id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_07c67e223022
unity_docs
editor
In Unity's 'Search the Asset Database', what is 'Provider filters' and how does it work?
The Asset Database provider has additional filters in the visual query builder . This table lists the filters and their textual query equivalents. Filter Search token Query example Description Type t:<type> t:script Find all script files. Component t:<component> t:TerrainGroup Find all assets that have a component with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94aae3a676cb
unity_docs
scripting
What is `Windows.WebCam.VideoCapture.OnVideoModeStoppedCallback` in Unity? Explain its purpose and usage.
VideoCapture.OnVideoModeStoppedCallback Declaration public delegate void OnVideoModeStoppedCallback ( Windows.WebCam.VideoCapture.VideoCaptureResult result ); Parameters Parameter Description result Indicates whether or not video mode was successfully deactivated. Description Called when video mode has be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34f4ed66753d
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefs.HasKey`.
ven key exists in PlayerPrefs, otherwise returns false. The following example demonstrates using PlayerPrefs.HasKey in a conditional statement. It prints one message to the console if the conditional statement returns true (if the key does exist in the PlayerPrefs data), and a different message if the conditional ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5d0353c7277
unity_docs
rendering
What is `PlayerSettings.WebGL` in Unity? Explain its purpose and usage.
WebGL class in UnityEditor Description WebGL specific player settings. Static Properties Property Description closeOnQuit If enabled, the Unity Player will close the browser running it when the application quits. compressionFormat CompressionFormat defines the compression type that the WebGL resources are en...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_16df0d6d8095
unity_docs
physics
In Unity's 'Collider types and performance', what is 'Prepare meshes for mesh colliders' and how does it work?
Mesh Collider components require a preprocessing step called “mesh cooking” to convert their geometry into an optimized format for efficient physics calculations. If this cooking occurs at runtime, it can cause significant CPU performance spikes. To learn more about Mesh Collider components, refer to Mesh colliders . Y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da1b02208f85
unity_docs
editor
What is `SpeedTreeImporter.scaleFactor` in Unity? Explain its purpose and usage.
SpeedTreeImporter.scaleFactor public float scaleFactor ; Description How much to scale the tree model compared to what is in the imported SpeedTree model file. In the Unity Editor, the SpeedTreeImporter provides a dropdown with the following unit conversion options, which drive the scaleFactor value: 0 - L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b53934668e2
unity_docs
scripting
What are the parameters of `Mesh.RecalculateBounds` in Unity?
Description Recalculate the bounding volume of the Mesh and all of its sub-meshes with the vertex data. After modifying vertices you should call this function to ensure the bounding volume is correct. Assigning triangles automatically recalculates the bounding volume. ```csharp using UnityEngine;public class Example : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f43a155ea38b
unity_docs
scripting
What is `Rendering.VirtualTexturing.System.Update` in Unity? Explain its purpose and usage.
Virtual Texturing is experimental and not ready for production use. The feature and documentation might be changed or removed in the future. System.Update Declaration public static void Update (); Description Update the virtual texturing system. This should be called every frame.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_39d873b61b7d
unity_docs
ui
In Unity's 'DropdownField', what is 'Create a DropdownField' and how does it work?
You can create a DropdownField with UI Builder, UXML, or C#. UI Builder To add options for a DropdownField in UI Builder, in the Inspector panel of the DropdownField, set the options in the Choices field. To set the default value, in the Inspector of the DropdownField, enter the numbering sequence of the option in Inde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4750a21585f3
unity_docs
rendering
What is `SpeedTreeImporter.receiveShadows` in Unity? Explain its purpose and usage.
SpeedTreeImporter.receiveShadows public bool[] receiveShadows ; Description Gets and sets an array of booleans to enable shadow receiving for each LOD. This setting controls whether the SpeedTree materials receive shadows from other objects in your Scene. Because the shadow-receiving effect comes with an incre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfcf7e822ec1
unity_docs
rendering
What is `Rendering.CullingOptions.DisablePerObjectCulling` in Unity? Explain its purpose and usage.
CullingOptions.DisablePerObjectCulling Description When this flag is set, Unity does not perform per-object culling. By default, when using a Scriptable Render Pipeline, Unity performs per-object culling for Lights and Reflection Probes. This means that Unity pairs visible Lights and Reflection Probes with visible ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c3e6b45c0b3
unity_docs
scripting
What is `SceneVisibilityManager.AreAnyDescendantsHidden` in Unity? Explain its purpose and usage.
SceneVisibilityManager.AreAnyDescendantsHidden Declaration public bool AreAnyDescendantsHidden ( SceneManagement.Scene scene ); Parameters Parameter Description scene Scene to check. Returns bool Returns true when at least one hidden descendant is found. Description Checks whether any descendants ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_16c8dd449275
unity_docs
rendering
In Unity's 'Convert data types', what is 'Individual converter' and how does it work?
To register an individual converter, use the DataBinding.sourceToUiConverters.AddConverter or DataBinding.uiToSourceConverters.AddConverter method. These methods require a delegate to convert a source type to a destination type. The delegate must be a ref delegate to enable bidirectional usage. The following example re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4fb3bf3f250
unity_docs
physics
Show me a Unity C# example demonstrating `PhysicsShapeGroup2D.AddPolygon`.
ShapeGroup2D . This index is used as the main reference when retrieving a shape. Description Adds a polygon shape ( PhysicsShapeType2D.Polygon ) to the shape group. A polygon shape is comprised of multiple edges (line segments) defined by all the specified vertices . NOTE : A polygon forms a closed shape and does...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_933775e94663
github
scripting
Write a Unity C# MonoBehaviour script called Mono Runner
```csharp using System; using UnityEngine; namespace THEBADDEST.Coroutines { /// <summary> /// This class allows us to start Coroutines from Non-Monobehaviour scripts. /// It has all the functions for coroutine actions e.g. a delayed call back method => AfterWait() /// </summary> public class MonoRunner : Mo...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_04259470a46a
unity_docs
rendering
What is `Rendering.BatchPackedCullingViewID` in Unity? Explain its purpose and usage.
BatchPackedCullingViewID struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description The ID of the view from which Unity invoked the culling. Public Methods Method Description Equals Returns true if the ID in the argument equals this view ID. GetHashCode Returns the hash code for th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6061bdd45048
unity_docs
scripting
What is `Rendering.VertexAttribute.BlendIndices` in Unity? Explain its purpose and usage.
VertexAttribute.BlendIndices Description Bone indices for skinned Meshes. Blend indices are usually integers. This vertex attribute maps to BLENDINDICES Semantic in the HLSL shading language. Additional resources: Mesh.HasVertexAttribute , Mesh.SetBoneWeights .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d0cb0955bc0
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.ScaleConstraint.scalingAxis`.
ScaleConstraint.scalingAxis public Animations.Axis scalingAxis ; Description The axes affected by the ScaleConstraint. Use this property to restrict the effect of the constraint on a particular axis. ```csharp using UnityEngine.Animations;public class ConstraintAxis { public void ConstrainOnlyOnXY(ScaleCons...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_27cfc33cadf0
github
scripting
Write a Unity C# MonoBehaviour script called Camera Frustum Tracker
```csharp using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables { [RequireComponent(typeof(Camera))] public class CameraFrustumTracker : MonoBehaviour { [SerializeField] private BoundsProperty_Writeable _cameraBoundsOutput = default; private Camera _camera; pri...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_39fc59020165
unity_docs
rendering
What is `Rendering.RendererUtils.RendererListDesc.ConvertToParameters` in Unity? Explain its purpose and usage.
RendererListDesc.ConvertToParameters Declaration public static Rendering.RendererListParams ConvertToParameters (ref Rendering.RendererUtils.RendererListDesc desc ); Returns RendererListParams If the RendererListDesc is valid, this returns a RendererListParams struct. Otherwise, this returns RendererLi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_30bfc795c183
unity_docs
physics
Explain 'Custom scripting symbols' in Unity.
In addition to Unity’s built-in scripting symbols , you can define your own custom scripting symbols. Where you define custom scripting symbols determines the scope in which they apply. You can define custom symbols in the following places: An asset file , for symbols that apply for all Editor and Player code in the pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fa0aed8c507
unity_docs
rendering
What is `ObjectFactory.CreateInstance` in Unity? Explain its purpose and usage.
ObjectFactory.CreateInstance Declaration public static Object CreateInstance (Type type ); Declaration public static T CreateInstance (); Parameters Parameter Description type The type of instance to create. Description Create a new instance of the given type. Use this method to create any type of ser...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fea482919aa4
unity_docs
rendering
Explain 'Transparent Cutout Diffuse' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Transparent Cutout Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. Cutout shader is an alternative way of displaying transparent objects. Differences between Cutout and regular Transparent shaders are: Thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ca14f1992379
unity_docs
physics
In Unity's 'Particle emissions and emitters', what is 'Rate of emission' and how does it work?
The rate of emission can be constant or can vary over the lifetime of the system according to a curve. If the Emission module Rate over Distance mode is active, a certain number of particles are released per unit of distance moved by the parent object. This is very useful for simulating particles that are actually crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a6350bf3715d
unity_docs
editor
In Unity's 'Introduction to building', what is 'Build modes' and how does it work?
Unity has different build modes, as follows: Release build: Includes only what’s necessary to run the application. This is the default build type. Development build: Includes scripting debug symbols and the Profiler . You can enable development builds in the Build Profiles window, which allows you to set further option...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0a53297fece
unity_docs
scripting
What is `SceneManagement.EditorSceneManager.SceneClosedCallback` in Unity? Explain its purpose and usage.
EditorSceneManager.SceneClosedCallback Declaration public delegate void SceneClosedCallback ( SceneManagement.Scene scene ); Parameters Parameter Description scene The Scene that was closed. Description Callbacks of this type which have been added to the sceneClosed event are called immediately after th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b2cd9848b5e
unity_docs
rendering
What is `Rendering.BatchFilterSettings.motionMode` in Unity? Explain its purpose and usage.
BatchFilterSettings.motionMode public MotionVectorGenerationMode motionMode ; Description Specifies how to generate motion vectors in this draw range. This corresponds to Renderer.motionVectorGenerationMode . If you set this to MotionVectorGenerationMode.Camera , Unity doesn't render the draw commands in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b1acf48beba
unity_docs
physics
What is `Physics2D.RaycastAll` in Unity? Explain its purpose and usage.
Physics2D.RaycastAll Declaration public static RaycastHit2D[] RaycastAll ( Vector2 origin , Vector2 direction , float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Parameter Description origin The po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5b3b22cce54
unity_docs
rendering
Show me a Unity code example for 'Convert data types'.
g instances requiring that specific type of conversion, without any additional configuration. Register global converters during application startup to ensure they’re available when needed. You can register global converters in static constructors, assembly initialization, or startup methods. The following example regis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_523ee9607b24
unity_docs
input
Give me an overview of the `AndroidInput` class in Unity.
AndroidInput class in UnityEngine / Implemented in: UnityEngine.InputLegacyModule Description AndroidInput provides support for off-screen touch input, such as a touchpad. Static Properties Property Description secondaryTouchEnabled Property indicating whether the system provides secondary touch input. seco...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03ed1400280e
unity_docs
scripting
Show me a Unity C# example demonstrating `ScriptableSingleton_1`.
riptableObject Description Generic class for storing Editor state. The ScriptableSingleton generic class allows you to create 'Manager' type classes in the Unity Editor. In classes that derive from ScriptableSingleton, serializable data you add survives assembly reloading in the Editor. Also, if the class uses the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2ef9c96084a
unity_docs
rendering
What is `IHVImageFormatImporter.wrapModeU` in Unity? Explain its purpose and usage.
IHVImageFormatImporter.wrapModeU public TextureWrapMode wrapModeU ; Description Texture U coordinate wrapping mode. Controls wrapping mode along texture U (horizontal) axis. Additional resources: Texture.wrapModeU , wrapMode , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31a2a9a95231
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.IsSubAsset`.
ject to query. entityId The EntityID of the asset object to query. Returns bool True if the asset is part of another asset, otherwise false. Description Checks whether the asset is part of another asset. Some assets may form part of another asset (for example, a procedural material can be part of a material ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16c060b3da42
unity_docs
animation
What is `ClipAnimationInfoCurve` in Unity? Explain its purpose and usage.
ClipAnimationInfoCurve struct in UnityEditor Description Stores a curve and its name that will be used to create additional curves during the import process. Properties Property Description curve The animation curve. name The name of the animation curve.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_645f3f4d16f7
unity_docs
rendering
Show me a Unity C# example demonstrating `GUIStyle.active`.
GUIStyle.active public GUIStyleState active ; Description Rendering settings for when the control is pressed down. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Assigns a texture to button for when the control // is pressed down Texture2D aTexture; void OnGUI() { if (!aTexture) {...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8f2743dee86
unity_docs
math
What is `HumanTrait.GetMuscleDefaultMax` in Unity? Explain its purpose and usage.
HumanTrait.GetMuscleDefaultMax Declaration public static float GetMuscleDefaultMax (int i ); Parameters Parameter Description i Muscle index. Description Get the default maximum value of rotation for a muscle in degrees. The default maximum applies to all three axes of rotation for the muscle. The indexin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c2683627520
unity_docs
scripting
Show me a Unity C# example demonstrating `Cloth.bendingStiffness`.
Cloth.bendingStiffness public float bendingStiffness ; Description Bending stiffness of the cloth. Must be between zero and one. Setting the value to zero disables bending stiffness simulation. In many cases, when you want a cloth to be more stiff, actually reducing the number of vertices will get you better ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f5e785946002
unity_docs
rendering
Explain 'Shader compilation' in Unity.
Every time you build your project, the Unity Editor compiles all the shaders that your build requires: every required shader variant, for every required graphics API. When you’re working in the Unity Editor, the Editor does not compile everything upfront. This is because compiling every variant for every graphics API c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2b14119aed5
unity_docs
scripting
What is `Experimental.GraphView.Pill` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Pill class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.VisualElement Description The Pill class includes methods for creating and managing a VisualElement that resembles a capsule. The Pill class include...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1bf494cc8a6
unity_docs
ui
What is `GUIContent.text` in Unity? Explain its purpose and usage.
GUIContent.text public string text ; Description The text contained. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void OnGUI() { GUI.Button(new Rect(0, 0, 100, 20), new GUIContent("Click me!")); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8cb8f6378a5
unity_docs
rendering
What is `LightTransport.BakeProgressState.IncrementCompletedWorkSteps` in Unity? Explain its purpose and usage.
BakeProgressState.IncrementCompletedWorkSteps Declaration public void IncrementCompletedWorkSteps (ulong steps ); Parameters Parameter Description steps Number of work steps to increment by. Description Increments the amount of completed work steps for this progress state. Updates the progress by adding t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_24
github
scripting
What does `MakeDefaultConfig` do in this Unity script? Explain its purpose and signature.
Create and return a default configuration which sets up all parameters to default values.The map starts up at San Francisco (37.771092, -122.468385) at an altitude above sea level of1781 meters while facing North (0 degrees heading). The default directory is set to WrldMaterials, whichpoints to Assets/Wrld/Resources/Wr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5760f301d5bb
unity_docs
scripting
What is `Rendering.RenderPipelineAsset_1` in Unity? Explain its purpose and usage.
RenderPipelineAsset<T0> class in UnityEngine.Rendering / Inherits from: Rendering.RenderPipelineAsset / Implemented in: UnityEngine.CoreModule Description An asset that produces a specific IRenderPipeline. Default implementation of IRenderPipelineAsset. This manages the lifecylces of inherited types, as well ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1e18cd8bb86
unity_docs
scripting
What is `MonoBehaviour.OnChildRectTransformDimensionsChange` in Unity? Explain its purpose and usage.
MonoBehaviour.OnChildRectTransformDimensionsChange() Description Called when a child RectTransform's dimensions change. Sent to the parent RectTransform when the dimensions of an immediate child RectTransform change. Use it in UI hierarchies where layouts need to respond dynamically to size changes. Important: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f3215b3d1e6
unity_docs
scripting
What is `ApplicationMemoryUsage` in Unity? Explain its purpose and usage.
ApplicationMemoryUsage enumeration Description Describes the application memory usage level. Properties Property Description Unknown The memory usage level of the application is not known. Low Application can safely allocate significant amounts of memory. Medium Application is at safe memory usage level and h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8bd95ffa502
unity_docs
math
Show me a Unity C# example demonstrating `Search.IQueryEngineFilter.AddOperator`.
a custom filter operator specific to the filter. Custom operators defined on a filter take precedence over operators defined globally on the QueryEngine . This is useful if you wish to have a custom operator only for a specific filter, or if you wish to override the default behavior of a built-in operator for a speci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ea73a3ec1b4
unity_docs
scripting
What is `PlayerSettings.gcIncremental` in Unity? Explain its purpose and usage.
PlayerSettings.gcIncremental public static bool gcIncremental ; Description Allows you to enable or disable incremental mode for garbage collection. Incremental mode is a feature which tries to reduce the interruption times caused by garbage collection. When enabled, the garbage collection task is split into s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c4aac126dcc
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.valid` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.valid public bool valid ; Description True if the object is valid. The object becomes invalid when its owner (see AudioSampleProvider.owner releases it. However, the provider cannot be destroyed while a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83f152a50f18
unity_docs
scripting
What is `Windows.WebCam.VideoCapture` in Unity? Explain its purpose and usage.
VideoCapture class in UnityEngine.Windows.WebCam / Implemented in: UnityEngine.CoreModule Description Records a video from the web camera directly to disk. This API is supported in the Windows Players (Standalone and Universal Windows Platform) and in the Windows Editor. The final video recording will be stored...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b804bce36589
unity_docs
rendering
Show me a Unity C# example demonstrating `LineRenderer.positionCount`.
LineRenderer.positionCount public int positionCount ; Description Set/get the number of vertices. positionCount returns the number of vertices in the line. The example below shows a line with 3 vertices. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(LineRenderer))] public cla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c48d18a2bde
unity_docs
scripting
What is `Unity.Loading.ContentLoadInterface.GetIntegrationTimeMS` in Unity? Explain its purpose and usage.
ContentLoadInterface.GetIntegrationTimeMS Declaration public static float GetIntegrationTimeMS (); Description Gets the target duration allowed per frame to integrate loading or unloading objects, in milliseconds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7d20cf083d6
unity_docs
scripting
In Unity's 'Handle Game Controller input', what is 'Example: Set up joystick button X for the Fire action' and how does it work?
Go to Edit > Project Settings . Select the Input Manager category. Open the Fire1 action. Set Positive Button to joystick button 15 . This code example demonstrates the corresponding input handling: ```csharp using UnityEngine; public class Shooting : MonoBehaviour { float bulletSpeed = 500f; public Transform gun; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2caff80599a3
unity_docs
editor
Give me an overview of the `PopupWindowContent` class in Unity.
PopupWindowContent class in UnityEditor Description Class used to implement content for a popup window. Additional resources: PopupWindow with full example. Properties Property Description editorWindow The EditorWindow that contains the popup content. Public Methods Method Description CreateGUI Creates ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9ed88bde80b
unity_docs
scripting
What is `UIElements.BoundsIntField` in Unity? Explain its purpose and usage.
BoundsIntField class in UnityEngine.UIElements / Inherits from: UIElements.BaseField_1 / Implemented in: UnityEngine.UIElementsModule Description A BoundsInt field. For more information, refer to UXML element BoundsIntField . Static Properties Property Description inputUssClassName USS class name o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8a97dc1770a
unity_docs
scripting
Show me a Unity C# example demonstrating `AnimationState.wrapMode`.
AnimationState.wrapMode public WrapMode wrapMode ; Description Wrapping mode of the animation. By default wrapMode is initialized to the value set in the Animation component's wrap mode. ```csharp using UnityEngine; using System.Collections;public class ExampleScript : MonoBehaviour { public Animation ani...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e8f0ff3af68
unity_docs
scripting
Show me a Unity C# example demonstrating `Component.transform`.
Component.transform public Transform transform ; Description The Transform attached to this GameObject . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { transform.Translate(1, 1, 1); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c433d3bc451f
unity_docs
performance
Give me an overview of the `WSABuildType` class in Unity.
WSABuildType enumeration Description Build configurations for Windows Store Visual Studio solutions. Properties Property Description Debug Debug configuation. No optimizations, profiler code enabled. Release Release configuration. Optimization enabled, profiler code enabled. Master Master configuation. Optimi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4038f17dd68b_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Holds the before and after value during a property chagnge Signature: ```csharp public abstract class PropertyChangedEvent<T> : UnityEvent<T,T>, IEvent ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_d371ccb2768a
unity_docs
scripting
What is `GUILayout.PasswordField` in Unity? Explain its purpose and usage.
GUILayout.PasswordField Declaration public static string PasswordField (string password , char maskChar , params GUILayoutOption[] options ); Declaration public static string PasswordField (string password , char maskChar , int maxLength , params GUILayoutOption[] options ); Declaration public static s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63ae272162b0
unity_docs
scripting
Show me a Unity C# example demonstrating `ControllerColliderHit.gameObject`.
ControllerColliderHit.gameObject public GameObject gameObject ; Description The game object that was hit by the controller. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { // Objects we touch, move them to position (0, 0, 0) hit....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd3d1eb61522
unity_docs
animation
What is `PlayerSettings.SplashScreen.animationLogoZoom` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.animationLogoZoom public static float animationLogoZoom ; Description The target zoom (from 0 to 1) for the logo when it reaches the end of the logo animation's total duration. Only used when animationMode is AnimationMode.Custom .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_13
github
scripting
What does `ClearCustomRenderCamera` do in this Unity script? Explain its purpose and signature.
If SetCustomRenderCamera has previously been called, this resets the CameraApi render camerabehavior back to its default, where the WRLD SDK controls a UnityEngine.Camera instance supplied via SetControlledCamera. Signature: ```csharp public void ClearCustomRenderCamera() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_df240c1a374b
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.frequency`.
ParticleSystem.NoiseModule.frequency public float frequency ; Description Low values create soft, smooth noise, and high values create rapidly changing noise. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private Pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_70146c2d89fe
unity_docs
xr
Explain 'Managed memory' in Unity.
Unity’s managed memory system is a C# scripting environment based on the Mono or IL2CPP Virtual Machines (VMs). The benefit of the managed memory system is that it manages the release of memory, so you don’t need to manually request the release of memory through your code. It makes use of a garbage collector to automat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71220b0685c0
unity_docs
rendering
What is `ParticleSystem.SetCustomParticleData` in Unity? Explain its purpose and usage.
ParticleSystem.SetCustomParticleData Declaration public void SetCustomParticleData (List<Vector4> customData , ParticleSystemCustomData streamIndex ); Parameters Parameter Description customData The array of per-particle data. streamIndex Which stream to assign the data to. Description Set a stream o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5c8e37a77b34
unity_docs
rendering
In Unity's 'Version control integrations', what is 'Checking out files' and how does it work?
In some version control systems, such as Perforce, versioned files are read-only by default, and require you to check them out before you edit them (unless you have enabled the Work offline setting). When you work with versioned Assets from the Editor, the Inspector displays a Check Out button that enables file editing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_967a6307b5d9_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Gets the overriding Sprite of a given Sprite.The original Sprite that is overridden Signature: ```csharp public Sprite this[Sprite originalSprite] ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_def98b4e9c27
unity_docs
rendering
In Unity's 'Build your application for Android', what is 'Publishing format' and how does it work?
Unity can build Android applications in the following publishing formats: APK Android App Bundle (AAB) By default, Unity builds Android applications in the APK publishing format. To make Unity build the Android application as an AAB: Select File > Build Profiles . From the list of platforms in the Platform pane, select...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ae03472d575
unity_docs
scripting
Show me a Unity C# example demonstrating `Logger.Log`.
logType The type of the log message. tag Used to identify the source of a log message. It usually identifies the class where the log call occurs. message String or object to be converted to string representation for display. context Object to which the message applies. Description Logs message to the Unity C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80d14e0c9495
unity_docs
editor
What are the parameters of `Unity.Profiling.ProfilerRecorder.ctor` in Unity?
Description Constructs ProfilerRecorder instance with a Profiler metric name and category. Use to initialize ProfilerRecorder and associate it with a specific Profiler metric. By default, ProfilerRecorder does not start collecting data immediately. Use ProfilerRecorderOptions.StartImmediately to enable collection toget...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_434949dfbde2
unity_docs
rendering
What is `GUIStyle.overflow` in Unity? Explain its purpose and usage.
GUIStyle.overflow public RectOffset overflow ; Description Extra space to be added to the background image. This is used if your image has a drop shadow and you want to extend the background image beyond the rectangles specified for gui elements that use this style. ```csharp using UnityEngine;public class ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ce9ec7922350
unity_docs
ui
In Unity's 'UIE-transition-event-example', what is 'Create the example' and how does it work?
Create a project in Unity with any template. From the menu, select Assets > Create > UI Toolkit > Editor Window . In the UI Toolkit Editor Window Creator window, enter TransitionExample . Save your changes. This creates three files as TransitionExample.cs , TransitionExample.uss , and TransitionExample.uxml . Replace T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c394d785194
unity_docs
xr
Explain 'Set up an XR scene' in Unity.
To set up an XR scene , add an XR Origin . These objects are collections of GameObjects and components that provide a frame of reference for transforming spatial tracking data into the scene, including controlling the scene camera . When you add an XR Origin to a scene, it controls the attached camera to track the user...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_508d5d01080d
unity_docs
rendering
What is `ParticleSystemJobs.IJobParticleSystemParallelFor.Execute` in Unity? Explain its purpose and usage.
IJobParticleSystemParallelFor.Execute Declaration public void Execute ( ParticleSystemJobs.ParticleSystemJobData jobData , int index ); Parameters Parameter Description jobData Contains the particle properties. index The index of the current particle. Description Implement this method to access and mod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9a42226568d2
unity_docs
rendering
Show me a Unity code example for 'Optimize Web platform for mobile'.
. Use a faster build option during development. For other settings that impact build size, refer to Recommended Player settings to optimize your Web build and Remove unused resources from your Web build . ## Use C# to enable the optimize for size setting If you have a script that edits settings and you want to enable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51a4448d8017
unity_docs
ui
What is `UIElements.BaseListView.allowAdd` in Unity? Explain its purpose and usage.
BaseListView.allowAdd public bool allowAdd ; Description This property allows the user to allow or block the addition of an item when clicking on the Add Button. It must return true or false . If the callback is not set to false , any Add operation will be allowed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e64634fb9b54
unity_docs
rendering
What is `AssetImporters.MaterialDescription.GetFloatPropertyNames` in Unity? Explain its purpose and usage.
MaterialDescription.GetFloatPropertyNames Declaration public void GetFloatPropertyNames (List<string> names ); Parameters Parameter Description names The list of retrieved property names. Description Retrieves the property names of type float for this material.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98e5677a535e
unity_docs
physics
What is `PlayerSettings.visibleInBackground` in Unity? Explain its purpose and usage.
PlayerSettings.visibleInBackground public static bool visibleInBackground ; Description On Windows, shows the application in the background if the Fullscreen Windowed mode is used. This setting lets the Windows Standalone Player running in Fullscreen mode remain visible even if you switch to another app. Typic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_12d80b04d39f
unity_docs
ui
Explain 'Use Toggle to create a conditional UI' in Unity.
This example uses a Toggle to create a conditional UI. ## Example overview The example creates a custom Editor window with two toggles. You can use the toggles to do the following: Show or hide a label Activate or deactivate a button You can find the completed files that this example creates in this GitHub repository...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e21f604fa827
unity_docs
rendering
In Unity's 'Optimize lighting in the Built-In Render Pipeline', what is 'Prioritize lights' and how does it work?
To avoid lighting GameObjects with multiple per-pixel lights, prioritize which lights provide per-pixel lighting based on which GameObjects they light. For example, in a driving game, prioritize the car headlights as a per-pixel light, but deprioritize the rear lights and distant lampposts. To decrease the number of pe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfee3d191856
unity_docs
editor
What are the parameters of `PrefabUtility.GetCorrespondingObjectFromOriginalSource` in Unity?
Returns TObject The corresponding object from the original source or null. Description Retrieves the object of origin for the given object. For any object you pass to this method, Unity follows through the chain of corresponding objects until there are no more and returns the last one found. You can use this method to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b00d5e0e07ff
unity_docs
rendering
Explain 'Configure shadow cascades' in Unity.
When you enable shadow cascades in your project, you can configure the number of cascades and the distances where each cascade ends. In URP, configure shadow cascades using the Cascade Count property, and then configure the cascade split distances. To visualize shadow cascades in URP, use the Shadow Cascades view in th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00f3dd7ae5c6
unity_docs
networking
What is `XR.XRDisplaySubsystemDescriptor.GetMirrorBlitModeByIndex` in Unity? Explain its purpose and usage.
XRDisplaySubsystemDescriptor.GetMirrorBlitModeByIndex Declaration public void GetMirrorBlitModeByIndex (int index , out XR.XRMirrorViewBlitModeDesc mode ); Parameters Parameter Description mode XRMirrorViewBlitMode to populate. index Index of the mirror blit mode to get. Description Get a supported m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_23f61522a7f7
github
scripting
Write a Unity C# script called XR Math Utils
```csharp using System.Runtime.InteropServices; using UnityEngine.UIElements; namespace com.rayneo.xr.extensions { public static class XRMathUtils { /// <summary> /// runtime右手坐标系结果转换成Unity左手系结果 /// </summary> /// <param name="rotation">旋转, 四元数, [x,y,z,w]</param> /// <pa...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_191521a4fc61
unity_docs
scripting
What is `NVIDIA.NVUnityPlugin` in Unity? Explain its purpose and usage.
NVUnityPlugin class in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description Provides methods to manage loading and unloading NVIDIA module plugins. Static Methods Method Description IsLoaded Checks wether the native plugin NVUnityPlugin in the NVIDIA native module has been loaded or not....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfaa7f4191dc
unity_docs
math
Show me a Unity C# example demonstrating `AI.NavMesh.GetAreaFromName`.
NavMesh.GetAreaFromName Declaration public static int GetAreaFromName (string areaName ); Parameters Parameter Description areaName Name of the area to look up. Returns int Index if the specified area name exists, or -1 if no area type has the specified name. Description Returns the area index for a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0617ded12cb1
unity_docs
rendering
What is `MipmapLimitDescriptor.groupName` in Unity? Explain its purpose and usage.
MipmapLimitDescriptor.groupName public string groupName ; Description The TextureMipmapLimitGroup to use the mipmap limit of. The texture uses the mipmap limit of groupName if you set MipmapLimitDescriptor.useMipmapLimit to true . If no group is provided (either String.Empty() or null ), the texture w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_87a4f18709ec
unity_docs
rendering
In Unity's 'Upgrade to Unity 2022 LTS', what is 'Change to generated lightmap UVs' and how does it work?
Unity’s UV generation procedure has changed. Lightmaps might appear corrupted in projects that use the Generate Lightmap UVs option in Model Import Settings. To resolve this problem, rebake all of the lightmaps in your project. This change only affects projects that use Generate Lightmap UVs.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a9026b8f105a
unity_docs
audio
In Unity's 'Activating and enabling Profiler modules', what is 'Reordering Profiler modules' and how does it work?
To change the order that the Profiler modules appear in the window, use the Profiler Module Editor : Open the Profiler window ( Window > Analysis > Profiler ) Select the Profiler Modules dropdown Select the cog icon (⚙). The Profiler Module Editor opens in its own window. Click and drag the handle (≡) next to the modul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19b89a4206d9
unity_docs
math
What is `Experimental.GraphView.ISelectable.HitTest` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ISelectable.HitTest Declaration public bool HitTest ( Vector2 localPoint ); Parameters Parameter Description localPoint The point. Returns bool True if on target. Description See if point is on target.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d7b03e829f2
unity_docs
math
What is `TerrainData.GetClampedDetailPatches` in Unity? Explain its purpose and usage.
TerrainData.GetClampedDetailPatches Declaration public Vector2Int[] GetClampedDetailPatches (float density ); Parameters Parameter Description density The detail density value. See Terrain.detailObjectDensity . Description Returns an array of detail patches, which are each identified by X-Z coordinates. D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5faad8846b3
unity_docs
scripting
What is `AndroidJavaProxy.hashCode` in Unity? Explain its purpose and usage.
AndroidJavaProxy.hashCode Declaration public int hashCode (); Returns int Returns the hash code of the java proxy object. Description The equivalent of the java.lang.Object hashCode() method.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1602c63c2a8
unity_docs
scripting
What is `Rendering.VirtualTexturing.Streaming.SetGPUCacheSettings` in Unity? Explain its purpose and usage.
Virtual Texturing is experimental and not ready for production use. The feature and documentation might be changed or removed in the future. Streaming.SetGPUCacheSettings Declaration public static void SetGPUCacheSettings (GPUCacheSetting[] cacheSettings ); Description Sets the GPU cache settings used by Strea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e649fc6201c
unity_docs
physics
Give me an overview of the `AreaEffector2D` class in Unity.
AreaEffector2D class in UnityEngine / Inherits from: Effector2D / Implemented in: UnityEngine.Physics2DModule Description Applies forces within an area. When the source Collider2D is a trigger, the effector will apply forces whenever the target Collider2D overlaps the source. When the source Collider is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76c974462f4a
unity_docs
scripting
What is `Input.GetButton` in Unity? Explain its purpose and usage.
Input.GetButton Declaration public static bool GetButton (string buttonName ); Parameters Parameter Description buttonName The name of the button such as Jump. Returns bool True when an axis has been pressed and not released. Description Returns true while the virtual button identified by buttonName...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d9985f234af
unity_docs
input
What is `Touch.fingerId` in Unity? Explain its purpose and usage.
Touch.fingerId public int fingerId ; Description The unique index for the touch. All current touches are reported in the Input.touches array or by using the Input.GetTouch function with the equivalent array index. However, the array index is not guaranteed to be the same from one frame to the next. The fin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf9514c41c2f
unity_docs
scripting
What is `UIElements.StyleBackgroundRepeat` in Unity? Explain its purpose and usage.
StyleBackgroundRepeat struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IStyleValue<T0> Description Represents a style value that can be either a BackgroundRepeat or a StyleKeyword . Properties Property Description keyword The style keyword. va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f39116829819
unity_docs
scripting
Explain 'Technical limitations' in Unity.
Web technology imposes restrictions on Unity web applications designed to run in web browsers. Make sure you’re aware of the following technical limitations before you build your application for the Web platform. ## Platform support Most popular desktop browser versions support Unity Web content, but do note that dif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ff5b23f56444
unity_docs
performance
In Unity's 'Job dependencies', what is 'An example of multiple jobs and dependencies' and how does it work?
The following is an example of multiple jobs that have multiple dependencies. It’s best practice to put the job code ( MyJob and AddOneJob ) in a separate file to the Update and LateUpdate code, but for the purposes of clarity, this example is one file: ```csharp using UnityEngine; using Unity.Collections; using Unity....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08621fc8f966
unity_docs
scripting
What is `DeviceType.Console` in Unity? Explain its purpose and usage.
DeviceType.Console Description A stationary gaming console. ```csharp //Attach this script to a GameObject //This script checks what device type the Application is running on and outputs this to the consoleusing UnityEngine;public class DeviceTypeExample : MonoBehaviour { //This is the Text for the Label at the to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.