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_f746e3f574dc
unity_docs
rendering
Explain 'ColorMask command in ShaderLab reference' in Unity.
Sets the color channel writing mask, which prevents the GPU from writing to channels in the render target. ## Render pipeline compatibility Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Custom SRP Built-in Render Pipeline ColorMask Yes Yes Yes Yes ## Syntax This command makes a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ad4689fa9ee
unity_docs
rendering
Explain 'Memory Profiler module introduction' in Unity.
The Memory Profiler module visualizes counters that represent the total allocated memory in your application. You can use the memory module to visualize where Unity allocated memory, and in what categories it spent memory. The built-in Memory Profiler module displays a basic overview of memory allocations in your appli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_03ac2c210e3c
unity_docs
scripting
Explain 'Editor Coroutines' in Unity.
com.unity.editorcoroutines ## Description The editor coroutines package allows developers to start constructs similar to Unity’s monobehaviour based coroutines within the editor using arbitrary objects. ## Released for Unity Package version 1.0.1 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_267cf9e91b29
unity_docs
rendering
In Unity's 'Document your package', what is 'Structure of the information' and how does it work?
After the title of the package, give a basic overview of the package and its contents. Following the overview and package contents, include instructions for installing, system requirements, and limitations. You can also offer links for getting help and providing feedback, including public forums or knowledge bases, and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6cafb5aa423
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.InstallLocation` in Unity? Explain its purpose and usage.
InstallLocation enumeration Description Mirrors the InstallLocation enum. For more information about the attribute, see Android's documentation: InstallLocation attribute Properties Property Description Null Attribute is not set and will not appear in the element. InternalOnly Mirrors android:installLoca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_075d6a092e81
unity_docs
scripting
What is `SceneTemplate.TemplateInstantiationMode` in Unity? Explain its purpose and usage.
TemplateInstantiationMode enumeration Description An enumeration of options for handling a Scene dependency Asset when you instantiate a SceneTemplateAsset . Properties Property Description Clone Specifies that the dependency Asset is cloned when the SceneTemplateAsset is instantiated. Reference Specifies tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d5f9d370f872_doc_8
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Input action maps associated with locomotion to affect when the active movement control scheme is set.Can use this list together with the Action Assets list to set control scheme masks by Map instead of the whole Asset. Signature: ```csharp public List<string> actionMaps ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_091241f79297
unity_docs
math
What is `LowLevel.PlayerLoop` in Unity? Explain its purpose and usage.
PlayerLoop class in UnityEngine.LowLevel / Implemented in: UnityEngine.CoreModule Description Provides static methods for retrieving and modifying the Unity Player loop. The Player loop is the full set of updates for different core systems that run on every iteration of a Unity runtime application's main execut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6df59266d8d8
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.Providers.SceneQueryEngineFilterAttribute.ctor`.
See SceneQueryEngineParameterTransformer for more information. Description Create a filter with the corresponding token and supported operators. The following example adds a new filter function dist that returns the distance between an object and a point. This filter needs a parameter transformer to transform ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_30c8954e4535
unity_docs
performance
Explain 'Optimization for Android' in Unity.
This section of the User Manual contains guidance on different techniques you can use to optimize your Android application. Topic Description Android thread configuration Explains how to configure thread affinity and thread priority to optimize for specific devices. Optimize application startup times Explains how to us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f7e8c8148846
unity_docs
rendering
Explain 'Visualizing vertex data shader examples in the Built-In Render Pipeline' in Unity.
These example shaders for the Built-in Render Pipeline demonstrate different ways of visualizing vertex data. For information on writing shaders, see Writing shaders . ## Visualizing UVs The following example shader visualizes the first set of UVs of a mesh . This shader is useful for debugging the coordinates. The c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f1665507dba
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddCapability` in Unity?
Returns bool True if the capability was successfully added. Description Adds a target capability to the Xcode project. This enables behavior based on the capability type. Some capabilities require additional setup within Xcode. For more control over the specific settings of capability, use the ProjectCapabilityManager ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dc42bb8bdfe
unity_docs
editor
What is `PlayerSettings.companyName` in Unity? Explain its purpose and usage.
PlayerSettings.companyName public static string companyName ; Description The name of your company. This is used to locate the preferences file. Custom player settings. ```csharp using UnityEngine; using UnityEditor; // Simple Script that saves and loads custom // Stand-alone/Web player screen settings among...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3c81a59fcb1
unity_docs
scripting
What is `Android.AndroidAssetPackState.status` in Unity? Explain its purpose and usage.
AndroidAssetPackState.status public Android.AndroidAssetPackStatus status ; Description The status of the Android asset pack. Read-only. Additional resources: AndroidAssetPackStatus , AndroidAssetPacks.GetAssetPackStateAsync .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ae576080d684
unity_docs
rendering
In Unity's 'Store light direction with Directional Mode', what is 'Setting your lightmap mode' and how does it work?
To set the mode in your Lighting Settings Asset , open the Lighting window ( Window > Lighting > Settings ), click Scene , navigate to the Lightmapping Settings , and select Directional Mode . You can set the lightmap mode for an instance of the Lighting Settings asset which can apply to one or more Scenes . You cannot...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e3638f791235_doc_6
github
scripting
What does `CreateGeneratorInstance` do in this Unity script? Explain its purpose and signature.
Create new instance using Signature: ```csharp public BaseCodeGenerator<T> CreateGeneratorInstance() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_ff1df0b730e5
unity_docs
rendering
What is `MaterialEditor.OnShaderChanged` in Unity? Explain its purpose and usage.
MaterialEditor.OnShaderChanged Declaration protected void OnShaderChanged (); Description A callback that is invoked when a Material's Shader is changed in the Inspector. This callback is invoked as the result of selecting a new Shader from the pop-up menu in the Inspector, or as the result of undoing or redoin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_afb9f5d82b8f
unity_docs
scripting
What is `SerializedProperty.boxedValue` in Unity? Explain its purpose and usage.
SerializedProperty.boxedValue public object boxedValue ; Description Value of the SerializedProperty, boxed as a System.Object. This property represents the value of the SerializedProperty as a System.Object which wraps the underlying type. This property makes it easier to write code that doesn't need the preci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47c01714df22
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.rotationBySpeed`.
ParticleSystem.rotationBySpeed public ParticleSystem.RotationBySpeedModule rotationBySpeed ; Description Script interface for the RotationBySpeedModule of a Particle System. Rotate particles based on their speed. Particle System modules do not need to be reassigned back to the system; they are interfaces and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2934b9c561c0
unity_docs
input
What is `UIElements.FocusChangeDirection` in Unity? Explain its purpose and usage.
FocusChangeDirection class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Base class for defining in which direction the focus moves in a focus ring. Focus ring implementations can move the focus in various direction; they can derive from this class to formalize the var...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e47319e512c5
unity_docs
editor
What is `EditorGUI.MultiFloatField` in Unity? Explain its purpose and usage.
EditorGUI.MultiFloatField Declaration public static void MultiFloatField ( Rect position , GUIContent[] subLabels , float[] values ); Declaration public static void MultiFloatField ( Rect position , GUIContent label , GUIContent[] subLabels , float[] values ); Parameters Parameter Description po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cee855e0dd4
unity_docs
editor
What is `AssetDatabase.AssetPathExists` in Unity? Explain its purpose and usage.
AssetDatabase.AssetPathExists Declaration public static bool AssetPathExists (string path ); Parameters Parameter Description path Path of the asset to check. Returns bool Returns true if the asset exists, false if not. Description Check whether an asset exists at the given path in the database.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13798bd8a9c9
unity_docs
ui
What is `EditorWindow.hasUnsavedChanges` in Unity? Explain its purpose and usage.
EditorWindow.hasUnsavedChanges public bool hasUnsavedChanges ; Description This property specifies whether the Editor prompts the user to save or discard unsaved changes before the window closes. Set hasUnsavedChanges to true to prompt the user to save or discard unsaved changes. This helps prevent them from ac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86fc24125b01
unity_docs
scripting
What is `Unity.Collections.NativeFixedLengthAttribute.ctor` in Unity? Explain its purpose and usage.
NativeFixedLengthAttribute Constructor Declaration public NativeFixedLengthAttribute (int fixedLength ); Parameters Parameter Description fixedLength The fixed number of elements in the native container. Description Initializes and returns an instance of NativeFixedLengthAttribute .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e8e9b5ea39e9
unity_docs
physics
Explain 'Trees' in Unity.
Trees add realism, interest, and a sense of place to a terrain . There are two ways to create new tree models: Use the Tree Editor to create tree models in the Unity Editor. The Tree Editor works only with the Built-In Render Pipeline . For most uses, the SpeedTree Modeler replaces the Tree Editor. For backward compati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b016d2f58643_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Applies a impulses on the player while still allowing teleportation, climbing, other movement. The applied impulse will be reduced over time. Signature: ```csharp public class PlayerRigidForce : PlayerForceBase ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_417965566521
unity_docs
editor
What is `AssetDatabase.CanOpenForEdit` in Unity? Explain its purpose and usage.
AssetDatabase.CanOpenForEdit Declaration public static bool CanOpenForEdit ( Object assetObject , StatusQueryOptions statusOptions = StatusQueryOptions.UseCachedIfPossible); Declaration public static bool CanOpenForEdit (string assetOrMetaFilePath , StatusQueryOptions statusOptions = StatusQueryOption...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f86397afbe2c
unity_docs
editor
What is `Search.IPropertyDatabaseView` in Unity? Explain its purpose and usage.
IPropertyDatabaseView interface in UnityEditor.Search Description Interface of a PropertyDatabase view. The idea of a PropertyDatabase view is similar to Windows' memory-mapped file views, although much simpler. Each PropertyDatabase view has its own filestream that can access the PropertyDatabase indepen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1aadaf9dc69e
unity_docs
scripting
What is `SceneManagement.SceneUtility.GetBuildIndexByScenePath` in Unity? Explain its purpose and usage.
SceneUtility.GetBuildIndexByScenePath Declaration public static int GetBuildIndexByScenePath (string scenePath ); Parameters Parameter Description scenePath Scene path (e.g: "Assets/Scenes/Scene1.unity"). Returns int Build index. Description Get the build index from a Scene path. The build index ref...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f172c3989c9
unity_docs
editor
What is `Handles.DrawBezier` in Unity? Explain its purpose and usage.
Handles.DrawBezier Declaration public static void DrawBezier ( Vector3 startPosition , Vector3 endPosition , Vector3 startTangent , Vector3 endTangent , Color color , Texture2D texture , float width ); Parameters Parameter Description startPosition The start point of the bezier line. endPos...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49f200aea4cc
unity_docs
editor
What is `AssetDatabase.importPackageCancelled` in Unity? Explain its purpose and usage.
AssetDatabase.importPackageCancelled Parameters Parameter Description value Name of package. Description Callback raised whenever a package import is cancelled by the user. ```csharp using UnityEditor; using UnityEngine;[InitializeOnLoad] public class AssetDatabaseExamples { static AssetDatabaseExamples() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_74b079c18ab6
github
scripting
Write a Unity C# physics script for General Camera Shake
```csharp #if !UNITY_FLASH using UnityEngine; using System.Collections; using DentedPixel; public class GeneralCameraShake : MonoBehaviour { private GameObject avatarBig; private float jumpIter = 9.5f; private AudioClip boomAudioClip; // Use this for initialization void Start () { avatarBig = GameObject.Find(...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_311cf8b106ab
unity_docs
rendering
What is `LightTransport.BufferID.Slice` in Unity? Explain its purpose and usage.
BufferID.Slice Declaration public BufferSlice<T> Slice (ulong offset ); Parameters Parameter Description offset The offset to use for the slice, measured in elements of the specified type. Returns BufferSlice<T> A typed slice aliasing the BufferID. Description Constructs a typed slice from the Buffer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6272aa356309
unity_docs
rendering
Give me an overview of the `Shader` class in Unity.
Shader class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Shader scripts used for all rendering. Most of the advanced rendering is controlled via Material class. Shader class is mostly used just to check whether a shader can run on the user's hardware ( isSupp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1cf80760756e
unity_docs
rendering
Explain 'Name directive in ShaderLab reference' in Unity.
This page contains information on using a Name block in your ShaderLab code to assign a name to a Pass. For information on defining Passes, see ShaderLab: defining a Pass . For information on how a Shader object works, and the relationship between Shader objects , SubShaders and Passes, see Shader object fundamentals ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1628646d37e2
unity_docs
rendering
Show me a Unity code example for 'Set the depth bias in a shader'.
GPU applies the depth bias for specific geometry in addition to the global depth bias. To reduce shadow acne, you can achieve a similar visual effect with the light bias settings; however, these settings work differently, and they do not change the state on the GPU. For more information, see Shadow troubleshooting . Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_281b2529d0cb
unity_docs
rendering
Give me an overview of the `Terrain` class in Unity.
Terrain class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.TerrainModule Description The Terrain component renders the terrain. Static Properties Property Description activeTerrain The active Terrain. This is a convenient function to get to the main Terrain in the Scene. activeT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94c216cb2541_doc_6
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The type of questions (what is displayed). Either Object, Text, Video or DifferingTypes (any of the first three). Signature: ```csharp public QuestionType questionType = QuestionType.Text; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_2a311b2b3f69_doc_1
github
scripting
What does `HasInstance` do in this Unity script? Explain its purpose and signature.
Is there an existing instance of type ? Signature: ```csharp public static bool HasInstance => Instance != null; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_ea42d4bad621
unity_docs
editor
What is `EditorGUI.DropdownButton` in Unity? Explain its purpose and usage.
EditorGUI.DropdownButton Declaration public static bool DropdownButton ( Rect position , GUIContent content , FocusType focusType ); Declaration public static bool DropdownButton ( Rect position , GUIContent content , FocusType focusType , GUIStyle style ); Parameters Parameter Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_359a9a0be0b5
unity_docs
scripting
What is `UIElements.BaseField_1.SetValueWithoutNotify` in Unity? Explain its purpose and usage.
BaseField<T0>.SetValueWithoutNotify Declaration public void SetValueWithoutNotify (TValueType newValue ); Parameters Parameter Description newValue New value to be set. Description Allow to set a value without being notified of the change, if any.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8351166d3852
unity_docs
physics
What are the parameters of `Collider.OnTriggerEnter` in Unity?
Description Called when a Collider with the Collider.isTrigger property overlaps another Collider. OnTriggerEnter is invoked when two GameObjects with a Collider component touch or overlap, and one of the Collider components has the Collider.isTrigger property enabled. A trigger Collider doesn't register collisions wit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4d9892b2168
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemInfo.graphicsDeviceVendor`.
SystemInfo.graphicsDeviceVendor public static string graphicsDeviceVendor ; Description The vendor of the graphics device (Read Only). This is the vendor of user's graphics card, as reported by the graphics driver. Additional resources: SystemInfo.graphicsDeviceName , SystemInfo.graphicsDeviceVersion . ```cs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_710b3cbd3831
unity_docs
scripting
What is `SerializedObject.ApplyModifiedProperties` in Unity? Explain its purpose and usage.
SerializedObject.ApplyModifiedProperties Declaration public bool ApplyModifiedProperties (); Returns bool Returns true if any pending property changes were applied to the target objects of the SerializedObject. Description Apply property modifications. Each instance of SerializedObject contains a serializ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0d0b7846b9f
unity_docs
scripting
What is `BuildCompression.LZ4Runtime` in Unity? Explain its purpose and usage.
BuildCompression.LZ4Runtime public static BuildCompression LZ4Runtime ; Description LZ4 Compression for runtime recompression. LZ4 compression results in larger compressed file sizes than LZ4HC and LZMA, but does not require the entire bundle to be decompressed before use. LZ4 is a “chunk-based” algorithm, an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18f0445bef50
unity_docs
editor
What is `EditorTools.ToolAttribute.targetContext` in Unity? Explain its purpose and usage.
ToolAttribute.targetContext public Type targetContext ; Description If provided, the EditorTool will only be made available when the ToolManager.activeContextType is equal to targetContext.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0732263ef189
unity_docs
scripting
What is `AI.NavMeshEditorHelpers.DrawBuildDebug` in Unity? Explain its purpose and usage.
NavMeshEditorHelpers.DrawBuildDebug Declaration public static void DrawBuildDebug ( AI.NavMeshData navMeshData , AI.NavMeshBuildDebugFlags flags = NavMeshBuildDebugFlags.All); Parameters Parameter Description navMeshData NavMesh object for which debug data has been deliberately collected during the buil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb5fea894606
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryEngine_1.SetDefaultFilter`.
blic void SetDefaultFilter (Func<TData,string,string,string,bool> handler ); Parameters Parameter Description handler Callback used to handle the filter. Takes an object of type TData, the filter identifier, the operator, and the filter value, and returns a boolean indicating if the filter passed or not. Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3144856397ee
unity_docs
scripting
What is `Build.Content.WriteSceneParameters.writeCommand` in Unity? Explain its purpose and usage.
WriteSceneParameters.writeCommand public Build.Content.WriteCommand writeCommand ; Description The struct of internal file name, list of objects, and order of objects to use when writing the serialized file.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e178e27add59
unity_docs
rendering
Show me a Unity code example for 'Fog shader example in the Built-In Render Pipeline'.
``` Shader "Custom/TextureCoordinates/Fog" { SubShader { Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag //Needed for fog variation to be compiled. #pragma multi_compile_fog #include "UnityCG.cginc" struct vertexInput { float4 vertex : POSITION; float4 texcoord0 : TEXCOORD0; }; struct fra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11cec0293761
unity_docs
editor
What are the parameters of `VersionControl.Provider.Status` in Unity?
Description Starts a task that will fetch the most recent status about the asset or assets from the revision control system. The updated assets can be access through the task's assetList property once it has completed. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.VersionControl; usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df20ab55cd53
unity_docs
physics
What is `UnityEngine.VehiclesModule` in Unity? Explain its purpose and usage.
UnityEngine.VehiclesModule Description The Vehicles module implements vehicle physics simulation through the WheelCollider component. Classes Class Description WheelCollider A special collider for vehicle wheels. Structs Struct Description WheelHit Contact information for the wheel, reported by WheelCollider...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39c373c291ef
unity_docs
rendering
What is `EditorGUI.ColorField` in Unity? Explain its purpose and usage.
EditorGUI.ColorField Declaration public static Color ColorField ( Rect position , Color value ); Declaration public static Color ColorField ( Rect position , string label , Color value ); Declaration public static Color ColorField ( Rect position , GUIContent label , Color value ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e1c18f8e2bd4
unity_docs
ui
Explain 'Use UXML instances as templates' in Unity.
You can instantiate existing UXML Documents as Templates inside your UXML Documents as Template Instances , similar to how Prefabs work in Unity. ## Use a UXML Document as a template To use an existing UXML Document in your project as a template, do the following: Under the Library ’s Project tab, find the UXML Asset...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1acab46f0be
unity_docs
editor
What is `GenericMenu.AddItem` in Unity? Explain its purpose and usage.
GenericMenu.AddItem Declaration public void AddItem ( GUIContent content , bool on , GenericMenu.MenuFunction func ); Parameters Parameter Description content The GUIContent to add as a menu item. on Specifies whether to show the item is currently activated (i.e. a tick next to the item in the menu). ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_970bb4713634
unity_docs
xr
Show me a Unity C# example demonstrating `Android.Permission.RequestUserPermission`.
he RequestUserPermission method doesn't wait for the user response and returns immediately. If the system permission dialog is displayed, the application suspends. You can use HasUserAuthorizedPermission method to check the status of the permission request. The following code example checks whether the user has gra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c2603841b110
unity_docs
rendering
Explain 'Mesh normals shader example in the Built-In Render Pipeline' in Unity.
``` Shader "Unlit/WorldSpaceNormals" { // no Properties block this time! SubShader { Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag // include file that contains UnityObjectToWorldNormal helper function #include "UnityCG.cginc" struct v2f { // we'll output world space normal as one of regular...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a35a467ace29
unity_docs
rendering
Explain 'Using multiple cameras' in Unity.
Resources and approaches for using more than one camera in a scene . Page Description Configure multiple cameras Swap camera views, or render a small camera view inside a larger one. Set the order of multiple cameras To draw one camera view on top of another, assign each camera to a different depth. Display camera view...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a598fe590d69
unity_docs
xr
Explain 'XR packages' in Unity.
The Unity packages that support XR development fall into two broad categories: XR provider plug-ins : Provider plug-ins enable support for XR devices and platforms. For example, the Apple ARKit plug-in allows AR applications to run on the iOS platform and the OpenXR plug-in allows applications to run on several VR and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7375de3ea7fc_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Utility that wraps the Unity Package Manager Client to work on events Signature: ```csharp public static class PackageUtility ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_e0dcb2168b7c
unity_docs
rendering
In Unity's 'Enable Enlighten Realtime Global Illumination', what is 'Shadows and Enlighten Realtime Global Illumination' and how does it work?
If a Light also casts shadows, Unity renders both dynamic and static GameObjects in the Scene into the Light’s shadow map . The Material Shaders of both static and dynamic GameObjects sample this shadow map so that these GameObjects cast real-time shadows onto each other. The Shadow Distance setting determines the maxi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_635be22aad61
unity_docs
rendering
Explain 'Prebuilt shaders in the Built-In Render Pipeline' in Unity.
Resources for using the Standard Shader , Standard Particle Shaders, or the Autodesk Interactive shader in the Built-In Render Pipeline . Page Description Standard Shader Resources for using the Standard Shader to render real-world objects such as stone, wood, glass, plastic and metal, use the Standard Shader. Particle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a7a62f41204
unity_docs
scripting
What is `AI.NavMeshHit` in Unity? Explain its purpose and usage.
NavMeshHit struct in UnityEngine.AI / Implemented in: UnityEngine.AIModule Description Result information for NavMesh queries. Properties Property Description distance Distance to the point of hit. hit Flag set when hit. mask Mask specifying NavMesh area at point of hit. normal Normal at the point of hit....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a22c3223e74b
unity_docs
rendering
In Unity's 'Creating models for optimal performance', what is 'Use a single skinned mesh' and how does it work?
For animated character models that use a Skinned Mesh Renderer , you should use only one of these components per character. Unity’s animation system optimizes animation using visibility culling and bounding volume updates. It only activates these optimizations if you use one Animation component and one Skinned Mesh Ren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_019c09274a40
unity_docs
scripting
What is `Experimental.GraphView.EdgeConnector_1.ctor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeConnector<T0> Constructor Declaration public EdgeConnector<T0> ( Experimental.GraphView.IEdgeConnectorListener listener ); Parameters Parameter Description listener The IEdgeConnectorListener that will finalize the e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f9c2399d844
unity_docs
scripting
What is `Windows.WebCam.PhotoCapture.TakePhotoAsync` in Unity? Explain its purpose and usage.
PhotoCapture.TakePhotoAsync Declaration public void TakePhotoAsync (string filename , Windows.WebCam.PhotoCaptureFileOutputFormat fileOutputFormat , Windows.WebCam.PhotoCapture.OnCapturedToDiskCallback onCapturedPhotoToDiskCallback ); Declaration public void TakePhotoAsync ( Windows.WebCam.PhotoCapture.On...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_266698629c9f
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoPlayer.prepareCompleted`.
paration finishes, the VideoPlayer invokes this callback. If you start playback after this callback is invoked, frames become available instantly. If you call VideoPlayer.Play without using VideoPlayer.Prepare first, the VideoPlayer invokes Prepare() anyway. If preparation succeeds, the VideoPlayer still in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f9bc1bbde950
unity_docs
performance
Explain 'Web build settings' in Unity.
Use the Web Build Settings to configure how Unity builds your application for the Web platform. ## Access the build settings for Web You can update your Web platform build settings from the Build Profiles window. To access the build settings for Web: Go to File > Build Profiles . Select Web . ## Web build settings r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b9fb5ad7e4a
unity_docs
animation
What is `Animations.AnimatorControllerLayer` in Unity? Explain its purpose and usage.
AnimatorControllerLayer class in UnityEditor.Animations Description The Animation Layer contains a state machine that controls animations of a model or part of it. Properties Property Description avatarMask The AvatarMask that is used to mask the animation on the given layer. blendingMode The blending mode us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d172aa2e1622
unity_docs
scripting
What is `Rendering.ScopedRenderPass.Dispose` in Unity? Explain its purpose and usage.
ScopedRenderPass.Dispose Declaration public void Dispose (); Description Ends the current render pass in the ScriptableRenderContext that was used to create the ScopedRenderPass . Additional resources: ScriptableRenderContext.BeginScopedRenderPass .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b6fb263daab
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerFlowEventType.ParallelNext`.
ion Use for the parallel flow continuation point. All parallel flow instances are equivalent and connected to the same Begin or Next events that happened previously. An example of a flow start point is job scheduling. For instance, IJobParallelForExtensions.Schedule generates an implicit Begin Profiler flow e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c3ad83669fe
unity_docs
scripting
What is `Video.VideoPlayer.ErrorEventHandler` in Unity? Explain its purpose and usage.
VideoPlayer.ErrorEventHandler Declaration public delegate void ErrorEventHandler ( Video.VideoPlayer source , string message ); Parameters Parameter Description source The VideoPlayer that is emitting the event. message Message describing the error just encountered. Description Delegate type for Vid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6ebbdd41525f
unity_docs
xr
Show me a Unity code example for 'Code sign your application'.
our application can take. To set entitlements for your application, use the following steps: In the same directory as your built application, create a file with the same name as your application with the.entitlements file extension. For example, if you name your application MyProject, create a file called MyProject.ent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ba9be4776ed2
unity_docs
scripting
In Unity's 'Inspecting scripts', what is 'Script components in the Inspector window' and how does it work?
Any MonoBehaviour script can be used as a component , which means: You can attach the script to GameObjects You can edit the script’s properties and values in the Inspector window The example code below declares a public field called myName . When you add this script to a GameObject in your scene , the field becomes vi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e88aa342a4c2_doc_14
github
scripting
What does `GetParticipant` do in this Unity script? Explain its purpose and signature.
Get single participant by user id/nameThe user id or user name Signature: ```csharp public VoiceParticipant GetParticipant(string _userId) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_709b1b18b233
github
scripting
Write a Unity C# UI script for System Info Bar
```csharp #if UNITY_ANDROID && !UNITY_EDITOR #define LYNX #endif using System; using System.Collections; using TMPro; using UnityEngine; using UnityEngine.UI; namespace Lynx { public class SystemInfoBar : MonoBehaviour { [Tooltip("Delay between each update for battery and time (seconds)")] [S...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_75d4f1cc0e7a
unity_docs
rendering
What is `ParticleSystemRenderer.meshCount` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.meshCount public int meshCount ; Description The number of Meshes the system uses for particle rendering. Additional resources: ParticleSystemRenderer.renderMode . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e75dae97d55
unity_docs
rendering
What is `MeshRenderer.enlightenVertexStream` in Unity? Explain its purpose and usage.
MeshRenderer.enlightenVertexStream public Mesh enlightenVertexStream ; Description Vertex attributes that override the primary mesh when the MeshRenderer uses lightmaps in the Realtime Global Illumination system. This vertex stream is used exclusively for UVs for real-time lightmaps. When Unity renders a Me...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1544adf5354
unity_docs
scripting
What is `Light.cullingMask` in Unity? Explain its purpose and usage.
Light.cullingMask public int cullingMask ; Description This is used to light certain objects in the Scene selectively. A GameObject will only be illuminated by a light if that light's cullingMask/ includes the layer chosen for the GameObject (ie, the mask bit for the layer must be set to 1 for the object t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db8c199200ac
unity_docs
rendering
What is `UIElements.TextShadow` in Unity? Explain its purpose and usage.
TextShadow struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Script interface for VisualElement text-shadow style property IStyle.textShadow . Properties Property Description blurRadius The blur radius of the shadow. color The color of the shadow. off...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_660c92c1b82c
unity_docs
audio
What is `AudioListener.GetOutputData` in Unity? Explain its purpose and usage.
AudioListener.GetOutputData Declaration public static 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 listener...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8303112d18af
unity_docs
xr
In Unity's 'Refund a customer', what is 'Verify a customer’s invoice number' and how does it work?
The Asset Store support center requires an invoice number to identify the transaction to refund. To verify an invoice number: Ask the customer to provide you with the invoice file, or invoice number that they received when they purchased the Asset Store package. Open the Asset Store Publisher Portal . Go to the Invoice...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ecac91d47f1
unity_docs
rendering
What are the parameters of `LightTransport.RadeonRaysContext.DestroyEvent` in Unity?
Description Destroy the event with the given ID. You should call this to free temporary resources associated with an event. Attempting to use the event after it has been destroyed, for example using IDeviceContext.Wait or IDeviceContext.IsCompleted will result in undefined behavior. ```csharp using Unity.Collections; u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_febc2256226a
unity_docs
audio
In Unity's 'Audio Random Container fundamentals', what is 'AudioSource API' and how does it work?
Use the AudioSource API to start, pause, and stop an Audio Random Container. This is similar to when you use the AudioSource API to play, pause, and stop an Audio Clip, but with the following exceptions: AudioSource.isPlaying returns true when the Audio Random Container plays an audio clip through an audio source . Aud...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_276fd3bdc8a8
unity_docs
editor
Show me a Unity code example for 'Instantiate UXML from C# scripts'.
ild UI from a UXML file: Load the file into a VisualTreeAsset ,. Use either: Instantiate() to instantiate without a parent, which creates a new TemplateContainer . CloneTree(parent) to clone inside a parent. Once the UXML is instantiated, you can retrieve specific elements from the visual tree with UQuery . The followi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfd20db8a1f3
unity_docs
physics
What is `Rigidbody2D.mass` in Unity? Explain its purpose and usage.
Rigidbody2D.mass public float mass ; Description Mass of the Rigidbody. The mass is given in arbitrary units, but the basic physical principles of mass apply. Newton's classic equation `force = mass x acceleration`, demonstrates that the larger an object's mass, the more force it requires to accelerate it to a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e8d0eb76e9d
unity_docs
scripting
What is `PlayerSettings.gpuSkinning` in Unity? Explain its purpose and usage.
PlayerSettings.gpuSkinning public static bool gpuSkinning ; Description Marked for deprecation in the future. Use PlayerSettings.meshDeformation instead. If you change the value of gpuSkinning , Unity sets PlayerSettings.meshDeformation in the following way: If you set gpuSkinning to false, Unity sets ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60c2a3ef1de5
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.RayTracingShader.SetShaderPass`.
called before calling RayTracingShader.DispatchRays. The Shader Pass code can include optional closest hit or any hit shaders. For procedural ray-traced geometries, an intersection shader must be authored. The engine code will automatically enable a keywork named RAY_TRACING_PROCEDURAL_GEOMETRY if the geometry is pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07c287b66b87
unity_docs
math
What is `PlayerSettings.SetScriptingDefineSymbols` in Unity? Explain its purpose and usage.
PlayerSettings.SetScriptingDefineSymbols Declaration public static void SetScriptingDefineSymbols ( Build.NamedBuildTarget buildTarget , string defines ); Declaration public static void SetScriptingDefineSymbols ( Build.NamedBuildTarget buildTarget , string[] defines ); Parameters Parameter Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d57a606dc7c7_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
数値などの基本的なプリミティブに対し、オーバーライドの有無と値のカスタムUIの2つを提示する実装 Signature: ```csharp public class OverridablePrimitiveDrawer : IExtensionFieldDrawer ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d3f8359c85db
unity_docs
physics
In Unity's 'Collider surface bounciness', what is 'Velocity threshold for bounce behavior' and how does it work?
In physics simulation, you can also define a threshold at which colliders no longer bounce off each other. If two colliding objects have a relative velocity below the defined value, they do not bounce off each other. To configure the bounce threshold, go to the Physics Settings ( Edit > Project Settings > Physics ) and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1eb36df58ec
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.Burst.ctor`.
particles to emit. _count Number of particles to emit. _cycleCount Specifies how many times the system should play the burst. Set this to 0 to make it play indefinitely. _repeatInterval How often to repeat the burst, in seconds. Description Construct a new Burst with a time and count. Additional resources: Par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9870aaa27519
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnEnable`.
me (via code or the Inspector), if the GameObject is already active. When activating the GameObject (or one of its inactive parent GameObjects) at runtime, if the script component is already enabled. OnEnable is always called after MonoBehaviour.Awake and before MonoBehaviour.Start on entering Play Mode. OnEnabl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dca582f0c148
unity_docs
editor
What is `Build.BuildPipelineContext` in Unity? Explain its purpose and usage.
BuildPipelineContext class in UnityEditor.Build Description Defines the build context for IProcessSceneWithReport during a build event. This class contains static methods for declaring additional scene dependencies for the build system. These dependencies are used to trigger scene rebuilds in cases where depende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_859153a46122
unity_docs
physics
What is `Awaitable.WaitForSecondsAsync` in Unity? Explain its purpose and usage.
Awaitable.WaitForSecondsAsync Declaration public static Awaitable WaitForSecondsAsync (float seconds , CancellationToken cancellationToken ); Parameters Parameter Description seconds Seconds to wait for. cancellationToken Optional cancellation token. Description Resumes execution after the specified n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e86fed587d53
unity_docs
scripting
What is `Vector2.operator_subtract` in Unity? Explain its purpose and usage.
Vector2.operator - public static Vector2 operator - ( Vector2 a , Vector2 b ); Returns Vector2 The difference between the two vectors, returned as a Vector2 struct. Description Subtracts one vector from another. Subtracts each component of b from a . ```csharp using UnityEngine;public class Exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e658a93532b7
unity_docs
editor
What is `SettingsProvider.OnDeactivate` in Unity? Explain its purpose and usage.
SettingsProvider.OnDeactivate Declaration public void OnDeactivate (); Description Use this function to implement a handler for when the user clicks on another setting or when the Settings window closes. ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements;class SimpleIMGUISettingsProvid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8762d0059793
unity_docs
rendering
What is `GUIStyleState.background` in Unity? Explain its purpose and usage.
GUIStyleState.background public Texture2D background ; Description The background image used by GUI elements in this given state. See also: scaledBackgrounds . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Assigns a texture to customStyles[0] for when the control // is pressed down...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b076739a480c
unity_docs
ui
What is `UIElements.Clickable.clicked` in Unity? Explain its purpose and usage.
Clickable.clicked Description Callback triggered when the target element is clicked. Encapsulates a method that has no parameters and does not return a value. ```csharp using UnityEngine; using UnityEditor; using UnityEngine.UIElements;public class ButtonExample : EditorWindow { [MenuItem("Window/Button Exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60b93e556205
unity_docs
scripting
What is `Experimental.GraphView.IconBadge.alignment` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IconBadge.alignment protected SpriteAlignment alignment ; Description Relative alignment between the badge and its target. The alignment will influence icon and tip position.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.