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_a20184cffbf7
unity_docs
scripting
What is `UIElements.MeshGenerationContext.AllocateTempMesh` in Unity? Explain its purpose and usage.
MeshGenerationContext.AllocateTempMesh Declaration public void AllocateTempMesh (int vertexCount , int indexCount , out NativeSlice<Vertex> vertices , out NativeSlice<ushort> indices ); Parameters Parameter Description vertexCount The number of vertices to allocate. The maximum is 65535 (or UInt16.MaxValu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fb15d5e5e17
unity_docs
editor
What are the parameters of `Search.SearchExpression.TryConvertToDouble` in Unity?
Returns bool Returns true if we were able to select the value and convert it to a double. Description Resolve a selector on an item and try to convert the selected value to a double. ```csharp [Description("Returns asset paths corresponding to a list of instance ids")] [SearchExpressionEvaluator("IdsToPaths", SearchExp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb0a6e7ab275
unity_docs
ui
What is `UIElements.UQueryState_1` in Unity? Explain its purpose and usage.
UQueryState<T0> struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Query object containing all the selection rules. The object can be saved and rerun later without re-allocating memory. Public Methods Method Description AtIndex Selects the nth element matching al...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a11c678296d4
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.isArray`.
SerializedProperty.isArray public bool isArray ; Description Is this property an array? (Read Only) Additional resources: arraySize , GetArrayElementAtIndex . ```csharp using System.Text; using UnityEditor; using UnityEngine;// Example showing the structure of SerializedProperty objects that comprise an Arra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e1edd7cf6c3
unity_docs
scripting
Show me a Unity C# example demonstrating `GL.LoadProjectionMatrix`.
he loaded projection matrix is expected to project into the API-agnostic clip volume defined by the following boundaries: 1. x = -1..1 (left..right) 2. y = -1..1 (bottom..top) 3. z = -1..1 (near..far) Unity might combine the matrix with an additional transformation to map to the convention of the actual graphics ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b8b783715a58
github
scripting
Write a Unity C# XR/VR script for AR Eyes Visualizer
```csharp using TMPro; using UnityEngine; using UnityEngine.XR.ARFoundation; public class AREyesVisualizer : MonoBehaviour { [SerializeField] private GameObject eyesPrefab; private TextMeshProUGUI eyeInfo; private ARFaceManager faceManager; private ARFace face; private GameObject leftEy...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_51472d9c858d
unity_docs
editor
Show me a Unity C# example demonstrating `EditorUserBuildSettings.overrideMaxTextureSize`.
t overrides individual texture import settings. Set this to zero to tell Unity not to apply an override, and to use the maximum size specified in individual texture import settings. The Unity editor command line argument -overrideMaxTextureSize can also be used to set this. Additional resources: EditorUserBuildSetti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_448491d56167
unity_docs
scripting
What are the parameters of `Serialization.ManagedReferenceUtility.GetManagedReferenceIds` in Unity?
Returns long[] Returns a list of the most recent serialization of the host object, including the most recent call to ManagedReferenceUtility.SetManagedReferenceIdForObject . An entry in the list is returned as ManagedReferenceUtility.RefIdNull if its SerialReference field is set to null. The returned list excludes obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b73ec055fd62
unity_docs
audio
What is `Audio.AudioMixerGroup.audioMixer` in Unity? Explain its purpose and usage.
AudioMixerGroup.audioMixer public Audio.AudioMixer audioMixer ; Description Gain access to the AudioMixer that this AudioMixerGroup belongs to (Read Only). This property is useful if you want to access the AudioMixer and modify its properties or the properties of its groups dynamically. ```csharp using U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc08c2a302c7
unity_docs
scripting
Show me a Unity C# example demonstrating `Random.onUnitSphere`.
Random.onUnitSphere public static Vector3 onUnitSphere ; Description Returns a random point on the surface of a sphere with radius 1.0 (Read Only). ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Sets the rigidbody velocity to 10 and in a random direction. GetComponent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e494a47024a8
unity_docs
physics
Show me a Unity code example for 'Enable or disable asynchronous shader compilation'.
ate scope, you can use ShaderUtil.allowAsyncCompilation . To do this: Store the current state of ShaderUtil.allowAsyncCompilation in a variable. Before you call the rendering commands, set ShaderUtil.allowAsyncCompilation to false . Call the rendering commands. After calling the rendering commands, restore ShaderUtil.a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4537818d0785_doc_12
github
scripting
What does `OnSelectExited` do in this Unity script? Explain its purpose and signature.
Emits the OnGrabReleased-Event alongside performing the rest of the select exit.Args of the select exit. Signature: ```csharp protected override void OnSelectExited(SelectExitEventArgs args) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_b7459738c701
unity_docs
scripting
What are the parameters of `Search.IPropertyDatabaseView.Invalidate` in Unity?
Description Invalidates a single property record so it is no longer retrievable. ``` using (var view = propertyDatabase.GetView()) { // Store a property. var propertyRecordKey = view.CreateRecordKey("path/to/my/asset", "m_Color"); view.Store(propertyRecordKey, new Color(1, 0, 1)); // Invalidate the pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1deb8e6fe21
unity_docs
scripting
What is `Experimental.GraphView.Scope.ScheduleUpdateGeometryFromContent` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.ScheduleUpdateGeometryFromContent Declaration protected void ScheduleUpdateGeometryFromContent (); Description Schedules the update of the size and position of the Scope based on its contents.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_157a8fec3186
unity_docs
animation
What is `Animations.ParentConstraint.GetTranslationOffset` in Unity? Explain its purpose and usage.
ParentConstraint.GetTranslationOffset Declaration public Vector3 GetTranslationOffset (int index ); Parameters Parameter Description index The index of the constraint source. Returns Vector3 The translation offset. Description Gets the rotation offset associated with a source by index. Throws Inva...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea86ed32b7ca
unity_docs
editor
What is `Debug.developerConsoleEnabled` in Unity? Explain its purpose and usage.
Debug.developerConsoleEnabled public static bool developerConsoleEnabled ; Description Allows you to enable or disable the developer console. The developer console is a window that can appear when a development build of your project is running. It is similar to the Console window in the Editor, but appears at ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_816eab6dbc50
unity_docs
editor
What is `SceneManagement.EditorSceneManager.SaveOpenScenes` in Unity? Explain its purpose and usage.
EditorSceneManager.SaveOpenScenes Declaration public static bool SaveOpenScenes (); Returns bool Returns true if all open Scenes are successfully saved. Description Save all open Scenes. Note : You must mark your Scenes as dirty to be able to save them. Use EditorSceneManager.MarkAllScenesDirty to do th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b4c739fa50b6
unity_docs
scripting
Explain 'GameObject fundamentals' in Unity.
Understand the basic workflows and operations for working with GameObjects in Unity. Learn how to manipulate transforms, control GameObject visibility and activation, create primitive shapes for prototyping, and understand how Unity manages GameObjects internally. Topic Description The GameObject class Understand the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0574ac051e34
unity_docs
rendering
In Unity's 'OpenGL Core', what is 'OpenGL Core features' and how does it work?
The new OpenGL back end introduces many new features (previously mostly DX11/GLES3 only): Compute shaders (as well as ComputeBuffers and “random write” render textures) Tessellation and Geometry shaders Indirect draw ( Graphics.DrawProcedural and Graphics.DrawProceduralIndirect ) Advanced blend modes
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf144065b0e6
unity_docs
ui
What is `UIElements.VisualElement.AddToClassList` in Unity? Explain its purpose and usage.
VisualElement.AddToClassList Declaration public void AddToClassList (string className ); Parameters Parameter Description className The name of the class to add to the list. Description Adds a class to the class list of the element in order to assign styles from USS. Note the class name is case-sensitive.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52ae61f8ee94
unity_docs
scripting
What is `IMGUI.Controls.TreeView.rootItem` in Unity? Explain its purpose and usage.
TreeView.rootItem protected IMGUI.Controls.TreeViewItem rootItem ; Description The hidden root item of the TreeView (it is never rendered). It has a depth of -1 whereas the rows of the TreeView will have a depth of 0 or higher. The rootItem can be used for traversing the items created in BuildRoot (if a ful...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_41f7394fd9df
unity_docs
editor
In Unity's 'Stack trace logging', what is 'Setting the stack trace type' and how does it work?
You can configure the stack trace option in the following ways: From the Console window menu: To select a stack trace option for all log message types, navigate to Stack Trace Logging > All and select the stack trace option for all log message types. To select a stack trace option for one type of log message, navigate ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_14ca2c54f7cf
unity_docs
rendering
In Unity's 'Transparent Cutout Vertex-Lit', what is 'Transparent Cutout Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. Cutout shader is an alternative way of displaying transparent objects. Differences between Cutout and regular Transparent shaders are: This shader cannot have partially transparent areas. Everything will be either fully opaque or fully transparent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21d6b5bfe745
unity_docs
physics
What is `Physics2D.raycastsHitTriggers` in Unity? Explain its purpose and usage.
Removed Physics2D.raycastsHitTriggers Obsolete Physics2D.raycastsHitTriggers is deprecated. Use Physics2D.queriesHitTriggers instead. Upgrade to queriesHitTriggers public static bool raycastsHitTriggers ; Description Set the raycasts to either detect or not detect Triggers. A Collider can be set up to act ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_152de45dfde0
unity_docs
editor
What is `Awaitable.EndOfFrameAsync` in Unity? Explain its purpose and usage.
Awaitable.EndOfFrameAsync Declaration public static Awaitable EndOfFrameAsync (CancellationToken cancellationToken ); Parameters Parameter Description cancellationToken Optional cancellation token used to signal cancellation. Description Resumes execution after all Unity subsystems have run for the curre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2086db42785
unity_docs
rendering
What is `Camera.nearClipPlane` in Unity? Explain its purpose and usage.
Camera.nearClipPlane public float nearClipPlane ; Description The distance of the near clipping plane from the Camera, in world units. The near clipping plane is nearest point of the Camera's view frustum. The Camera cannot see geometry that is closer than this distance. For more information, see Understandin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f8a82648ad8
unity_docs
editor
What is `Android.AndroidPluginImporterUtilities.SetAndroidSharedLibraryType` in Unity? Explain its purpose and usage.
AndroidPluginImporterUtilities.SetAndroidSharedLibraryType Declaration public static void SetAndroidSharedLibraryType ( PluginImporter importer , Android.AndroidSharedLibraryType type ); Description Sets the type of content that the shared library contains. This is only applicable for plugins that use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96b0acb2db68
unity_docs
scripting
Show me a Unity C# example demonstrating `RuntimePlatform.OSXPlayer`.
RuntimePlatform.OSXPlayer Description In the player on macOS. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.OSXPlayer) { Debug.Log("Do something special he...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f972d40952ae
unity_docs
scripting
What are the parameters of `UIElements.EnumFlagsField.ctor` in Unity?
Description Constructs an EnumFlagsField with a default value, and initializes its underlying type. Declaration public EnumFlagsField (Enum defaultValue , bool includeObsoleteValues ); Parameters Parameter Description defaultValue Initial value. This also detects the Enum type. Description Constructs an EnumFlagsField ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f13f1a3d3e3
unity_docs
editor
What is `AssetImporters.AssetImporterEditor.showImportedObject` in Unity? Explain its purpose and usage.
AssetImporterEditor.showImportedObject public bool showImportedObject ; Description Should imported object be shown as a separate editor? Let asset importers decide if the imported object should be shown as a separate editor or not.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e9b3a177b6b
unity_docs
rendering
What is `QualitySettings.shadowCascade4Split` in Unity? Explain its purpose and usage.
QualitySettings.shadowCascade4Split public static Vector3 shadowCascade4Split ; Description The normalized cascade start position for a 4 cascade setup. Each member of the vector defines the normalized position of the coresponding cascade with respect to Zero. Additional resources: Quality Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b93d284207c6
unity_docs
scripting
Explain 'Creating scene templates' in Unity.
You can create a new scene template in one of the following ways: Start an empty template . Create a template from an existing scene asset . Create a template from the current scene . After you create a template, you can edit its properties or create new scenes from it . Tip: Before you create a template from a scene, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_39749444cd98
unity_docs
performance
Explain 'IL2CPP limitations' in Unity.
The IL2CPP back end has some notable limitations, due partly to the inherent characteristics of ahead-of-time (AOT) compilation and partly to platform-specific restrictions. ## Threads Threads aren’t supported on the Web platform, so any managed code that uses the System.Threading namespace fails at runtime. Some par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_baf6070d065e
unity_docs
xr
What is `XR.XRDisplaySubsystem.TryGetAppGPUTimeLastFrame` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.TryGetAppGPUTimeLastFrame Declaration public bool TryGetAppGPUTimeLastFrame (out float gpuTimeLastFrame ); Parameters Parameter Description gpuTimeLastFrame Outputs the time spent by the GPU during the last frame. Returns bool Returns true if the GPU time spent on the last frame is ava...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b8ad0d47dbb5
unity_docs
rendering
Explain 'Limit Velocity over Lifetime module reference' in Unity.
This module controls how the speed of particles is reduced over their lifetime. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Separate Axes Splits the a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf38bc6df311
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.Acos`.
Mathf.Acos Declaration public static float Acos (float f ); Description Returns the arc-cosine of f - the angle in radians whose cosine is f . ```csharp using UnityEngine;public class ScriptExample : MonoBehaviour { void Start() { print(Mathf.Acos(0.5f)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f44661a3c23
unity_docs
scripting
What is `IMGUI.Controls.TreeView.GetRowRect` in Unity? Explain its purpose and usage.
TreeView.GetRowRect Declaration protected Rect GetRowRect (int row ); Parameters Parameter Description row Row index. Returns Rect Row rect. Description Get the rect for a row. This rect is limited to the visible width of the scroll view. If the TreeView is using a MultiColumnHeader then the tot...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_65d73a4195f7
unity_docs
ui
In Unity's 'ToolbarToggle', what is 'USS classes' and how does it work?
The following table lists all the C# public property names and their related USS selector. C# property USS selector Description ussClassName.unity-toolbar-toggle USS class name of elements of this type. ussClassName.unity-toggle USS class name for Toggle elements. Unity adds this USS class to every instance of the Togg...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6265769efbb6
unity_docs
math
What is `AnimatedValues.AnimBool` in Unity? Explain its purpose and usage.
AnimBool class in UnityEditor.AnimatedValues / Inherits from: AnimatedValues.BaseAnimValueNonAlloc_1 Description Lerp from 0 - 1. When value is 0 returns false, when value > 0.5 returns true. Animated using Mathf.Lerp . Properties Property Description faded Retuns the float value of the tween. Constructor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0d86bfc6ef8a
unity_docs
physics
In Unity's 'Build for QNX from the command line', what is 'Build script' and how does it work?
You can add the example build script into Assets/Editor/ for the project to you’re building from the command line. Use the -executeMethod option to call the Build() method of this class, which sets up the build options and triggers the build. For more information, refer to the BuildPipeline.BuildPlayer documentation . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e2dfe0cabff
unity_docs
input
Show me a Unity C# example demonstrating `AndroidJavaClass.ctor`.
ect of that particular type. It allows you to access static properties and methods of the Java/Kotlin classes without creating an instance or allocating additional memory. The following code example demonstrates the use of AndroidJavaClass constructor for interacting with Java code. It shows how to access a static pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fcf4b84e4b5
unity_docs
scripting
Show me a Unity C# example demonstrating `QualitySettings.asyncUploadTimeSlice`.
asynchronous asset uploads in scenes with frequent small texture or mesh loads while maintaining control over CPU usage. By increasing the time slice, Unity may be able to upload more assets on a given frame. Conversely, reducing this value ensures that asset uploads consume less CPU time per frame, leaving more resour...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b30d79bcddc1
unity_docs
math
What is `Rendering.BatchCullingOutputDrawCommands.proceduralDrawCommandCount` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands.proceduralDrawCommandCount public int proceduralDrawCommandCount ; Description The number of elements in the BatchCullingOutputDrawCommands.proceduralDrawCommands array. You must set this in the OnPerformCulling callback.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2fbf14f366a8
unity_docs
scripting
What is `Handles.ArrowHandleCap` in Unity? Explain its purpose and usage.
Handles.ArrowHandleCap Declaration public static void ArrowHandleCap (int controlID , Vector3 position , Quaternion rotation , float size , EventType eventType ); Parameters Parameter Description controlID The control ID for the handle. position The position of the handle in the space of Handles...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11a11332d323
unity_docs
rendering
What is `Rendering.RenderPipeline.EndFrameRendering` in Unity? Explain its purpose and usage.
RenderPipeline.EndFrameRendering Declaration protected static void EndFrameRendering ( Rendering.ScriptableRenderContext context , Camera[] cameras ); Description Calls the RenderPipelineManager.endFrameRendering delegate. This method is replaced by RenderPipeline.EndContextRendering . It is supported and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d5e6af331e1
unity_docs
editor
Show me a Unity C# example demonstrating `QualitySettings.TryExcludePlatformAt`.
TargetGroupName , int index , out Exception error ); Parameters Parameter Description buildTargetGroupName The platform name. index The index of the Quality Level, must be positive and lower than the count of Quality Levels. error The error raised by the API. Returns bool True if no errors were found. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_815d490fcf92
unity_docs
scripting
What is `Rendering.RenderQueueRange.minimumBound` in Unity? Explain its purpose and usage.
RenderQueueRange.minimumBound public static int minimumBound ; Description Minimum value that can be used as a bound. Additional resources: lowerBound , upperBound , FilteringSettings.renderQueueRange .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a5f36c7052f
unity_docs
physics
What is `CompositeCollider2D.geometryType` in Unity? Explain its purpose and usage.
CompositeCollider2D.geometryType public CompositeCollider2D.GeometryType geometryType ; Description Specifies the type of geometry the Composite Collider should generate. Additional resources: GeometryType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40c15ff8eb74
unity_docs
rendering
What is `Rendering.ScriptableCullingParameters.maximumVisibleLights` in Unity? Explain its purpose and usage.
ScriptableCullingParameters.maximumVisibleLights public int maximumVisibleLights ; Description This parameter controls how many visible lights are allowed. Default is set to unlimited (-1). If this parameter has a value other than -1, Unity does not render lights in excess of that value. Unity avoids culling...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_38a01079cc48
unity_docs
rendering
Show me a Unity code example for 'Single-pass stereo rendering for Android'.
ers that don’t have custom vertex processing. Fixed-function pipeline shaders. Note : These shader changes are compatible with multi-pass stereo rendering. ## Modify your shaders If you want to use the unity_StereoEyeIndex built-in shader variable to know which eye the GPU is rendering to, you must declare UNITY_VERT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29efe0291337
unity_docs
editor
Show me a Unity C# example demonstrating `MonoImporter.GetExecutionOrder`.
Description script The script to retrieve the execution order for. Returns int Returns the execution order for the given MonoScript . Description Gets the execution order for a MonoScript . This is the same execution order that the Script Execution Order Settings window displays. The default execution or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb6e9129aa1e
unity_docs
editor
What is `ModelImporter.extraUserProperties` in Unity? Explain its purpose and usage.
ModelImporter.extraUserProperties public string[] extraUserProperties ; Description A list of default FBX properties to treat as user properties during OnPostprocessGameObjectWithUserProperties. Specify the names of default FBX properties to be consider as extra user properties to pass to AssetPostprocessor.On...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44aff025e98d
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayout.MaxHeight`.
GUILayout.MaxHeight Declaration public static GUILayoutOption MaxHeight (float maxHeight ); Description Option passed to a control to specify a maximum height. Maximum Height allowed for the window. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a window you can resize be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_494759eb86ea
unity_docs
rendering
What is `ParticleSystem.Particle.animatedVelocity` in Unity? Explain its purpose and usage.
ParticleSystem.Particle.animatedVelocity public Vector3 animatedVelocity ; Description The animated velocity of the particle. You can use animated velocity for effects that are not based on physics, but are instead based on creating a specific velocity over time. Modules such as Noise and VelocityOverLifetim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfde51ac5237
unity_docs
physics
What is `PhysicsVisualizationSettings.showContacts` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.showContacts public static bool showContacts ; Description Whether the PhysicsDebugWindow shows contacts. If you set this property to true, contacts are visualized in the scene.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf03ec612b74
unity_docs
scripting
What is `ParticleSystem.LimitVelocityOverLifetimeModule.drag` in Unity? Explain its purpose and usage.
ParticleSystem.LimitVelocityOverLifetimeModule.drag public ParticleSystem.MinMaxCurve drag ; Description Controls the amount of drag that this modules applies to the particle velocities. Additional resources: ParticleSystem.LimitVelocityOverLifetimeModule.multiplyDragByParticleSize , ParticleSystem.LimitVe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15a42b76a101
unity_docs
rendering
What is `Rendering.BuiltinShaderDefine.UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS` in Unity? Explain its purpose and usage.
BuiltinShaderDefine.UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS Description UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS is set when Semitransparent Shadows are enabled. Additional resources: TierSettings.semitransparentShadows .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f54dfdb3c63f
unity_docs
rendering
What is `WebCamTexture.GetPixels32` in Unity? Explain its purpose and usage.
WebCamTexture.GetPixels32 Declaration public Color32[] GetPixels32 (Color32[] colors = null); Parameters Parameter Description colors An optional array to write the pixel data to. Returns Color32[] An array that contains the pixel colors. Description Gets the pixel color data for a mipmap level as ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f712eae3b20
unity_docs
editor
What is `PlayerSettings.WSA.certificateNotAfter` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.certificateNotAfter public static Nullable<DateTime> certificateNotAfter ; Description The expiration date for the current Universal Windows Platform certificate. In the Editor, Unity displays this under Certificate in UWP Player Settings . Read-only.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0fcb8bdb8f0
unity_docs
scripting
What is `ObjectPreview.MoveNextTarget` in Unity? Explain its purpose and usage.
ObjectPreview.MoveNextTarget Declaration public bool MoveNextTarget (); Returns bool True if there is another target available. Description Called to iterate through the targets, this will be used when previewing more than one target.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_994c45e00430
unity_docs
editor
What is `WSABuildAndRunDeployTarget` in Unity? Explain its purpose and usage.
WSABuildAndRunDeployTarget enumeration Description Specifies the Windows device to deploy and launch the UWP app on when using Build and Run from the Editor. This setting is ignored when performing a regular Build to generate a Visual Studio Solution. Properties Property Description LocalMachine Runs the app o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e17d03c801e
unity_docs
rendering
What is `SystemInfo.copyTextureSupport` in Unity? Explain its purpose and usage.
SystemInfo.copyTextureSupport public static Rendering.CopyTextureSupport copyTextureSupport ; Description Support for various Graphics.CopyTexture cases (Read Only). Most modern platforms and graphics APIs support quite flexible texture copy (e.g. copy from a RenderTexture into a Cubemap face). However ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_461275ea09a7
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.Timestamp` in Unity? Explain its purpose and usage.
ProfilerUnsafeUtility.Timestamp public static long Timestamp ; Description Gets Profiler timestamp. Use to measure time intervals with the same accuracy as Unity Profiler. ```csharp using Unity.Profiling.LowLevel.Unsafe;public class Example { public static long ElapsedNanoseconds(long startTimestamp) { long...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8731895b464f
unity_docs
scripting
What is `SearchService.ObjectSelectorSearchContext.requiredTypes` in Unity? Explain its purpose and usage.
ObjectSelectorSearchContext.requiredTypes public IEnumerable<Type> requiredTypes ; Description An IEnumerable of types that contains the type constraints for this search. If this IEnumerable contains null values, you can find the required type for the search in the SearchService.ObjectSelector.SearchContext.req...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48f4ddfcffe4
unity_docs
editor
Show me a Unity C# example demonstrating `BuildAssetBundleOptions.AppendHashToAssetBundleName`.
BuildAssetBundleOptions.AppendHashToAssetBundleName Description Append the hash to the assetBundle name. This allows you to append the hash to the assetBundle name. ```csharp //Create a folder (right click in the Assets folder and go to Create>Folder), and name it “Editor” if it doesn’t already exist //Place this ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5840dc8416be
unity_docs
rendering
What is `PlayerSettings.Android.textureCompressionFormats` in Unity? Explain its purpose and usage.
PlayerSettings.Android.textureCompressionFormats public static TextureCompressionFormat[] textureCompressionFormats ; Description Target texture compression formats. If you set multiple texture compression formats, you can use the Texture Compression Targeting feature. To use this feature you must also build...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4364d7308c50
unity_docs
scripting
What is `SystemInfo.graphicsMemorySize` in Unity? Explain its purpose and usage.
SystemInfo.graphicsMemorySize public static int graphicsMemorySize ; Description Amount of video memory present (Read Only). This is the approximate amount of graphics memory in megabytes. Note: On WebGL platform, this property returns a fallback value of 512MB because web browsers do not allow access to the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4633bdef331
unity_docs
rendering
What is `Rendering.ScriptableCullingParameters.cullingOptions` in Unity? Explain its purpose and usage.
ScriptableCullingParameters.cullingOptions public Rendering.CullingOptions cullingOptions ; Description Flags to configure a culling operation in the Scriptable Render Pipeline. Unity sets some of the CullingOptions flags with default values, and others depending on the properties of the Camera from which...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_330c866d26e1
unity_docs
input
Show me a Unity C# example demonstrating `TouchScreenKeyboard.active`.
TouchScreenKeyboard.active public bool active ; Description Is the keyboard visible or sliding into the position on the screen? Use this property to bring previously hidden keyboard back on the screen. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Hides the keyboard if the device is fa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b63ea2c9ddb
unity_docs
rendering
In Unity's 'Shape module reference', what is 'Shape properties' and how does it work?
This section details the properties for each Shape . For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00e7087e4d3b
unity_docs
scripting
What is `GlobalObjectId.GlobalObjectIdentifierToInstanceIDSlow` in Unity? Explain its purpose and usage.
GlobalObjectId.GlobalObjectIdentifierToInstanceIDSlow Declaration public static int GlobalObjectIdentifierToInstanceIDSlow ( GlobalObjectId id ); Parameters Parameter Description id The GlobalObjectId to lookup. Returns int Returns the InstanceID of the object. If the GlobalObjectId can't be f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ed7530d71b8
unity_docs
rendering
Show me a Unity C# example demonstrating `CubemapArray.SetPixelData`.
to a texture. The size of the data array must be the width × height of the mipmap level of the face, and the data layout must match the texture format, otherwise SetPixelData fails. You can use byte for T if you don't want to define a custom struct to match the texture format. Unity throws an exception when Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee9d57dbfe14
unity_docs
rendering
What is `Texture2DArray.SetPixelData` in Unity? Explain its purpose and usage.
Texture2DArray.SetPixelData Declaration public void SetPixelData (T[] data , int mipLevel , int element , int sourceDataStartIndex = 0); Declaration public void SetPixelData (NativeArray<T> data , int mipLevel , int element , int sourceDataStartIndex = 0); Parameters Parameter Description data ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be8ececd3a05
unity_docs
scripting
What is `Unity.Properties.PropertyContainer.SetValue` in Unity? Explain its purpose and usage.
PropertyContainer.SetValue Declaration public static void SetValue (TContainer container , string name , TValue value ); Parameters Parameter Description container The container whose property will be set. name The name of the property to set. value The value to assign to the property. Description S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_242818819040
unity_docs
physics
Explain 'External Forces module reference' in Unity.
This property modifies the effect of wind zones and Particle System Force Fields on particles emitted by the system. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20da9f51e01d
unity_docs
rendering
Give me an overview of the `LightType` class in Unity.
LightType enumeration Description The type of a Light . Additional resources: Light.type , light component . Properties Property Description Spot The light is a cone-shaped spot light. Directional The light is a directional light. Point The light is a point light. Rectangle The light is a rectangle-shape...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e85a074f782d
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.UnityWebRequest.PostWwwForm`.
plication/x-www-form-urlencoded by default. This method attaches a DownloadHandlerBuffer to the UnityWebRequest . This is for convenience, as we anticipate most users will use the DownloadHandler to check replies from the server, particularly in the case of REST APIs. The string in the form parameter is expecte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ccd35b2fb03
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.CreateGizmoRendererList` in Unity? Explain its purpose and usage.
ScriptableRenderContext.CreateGizmoRendererList Declaration public Rendering.RendererList CreateGizmoRendererList ( Camera camera , Rendering.GizmoSubset gizmoSubset ); Parameters Parameter Description camera The camera that is used for rendering the Gizmo. gizmoSubset Specify how gizmos should be re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc687b07d16a
unity_docs
physics
Show me a Unity C# example demonstrating `ControllerColliderHit.moveLength`.
erColliderHit.moveLength public float moveLength ; Description How far the character has travelled until it hit the collider. Note that this can be different from what you pass to CharacterController.Move , because the initial movement vector is decomposed into a set of movements, according to CharacterContro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12c5b5b98e8e
unity_docs
physics
What is `VersionControl.Provider.Submit` in Unity? Explain its purpose and usage.
Provider.Submit Declaration public static VersionControl.Task Submit ( VersionControl.ChangeSet changeset , VersionControl.AssetList list , string description , bool saveOnly ); Parameters Parameter Description changeset The changeset to submit. list The list of assets to submit. description The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68800b94a49f
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddFile` in Unity?
Returns string The GUID of the added file. You can use it later, for example, to add the file for building to targets. Description Adds a new file reference to the list of known files. The group structure is automatically created to correspond to the project path. To add the file to the list of files to build, pass the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5d7d86a4bab0
github
scripting
Write a Unity C# physics script for Piece
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public abstract class Piece : MonoBehaviour { public string type; public int CurrentX{set;get;} public int CurrentY{set;get;} public int Value; public bool isWhite; public GameObject Object; public Boa...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_b647ae936e76
unity_docs
rendering
What is `UIElements.Button.iconOnlyUssClassName` in Unity? Explain its purpose and usage.
Button.iconOnlyUssClassName public static string iconOnlyUssClassName ; Description The USS class name for Button elements with an icon only, no text. Unity adds this USS class to an instance of the Button element if the instance's Button.iconImage property contains a valid Texture and no text is set. An...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_434de1a05151
unity_docs
ui
Explain 'Apply masking effects in UI Toolkit' in Unity.
Masking is a technique that lets you control which parts of a UI element are visible. In UI Toolkit, you can use USS property overflow: hidden to hide parts of a UI element that are outside the bounds of another UI element. ## Masking with an element You can use an element to mask another element. To make a masking e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_486e7f3e6617
github
scripting
Write a Unity C# MonoBehaviour script called Sample Searchable Mono Behaviour
```csharp using UnityEngine; namespace FieldSearch.Samples { /// <summary> /// Sample monobehaviour with specific inspector /// </summary> public class SampleSearchableMonoBehaviour : BaseSampleSearchableMonoBehaviour { [SerializeField] private Transform Receiver; [SerializeField] ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d47e9fdf27af
unity_docs
rendering
What is `Rendering.RendererUtils.RendererListDesc.sortingCriteria` in Unity? Explain its purpose and usage.
RendererListDesc.sortingCriteria public Rendering.SortingCriteria sortingCriteria ; Description The method Unity uses to sort the GameObjects in the RendererList. For more information, see SortingCriteria .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_833ec9f6234a
unity_docs
animation
What is `Animations.AnimationHumanStream.SetGoalWeightPosition` in Unity? Explain its purpose and usage.
AnimationHumanStream.SetGoalWeightPosition Declaration public void SetGoalWeightPosition ( AvatarIKGoal index , float value ); Parameters Parameter Description index The AvatarIKGoal that is queried. value The position weight of the IK goal. Description Sets the position weight of the IK goal. Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0de4138c9b07
unity_docs
scripting
What is `UIElements.SerializedPropertyChangeEvent.GetPooled` in Unity? Explain its purpose and usage.
SerializedPropertyChangeEvent.GetPooled Declaration public static UIElements.SerializedPropertyChangeEvent GetPooled ( SerializedProperty value ); Parameters Parameter Description value The SerializedProperty that changed. Returns SerializedPropertyChangeEvent An initialized event. Description Ge...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_28fd272ba02a
unity_docs
scripting
In Unity's 'Constraint components introduction', what is 'Linking to GameObjects' and how does it work?
Use the Sources list in a Constraint component to specify the GameObjects to link to. For example, to make a crosshair follow the player’s spaceship in a 2D shooter, add a Position Constraint component to the crosshair. To link the crosshair to the spaceship, navigate to the Position Constraint component and add the sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51997fd57d3c
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.ISearchView.context`.
ISearchView.context public Search.SearchContext context ; Description Returns the current view search context. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_context { [MenuItem("Examples/ISearchView/context")] public static void Run() { var vie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a48aae7da57
unity_docs
animation
What is `HumanBone.boneName` in Unity? Explain its purpose and usage.
HumanBone.boneName public string boneName ; Description The name of the bone to which the Mecanim human bone is mapped. The name of the GameObject representing the human bone. Additional resources: humanName .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_df54cf431876
unity_docs
scripting
Explain 'Grid Layout Group' in Unity.
The Grid Layout Group component places its child layout elements in a grid. ## Properties Property: Function: Padding The padding inside the edges of the layout group. Cell Size The size to use for each layout element in the group. Spacing The spacing between the layout elements. Start Corner The corner where the fir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5c5cafd21634
unity_docs
rendering
Explain 'Introduction to font assets' in Unity.
Font assets act as containers for fonts. With font assets, you can import fonts into your projects and create variations of a font from one file and not change the original font. Another reason to create font assets is to deal with languages with massive character sets, such as Chinese. You can include only the charact...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f478fa5bf06
unity_docs
scripting
What is `UIElements.BaseListView.itemUssClassName` in Unity? Explain its purpose and usage.
BaseListView.itemUssClassName public static string itemUssClassName ; Description The USS class name of item elements in ListView elements. Unity adds this USS class to every item element the ListView contains. Any styling applied to this class affects every item element located beside, or below the styles...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9af7a7359a91
unity_docs
animation
What is `Animations.TransformStreamHandle.GetLocalRotation` in Unity? Explain its purpose and usage.
TransformStreamHandle.GetLocalRotation Declaration public Quaternion GetLocalRotation ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns Quaternion The rotation of the transform relative to the parent. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6fda975c9cf9
unity_docs
ui
Show me a Unity code example for 'Apply masking effects in UI Toolkit'.
masked elements. The masking elements are the parent elements of the masked elements. The example uses a VisualElement with a background image to demonstrate the masking effect. You can apply the masking technique to any element, such as a Label or a Button. The #MaskRounded element has a border-radius property set to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e073f89e34f2
unity_docs
rendering
Explain 'Optimize Surface Shaders' in Unity.
Surface Shaders are great for writing shaders that interact with lighting. However, their default options are tuned to cover a broad number of general cases. Tweak these for specific situations to make shaders run faster or at least be smaller: The halfasview for Specular shader types is even faster. The half-vector (h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67b0b6e28a90
unity_docs
rendering
What is `ShaderKeywordFilter.RemoveOrSelectAttribute` in Unity? Explain its purpose and usage.
RemoveOrSelectAttribute class in UnityEditor.ShaderKeywordFilter / Inherits from: ShaderKeywordFilter.FilterAttribute Description Either remove or include the specified shader keywords in the build, depending on the data field underneath. Unity does the following in all multi_compile keyword sets: Removes k...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74d0ec55207a
unity_docs
ui
What is `Presets.PresetSelector.DrawPresetButton` in Unity? Explain its purpose and usage.
PresetSelector.DrawPresetButton Declaration public static bool DrawPresetButton ( Rect rectangle , Object[] targets ); Parameters Parameter Description rectangle The Rect where the PresetSelector icon is drawn. targets List of objects to which the selected Preset is applied. Description Draw a Preset...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44bf28e44874_doc_0
github
scripting
What does `WaitCoroutine` do in this Unity script? Explain its purpose and signature.
Call this coroutine to waiting time.Time to wait.Function to call at the end. Signature: ```csharp public static IEnumerator WaitCoroutine(float waitingTime, Action<bool> callback) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.