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_9b3fe91cb286
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoClip.pixelAspectRatioDenominator`.
rator:denominator). (Read Only). The pixel aspect ratio (for example, 10:11) determines the shape of each pixel. The first number (10) is the numerator and is the width of the pixel. The second number (11) is the denominator and is the height of the pixel. You can use the pixel aspect ratio to resize a video to appear...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a4952fe4427
unity_docs
scripting
What is `Pool.GenericPool_1.Release` in Unity? Explain its purpose and usage.
GenericPool<T0>.Release Declaration public static void Release (T toRelease ); Parameters Parameter Description toRelease The instance to return to the pool. Description Returns the instance back to the pool.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ef9acce939c
unity_docs
editor
What are the parameters of `AssetDatabase.cacheServerConnectionChanged` in Unity?
Description Unity raises this event when Cache Server connection is changed. ```csharp using UnityEngine; using UnityEditor;public class CacheServerConnectionChangedExample { [MenuItem("AssetDatabase/Correct connection to the Cache Server")] static void CorrectChangeCacheServer() { var correctEndpoi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ffebb483e59
unity_docs
scripting
What is `StaticOcclusionCulling.doesSceneHaveManualPortals` in Unity? Explain its purpose and usage.
StaticOcclusionCulling.doesSceneHaveManualPortals public static bool doesSceneHaveManualPortals ; Description Does the Scene contain any occlusion portals that were added manually rather than automatically?
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5e1cb66eb7c
unity_docs
editor
What is `Search.PropertyDatabaseRecordKey` in Unity? Explain its purpose and usage.
PropertyDatabaseRecordKey struct in UnityEditor.Search Description The key of a record that is stored in the PropertyDatabase . A key is a numerical value that represents a description of the property being stored in the PropertyDatabase . It is composed of two parts, the document key and the property key. The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1230a600ef73
unity_docs
networking
What is `Android.AndroidHardwareKeyboardHidden` in Unity? Explain its purpose and usage.
AndroidHardwareKeyboardHidden enumeration Description Options to indicate whether the physical keyboard is available. Additional resources: AndroidConfiguration.hardKeyboardHidden Properties Property Description Undefined Mirrors the Android property value HARDKEYBOARDHIDDEN_UNDEFINED. No Mirrors the Android...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c2964ac8724
unity_docs
scripting
What is `Experimental.GraphView.Scope.autoUpdateGeometry` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.autoUpdateGeometry public bool autoUpdateGeometry ; Description Enables or disables the automatic resizing and positioning of the Scope.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_71e6ec82ac2b
unity_docs
xr
In Unity's 'Set up an XR scene', what is 'Detect whether XR is enabled' and how does it work?
If you have a scene that can be used in both XR and non-XR contexts, you can use the XRSettings.enabled property to detect whether the XR subsystems are currently loaded and active. With that information you can activate or deactivate the appropriate sets of GameObjects and components. ```csharp public void CheckXRStat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_51e089107f1c
unity_docs
rendering
In Unity's 'Colors preferences reference', what is 'Animation colors' and how does it work?
Use this setting to customize color preferences for animated properties. Property Function Property Animated The color to indicate a property that’s currently being animated. Property Candidate The color to indicate the animated property that you modified recently. Property Recorded The color to indicate that an animat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b8b89f84f73
unity_docs
rendering
In Unity's 'Introduction to materials', what is 'Material fundamentals' and how does it work?
A material contains a reference to a Shader object . If that Shader object defines material properties , then the material can also contain data such as colors or references to textures. The Material class represents a material in C# code. For information, see Using Materials with C# scripts . A material asset is a fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e25ccba1e602
unity_docs
rendering
What is `Rendering.RayTracingShader.SetConstantBuffer` in Unity? Explain its purpose and usage.
RayTracingShader.SetConstantBuffer Declaration public void SetConstantBuffer (int nameID , ComputeBuffer buffer , int offset , int size ); Declaration public void SetConstantBuffer (string name , ComputeBuffer buffer , int offset , int size ); Declaration public void SetConstantBuffer (int nameI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a3a61aa17a32
unity_docs
scripting
What is `EventType.MouseDown` in Unity? Explain its purpose and usage.
EventType.MouseDown Description Mouse button was pressed. This event gets sent when any mouse button is pressed. Use Event.button to determine which button was pressed down. Additional resources: EventType , Event.Use . ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_595ef69d76b1
github
scripting
Write a Unity Editor script for Visual Scripting Help URL Attribute
```csharp #if UNITY_EDITOR && UNITY_2021_1_OR_NEWER #define CAN_USE_CUSTOM_HELP_URL #endif using System; using System.Diagnostics; using UnityEngine; namespace Unity.VisualScripting { #if CAN_USE_CUSTOM_HELP_URL using UnityEditor.PackageManager; [Conditional("UNITY_EDITOR")] class VisualScriptingHelpURLAttrib...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_400776c26109
github
scripting
Write a Unity Editor script for Type Info
```csharp using System; using UnityEngine; namespace E { /// <summary> /// Type info of <see cref="GlobalBehaviour"/>. /// could monified by <see cref="BehaviourManager.ResetTypeInfosCallback"/>. /// </summary> public struct TypeInfo : IEquatable<TypeInfo> { public TypeInfo(in Type typ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4f4e4ef2c4e2
unity_docs
scripting
What is `SpriteRenderer.sprite` in Unity? Explain its purpose and usage.
SpriteRenderer.sprite public Sprite sprite ; Description The Sprite to render. The SpriteRenderer component will render the assigned Sprite.sprite sprite. The rendered sprite can be changed by specifying a different sprite in the sprite variable. ```csharp // Example that loads sprites from a texture ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4f5c57a2877
unity_docs
scripting
What is `HandleUtility.GetOverlappingObjects` in Unity? Explain its purpose and usage.
HandleUtility.GetOverlappingObjects Declaration public static void GetOverlappingObjects ( Vector2 position , List<Object> outObjectList ); Parameters Parameter Description position The mouse position to test. outObjectList The list to hold the returned objects. Description Gets an ordered list of obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e56737c336b
unity_docs
rendering
What is `ParticleSystemJobs.IJobParticleSystemParallelForBatch.Execute` in Unity? Explain its purpose and usage.
IJobParticleSystemParallelForBatch.Execute Declaration public void Execute ( ParticleSystemJobs.ParticleSystemJobData jobData , int startIndex , int count ); Parameters Parameter Description jobData Contains the particle properties. startIndex The first particle index that this job should process. coun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46b82264aca0
unity_docs
scripting
What is `UIElements.Position` in Unity? Explain its purpose and usage.
Position enumeration Description Defines how the position values are interpreted by the layout engine. Properties Property Description Relative The element is positioned in relation to its default box as calculated by layout. Absolute The element is positioned in relation to its parent box and doesn't...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bc5b363a18a
unity_docs
math
What is `AndroidJNI.SetCharArrayElement` in Unity? Explain its purpose and usage.
AndroidJNI.SetCharArrayElement Declaration public static void SetCharArrayElement (IntPtr array , int index , char val ); Description Sets the char value of one element in a primitive array. This function is a special case of SetCharArrayRegion(), called with region size set to 1. Additional resources: Java...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36f66c6a733f
unity_docs
rendering
Show me a Unity C# example demonstrating `Mesh.uv4`.
or Vector4 value if you need to. This property returns a copy of the data. This means that it causes a heap memory allocation. It also means that to make changes to the original data, you must update the copy and then reassign the updated copy to the mesh. The following example demonstrates how to create an array to ho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52718cb4bc13
unity_docs
scripting
What is `UIElements.StylePropertyName` in Unity? Explain its purpose and usage.
StylePropertyName struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Defines the name of a style property. Constructors Constructor Description StylePropertyName Initializes and returns an instance of StylePropertyName from a string. Static Methods Method De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1e9d4c025dc
unity_docs
math
What is `Search.SearchUtils.ShowColumnSelector` in Unity? Explain its purpose and usage.
SearchUtils.ShowColumnSelector Declaration public static void ShowColumnSelector (Action<IEnumerable<SearchColumn>,int> columnsAddedHandler , IEnumerable<SearchColumn> columns , Vector2 mousePosition , int activeColumnIndex ); Parameters Parameter Description columnsAddedHandler Select handler invoked w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e557b4b29e8
unity_docs
math
Show me a Unity C# example demonstrating `LightTransport.BufferSlice_1.ctor`.
offset from the beginning of a buffer. The buffer is defined by the BufferID. Creates a typed view into a buffer starting at the specified element offset. The offset is measured in elements of the type T, not in bytes. Important: The offset must not exceed the buffer's capacity, and there must be sufficient space for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2023723eb011
unity_docs
input
What is `Undo.IncrementCurrentGroup` in Unity? Explain its purpose and usage.
Undo.IncrementCurrentGroup Declaration public static void IncrementCurrentGroup (); Description Unity automatically groups undo operations by the current group index. The current group is automatically incremented based on events eg. mouse down events, executing a menu item increments the current group. But som...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c959d15e1eea
unity_docs
rendering
What are the parameters of `GUI.DrawTexture` in Unity?
Description Draw a texture within a rectangle. Additional resources: GUI.color , GUI.contentColor . ```csharp // Draws a texture in the left corner of the screen. // The texture is drawn in a window 60x60 pixels. // The source texture is given an aspect ratio of 10x1 // and scaled to fit in the 60x60 rectangle. Becaus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7087feff7010
unity_docs
xr
What is `iOS.Xcode.PBXProject.AddAssetTagForFile` in Unity? Explain its purpose and usage.
PBXProject.AddAssetTagForFile Declaration public void AddAssetTagForFile (string targetGuid , string fileGuid , string tag ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . fileGuid The GUID of the file. tag The name of the asset tag....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab35cdea9f65
unity_docs
editor
What is `Device.Screen.SetMSAASamples` in Unity? Explain its purpose and usage.
Screen.SetMSAASamples Declaration public static void SetMSAASamples (int numSamples ); Description This has the same functionality as Screen.SetMSAASamples and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_810d9fb57127
unity_docs
animation
What is `Animations.AnimationHumanStream.SetGoalRotation` in Unity? Explain its purpose and usage.
AnimationHumanStream.SetGoalRotation Declaration public void SetGoalRotation ( AvatarIKGoal index , Quaternion rot ); Parameters Parameter Description index The AvatarIKGoal that is queried. rot The rotation of this IK goal. Description Sets the rotation of this IK goal in world space. Additional re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5217a7c68079
unity_docs
rendering
What is `Rendering.FilteringSettings.defaultValue` in Unity? Explain its purpose and usage.
FilteringSettings.defaultValue public static Rendering.FilteringSettings defaultValue ; Description Creates a FilteringSettings struct that contains default values for all properties. With these default values, Unity does not perform any filtering. To override values at the time that you create the struct, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88c81ea2f05f
unity_docs
editor
What is `Rendering.ResourcePathAttribute` in Unity? Explain its purpose and usage.
ResourcePathAttribute class in UnityEngine.Rendering / Inherits from: Rendering.ResourcePathsBaseAttribute / Implemented in: UnityEngine.CoreModule Description This attribute is used to describe what path to the asset should be used. This is only used in the editor and doesn't have any effect at runtime. See ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0b02971ce47e
unity_docs
rendering
Explain 'Prepare materials for projection in the Built-In Render Pipeline' in Unity.
Use a Projector component to create effects such as: Decal effects, like bullet holes or paint splatters Blob shadows Stylized lighting effects The effect of a real-world projector, using another Camera that renders to a Render Texture Note: This workflow is compatible only with the Built-in Render Pipeline . For simil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03a33077f914
unity_docs
rendering
What is `ParticleSystem.RotationBySpeedModule.range` in Unity? Explain its purpose and usage.
ParticleSystem.RotationBySpeedModule.range public Vector2 range ; Description Set the minimum and maximum speeds that this module applies the rotation curve between. Additional resources: ParticleSystem.RotationBySpeedModule.angularVelocity. ```csharp using UnityEngine; using System.Collections;[RequireComp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2fe91b06c99e
unity_docs
rendering
Explain 'ShaderLab language reference' in Unity.
Find the blocks, directives, and commands you need to write a shader in ShaderLab . Page Description Shader Explore the Shader block in ShaderLab to create a shader, and add material properties, custom editors and a fallback shader. SubShader Explore the SubShader block in ShaderLab to create a subshader, and add LOD v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_edf690e48fca
unity_docs
rendering
Show me a Unity code example for 'Properties block reference in ShaderLab'.
x Signature Function Properties { <Material property declaration> <Material property declaration> } Saves the given properties as part of the material asset, and uses the values stored in the material asset during rendering. A Properties block can contain any number of material property declarations. ## Material prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91b1a1ee8f50
unity_docs
scripting
What is `Gizmos.DrawSphere` in Unity? Explain its purpose and usage.
Gizmos.DrawSphere Declaration public static void DrawSphere ( Vector3 center , float radius ); Description Draws a solid sphere with center and radius . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void OnDrawGizmosSelected() { // Draw a yellow spher...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15b176e30a4c
unity_docs
rendering
What is `GUI.Toggle` in Unity? Explain its purpose and usage.
GUI.Toggle Declaration public static bool Toggle ( Rect position , bool value , string text ); Declaration public static bool Toggle ( Rect position , bool value , Texture image ); Declaration public static bool Toggle ( Rect position , bool value , GUIContent content ); Declaration public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03ed40f3609b
unity_docs
editor
What are the parameters of `VersionControl.Provider.ResolveIsValid` in Unity?
Description Tests if any of the assets in the list have the conflicted state and can be resolved. Returns true if one or more assets in the list are resolvable. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.VersionControl; using UnityEngine;public class EditorScript : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c46cf3541e93
unity_docs
math
What are the parameters of `Random.Range` in Unity?
```csharp using UnityEngine;public class ExampleClass : MonoBehaviour { public GameObject prefab; public float zoffset = 10; // Click the "Instantiate!" button and a new grid of `prefab` objects will be // instantiated with a random number of items in each direction. void OnGUI() { if (GU...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a05b63f2ea6
unity_docs
physics
What is `JointDrive` in Unity? Explain its purpose and usage.
JointDrive struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description How the joint's movement will behave along its local X axis. Properties Property Description maximumForce Amount of force applied to push the object toward the defined direction. positionDamper Resistance strength again...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_aad37e0dbd67
github
scripting
Write a Unity C# MonoBehaviour script called MBP_Manager
```csharp  using UnityEngine; using System.Diagnostics; using Debug = UnityEngine.Debug; public class MBP_Manager : MonoBehaviour { public bool isMultithreading; public static bool isDebugOn = true; public int calculationLoad = 200; TestMBP[] instances; Stopwatch sw = new Stopwatch (); public static int fram...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_bc4a463eb818
unity_docs
scripting
What is `Pool.IObjectPool_1.Release` in Unity? Explain its purpose and usage.
IObjectPool<T0>.Release Declaration public void Release (T element ); Parameters Parameter Description element The instance to return to the pool. Description Returns the instance back to the pool. If the pool has collection checks enabled and the instance is already held by the pool then an exception wil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bfb1d1eb8005
unity_docs
rendering
In Unity's 'Panoramic Skybox Shader Material Inspector Window reference', what is 'Properties' and how does it work?
Property Description Tint Color The color to tint the skybox to. Unity adds this color to the Textures to change their appearance without altering the base Texture files. Exposure Adjusts the skybox’s exposure. This allows you to correct tonal values in the skybox Textures. Larger values produce a more exposed, seeming...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_945453d087f0
unity_docs
audio
In Unity's 'Set up your environment for Embedded Linux', what is 'Install the toolchain and SDK packages' and how does it work?
After you create a new project with Unity, you must install the following toolchain and SDK packages for your operating system and target architecture. To install a Unity package for Embedded Linux toolchain and SDK, refer to Install a UPM package by name . Note : When you install sysroot and toolchain pacakges, the ba...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f99a7f4b17cb
unity_docs
rendering
In Unity's 'Create cookies in the Built-In Render Pipeline', what is 'Limitations' and how does it work?
In the Built-In Render Pipeline, VertexLit shaders can’t display Cookies or Shadows. Shadows are disabled for directional lights with cookies when forward rendering is used. It’s possible to write custom shaders to enable shadows in this case; see documentation on writing surface shaders for further details.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ba30298f6ea
unity_docs
scripting
Show me a Unity C# example demonstrating `Component.GetComponent`.
eObject (or any component attached to that GameObject). You can then call GetComponent on that reference. See the Component and GameObject class reference pages for the other variations of the GetComponent family of methods. The following example gets a reference to a hinge joint component on the same GameObje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52fb62f6b19f
unity_docs
editor
What is `PlayerSettings.WSA.lastRequiredScene` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.lastRequiredScene public static int lastRequiredScene ; Description The scene index number from the Scenes in Build list for the last scene that must be present in a Streaming Install build. In the Editor, Unity displays this under Packaging in UWP Player Settings . For an applicatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13509aa85de5
unity_docs
scripting
Show me a Unity C# example demonstrating `Cloth.damping`.
Cloth.damping public float damping ; Description Damp cloth motion. Set this to damp the motions of a cloth instance. Must be between zero and one. Setting this to zero will disable cloth damping. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { GetComponent<Cloth>().dampin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8acf9e34e031
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.IPropertyDatabaseView.Invalidate`.
IPropertyDatabaseView.Invalidate Declaration public void Invalidate (InAttribute) recordKey ); Parameters Parameter Description recordKey A record key. Description Invalidates a single property record so it is no longer retrievable. ``` using (var view = propertyDatabase.GetView()) { // Store a property....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1211a86e3bd
unity_docs
performance
What is `PickingIncludeExcludeList` in Unity? Explain its purpose and usage.
PickingIncludeExcludeList struct in UnityEditor Description Represents a list of Unity Object and DOTS Entity IDs that picking algorithms can either consider or discard. Properties Property Description ExcludeEntities An array of DOTS Entity IDs that the picking algorithm doesn't consider when it selects the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6306f52faec
unity_docs
editor
Show me a Unity C# example demonstrating `PrefabUtility.UnpackAllInstancesOfPrefab`.
he contents of the Prefab Asset while retaining all override values. The Prefab instances will not be unpacked in closed scenes. This function uses PrefabUtility.FindAllInstancesOfPrefab to determine which instances to unpack and calls PrefabUtility.UnpackPrefabInstance for each instance. Unpacking throws an Argum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_55630bcad401
unity_docs
rendering
Explain 'Branch based on shader pass or shader stage' in Unity.
## Shader stage being compiled Preprocessor macros SHADER_STAGE_VERTEX , SHADER_STAGE_FRAGMENT , SHADER_STAGE_DOMAIN , SHADER_STAGE_HULL , SHADER_STAGE_GEOMETRY , SHADER_STAGE_COMPUTE are defined when compiling each Shader stage. Typically they are useful when sharing Shader code between pixel Shaders and compute Shad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_131be1086c3b
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.bindposes`.
Each matrix in bindposes is the inverse of the transformation matrix of the bone, calculated when the bone is in its base state (its bind pose). Note: See the Mesh page where example 2 shows vertices being copied, updated and and re-assigned to the Mesh . The example on this page also updates bindposes , Skin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5408e146b7e5
unity_docs
input
Give me an overview of the `Input` class in Unity.
Input class in UnityEngine / Implemented in: UnityEngine.InputLegacyModule Description Interface into the Legacy Input system. Note : The Input class is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the new Input System...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d4200d5ca7d
unity_docs
performance
What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.MaxJobThreadCount` in Unity? Explain its purpose and usage.
JobsUtility.MaxJobThreadCount public static int MaxJobThreadCount ; Description The maximum number of job threads that the job system can create. This maximum is the maximum number of threads that the job can system support. However, the maximum number of job worker threads that the job system creates is lowe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1395617a0d7b
unity_docs
rendering
What is `Rendering.TierSettings.reflectionProbeBlending` in Unity? Explain its purpose and usage.
TierSettings.reflectionProbeBlending public bool reflectionProbeBlending ; Description Whether to enable Reflection Probes Blending. Enabling or disabling this setting will add or remove the UNITY_SPECCUBE_BLENDING shader compiler define.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_869d8dc8057b
unity_docs
rendering
Show me a Unity code example for 'Optimize shaders'.
this technique is named after the LOD feature for rendering meshes, there are important differences: shader LOD does not relate to distance from the Camera , and Unity does not calculate shader LOD automatically. You must set the maximum shader LOD manually. Follow these steps: Assign LOD values to subshaders. The lowe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6489d704e9d1
unity_docs
audio
What are the parameters of `AudioSource.Play` in Unity?
Description Plays the clip . The delay parameter is deprecated, please use the newer AudioSource.PlayDelayed function instead which specifies the delay in seconds. If AudioSource.clip is set to the same clip that is playing then the clip will sound like it is re-started. AudioSource will assume ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cfd3362850f
unity_docs
animation
What is `Animations.PropertyStreamHandle.IsValid` in Unity? Explain its purpose and usage.
PropertyStreamHandle.IsValid Declaration public bool IsValid ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns bool Whether or not the handle is valid. Description Returns whether or not the handle is valid.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_375d20e1b1c2
unity_docs
rendering
What is `CameraProjectionCache.ctor` in Unity? Explain its purpose and usage.
CameraProjectionCache Constructor Declaration public CameraProjectionCache ( Camera camera ); Parameters Parameter Description camera The Camera from which projection matrices will be copied. Description Creates a CameraProjectionCache with the camera's current state.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90b2bcf1e71a
unity_docs
editor
What is `MonoImporter.SetIcon` in Unity? Explain its purpose and usage.
MonoImporter.SetIcon Declaration public void SetIcon ( Texture2D icon ); Parameters Parameter Description icon The custom icon to associate with the imported MonoScript . When the value is null, Unity restores the default icon. Description Sets a custom icon to associate with the imported MonoScript . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b65cecc8b86
unity_docs
editor
Show me a Unity C# example demonstrating `EditorApplication.isCompiling`.
EditorApplication.isCompiling public static bool isCompiling ; Description Is editor currently compiling scripts? (Read Only) Editor Window that tells you if Unity is compiling scripts. ```csharp // Small example that shows when scripts are being compiled.using UnityEditor; using UnityEngine;public class isCom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c1e6495961c
unity_docs
rendering
What is `LightmapSettings.lightmapsMode` in Unity? Explain its purpose and usage.
LightmapSettings.lightmapsMode public static LightmapsMode lightmapsMode ; Description NonDirectional or CombinedDirectional Specular lightmaps rendering mode. Note: this property is only serialized when building the player. In all the other cases it's the responsibility of the Unity lightmapping system (or a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8566c18df2c0
unity_docs
scripting
What is `SearchService.ProjectSearch.RegisterEngine` in Unity? Explain its purpose and usage.
ProjectSearch.RegisterEngine Declaration public static void RegisterEngine ( SearchService.IProjectSearchEngine engine ); Parameters Parameter Description engine The Project search engine to register. Description Registers a Project search engine dynamically. If you set a dynamically registered engine as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7077056fb7b3
unity_docs
animation
What is `StateMachineBehaviour.OnStateMachineEnter` in Unity? Explain its purpose and usage.
StateMachineBehaviour.OnStateMachineEnter Declaration public void OnStateMachineEnter ( Animator animator , int stateMachinePathHash ); Parameters Parameter Description animator The Animator evaluating the state machine. stateMachinePathHash The hash of the full path to the state machine. Description I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0167c0cc713a
unity_docs
editor
What is `HideFlags.DontSaveInBuild` in Unity? Explain its purpose and usage.
HideFlags.DontSaveInBuild Description The object will not be saved when building a player. For Prefab instances in a scene, you can set the hideflag on the Prefab instance handle object as a way to set the same hideflags on all the objects of the Prefab instance. (See PrefabUtility.GetPrefabInstanceHandle ).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_344459396991
unity_docs
scripting
What is `Experimental.GraphView.Port.visualClass` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Port.visualClass public string visualClass ; Description The name of the uss class to use to style the port.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81f85453c183
unity_docs
scripting
Show me a Unity C# example demonstrating `HandleUtility.AddControl`.
d , float distance ); Parameters Parameter Description controlId The ID that is recorded as the nearest control if the mouse cursor is near the handle. distance The distance from the mouse cursor to the handle. Description Record a distance measurement from a handle. All handles call this with their contro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cc9e2fef558
unity_docs
editor
What is `TerrainTools.TerrainPaintToolWithOverlaysBase.OnToolGUI` in Unity? Explain its purpose and usage.
TerrainPaintToolWithOverlaysBase.OnToolGUI Declaration public void OnToolGUI ( EditorWindow window ); Parameters Parameter Description window The window that is displaying the custom editor tool. Description This method is used to implement the custom terrain editor paint tool.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9d9c5da8882
unity_docs
scripting
What is `ParticleSystem.NoiseModule.scrollSpeed` in Unity? Explain its purpose and usage.
ParticleSystem.NoiseModule.scrollSpeed public ParticleSystem.MinMaxCurve scrollSpeed ; Description Scroll the noise map over the Particle System. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4ea478f2b24
unity_docs
rendering
Show me a Unity C# example demonstrating `Profiling.Profiler.GetTotalAllocatedMemoryLong`.
of memory allocated by Unity. This returns 0 if the Profiler is not available. Description The total memory allocated by the internal allocators in Unity. Unity reserves large pools of memory from the system; this includes double the required memory for textures because Unity keeps a copy of each texture on both th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec4105ab57af
unity_docs
input
Show me a Unity C# example demonstrating `TouchPhase`.
TouchPhase enumeration Description Describes phase of a finger touch. TouchPhase is an enum type that contains the states of possible finger touches. The states represent each action the finger can take on the most recent frame update. Since a touch is tracked over its "lifetime" by the device, the start and end o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa1e64d69469
unity_docs
editor
What is `SettingsProvider.GetSearchKeywordsFromGUIContentProperties` in Unity? Explain its purpose and usage.
SettingsProvider.GetSearchKeywordsFromGUIContentProperties Declaration public static IEnumerable<string> GetSearchKeywordsFromGUIContentProperties (); Returns IEnumerable<string> Returns the list of keywords extracted from the static GUIContent. Description Extract search keywords from all public static me...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86aca812ef8a
unity_docs
scripting
What is `Progress.Item.currentStep` in Unity? Explain its purpose and usage.
Progress.Item.currentStep public int currentStep ; Description Returns the current step for this progress indicator. Returns -1 if this indicator does not report progress in steps. To set the type of steps that the progress window displays, use Progress.Item.SetStepLabel . Additional resources: Progress.Item....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86d43a5e466c
unity_docs
scripting
What is `UIElements.StyleFloat.ctor` in Unity? Explain its purpose and usage.
StyleFloat Constructor Declaration public StyleFloat (float v ); Description Creates from either a float or a StyleKeyword . Declaration public StyleFloat ( UIElements.StyleKeyword keyword ); Description Creates from either a float or a StyleKeyword .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3092ae37a57a
unity_docs
physics
What is `PhysicsVisualizationSettings.QueryFilter.Sphere` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.QueryFilter.Sphere Description Whether the filter includes sphere shaped queries. For example, sphere shaped queries include Physics.SphereCast , Physics.CheckSphere , and Physics.OverlapSphere .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b50214f7a102
unity_docs
scripting
Show me a Unity code example for 'Creating scene templates'.
mpts you to save the scene before it saves the template. After you create a template from the current scene, you might want to edit its properties to specify which of its dependencies Unity clones when you create a new scene from it. ## Creating templates from C# scripts You can create scene templates from your C# sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ecb376b13cd
unity_docs
scripting
Show me a Unity C# example demonstrating `MenuItem.ctor`.
this page demonstrates more about this feature. The following example code adds three menu items with corresponding functions to a menu called "Example": Example2 (priority 100), Example1 (priority 101), and then Example3 (priority 112). In the menu, a separator line divides Example3 from the other two menu it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_467a5b457ba3
unity_docs
editor
What are the parameters of `PlayerSettings.GetScriptingDefineSymbols` in Unity?
Description Gets the array of symbols for script compilation for the build target you select. Symbols are semicolon-separated. For example, "SYMBOL1;SYMBOL2". ```csharp using UnityEditor; using UnityEditor.Build; using UnityEngine;public class GetScriptingDefineSymbolsExample { [MenuItem("Tools/Log Scripting Define...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f75cb1522905
unity_docs
physics
What is `Time.fixedUnscaledDeltaTime` in Unity? Explain its purpose and usage.
Time.fixedUnscaledDeltaTime public static float fixedUnscaledDeltaTime ; Description The interval in seconds of timeScale-independent ("real") time at which physics and other fixed frame rate updates (like MonoBehaviour's FixedUpdate ) are performed.(Read Only). Unlike Time.fixedDeltaTime this value is in re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d72c307032fe
unity_docs
editor
What are the parameters of `EditorGUI.DropShadowLabel` in Unity?
Description Draws a label with a drop shadow. Not superfast, so use with caution. Shadow Label in and editor window. ```csharp using UnityEngine; using UnityEditor;public class EditorGUIDropShadowLabel : EditorWindow { // Write some text using a Shadow Label. string text = "This is some text with a Shadow Label...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_322d89f47755
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.SetSortIndex` in Unity? Explain its purpose and usage.
Hierarchy.SetSortIndex Declaration public void SetSortIndex (ref Unity.Hierarchy.HierarchyNode node , int sortIndex ); Parameters Parameter Description node The hierarchy node. sortIndex The sort index. Description Sets the sort index of a hierarchy node. After setting sort indexes, you must call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ee4d0b227b15
unity_docs
rendering
In Unity's 'Introduction to the CullingGroup API', what is 'Using visibility' and how does it work?
All the volumes for which CullingGroup computes visibility are defined by bounding spheres - in practice, a position (the center of the sphere) and a radius value. No other bounding shapes are supported, for performance reasons. In practice this means you will be defining a sphere that fully encloses the object you are...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ee97c916ac1
unity_docs
networking
What is `Networking.PlayerConnection.EditorConnection.Initialize` in Unity? Explain its purpose and usage.
EditorConnection.Initialize Declaration public void Initialize (); Description Initializes the EditorConnection. Starts listening for Players. If all the Players disconnect, the socket gets cleaned up, so you need to reinitialize the socket if you expect more connections.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_737db3abbd12
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.SlideArrow`.
MouseCursor.SlideArrow Description Arrow with small arrows for indicating sliding at number fields. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b979354e606d
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.ClearImporterOverride`.
AssetDatabase.ClearImporterOverride Declaration public static void ClearImporterOverride (string path ); Parameters Parameter Description path Project relative path for the asset. Description Clears the importer override for the asset. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Asse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7ae25e5fb2bd
github
scripting
Write a Unity C# UI script for Fade Canvas
```csharp using System.Collections; using UnityEngine; /// <summary> /// Fades a canvas over time using a coroutine and a canvas group /// </summary> [RequireComponent(typeof(CanvasGroup))] public class FadeCanvas : MonoBehaviour { [Tooltip("The speed at which the canvas fades")] public float defaultDuration ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_ec1c4b573034
unity_docs
ui
Show me a Unity code example for 'GroupBox'.
nGroup . In most cases, it’s better to use RadioButtonGroup because you must register every single radio button when you use the GroupBox and RadioButton combo. However, use the combo if you want to add additional visual elements in the group. ## Create a GroupBox with C# script The following C# code snippets create ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df3bb6a672fb
unity_docs
rendering
What is `ShaderUtil.GetCustomEditorForRenderPipeline` in Unity? Explain its purpose and usage.
ShaderUtil.GetCustomEditorForRenderPipeline Declaration public static string GetCustomEditorForRenderPipeline ( Shader shader , Type renderPipelineType ); Declaration public static string GetCustomEditorForRenderPipeline ( Shader shader , string renderPipelineType ); Parameters Parameter Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd7a71916888
unity_docs
animation
In Unity's 'Performance and optimization', what is 'Simple animation' and how does it work?
Playing a single Animation Clip with no blending can make Unity slower than the legacy animation system . The old system is very direct, sampling the curve and directly writing into the transform. Unity’s current animation system has temporary buffers it uses for blending, and there is additional copying of the sampled...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_889bfc95dfdf
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.NativeSliceUnsafeUtility.GetUnsafePtr` in Unity? Explain its purpose and usage.
NativeSliceUnsafeUtility.GetUnsafePtr Declaration public static void* GetUnsafePtr (NativeSlice<T> nativeSlice ); Parameters Parameter Description nativeSlice The NativeSlice to check. Returns void* The memory buffer pointer of nativeSlice . Description Gets a NativeSlice memory buffer pointer and c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db89cdd19f4f
unity_docs
editor
What is `SerializedProperty.contentHash` in Unity? Explain its purpose and usage.
SerializedProperty.contentHash public uint contentHash ; Description Provides the hash value for the property. (Read Only) You can use this to track if there has been any changes to the value at the property path (Additional resources: SerializedProperty.propertyPath ). Please note that: -If the size of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9408f6f17ebc
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.SetBaseReferenceForConfig` in Unity?
Description Sets the base configuration reference for the specified build configuration. Note : If the baseReference parameter is null, the base reference is removed. ```csharp using UnityEngine; using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_SetBaseRefe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a09f69ea2f8
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.DrawTexture3DSlice`.
f the texture sampling planes. filterMode Sets the texture filtering mode to use. useColorRamp Enables color ramp visualization. customColorRamp The custom gradient that Unity uses as a color ramp. If this is not specified, Unity uses Google Turbo color ramp . Description Draws a 3D texture using Slice renderi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e1ec2fc48d63
unity_docs
physics
In Unity's 'Profiler counters reference', what is 'Asset loading profiler counters' and how does it work?
The available asset loading profiler counters and availability in release (non-development) players are as follows: Profiler counter Description Availability in release (non-development) players Audio Reads The number of bytes requested from the AsyncReadManager for an audio load. Unavailable Entities Reads The number ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dadc16c0d8c4
unity_docs
rendering
Explain 'Unity Editor command line arguments reference' in Unity.
You can launch the Unity Editor and Player with additional command line arguments to control startup behavior, configure settings, or automate workflows. To use these arguments, append them to the Unity executable path when launching from a terminal or command prompt. For example: unity.exe -batchmode -quit -executeMet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fa6b08e45ba
unity_docs
rendering
What is `ParticleSystem.AllocateCustomDataAttribute` in Unity? Explain its purpose and usage.
ParticleSystem.AllocateCustomDataAttribute Declaration public void AllocateCustomDataAttribute ( ParticleSystemCustomData stream ); Parameters Parameter Description stream The custom data stream to allocate. Description Ensures that the customData1 and customData2 particle attribute arrays are alloca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96f16baede12
unity_docs
math
What is `Matrix4x4.TRS` in Unity? Explain its purpose and usage.
Matrix4x4.TRS Declaration public static Matrix4x4 TRS ( Vector3 pos , Quaternion q , Vector3 s ); Description Creates a translation, rotation and scaling matrix. The returned matrix is such that it places objects at position pos , oriented in rotation q and scaled by s . ```csharp using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_831bb71414a7
unity_docs
physics
What is `Rigidbody.AddExplosionForce` in Unity? Explain its purpose and usage.
Rigidbody.AddExplosionForce Declaration public void AddExplosionForce (float explosionForce , Vector3 explosionPosition , float explosionRadius , float upwardsModifier = 0.0f, ForceMode mode = ForceMode.Force)); Parameters Parameter Description explosionForce The force of the explosion (which may ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d7d7f135589d
unity_docs
rendering
Show me a Unity code example for 'Particle System custom vertex streams in the Built-In Render Pipeline'.
rovide you with some information in brackets, next to each item, to help you read the correct data in your shader: Position (POSITION.xyz) Normal (NORMAL.xyz) Color (COLOR.xyzw) UV (TEXCOORD0.xy) UV2 (TEXCOORD0.zw) AnimBlend (TEXCOORD1.x) Each item in brackets corresponds to a Vertex Shader input, which you should spec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81bbe5344873
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.ParentConstraint.translationAxis`.
ParentConstraint.translationAxis public Animations.Axis translationAxis ; Description The translation axes affected by the ParentConstraint. Use this property to restrict the translation of the constrained object on a particular axis. ```csharp using UnityEngine.Animations;public class ConstraintAxis { publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.