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_sr_8754e7a4a2ba
unity_docs
scripting
What is `SystemLanguage.ChineseSimplified` in Unity? Explain its purpose and usage.
SystemLanguage.ChineseSimplified Description ChineseSimplified. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Simplified Chinese language if (Application.systemLanguage == SystemLanguage.ChineseSimplified) { //Outp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eab092b74d4f
unity_docs
scripting
What is `AI.NavMeshBuildSettings.minRegionArea` in Unity? Explain its purpose and usage.
NavMeshBuildSettings.minRegionArea public float minRegionArea ; Description The approximate minimum area of individual NavMesh regions. This property allows you to cull away small non-connected NavMesh regions. NavMesh regions whose surface area is smaller than the specified value, will be removed. Note: some r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b547208efd62
github
scripting
Write a Unity Editor script for Curve Component Inspector
```csharp namespace CurvePickerTool.Samples { using System.Collections.Generic; using UnityEditor; using UnityEngine; [CustomEditor(typeof(CurveComponent))] public class CurveComponentInspector : Editor { private CurveComponent component; private CurvePickerGUI curveGUI; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_a1e13af5465e
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.RotationBySpeedModule.y`.
ParticleSystem.RotationBySpeedModule.y public ParticleSystem.MinMaxCurve y ; Description Rotation by speed curve for the y-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ada0c6f68a15
unity_docs
scripting
In Unity's 'Vector2Field', what is 'Create a Vector2Field' and how does it work?
You can create a Vector2Field with UI Builder, UXML, and C#. The following C# example creates a Vector2Field and sets the default value to (15.5, 12.5) : ``` Vector2Field myElement = new Vector2Field("Label text"); // Set the default value to (15.5, 12.5). myElement.value = new Vector2(15.5f, 12.5f); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_9
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Default material to be assigned to Wrld Landmarks.Landmarks are special buildings which are dotted around the globe. They have a custom texturewhich will be automatically assigned to this material's diffuse value. Setting this value to null usesa standard diffuse material. Signature: ```csharp public Material Override...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d65e6fefed33
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.CalcSize`.
GUIStyle.CalcSize Declaration public Vector2 CalcSize ( GUIContent content ); Description Calculate the size of some content if it is rendered with this style. This function does not take word wrapping into account. To do that, you need to determine the allocated width and then call CalcHeight to figure...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9eb835d809a
unity_docs
scripting
What is `Unity.Android.Gradle.LocalPropertiesFile` in Unity? Explain its purpose and usage.
LocalPropertiesFile class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseGradleFile Description The C# definition of local.properties file. For more information about the file, see Android's documentation: Gradle properties files Properties Property Description CMakeDir The C# definition...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f801282f2a15
unity_docs
rendering
What is `Rendering.RenderPipelineManager.pipelineSwitchCompleted` in Unity? Explain its purpose and usage.
RenderPipelineManager.pipelineSwitchCompleted public static bool pipelineSwitchCompleted ; Description Indicate when Render Pipeline switch is in progress. The value is false if the render pipeline is in the process of being switched. The value is true if the switch has completed and the render pipeline is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e88aa342a4c2_doc_15
github
scripting
What does `SendDirectTextMessage` do in this Unity script? Explain its purpose and signature.
You can send a message to a player with playerId being the playerId ofthe player that the message should be sent to, and message being the message that should be sent.The user id or user nameThe direct message Signature: ```csharp public Task SendDirectTextMessage(string _userId, string _message) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_623bc02cce5e
unity_docs
scripting
What is `LightTransport.ReferenceContext.Wait` in Unity? Explain its purpose and usage.
ReferenceContext.Wait Declaration public bool Wait ( LightTransport.EventID id ); Parameters Parameter Description id ID of the event. Returns bool Returns true of the event completed successfully. Description Wait for an asynchronous event. The ReferenceContext implementation of the IDeviceCont...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_566e0898e348
unity_docs
scripting
What is `TerrainData.heightmapResolution` in Unity? Explain its purpose and usage.
TerrainData.heightmapResolution public int heightmapResolution ; Description The size of the heightmap in texels for both the width and height. When setting the heightmap resolution, Unity clamps the value to one of 33, 65, 129, 257, 513, 1025, 2049, or 4097.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79582f5cddad
unity_docs
scripting
What are the parameters of `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.AddressOf` in Unity?
Returns void* A void pointer that represents the memory address of the object. This pointer allows direct access to the memory location. Manage this pointer carefully to prevent runtime errors. Description Obtains the memory address of the specified object as a pointer. The AddressOf method retrieves the memory address...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd111eaa320c
unity_docs
editor
What is `BuildPlayerWindow.DefaultBuildMethods` in Unity? Explain its purpose and usage.
DefaultBuildMethods class in UnityEditor Description Default build methods for the BuildPlayerWindow. Static Methods Method Description BuildPlayer The built-in, default handler for executing a player build. Can be used to provide default functionality in a custom build player window. GetBuildPlayerOptions Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22207104c444
unity_docs
physics
Show me a Unity C# example demonstrating `Application.quitting`.
cus. OnApplicationPause(bool) is called when the application pauses on losing focus or resumes on regaining focus. UWP : On UWP apps, there's no application quit event; therefore, consider using OnApplicationFocus event when focusStatus equals false. To prevent the Player application from quitting, refer to the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be53da1c827a
unity_docs
rendering
What is `ScalableBufferManager.ResizeBuffers` in Unity? Explain its purpose and usage.
ScalableBufferManager.ResizeBuffers Declaration public static void ResizeBuffers (float widthScale , float heightScale ); Parameters Parameter Description widthScale New scale factor for the width that the ScalableBufferManager uses to resize all render textures that are marked as DynamicallyScalable . The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_032bbceac433
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Estonian`.
SystemLanguage.Estonian Description Estonian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Estonian language if (Application.systemLanguage == SystemLanguage.Estonian) { //Outputs into console that the system is E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ef89b94e238
unity_docs
scripting
What is `Camera.onPreRender` in Unity? Explain its purpose and usage.
Camera.onPreRender public static Camera.CameraCallback onPreRender ; Description Delegate that you can use to execute custom code before a Camera renders the scene. In the Built-in Render Pipeline, Unity calls this onPreRender before any Camera begins rendering. To execute custom code at this point, crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a475f2b3251e
unity_docs
ui
What is `Accessibility.AccessibilityRole` in Unity? Explain its purpose and usage.
AccessibilityRole enumeration Description Describes the role of an accessibility node. Properties Property Description None The accessibility node has no roles. Button The accessibility node behaves like a button. Image The accessibility node behaves like an image. StaticText The accessibility node behaves l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2778b7f8934c
unity_docs
scripting
What is `Experimental.GraphView.Edge` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Edge class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.GraphElement Description The GraphView edge element. Properties Property Description candidatePosition The edge's end position while...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3a92dd8a00a
unity_docs
scripting
What is `UIElements.UQueryBuilder_1.Where` in Unity? Explain its purpose and usage.
UQueryBuilder<T0>.Where Declaration public UQueryBuilder<T> Where (Func<T,bool> selectorPredicate ); Parameters Parameter Description selectorPredicate Predicate that must return true for selected elements. Returns UQueryBuilder<T> QueryBuilder configured with the associated selection rules. Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_824e5858cecc
unity_docs
editor
What is `Editor.finishedDefaultHeaderGUI` in Unity? Explain its purpose and usage.
Editor.finishedDefaultHeaderGUI Description An event raised while drawing the header of the Inspector window, after the default header items have been drawn. Add an event handler to this event in order to draw additional items in the header for the Editor passed to the event handler method. The following example ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8fa1da92240
unity_docs
scripting
What is `NetworkReachability.ReachableViaLocalAreaNetwork` in Unity? Explain its purpose and usage.
NetworkReachability.ReachableViaLocalAreaNetwork Description Network is reachable via WiFi or cable. ```csharp //Attach this script to a GameObject //This script checks the device’s ability to reach the internet and outputs it to the console windowusing UnityEngine;public class Example : MonoBehaviour { string m_R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b599efa3a23e
unity_docs
rendering
What is `TerrainTools.TerrainInspectorUtility` in Unity? Explain its purpose and usage.
TerrainInspectorUtility class in UnityEditor.TerrainTools Description Utility class for Terrain Inspector GUI. Use this class to add Terrain Inspector GUI elements to custom inspector windows. Static Methods Method Description TerrainShaderValidationGUI Checks whether a Material is compatible with Terrain.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36e4b871b180
unity_docs
scripting
What is `AssetBundleLoadResult` in Unity? Explain its purpose and usage.
AssetBundleLoadResult enumeration Description The result of an Asset Bundle Load or Recompress Operation. Properties Property Description Success The operation completed successfully. Cancelled The operation was cancelled. NotMatchingCrc The decompressed Asset data did not match the precomputed CRC. This may ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_29341861c2bd
unity_docs
ui
In Unity's 'Best practices for USS', what is 'Selector architecture consideration' and how does it work?
All USS selectors are applied at runtime so the architecture affects initialization performance. USS selectors are applied when an element first appears or when its classes change: The :hover selector is the main culprit for selectors to cause interactivity issues and a re-styling. The performance impact appears under ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_18
github
scripting
What does `UpdateGraphicsApi` do in this Unity script? Explain its purpose and signature.
Shows the Update Graphics API window.if the editor graphics device has changed Signature: ```csharp public static void UpdateGraphicsApi(bool needsReset) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b9483b53ea21
unity_docs
input
Show me a Unity C# example demonstrating `TouchPhase.Moved`.
TouchPhase.Moved Description A finger moved on the screen. ```csharp //Attach this script to an empty GameObject //Create some UI Text by going to Create>UI>Text. //Drag this GameObject into the Text field of your GameObject’s Inspector window.using UnityEngine; using System.Collections; using UnityEngine.UI;public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2403329c2eeb
unity_docs
scripting
What is `UIElements.Foldout.toggleUssClassName` in Unity? Explain its purpose and usage.
Foldout.toggleUssClassName public static string toggleUssClassName ; Description The USS class name of Toggle sub-elements in Foldout elements. Unity adds this USS class to the Toggle sub-element of every Foldout . Any styling applied to this class affects every Toggle sub-element located beside, or bel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_265fab1330d7
unity_docs
rendering
What is `PlatformIcon.layerCount` in Unity? Explain its purpose and usage.
PlatformIcon.layerCount public int layerCount ; Description The number of texture layers the icon slot currently contains. Cannot be smaller than PlatformIcon.minLayerCount or larger than PlatformIcon.maxLayerCount .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_65c15af12a16
unity_docs
scripting
In Unity's 'Audio Source component reference', what is 'Audio Source component settings' and how does it work?
Use the following settings to change how an audio source plays an audio clip. Property Description Audio Resource Reference to the audio resource the audio source will play. You can assign a Audio Clip or an Audio Random Container to this property. Output Determines how the audio source will route and process the audio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7f4736c59405
unity_docs
editor
In Unity's 'Introduction to assemblies in Unity', what is 'Defining assemblies' and how does it work?
To organize your project code into assemblies, create a folder for each desired assembly and move the scripts that should belong to each assembly into the relevant folder. Then create Assembly Definition assets to specify the assembly properties. Unity compiles all the scripts in a folder that contains an Assembly Defi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_380a650c32bb
unity_docs
rendering
Give me an overview of the `LightmapEditorSettings` class in Unity.
LightmapEditorSettings class in UnityEditor Description This class is now obsolete. Use LightingSettings . The bake can be started via Lightmapping class. Additional resources: Lightmapping . Static Properties Property Description reflectionCubemapCompression Determines how Unity will compress baked refle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d753477d456
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemMove` in Unity? Explain its purpose and usage.
UnsafeUtility.MemMove Declaration public static void MemMove (void* destination , void* source , long size ); Parameters Parameter Description destination A pointer to the start of the destination memory block. Ensure this block is large enough to hold the specified number of bytes to prevent overflow. so...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_795653ce7afe
unity_docs
editor
What is `AssetDatabase.GetSubFolders` in Unity? Explain its purpose and usage.
AssetDatabase.GetSubFolders Declaration public static string[] GetSubFolders (string path ); Parameters Parameter Description path The path of a directory in the Assets folder relative to the project folder root. Returns string[] Returns an array of the folder's subdirectories. Description Obtains th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f925a3b4dbf
unity_docs
scripting
Explain 'Share information about a rendering event' in Unity.
To help you share information for a particular event, the Frame Debugger window can copy the information in the user interface to the clipboard. It can copy information for a single property, for all the properties in a properties section, or for an entire event. This means you don’t need to take one or multiple screen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1007aa62b703
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.Lerp`.
value V equals V = A + ( B − A ) × t where 0 < t < 1. The method interpolates between points a and b , such that: When t ≤ 0, this method returns vector a . When 0 < t < 1, this method returns a vector that points along the line between a and b . The distance along the line corresponds to the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b72f8e9dae3
unity_docs
rendering
Explain 'Use 16-bit precision in shaders' in Unity.
By default, GPUs use 32-bit precision. You can use 16-bit precision instead in GPU calculations, which has the following benefits on mobile platforms: Shaders use less memory, bandwidth, and power. Calculations are faster. Using fewer bits can improve how the GPU allocates registers. ## Create a 16-bit variable To us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2fdbe66f926
unity_docs
scripting
Show me a Unity C# example demonstrating `IMGUI.Controls.ArcHandle`.
display control handles for editing the angle and radius of an arc. The arc originates at Vector3.forward multiplied by the radius and rotates around Vector3.up . The handle rendered by this class's DrawHandle method is affected by global state in the Handles class, such as Handles.matrix and Handles.color ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f4fbabc6258
unity_docs
scripting
What is `TakeInfo.defaultClipName` in Unity? Explain its purpose and usage.
TakeInfo.defaultClipName public string defaultClipName ; Description This is the default clip name for the clip generated for this take. Normally it should be the same than TakeInfo.name unless you are using the @ convention. In this case the default clip name should be set to the same value than the name aft...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cef152dc8988
unity_docs
editor
What is `Search.ISearchView.SetSearchText` in Unity? Explain its purpose and usage.
ISearchView.SetSearchText Declaration public void SetSearchText (string searchText , Search.TextCursorPlacement moveCursor ); Declaration public void SetSearchText (string searchText , Search.TextCursorPlacement moveCursor , int cursorInsertPosition ); Parameters Parameter Description searchText ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59129326debc
unity_docs
scripting
What is `ObjectChangeKind` in Unity? Explain its purpose and usage.
ObjectChangeKind enumeration Description This enumeration describes the different kind of changes that can be tracked in an ObjectChangeEventStream . Each event has a corresponding type in ObjectChangeEvents . ```csharp using UnityEditor; using UnityEngine;[InitializeOnLoad] public class ObjectChangeEventsExampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5562ea998c01
unity_docs
rendering
What is `Rendering.ShadowSplitData.SetCullingPlane` in Unity? Explain its purpose and usage.
ShadowSplitData.SetCullingPlane Declaration public void SetCullingPlane (int index , Plane plane ); Parameters Parameter Description index The index of the culling plane to set. plane The culling plane. Description Sets a culling plane.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7f2eefdc6e78
github
scripting
Write a Unity C# MonoBehaviour script called Spawn Object
```csharp using UnityEngine; /// <summary> /// Spawn an object at a transform's position /// </summary> public class SpawnObject : MonoBehaviour { [Tooltip("The object that will be spawned")] public GameObject originalObject = null; [Tooltip("The transform where the object is spanwed")] public Transf...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_5905b8ac2f86
unity_docs
rendering
What is `Experimental.Playables.MaterialEffectPlayable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. MaterialEffectPlayable struct in UnityEngine.Experimental.Playables / Implemented in: UnityEngine.CoreModule Implements interfaces: IPlayable Description An implementation of IPlayable that allows application of a Materia...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6310b9c26ec1
unity_docs
animation
What is `Animator.parameters` in Unity? Explain its purpose and usage.
Animator.parameters public AnimatorControllerParameter[] parameters ; Description The AnimatorControllerParameter list used by the animator. (Read Only) In Play mode, the list comes from the first playable controller. Otherwise, the list comes from the AnimatorController associated with this animator.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e9792965f34
unity_docs
math
Show me a Unity C# example demonstrating `HumanTrait.GetMuscleDefaultMin`.
HumanTrait.GetMuscleDefaultMin Declaration public static float GetMuscleDefaultMin (int i ); Parameters Parameter Description i Muscle index. Description Get the default minimum value of rotation for a muscle in degrees. The default minimum 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_9ae17e0539a9
unity_docs
scripting
What is `SearchService.AdvancedObjectSelectorValidatorAttribute.ctor` in Unity? Explain its purpose and usage.
AdvancedObjectSelectorValidatorAttribute Constructor Declaration public AdvancedObjectSelectorValidatorAttribute (string id ); Parameters Parameter Description id A unique identifier for this advanced object selector validator. Description Registers a method to act as an advanced object selector validator....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fdd0fc73825
unity_docs
editor
What is `Tilemaps.Tilemap.GetEditorPreviewTileFlags` in Unity? Explain its purpose and usage.
Tilemap.GetEditorPreviewTileFlags Declaration public Tilemaps.TileFlags GetEditorPreviewTileFlags ( Vector3Int position ); Parameters Parameter Description position Position of the Tile on the Tilemap . Returns TileFlags TileFlags from the editor preview Tile . Description Gets the TileFlags ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_528a1a29d5b2
unity_docs
rendering
What is `Rendering.CommandBuffer.SetGlobalFloat` in Unity? Explain its purpose and usage.
CommandBuffer.SetGlobalFloat Declaration public void SetGlobalFloat (string name , float value ); Declaration public void SetGlobalFloat (int nameID , float value ); Description Add a "set global shader float property" command. When the command buffer will be executed, a global shader float property wil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf98c37ce013
unity_docs
xr
What is `XR.XRSettings.StereoRenderingMode` in Unity? Explain its purpose and usage.
StereoRenderingMode enumeration Description Enum type signifying the different stereo rendering modes available. To find out what the current stereo rendering mode used in your Unity project at runtime, use XRSettings.stereoRenderingMode . This method returns a value of type StereoRenderingMode. Properties Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07689806c297
unity_docs
editor
What is `GlobalObjectId.CompareTo` in Unity? Explain its purpose and usage.
GlobalObjectId.CompareTo Declaration public int CompareTo ( GlobalObjectId other ); Parameters Parameter Description other The other GlobalObjectId to compare with this instance. Returns int Returns an integer that represents the relative sort order positions of the current instance and the other Glob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_823d502777ad
unity_docs
editor
What is `EditorGUI.indentLevel` in Unity? Explain its purpose and usage.
EditorGUI.indentLevel public static int indentLevel ; Description The indent level of the field labels. EditorGUILayout.LabelField will display the string given as an argument. This string can be displayed at a horizontal position, and the position changed by indentLevel . As indentLevel increases the label...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a636b61da8f0
unity_docs
physics
Explain 'Create a configurable joint' in Unity.
To create a custom configurable joint and have fine control over behavior, you can use the Configurable Joint . You can also use the Configurable Joint to implement physics forces that drive a GameObject to a specific target velocity or position. Topic Description Customize movement constraint with Configurable Joints ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9421aef6257e
unity_docs
math
What is `Mathf.HalfToFloat` in Unity? Explain its purpose and usage.
Mathf.HalfToFloat Declaration public static float HalfToFloat (ushort val ); Parameters Parameter Description val The half precision value to convert. Returns float The decoded 32-bit float. Description Convert a half precision float to a 32-bit floating point value. Additional resources: Mathf.Fl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac665a6d52f1
unity_docs
xr
What is `Networking.UnityWebRequest.SetRequestHeader` in Unity? Explain its purpose and usage.
UnityWebRequest.SetRequestHeader Declaration public void SetRequestHeader (string name , string value ); Parameters Parameter Description name The key of the header to be set. Case-sensitive. value The header's intended value. Description Set a HTTP request header to a custom value. Header keys and val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_29b2516e12d5
unity_docs
editor
In Unity's 'In-App Purchasing', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.purchasing@5.2 released 5.2.0-pre.1, 5.2.0-pre.2, 5.2.0, 5.2.1 com.unity.purchasing@5.1 released 5.1.0, 5.1.1, 5.1.2 com.unity.purchasing@5.0 released 5.0.0-pre.1, 5.0.0-pre.2, 5.0.0-pre.3, 5.0.0-pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_6
github
scripting
What does `ReleaseRequested` do in this Unity script? Explain its purpose and signature.
Check if a release has been requested while loading. Signature: ```csharp public bool ReleaseRequested => releaseRequested; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_5a6899dc92df
unity_docs
xr
In Unity's 'Git dependencies', what is 'Requirements' and how does it work?
To use Git dependencies in a project, make sure you installed the Git client (minimum version 2.14.0) on your computer and that you have added the Git executable path to the PATH system environment variable. Warning: Unity tested the Package Manager to work with Git 2.14.0 and above. Unity can’t guarantee the results i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_695599dde45b
unity_docs
editor
What is `SettingsService.NotifySettingsProviderChanged` in Unity? Explain its purpose and usage.
SettingsService.NotifySettingsProviderChanged Declaration public static void NotifySettingsProviderChanged (); Description Use this function to notify the SettingsService that a SettingsProvider changed. The client managing the SettingsProvider should call this function when a SettingsProvider is added, removed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5d440ca54db
unity_docs
rendering
What is `ParticleSystemRenderer.GetActiveTrailVertexStreams` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.GetActiveTrailVertexStreams Declaration public void GetActiveTrailVertexStreams (List<ParticleSystemVertexStream> streams ); Parameters Parameter Description streams The array of streams to populate. Description Queries which trail Vertex Shader streams are enabled on the ParticleSy...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c49e17201c33
unity_docs
ui
What is `UIElements.VisualElement.FindCommonAncestor` in Unity? Explain its purpose and usage.
VisualElement.FindCommonAncestor Declaration public UIElements.VisualElement FindCommonAncestor ( UIElements.VisualElement other ); Description Finds the lowest common ancestor between two VisualElements inside the VisualTree hierarchy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51274bb20dc4
unity_docs
scripting
What is `CustomGridBrushAttribute.hideDefaultInstance` in Unity? Explain its purpose and usage.
CustomGridBrushAttribute.hideDefaultInstance public bool hideDefaultInstance ; Description Hide the default instance of brush in the tile palette window. In addition to asset instances of brush class, Unity creates a default instance of every brush to be shown in the palette window dropdown. When hideDefaultIns...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7ef9093a220
unity_docs
scripting
What is `SystemLanguage.French` in Unity? Explain its purpose and usage.
SystemLanguage.French Description French. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the French language if (Application.systemLanguage == SystemLanguage.French) { //Outputs into console that the system is French D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68b5418880ec
unity_docs
rendering
What is `Rendering.BatchFilterSettings.staticShadowCaster` in Unity? Explain its purpose and usage.
BatchFilterSettings.staticShadowCaster public bool staticShadowCaster ; Description Indicates whether instances from the draw commands in this draw range render into cached shadow maps. This corresponds to Renderer.staticShadowCaster .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce9054088a04
unity_docs
ui
What is `UIElements.UQuery` in Unity? Explain its purpose and usage.
UQuery class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description UQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a complex hierarchy. See UQuery manual page for further information.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b287b236f8e0
unity_docs
rendering
In Unity's 'SpeedTree Model tab reference', what is 'Material' and how does it work?
Property Description Main Color Choose a color to modulate the diffuse lighting component. Color Variation Enable color variation for the model. This property uses Main Color and Variation Color (RGB) Intensity (A) along with the model’s world position to pick the final color. Color variation helps add a more natural l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b67dc3232ef4
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.useUnscaledTime`.
ParticleSystem.MainModule.useUnscaledTime public bool useUnscaledTime ; Description When true, use the unscaled delta time to simulate the Particle System. Otherwise, use the scaled delta time. This is useful for playing effects whilst the game is paused and [[Time.timeScale] is set to zero. ```csharp using U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18abaefbee6d
unity_docs
rendering
What is `SparseTexture.tileWidth` in Unity? Explain its purpose and usage.
SparseTexture.tileWidth public int tileWidth ; Description Get sparse texture tile width (Read Only). After creating the sparse texture, query the tile size with tileWidth & tileHeight . Tile sizes are platform and GPU dependent. Additional resources: SparseTexture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd6d28ec3597
unity_docs
rendering
What are the parameters of `Mesh.SetUVs` in Unity?
Description Sets the texture coordinates (UVs) stored in a given channel. Sets the UVs as a List of either Vector2 , Vector3 , or Vector4 . 2 dimensional (Vector2) data is the most common use case, but 3 or 4 dimensional data is sometimes used for special shader effects. Unity stores UVs in 0-1 space. [0,0] represents ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0a67fa4268cf
github
scripting
Write a Unity C# audio script for Component Trigger Base
```csharp using UnityEngine; using System; namespace LeakyAbstraction.ReactiveScriptables { public abstract class ComponentTriggerBase<T> : SubscriptionHelperMonoBehaviour where T : Component { [SerializeField] private GameEvent _event = default; [SerializeField] private GameS...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7ac0e806736b
unity_docs
physics
What is `EdgeCollider2D.GetPoints` in Unity? Explain its purpose and usage.
EdgeCollider2D.GetPoints Declaration public int GetPoints (List<Vector2> points ); Parameters Parameter Description points A list of Vector2 used to receive the points. Returns int Returns the number of points placed in the points list. Description Gets all the points that define a set of continu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_6
github
scripting
What does `GetControlledCamera` do in this Unity script? Explain its purpose and signature.
Returns the camera that is currently being controlled by the WRLD SDK. Signature: ```csharp public UnityEngine.Camera GetControlledCamera() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_17b6c2591b95
unity_docs
physics
What is `RaycastHit` in Unity? Explain its purpose and usage.
RaycastHit struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Structure used to get information back from a raycast. Additional resources: Physics.Raycast , Physics.Linecast , Physics.RaycastAll . Properties Property Description articulationBody The ArticulationBody of the coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb7297a7e4e8
unity_docs
physics
Give me an overview of the `ApplicationTitleDescriptor` class in Unity.
ApplicationTitleDescriptor class in UnityEditor Description Utility class containing all the information necessary to format Unity Editor main window title. All the various fields are concatenated to create a fully formed title. If only ApplicationTitleDescriptor.title is provided, this will become the complete ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_78979ab0f793
unity_docs
xr
Explain 'XR API reference' in Unity.
Understand the common APIs for XR development that Unity provides. Unity provides APIs for XR development under the XR namespace. Refer to the following table to understand the XR APIs: Topic Description XR.XRSettings APIs for Global XR related settings. XR.XRDevice APIs related to XR devices. XR.InputTracking APIs for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_65b35ff450be
unity_docs
scripting
In Unity's 'Awaitable code example reference', what is 'Conditional wait' and how does it work?
In iterator-based coroutines, WaitUntil suspends a coroutine execution until a delegate evaluates true . You can create equivalent behavior for an Awaitable -returning asynchronous method by making it wait until a condition changes using a cancellation token: ```csharp public static async Awaitable AwaitableUntil(Func<...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_079555a55948
unity_docs
scripting
Explain 'Custom controls' in Unity.
You can create custom controls and implement custom logic for user interface elements. Topic Description Create custom controls Understand the basics of creating and using custom controls. Configure the custom control name and visibility in UI Builder Use the UxmlElement attribute to change how your custom controls app...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e09d2ae85b18
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.limitYMultiplier`.
ParticleSystem.LimitVelocityOverLifetimeModule.limitYMultiplier public float limitYMultiplier ; Description Change the limit multiplier on the y-axis. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall limit multiplier. ```csharp using UnityEngine;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76edb4a5eaba
unity_docs
rendering
Show me a Unity C# example demonstrating `Sprite.GetSecondaryTextureCount`.
Sprite.GetSecondaryTextureCount Declaration public int GetSecondaryTextureCount (); Returns int Returns the number of Secondary Textures that the Sprite is using. Description Gets the number of Secondary Textures that the Sprite is using. ```csharp using UnityEngine;// Create a Sprite with Secondary Text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c0f5cb0c93c
unity_docs
scripting
What are the parameters of `GameObject.GetComponentsInChildren` in Unity?
Returns T[] An array containing all matching components of type T . Description Retrieves references to all components of type T on the specified GameObject, and any child of the GameObject. The typical usage for this method is to call it on a reference to a different GameObject than the one your script is on. For exam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08e64ce04cb7
unity_docs
rendering
What is `Rendering.RayTracingSubMeshFlagsConfig.opaqueMaterials` in Unity? Explain its purpose and usage.
RayTracingSubMeshFlagsConfig.opaqueMaterials public Rendering.RayTracingSubMeshFlags opaqueMaterials ; Description The corresponding RayTracingSubMeshFlags value for opaque Materials. To maximize ray tracing performance on the GPU, RayTracingSubMeshFlags.Enabled combined with RayTracingSubMeshFlags.Close...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_328f5cb4c8dd
unity_docs
xr
Explain 'Developing for iOS' in Unity.
This section of the User Manual contains iOS-specific development information on topics such as input, in-app purchases, and debugging. Topic Description iOS mobile scripting Understand scripting for iOS. Input for iOS devices Detect and handle user input on different types of iOS device. Test and debug an iOS applicat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4786de5b574a
unity_docs
rendering
In Unity's 'Color spaces in Unity', what is 'Linear and gamma color space' and how does it work?
The human eye doesn’t have a linear response to light intensity. We see some brightness levels of light more easily than others - a gradient that proceeds in a linear fashion from black to white would not look like a linear gradient to our eyes. For historical reasons, monitors and displays have the same characteristic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3532fa633434
unity_docs
rendering
What is `ParticleSystem.NoiseModule.positionAmount` in Unity? Explain its purpose and usage.
ParticleSystem.NoiseModule.positionAmount public ParticleSystem.MinMaxCurve positionAmount ; Description How much the noise affects the particle positions. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private Par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e74866b6805
unity_docs
scripting
What is `Device.Application.unityVersion` in Unity? Explain its purpose and usage.
Application.unityVersion public static string unityVersion ; Description This has the same functionality as Application.unityVersion . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb27be80a5fb
unity_docs
physics
Show me a Unity C# example demonstrating `MonoBehaviour.OnTriggerEnter2D`.
of the screen GameObject2 moves right towards GameObject1 . When these have collided GameObject2 returns back to the left. The left side of the screen is the starting point for GameObject2 . The right side of the screen is the constant position of GameObject1 . The Example2 script code makes GameObject2 collid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a19fbdee2bc
unity_docs
rendering
What is `WebCamTexture.requestedFPS` in Unity? Explain its purpose and usage.
WebCamTexture.requestedFPS public float requestedFPS ; Description Set the requested frame rate of the camera device (in frames per second). It will use a closest frame rate to the one requested which is supported by the camera. The requested values only have an effect when set while the camera is not running.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db766ff77b0d
unity_docs
math
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetricsFilters.SetPriorityFilter` in Unity? Explain its purpose and usage.
AsyncReadManagerMetricsFilters.SetPriorityFilter Declaration public void SetPriorityFilter ( Unity.IO.LowLevel.Unsafe.Priority _priorityLevel ); Declaration public void SetPriorityFilter (Priority[] _priorityLevels ); Parameters Parameter Description _priorityLevel Priority level to filter by. Summary ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2cca6862a24
unity_docs
scripting
What is `PackageManager.UI.Sample.FindByPackage` in Unity? Explain its purpose and usage.
Sample.FindByPackage Declaration public static IEnumerable<Sample> FindByPackage (string packageName , string packageVersion ); Parameters Parameter Description packageName The name of the package. packageVersion The version of the package. Returns IEnumerable<Sample> Returns a list of found samples....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a0d14a27bb7
unity_docs
editor
What is `Search.ISearchDatabase` in Unity? Explain its purpose and usage.
ISearchDatabase interface in UnityEditor.Search Description Interface used to expose the search databases information. Properties Property Description excludePatterns Exclude patterns. includePatterns Include patterns. indexingOptions Indicates how the database is built. name Name of the database. roots Ro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54d2aaefd03b
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetAssetBundleDependencies`.
dleName The name of the AssetBundle for which dependencies are required. recursive If false, returns only AssetBundles which are direct dependencies of the input; if true, includes all indirect dependencies of the input. Returns string[] The names of all AssetBundles that the input depends on. Description Gi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d91834edf6c8
unity_docs
scripting
What is `ModelImporterTangents` in Unity? Explain its purpose and usage.
ModelImporterTangents enumeration Description Vertex tangent generation options for ModelImporter . Tangentss can either be imported from model file, calculated by Unity using several methods (default is MikkTSpace), or not included into imported mesh at all. Vertex tangents are most often used for normal/bump ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_501ca1445695
unity_docs
rendering
Explain 'Self-Illuminated Normal mapped Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Self-Illuminated Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_982670440ba2
unity_docs
editor
What are the parameters of `EditorGUI.IntField` in Unity?
Returns int The value entered by the user. Description Makes a text field for entering integers. Int Field in an Editor Window. ```csharp //Create a folder and name it "Editor" (Right click in your Project Asset folder and go to Create>Folder) if you don't already have one //Place this script in the Editor folder //Thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4392181e3c11
unity_docs
rendering
What is `ShaderKeywordFilter.RemoveIfNotAttribute.ctor` in Unity? Explain its purpose and usage.
RemoveIfNotAttribute Constructor Declaration public RemoveIfNotAttribute (object condition , bool overridePriority , string filePath , int lineNumber , params string[] keywordNames ); Parameters Parameter Description condition Unity compares the data field to this value. The outcome determines the filter...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_695d7bd68478
unity_docs
scripting
What is `RefreshRate.value` in Unity? Explain its purpose and usage.
RefreshRate.value public double value ; Description The numerical value of the refresh rate in hertz. The Refresh Rate value is a numerical value which results from dividing the numerator by the denominator.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ed084a0ee41
unity_docs
editor
Show me a Unity C# example demonstrating `MonoImporter.SetDefaultReferences`.
yEngine.Object. target An array of objects to use as default values. The size of the array must match the size of the names array. The array can include null values. Description Sets default references for this MonoScript . When the Unity Editor instantiates this MonoScript , it uses the default values to popula...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b4dfb1c6a2c
unity_docs
scripting
What is `Playables.PlayableAsset` in Unity? Explain its purpose and usage.
PlayableAsset class in UnityEngine.Playables / Inherits from: ScriptableObject / Implemented in: UnityEngine.CoreModule Implements interfaces: IPlayableAsset Description A base class for assets that can be used to instantiate a Playable at runtime. Properties Property Description duration The playback d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_494c7b09370d
unity_docs
rendering
Explain 'Call JavaScript functions from Unity C# scripts' in Unity.
You can use functions from your JavaScript plug-ins in your Unity C# code. It can be useful to use JavaScript code in Unity because you might need to communicate with other elements on your web page or Web APIs. To learn about the file types and how to set up a JavaScript plug-in for interaction with Unity scripts , re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.