id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_ba830e49dae2
unity_docs
input
Show me a Unity code example for 'UnsignedIntegerField'.
s to ensure that the entered data meets certain requirements. Note : To align an UnsignedIntegerField with other fields in an Inspector window, apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create an UnsignedIntegerField You can create an UnsignedIntegerField with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03a61e212bce
unity_docs
animation
What is `AnimatorOverrideController` in Unity? Explain its purpose and usage.
AnimatorOverrideController class in UnityEngine / Inherits from: RuntimeAnimatorController / Implemented in: UnityEngine.AnimationModule Description Interface to control Animator Override Controller. Animator Override Controller is used to override Animation Clips from a controller to specialize animations fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d8b7669518f
unity_docs
scripting
What is `GUIUtility.GetStateObject` in Unity? Explain its purpose and usage.
GUIUtility.GetStateObject Declaration public static object GetStateObject (Type t , int controlID ); Description Get a state object from a controlID. This will return a recycled state object that is unique for controlID . If there is no state object then a new one will be created and hooked up to the contr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62f114da9d95
unity_docs
rendering
In Unity's 'Control material variant properties', what is 'Prevent overrides' and how does it work?
To prevent child materials from overriding a parent property, lock the property. Follow these steps: Select the parent material. In the Inspector window, right-click on the name of the property you want to lock. Select Lock in children . Unity applies the value from the parent property to all its child materials, remov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e200cc71ac87
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Basque`.
SystemLanguage.Basque Description Basque. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Basque language if (Application.systemLanguage == SystemLanguage.Basque) { //Outputs into console that the system is Basque D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09ed63072f13
unity_docs
rendering
What is `Rendering.RayTracingShader.SetShaderPass` in Unity? Explain its purpose and usage.
RayTracingShader.SetShaderPass Declaration public void SetShaderPass (string passName ); Parameters Parameter Description passName The Shader Pass to use when executing ray tracing shaders. Description Selects which Shader Pass to use when executing ray/geometry intersection shaders. This name is specifie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f771cb94f99e
unity_docs
rendering
What is `Rendering.RayTracingGeometryInstanceConfig.motionVectorMode` in Unity? Explain its purpose and usage.
RayTracingGeometryInstanceConfig.motionVectorMode public MotionVectorGenerationMode motionVectorMode ; Description Motion vector mode. Unity configures the following built-in shader uniforms to calculate motion vectors in HLSL code: unity_MotionVectorsParams , unity_MatrixPreviousM and unity_MatrixPreviou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f91ccf19a626
unity_docs
audio
What is `AudioSource.GetOutputData` in Unity? Explain its purpose and usage.
AudioSource.GetOutputData Declaration public void GetOutputData (float[] samples , int channel ); Parameters Parameter Description samples The array to populate with audio samples. Its length must be a power of 2. channel The channel to sample from. Description Provides a block of the currently playing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_49448dd817d6
unity_docs
physics
In Unity's 'Introduction to compound colliders', what is 'Benefits and limitations of compound colliders' and how does it work?
In most cases, compound colliders offer a similar solution to Mesh colliders : their primary purpose is to provide accurate collisions for items with complex shapes. When considering the benefits and limitations of compound colliders, you are usually comparing them to Mesh colliders. The main benefits of compound colli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c3cd5e7c0e1
unity_docs
rendering
What is `XR.XRDisplaySubsystem.textureLayout` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.textureLayout public XR.XRDisplaySubsystem.TextureLayout textureLayout ; Description Set DisplaySubsystem to use certain texture layout. Should query supported texture layout through XRDisplaySubsystem.supportedTextureLayouts first for the capabilities.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46241e6b35c4
unity_docs
animation
What is `Animations.GenericBindingUtility.UnbindProperties` in Unity? Explain its purpose and usage.
GenericBindingUtility.UnbindProperties Declaration public static void UnbindProperties (NativeArray<BoundProperty> boundProperties ); Parameters Parameter Description boundProperties The list of BoundProperty to unbind. Description Unbinds and frees all resources used by a list of BoundProperty . Creat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4fb916ac464
unity_docs
scripting
Show me a Unity C# example demonstrating `TerrainTools.TerrainPaintToolWithOverlays_1`.
TerrainPaintToolWithOverlays<T0> class in UnityEditor.TerrainTools / Inherits from: TerrainTools.TerrainPaintToolWithOverlaysBase Description Base class for Terrain painting tools, which inherit from Editor Tools. Derive from this class to implement your own terrain painting tools, which also appear in the Terr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_503769334cc6
unity_docs
editor
Explain 'Binding examples' in Unity.
Learn Editor data binding from examples. ## Basic Editor binding examples Topics Description Bind with binding path in C# script Use bindingPath to create a binding that changes the name of a GameObject in a custom Editor window. Bind without the binding path Use BindProperty() to create a binding that changes the na...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23d59af8ec6e
unity_docs
scripting
Show me a Unity C# example demonstrating `RuntimePlatform.IPhonePlayer`.
RuntimePlatform.IPhonePlayer Description In the player on iPhone or iPad devices. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.IPhonePlayer) { Debug.Log("...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0ff0bb94f8f3
unity_docs
editor
Show me a Unity code example for 'Focus events'.
e TextField. When the TextField is in focus, FocusInEvent fires and clears the placeholder text. FocusOutEvent toggles the placeholder mode based on the TextField contents. To see the example in action, do the following: Create a new C# script called PlaceHolderExample. Copy the example code into the C# script. Under W...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad13e3c9cf9c
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyNodeMapUnmanaged_1` in Unity? Explain its purpose and usage.
HierarchyNodeMapUnmanaged<T0> struct in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Description Represents a collection of HierarchyNode and values of type T with O(1) access time. Properties Property Description Capacity The number of elements that can be contained in the Hier...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0411b80e411f
unity_docs
scripting
What is `Events.UnityEventTools.RegisterVoidPersistentListener` in Unity? Explain its purpose and usage.
UnityEventTools.RegisterVoidPersistentListener Declaration public static void RegisterVoidPersistentListener ( Events.UnityEventBase unityEvent , int index , Events.UnityAction call ); Parameters Parameter Description unityEvent Event to modify. index Index to modify. call Function to call. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ed9a3469445
unity_docs
scripting
What is `Mesh.HasVertexAttribute` in Unity? Explain its purpose and usage.
Mesh.HasVertexAttribute Declaration public bool HasVertexAttribute ( Rendering.VertexAttribute attr ); Parameters Parameter Description attr Vertex data attribute to check for. Returns bool Returns true if the data attribute is present in the mesh. Description Checks if a specific vertex data attri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e908053553d
unity_docs
physics
Show me a Unity C# example demonstrating `Collision2D.rigidbody`.
Collision2D.rigidbody public Rigidbody2D rigidbody ; Description The incoming Rigidbody2D involved in the collision with the otherRigidbody . This may be null if the Collision2D.collider is not attached to a Rigidbody2D . Additional resources: Collider2D and Rigidbody2D . ```csharp using UnityEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_110eb5ecb208
unity_docs
editor
What is `Build.BuildPlayerProcessor` in Unity? Explain its purpose and usage.
BuildPlayerProcessor class in UnityEditor.Build Implements interfaces: IOrderedCallback Description Extend BuildPlayerProcessor to receive callbacks during a Player build. Add files and perform custom setup before the build starts. For more information, refer to Use build callbacks . Additional resources: IF...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c39e12ca11bb
unity_docs
physics
What is `SimulationStage.PublishSimulationResults` in Unity? Explain its purpose and usage.
SimulationStage.PublishSimulationResults Description This stage publishes simulation results. Specifically, the stage: Applies latest Rigidbody poses to corresponding Transform components. Applies latest ArticulationBody poses to corresponding Transform components. Invokes OnCollision, OnTrigger, OnJoint...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0808a2d0d4f
unity_docs
rendering
What is `Rendering.RendererUtils.RendererListDesc.overrideShader` in Unity? Explain its purpose and usage.
RendererListDesc.overrideShader public Shader overrideShader ; Description The shader to render the RendererList's GameObjects with. This overrides the shader for each GameObject. Override shaders do not override existing material properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fafcd3f293da
unity_docs
scripting
What is `AndroidJNI.Throw` in Unity? Explain its purpose and usage.
AndroidJNI.Throw Declaration public static int Throw (IntPtr obj ); Description Causes a java.lang.Throwable object to be thrown. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_912b7fadcd4b
unity_docs
physics
Explain 'Wheel collider friction' in Unity.
The Wheel collider calculates wheel friction separately from the rest of the physics engine , and ignores standard Physic Material settings. Instead, it uses a slip-based friction model, which provides more realistic behavior. In most cases, the Wheel collider ’s default friction settings are sufficient to create a wor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90b3c848528d
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector2.operator_multiply`.
Vector2.operator * public static Vector2 operator * ( Vector2 a , float d ); Description Multiplies a vector by a number. Multiplies each component of a by a number d . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // make the vector twice longer: prints (2.0,4.0)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bc3674636b5
unity_docs
rendering
What is `Rendering.LightUnit.Lumen` in Unity? Explain its purpose and usage.
LightUnit.Lumen Description The unit of luminous flux. Describes the total amount of visible light that a light source emits in all directions. When you use this unit, the amount of visible light is independent of the source's size meaning the illumination level of a Scene does not change depending on the size of a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7fa01271b32
unity_docs
editor
What is `EditorGUIUtility.GetMainWindowPosition` in Unity? Explain its purpose and usage.
EditorGUIUtility.GetMainWindowPosition Declaration public static Rect GetMainWindowPosition (); Returns Rect Position of Unity Editor's main window. Description Returns position of Unity Editor's main window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8844a9373113
unity_docs
scripting
In Unity's 'Video playback in Web', what is 'Supported video playback features and formats' and how does it work?
Unity Web supports the following video playback audio output modes: Class Use VideoAudioOutputMode.None Disables the embedded audio. VideoAudioOutputMode.Direct Sends the embedded audio directly to the platform’s audio hardware. VideoAudioOutputMode.AudioSource Sends the embedded audio into a specified AudioSource . If...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ef58e429f14
unity_docs
rendering
What is `UIElements.PanelSettings.vertexBudget` in Unity? Explain its purpose and usage.
PanelSettings.vertexBudget public uint vertexBudget ; Description The expected number of vertices that will be used by this panel. A value of 0 means that the UI renderer will use its own default. If this hint is set too high, extra CPU and GPU memory may be allocated without actually being used. If set t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc6bd02f08e4
unity_docs
scripting
What are the parameters of `AudioSource.SetScheduledEndTime` in Unity?
Description Changes the time at which a sound that has already been scheduled to play will end. Notice that depending on the timing not all rescheduling requests can be fulfilled. Note that the time specified is still a time on the absolute time-line, meaning that the sound will stop when reaching that time, regardless...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03aaeec2af77
unity_docs
animation
What is `Playables.AnimationPlayableUtilities.PlayLayerMixer` in Unity? Explain its purpose and usage.
AnimationPlayableUtilities.PlayLayerMixer Declaration public static Animations.AnimationLayerMixerPlayable PlayLayerMixer ( Animator animator , int inputCount , out Playables.PlayableGraph graph ); Parameters Parameter Description animator Target Animator. inputCount The input count for the Animati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bac0b413ff15
unity_docs
input
What is `Device.SystemInfo.supportsDepthFetchInRenderPass` in Unity? Explain its purpose and usage.
SystemInfo.supportsDepthFetchInRenderPass public static bool supportsDepthFetchInRenderPass ; Description Indicates whether RenderPass can use its depth attachment as input. (Read Only) When RenderPass is emulated (e.g. D3D11 or OpenGL Core) this is always possible since the temporary copy will be used. When na...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_661fc6413ce3
github
scripting
Write a Unity C# script called App Version Text
```csharp using UnityEngine; namespace GI.UnityToolkit.Components.UI { /// <summary> /// Automatically sets the text to the application version at runtime. /// </summary> public class AppVersionText : TextComponent { [SerializeField, Tooltip("(Optional) Used to add text around the applicati...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_97e53f9fcc07
github
scripting
Write a Unity C# MonoBehaviour script called Scene Singleton Mono Behaviour
```csharp using System; using System.Collections.Generic; using SiegfriedWagner.Singletons.Internal; using UnityEngine; using UnityEngine.SceneManagement; namespace SiegfriedWagner.Singletons { /// <summary> /// A scene scoped singleton inheriting from MonoBehaviour. /// Scene scoped singleton is a mono be...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_abfc4947783c
unity_docs
scripting
What is `SceneVisibilityManager.AreAllDescendantsVisible` in Unity? Explain its purpose and usage.
SceneVisibilityManager.AreAllDescendantsVisible Declaration public bool AreAllDescendantsVisible ( GameObject gameObject ); Parameters Parameter Description gameObject GameObject to check. Returns bool Returns true if all descendants of the GameObject are visible. Description Checks whether all the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d04e9f3ad6a
unity_docs
rendering
In Unity's 'Configure lightmapping with a Lighting Settings Asset', what is 'Viewing and editing the properties of a Lighting Settings Asset' and how does it work?
You can view and edit the properties of Lighting Settings Asset in two places in the Unity Editor: In the Project view, if you select a Lighting Settings Asset, you can view and edit its properties in the Inspector . If the active Scene has a Lighting Settings Asset assigned to it, you can view and edit the properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e88aa342a4c2_doc_16
github
scripting
What does `FetchDirectTextMessageHistory` do in this Unity script? Explain its purpose and signature.
Access the history of a direct message conversation between two playersThe user id or user name Signature: ```csharp public Task<List<TextMessage>> FetchDirectTextMessageHistory(string _userId) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_64ffd2cfa741
unity_docs
physics
In Unity's 'Low-level native plug-in Shader compiler access', what is 'Shader compiler access extension API' and how does it work?
In order to take advantage of the rendering extension, a plug-in should export UnityShaderCompilerExtEvent. There is a lot of documentation provided inside the include file. A plug-in will get called via UnityShaderCompilerExtEvent whenever one of the builtin events is triggered by Unity. The callbacks can also be adde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c76015161309
unity_docs
scripting
What is `PlayerSettings.GetIl2CppCodeGeneration` in Unity? Explain its purpose and usage.
PlayerSettings.GetIl2CppCodeGeneration Declaration public static Build.Il2CppCodeGeneration GetIl2CppCodeGeneration ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description buildTarget The NamedBuildTarget . Returns Il2CppCodeGeneration Returns code generation option for the specifie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd00247d46da
unity_docs
editor
Explain 'Experimental packages' in Unity.
Experimental packages are new packages or experimental modifications made to mature packages. Unity doesn’t support Experimental packages because they’re in the early stages of development. Note: Before Unity Editor version 2021.1, the Package Manager used the “Preview” state to describe packages that are experimental ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9bdd3b2200d7
github
scripting
Write a Unity C# script called Play Audio
```csharp using Solid.Core; using UnityEngine; namespace Solid.Examples { [RequireComponent(typeof(AudioSource))] public class PlayAudio : Awaitable<bool> { private AudioSource _source; private AudioClip _clip; protected override void OnAwake(params object[] parameters) { ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_dce42843a0ec
unity_docs
rendering
What is `Terrain.deringLightProbesForTrees` in Unity? Explain its purpose and usage.
Terrain.deringLightProbesForTrees public bool deringLightProbesForTrees ; Description Removes ringing from light probes on Tree Editor trees (Editor only). Ringing is an artifact that can occur on probes if they are subject to drastic changes in lighting. Light may overshoot and appear in the opposite end of th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_babd5c2ca087
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayout.MinHeight`.
GUILayout.MinHeight Declaration public static GUILayoutOption MinHeight (float minHeight ); Description Option passed to a control to specify a minimum height. Minimum height for a window. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a window you can resize between 80px...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_111f62754518
unity_docs
scripting
Show me a Unity C# example demonstrating `GUISkin.FindStyle`.
GUISkin.FindStyle Declaration public GUIStyle FindStyle (string styleName ); Description Try to search for a GUIStyle . This functions returns NULL and does not give an error. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Checks if a style name exists string aStyleName = "A Style I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_093e2a6746b7
unity_docs
rendering
What are the parameters of `GUILayout.RepeatButton` in Unity?
Returns bool true when the holds down the mouse. Description Make a repeating button. The button returns true as long as the user holds down the mouse. Repeat Buttons in the Game View. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a button with an image and a button with text ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60108fa6a9da
unity_docs
scripting
What is `Experimental.GraphView.EdgeControl.PointsChanged` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeControl.PointsChanged Declaration protected void PointsChanged (); Description Check if the edge points have changed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a443e93509c3
unity_docs
scripting
What is `LineUtility` in Unity? Explain its purpose and usage.
LineUtility class in UnityEngine / Implemented in: UnityEngine.CoreModule Description A collection of common line functions. Static Methods Method Description Simplify Generates a simplified version of the original line by removing points that fall within the specified tolerance.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a27878717a93
unity_docs
animation
Explain 'Access the Particle System from the Animation system' in Unity.
All particle properties are accessible by the Animation system, meaning you can keyframe them in and control them from your animations. To access the Particle System ’s properties, follow these steps: Attach an Animator component to the Particle System’s GameObject . An Animation Controller and an Animation are also re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_89c5df242e9f
unity_docs
performance
In Unity's 'Set up your JavaScript plug-in', what is 'Call functions from the .jslib file type' and how does it work?
You can call functions from your .jslib plug-in files in your Unity C# or native scripts . The .jslib file type uses the --js-library Emscripten module. For more information, refer to the Emscripten documentation about the –js-library Emscripten option . The following code shows an example of a .jslib plug-in file with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5760ddb64250
unity_docs
physics
What is `Animator.GetBehaviour` in Unity? Explain its purpose and usage.
Animator.GetBehaviour Declaration public T GetBehaviour (); Description Returns the first StateMachineBehaviour that matches type T or is derived from T . Returns null if none are found. ```csharp using UnityEditor; using UnityEngine;public class RunBehaviour : StateMachineBehaviour { // OnStateUpdate is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_59f654d7955f_doc_2
github
scripting
What does `FallbackTrackingStateAction` do in this Unity script? Explain its purpose and signature.
The fallback Input System action to get the Tracking State when updating this GameObject position or rotationwhen the default track status action has no position or rotation data. If not specified, this will fallbackto the device's tracking state that drives the position or rotation action.Must be a IntegerControl Cont...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_1f04d1020631
unity_docs
rendering
Explain 'Embedded dependencies' in Unity.
Any package that appears under your project’s Packages folder is embedded in that project. You can create an embedded package in several ways: Create a new package directly in your project’s Packages folder. Manually copy a Unity package from the project’s package cache into your project’s Packages folder. Use a C# scr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19a880808e5d
unity_docs
ui
Give me an overview of the `CursorLockMode` class in Unity.
CursorLockMode enumeration Description How the cursor should behave. These are various modes that control the behaviour of the Cursor. A default cursor must be set in PlayerSettings > Default Cursor . ```csharp //This script makes Buttons that control the Cursor's lock state. Note that the Confined mode only w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7667ae7d3c4b
unity_docs
scripting
What is `Accessibility.AccessibilityHierarchy` in Unity? Explain its purpose and usage.
AccessibilityHierarchy class in UnityEngine.Accessibility / Implemented in: UnityEngine.AccessibilityModule Description Represents the hierarchy data model that the screen reader uses for reading and navigating the UI. A hierarchy must be set to active through AssistiveSupport.activeHierarchy when the scr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e00ced9b57d
unity_docs
physics
What is `Search.SearchViewFlags.OpenInBuilderMode` in Unity? Explain its purpose and usage.
SearchViewFlags.OpenInBuilderMode Description This flag forces the picker to open in builder mode. When this flag is set, the picker will open in builder mode. When it is not set, the picker will open in the last mode used. ```csharp [SearchContext("t:material", "asset", SearchViewFlags.OpenInBuilderMode)] public ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ea51f6076e4
unity_docs
rendering
What is `Build.Content.ContentBuildInterface.CalculatePlayerDependenciesForGameManagers` in Unity? Explain its purpose and usage.
ContentBuildInterface.CalculatePlayerDependenciesForGameManagers Declaration public static Build.Content.GameManagerDependencyInfo CalculatePlayerDependenciesForGameManagers ( Build.Content.BuildSettings settings , Build.Content.BuildUsageTagGlobal globalUsage , Build.Content.BuildUsageTagSet usageSet ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e654aac775a4
unity_docs
scripting
What is `Gradient.alphaKeys` in Unity? Explain its purpose and usage.
Gradient.alphaKeys public GradientAlphaKey[] alphaKeys ; Description All alpha keys defined in the gradient. Note that the alpha keys will be automatically sorted by time value and that it is ensured to always have a minimum of 2 alpha keys.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37b3bee9208f
unity_docs
rendering
What is `ParticleSystemRenderer.activeTrailVertexStreamsCount` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.activeTrailVertexStreamsCount public int activeTrailVertexStreamsCount ; Description The number of currently active custom trail vertex streams. Additional resources: ParticleSystemRenderer.SetActiveTrailVertexStreams , ParticleSystemRenderer.GetActiveTrailVertexStreams .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0012c05e1f7
unity_docs
ui
Give me an overview of the `PropertyDrawer` class in Unity.
PropertyDrawer class in UnityEditor / Inherits from: GUIDrawer Description Base class to derive custom property drawers from. Use this to create custom drawers for your own Serializable classes or for script variables with custom PropertyAttribute s. PropertyDrawers have two uses: Customize the GUI of every i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd94610311d8
unity_docs
scripting
Show me a Unity C# example demonstrating `Quaternion.x`.
Quaternion.x public float x ; Description X component of the Quaternion. Don't modify this directly unless you know quaternions inside out. ```csharp //Create three Sliders (Create>UI>Slider) and three Text GameObjects (Create>UI>Text). These are for manipulating the x, y, and z values of the Quaternion. The t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86bbf1e9fdb3
unity_docs
physics
What is `Profiling.ProfilerArea` in Unity? Explain its purpose and usage.
ProfilerArea enumeration Description The different areas of profiling, corresponding to the charts in ProfilerWindow . Each area corresponds to a chart in ProfilerWindow and the accompanying detail pane in its bottom half. These are the categories that group statistical data and provide additional insights into...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9b33645a501
unity_docs
xr
Show me a Unity C# example demonstrating `FrameTiming`.
within frame. The cpuMainThreadPresentWaitTime is the sum of displayed [wait] blocks, and includes waits for Present and target fps. It’s harder to calculate GPU work time, because it starts somewhere in the middle of scene rendering processes and finishes on the next frame's sync point with the previous frame. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f5a5f43a95f
unity_docs
scripting
Give me an overview of the `ChangeGameObjectOrComponentPropertiesEventArgs` class in Unity.
ChangeGameObjectOrComponentPropertiesEventArgs struct in UnityEditor Description A change of this type indicates that a property of a GameObject or Component has changed. This happens for example when Undo.RecordObject is used with an instance of a Component . Properties Property Description instanceId ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31ad2f47028f
unity_docs
editor
What is `iOS.Xcode.PBXProject.GetCopyFilesBuildPhaseByTarget` in Unity? Explain its purpose and usage.
PBXProject.GetCopyFilesBuildPhaseByTarget Declaration public string GetCopyFilesBuildPhaseByTarget (string targetGuid , string name , string dstPath , string subfolderSpec ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . name The name...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e56df34b886
unity_docs
ui
What is `Experimental.GraphView.GraphView.CalculateRectToFitAll` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.CalculateRectToFitAll Declaration public Rect CalculateRectToFitAll ( UIElements.VisualElement container ); Parameters Parameter Description container This should be the view container. Returns Rect The c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1be110d3ac65
unity_docs
xr
In Unity's 'Apple ARKit XR Plugin', what is 'Description' and how does it work?
Provides native Apple ARKit integration for use with Unity’s multi-platform XR API. Supports the following features: -Efficient Background Rendering -Horizontal Planes -Depth Data -Anchors -Hit Testing -Face Tracking -Environment Probes -Meshing -Occlusion * Apple and ARKit are trademarks of Apple Inc., registered in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9a176653052
unity_docs
animation
What is `Animations.TransformSceneHandle.GetRotation` in Unity? Explain its purpose and usage.
TransformSceneHandle.GetRotation Declaration public Quaternion GetRotation ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that manages this handle. Returns Quaternion The rotation of the transform in world space. Description Gets the rotation of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15be18070bf9
unity_docs
editor
What is `PrefabUtility.GetCorrespondingObjectFromOriginalSource` in Unity? Explain its purpose and usage.
PrefabUtility.GetCorrespondingObjectFromOriginalSource Declaration public static TObject GetCorrespondingObjectFromOriginalSource (TObject componentOrGameObject ); Parameters Parameter Description componentOrGameObject The object to find the corresponding original object from. Returns TObject The corresp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cd8d7846821
unity_docs
rendering
What is `Texture3D.GetPixelData` in Unity? Explain its purpose and usage.
Texture3D.GetPixelData Declaration public NativeArray<T> GetPixelData (int mipLevel ); Parameters Parameter Description mipLevel The mipmap level to read from. The range is 0 through the texture's Texture.mipmapCount . The default value is 0 . Returns NativeArray<T> A native array that points direct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0e8c180ffac
unity_docs
input
What is `Playables.PlayableExtensions.SetInputWeight` in Unity? Explain its purpose and usage.
PlayableExtensions.SetInputWeight Declaration public static void SetInputWeight (U playable , int inputIndex , float weight ); Declaration public static void SetInputWeight (U playable , V input , float weight ); Parameters Parameter Description playable The Playable used by this operation. input...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ff470cdb47ea
unity_docs
rendering
In Unity's 'Framebuffer orientation', what is 'Using pre-rotation in Unity' and how does it work?
To make Unity apply pre-rotation, you can use C# scripts or the Unity Editor: Through C# scripts: Set PlayerSettings.vulkanEnablePreTransform to true . Through the Unity Editor: Select Edit > Project Settings . In the Project settings window, select the Player tab, then open Android Player Settings . In the Other Setti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb576fcf32f1
unity_docs
rendering
What is `Material.GetMatrix` in Unity? Explain its purpose and usage.
Material.GetMatrix Declaration public Matrix4x4 GetMatrix (string name ); Declaration public Matrix4x4 GetMatrix (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. Description Get a named matrix v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5889b6e99ef9
unity_docs
editor
What is `EditorGUILayout.RenderingLayerMaskField` in Unity? Explain its purpose and usage.
EditorGUILayout.RenderingLayerMaskField Declaration public static RenderingLayerMask RenderingLayerMaskField (string label , RenderingLayerMask layers , params GUILayoutOption[] options ); Declaration public static RenderingLayerMask RenderingLayerMaskField (string label , RenderingLayerMask layers ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63b24c130dfc
unity_docs
scripting
What is `Handles.RotationHandle` in Unity? Explain its purpose and usage.
Handles.RotationHandle Declaration public static Quaternion RotationHandle ( Quaternion rotation , Vector3 position ); Declaration public static Quaternion RotationHandle ( Handles.RotationHandleIds ids , Quaternion rotation , Vector3 position ); Parameters Parameter Description rotation ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b3ed9f412a0e_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The pointer world position. Signature: ```csharp private Vector3 pointerWorldPosition = Vector3.zero; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_2a071e4214b0
unity_docs
scripting
Explain 'Scene view navigation' in Unity.
By default, you look through and control the Scene Camera when you navigate through the Scene view. To look through and control a GameObject that has a camera component attached to it, use the Cameras overlay . You can use the following navigation controls to move the Scene Camera or a GameObject that has a camera comp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9796d9eb9c3
unity_docs
rendering
Explain 'Validate and correct materials in the Built-In Render Pipeline' in Unity.
## Validate albedo Unity’s Material charts define the standard luminance range as 50–243 sRGB for non-metals, and 186–255 sRGB for metals. Validate Albedo mode colors any pixels outside of these ranges with different colors to indicate that the value is too low or too high. In the example below, the first texture is b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e851650afcb0
unity_docs
scripting
In Unity's 'Direct reference asset management', what is 'Unity object references' and how does it work?
If a field references an object derived from UnityEngine.Object , then Unity doesn’t serialize the entire object’s data, and instead serializes a pointer to that object. The pointer contains the following information: A global unique identifier (GUID) : A 128-bit (32-character hexadecimal) ID that uniquely identifies t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_02e9d4e074b6
unity_docs
scripting
Show me a Unity code example for 'Inverse Kinematics'.
Controller. The Animator Controller component assigned to the character’s Animator Controller. Next, add a script to your character. In this example, the script is named IKControl . This script sets the IK target for the right hand of the character. This script also changes the look at position so that the character lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_36cb6cae3e59
unity_docs
scripting
Explain 'Receive callbacks when any bound properties change' in Unity.
Version : 2021.3+ The examples demonstrate how to receive callbacks when any properties of a bound serialized object changes. ## Example overview This example creates a custom Inspector with two fields. It warns the user if the values of the fields fall outside certain ranges. You can find the completed files for the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54ce5d26e94a
unity_docs
animation
What is `UIElements.Experimental.ValueAnimation_1.valueUpdated` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ValueAnimation<T0>.valueUpdated public Action<VisualElement,T> valueUpdated ; Description Callback invoked after every value interpolation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_145ce4d6f4cf
unity_docs
rendering
Explain 'ShaderLab: legacy texture combining' in Unity.
Note : The ShaderLab functionality on this page is legacy, and is documented for backwards compatibility only. If your shader source file includes HLSL code, Unity ignores these commands completely. If your shader source file does not include HLSL code, Unity compiles these commands into regular shader programs on impo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_95c71f24d65e_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
EXPERIMENTAL: This is an alternative version of that keeps a globally accessiblereference to this context via .USES: See for more info. Signature: ```csharp public class ContextWithLocator : BaseContext ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c90e0299814
unity_docs
math
What is `Compilation.CompilationPipeline.IsDefineConstraintsCompatible` in Unity? Explain its purpose and usage.
CompilationPipeline.IsDefineConstraintsCompatible Declaration public static bool IsDefineConstraintsCompatible (string[] defines , string[] defineConstraints ); Parameters Parameter Description defines A string array of #define directives. defineConstraints A string array of #define directives to to check...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec0ac3caca97
unity_docs
rendering
What is `ParticleSystem.MainModule.startRotationMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startRotationMultiplier public float startRotationMultiplier ; Description A multiplier for ParticleSystem.MainModule.startRotation . Changing this property is more efficient than accessing the entire curve, if you only want to change the overall rotation multiplier. ```csharp using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fdf5c1aa31d4
unity_docs
rendering
In Unity's 'Scriptable Render Pipeline Batcher in URP', what is 'How the SRP Batcher works' and how does it work?
The traditional way to optimize draw calls is to reduce the number of them. Instead, the SRP Batcher reduces render-state changes between draw calls. To do this, the SRP Batcher combines a sequence of bind and draw GPU commands. Each sequence of commands is called an SRP batch. To achieve optimal performance for your r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e188cdeb4941
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetPostprocessor.OnPreprocessTexture`.
AssetPostprocessor.OnPreprocessTexture() Description Add this function to a subclass to get a notification just before the texture importer is run. This lets you set up default values for the import settings. Use this callback if you want to change the compression format of the texture. ```csharp using UnityEngin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c6cebb96352
unity_docs
scripting
Give me an overview of the `SpriteMeshType` class in Unity.
SpriteMeshType enumeration Description Defines the type of mesh generated for a sprite. Properties Property Description FullRect Rectangle mesh equal to the user specified sprite size. Tight Tight mesh based on pixel alpha values. As many excess pixels are cropped as possible.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fbfb0356d23
unity_docs
scripting
What is `Unity.Properties.IPropertyBag_1.Accept` in Unity? Explain its purpose and usage.
IPropertyBag<T0>.Accept Declaration public void Accept ( Unity.Properties.IPropertyBagVisitor visitor , ref TContainer container ); Parameters Parameter Description visitor The visitor being run. container The container being visited. Description Call this method to invoke IPropertyBagVisitor.Visit_1 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53f995baba3e
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.Arrow`.
MouseCursor.Arrow Description Normal pointer arrow. ```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 displays a small window that has a color box in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d3de2f1b963
unity_docs
physics
What is `PhysicsShapeGroup2D.ctor` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D Constructor Declaration public PhysicsShapeGroup2D (int shapeCapacity = 1, int vertexCapacity = 8); Parameters Parameter Description shapeCapacity The initial capacity of the PhysicsShape2D list used to contain the shapes. vertexCapacity The initial capacity of the vertices list ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec1343d7c27e
unity_docs
scripting
What is `IMGUI.Controls.TreeView.GetAncestors` in Unity? Explain its purpose and usage.
TreeView.GetAncestors Declaration protected IList<int> GetAncestors (int id ); Parameters Parameter Description id TreeViewItem ID. Returns IList<int> List of all the ancestors of a given item with ID id. Description This method is e.g. used for revealing items that are currently under a collapsed it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96c751cb79d6
unity_docs
rendering
What is `AssetDatabase.SetMainObject` in Unity? Explain its purpose and usage.
AssetDatabase.SetMainObject Declaration public static void SetMainObject ( Object mainObject , string assetPath ); Parameters Parameter Description mainObject The object to become the main object. assetPath Path to the asset file. Description Specifies which object in the asset file should become the m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c67e2d7a58d9
unity_docs
scripting
What is `iOS.Device.iosAppOnMac` in Unity? Explain its purpose and usage.
Device.iosAppOnMac public static bool iosAppOnMac ; Description Indicates whether the process is an iOS app running on a Mac. This property returns true only when the process is an iOS application running on a Mac computer with Apple silicon.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6de10b4e2b85
unity_docs
editor
What is `UIElements.ToolbarMenuElementExtensions` in Unity? Explain its purpose and usage.
ToolbarMenuElementExtensions class in UnityEditor.UIElements Description An extension class that handles menu management for elements that are implemented with the IToolbarMenuElement interface, but are identical to DropdownMenu. Static Methods Method Description ShowMenu Display the menu for the element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98948bd4c61e
unity_docs
rendering
What is `Shader.SetGlobalInt` in Unity? Explain its purpose and usage.
Shader.SetGlobalInt Declaration public static void SetGlobalInt (string name , int value ); Declaration public static void SetGlobalInt (int nameID , int value ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cbe5a5a3f23
unity_docs
scripting
What are the parameters of `Input.GetTouch` in Unity?
Returns Touch Touch details in the struct. Description Call Input.GetTouch to obtain a Touch struct. Note : This API 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 Input System package. To learn more about input, refer to Inpu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00bc09bdbda2
unity_docs
scripting
What is `Playables.PlayableBehaviour.OnGraphStart` in Unity? Explain its purpose and usage.
PlayableBehaviour.OnGraphStart Declaration public void OnGraphStart ( Playables.Playable playable ); Parameters Parameter Description playable The Playable that owns the current PlayableBehaviour. Description This function is called when the PlayableGraph that owns this PlayableBehaviour starts. OnGr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a37eb9017b9
unity_docs
rendering
Give me an overview of the `LightmapSettings` class in Unity.
LightmapSettings class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Stores lightmaps of the Scene. A Scene can have several lightmaps stored in it, and Renderer components can use those lightmaps. This makes it possible to use the same material on multiple obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_626d61c73144
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.ScreenOrientation` in Unity? Explain its purpose and usage.
ScreenOrientation enumeration Description Mirrors the ScreenOrientation enum. For more information about the attribute, see Android's documentation: ScreenOrientation attribute Properties Property Description Null Attribute is not set and will not appear in the element. Unspecified Mirrors android:screen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.