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_1697ef8221ec
unity_docs
ui
Explain 'Download and import an asset package' in Unity.
You can import an asset package that you got from the Asset Store and download it to your project by using the Package Manager window. Notes: This task applies only to asset packages in the.unitypackage format. For information about installing packages from the Asset Store that are in the UPM format, refer to Install a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c5e533e05a5
unity_docs
input
In Unity's 'Mobile Keyboard', what is 'Keyboard Layout Options' and how does it work?
The Keyboard supports the following options:- Property: Function: TouchScreenKeyboardType.Default Letters. Can be switched to keyboard with numbers and punctuation. TouchScreenKeyboardType.ASCIICapable Letters. Can be switched to keyboard with numbers and punctuation. TouchScreenKeyboardType.NumbersAndPunctuation Numbe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15982dcee090
unity_docs
scripting
What is `TextGeneratorType` in Unity? Explain its purpose and usage.
TextGeneratorType enumeration Description Defines the types of text generators to use. This enum is used to switch between Unity's standard and advanced text generators. Properties Property Description Standard The standard text generator, which is the default option. Advanced Supports comprehensive Unicode a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb7a4fbaae23
unity_docs
networking
In Unity's 'Package manifest file', what is 'Optional properties' and how does it work?
These properties are optional, meaning that you can omit them. However, if they’re present, they must have a valid value. Property JSON Type Description author Object or string The author of the package. This property supports only one author. This property has one required field, name , and two optional fields, email ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99647a015a1e
unity_docs
scripting
What is `Cloth.enabled` in Unity? Explain its purpose and usage.
Cloth.enabled public bool enabled ; Description Is this cloth enabled? This is the same as the checkbox next to the component label in the inspector. A disabled cloth component will not update it's physics simulation, so you can use this to suspend the simulation of cloth objects when they are not needed, as c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c234cc810a18
unity_docs
rendering
What is `ParticleSystem.RotationBySpeedModule.enabled` in Unity? Explain its purpose and usage.
ParticleSystem.RotationBySpeedModule.enabled public bool enabled ; Description ESpecifies whether the RotationBySpeedModule is enabled or disabled. Additional resources: ParticleSystem.rotationBySpeed . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_439e0e825463
unity_docs
editor
Give me an overview of the `InteractionMode` class in Unity.
InteractionMode enumeration Description The mode of interaction, user or automated, that an API method is called with. Some of Unity’s API methods allow you to specify whether the “interaction mode” is user-driven or automated. This affects whether Unity shows dialog boxes, and whether actions are recorded in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_623b9254c4ce
unity_docs
input
What is `Playables.PlayableExtensions.AddInput` in Unity? Explain its purpose and usage.
PlayableExtensions.AddInput Declaration public static int AddInput (U playable , V sourcePlayable , int sourceOutputIndex , float weight ); Parameters Parameter Description playable The Playable used by this operation. sourcePlayable The Playable to connect to. sourceOutputIndex The output port of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94c946e81f27
unity_docs
physics
What is `Input.IsJoystickPreconfigured` in Unity? Explain its purpose and usage.
Input.IsJoystickPreconfigured Declaration public static bool IsJoystickPreconfigured (string joystickName ); Parameters Parameter Description joystickName The name of the joystick to check (returned by Input.GetJoystickNames ). Returns bool True if the joystick layout has been preconfigured; false other...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_953561646c5f
unity_docs
physics
Explain 'Optimize collision callbacks' in Unity.
Reduce garbage collector (GC) load and improve performance by optimizing physics collision callback allocations. Unity provides physics collision callback messages like: OnCollisionEnter OnCollisionStay OnCollisionExit By default, each time these callbacks are invoked, Unity allocates new Collision (or Collider for tri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2004b1b9f22a
unity_docs
scripting
What is `Events.UnityEventTools.RegisterFloatPersistentListener` in Unity? Explain its purpose and usage.
UnityEventTools.RegisterFloatPersistentListener Declaration public static void RegisterFloatPersistentListener ( Events.UnityEventBase unityEvent , int index , UnityAction<float> call , float argument ); Parameters Parameter Description unityEvent Event to modify. index Index to modify. call Function...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_895f55d627b4
unity_docs
rendering
Show me a Unity C# example demonstrating `GL`.
g not visible). The usual place to call GL drawing is most often in OnPostRender () from a script attached to a camera, or inside an image effect function ( OnRenderImage ). Note: The High Definition Render Pipeline (HDRP) and the Universal Render Pipeline (URP) do not support OnPostRender . Instead, use RenderPip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e100bd875ca5
unity_docs
editor
Give me an overview of the `JsonUtility` class in Unity.
JsonUtility class in UnityEngine / Implemented in: UnityEngine.JSONSerializeModule Description Provides functions for converting between objects and JSON data. You can use this class to generate a JSON representation of an object, or to populate an object from a JSON string. This can be useful when interacting ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5f43dd7a5fca
github
scripting
Write a Unity Editor script for Isometric Rule Tile Editor
```csharp using System; using System.Linq; using System.Reflection; using UnityEngine; namespace UnityEditor { [CustomEditor(typeof(IsometricRuleTile), true)] [CanEditMultipleObjects] public class IsometricRuleTileEditor : RuleTileEditor { private static readonly int[, ] s_Arrows = { ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_1dfbcf5b2a82
unity_docs
scripting
Give me an overview of the `NormalMapEncoding` class in Unity.
NormalMapEncoding enumeration Description Describes the encoding of normal maps. You can configure the encoding of normal maps on Android, iOS, and tvOS. On other platforms, the encoding is always DXT5nm. Properties Property Description XYZ Three-component normal map encoding. DXT5nm Two-component DXT5nm-styl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5384bdf3499
unity_docs
scripting
What is `Video.VideoClip.width` in Unity? Explain its purpose and usage.
VideoClip.width public uint width ; Description The width of the images in the video clip in pixels. (Read Only). You can use this property to help get the dimensions of your video and help display your video properly. Also, you can use it to calculate the image aspect ratio. Additional resources: VideoClip.h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_551d8367ec5f
unity_docs
scripting
What is `AI.NavMeshQueryFilter.GetAreaCost` in Unity? Explain its purpose and usage.
NavMeshQueryFilter.GetAreaCost Declaration public float GetAreaCost (int areaIndex ); Parameters Parameter Description areaIndex Index to retreive the cost for. Returns float The cost multiplier for the supplied area index. Description Returns the area cost multiplier for the given area type for this...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62f2a748b4f4
unity_docs
scripting
In Unity's 'Branch group reference', what is 'Using curves' and how does it work?
You can use curves to control some properties: click the curve to open the Curve window. For more information, refer to Editing curves . For many properties, the curve controls the details of the branch’s shape along its length. In that case, the first point of the curve is the base of the branch, and the second point ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_260b87c289ca
unity_docs
ui
What are the parameters of `GUI.DragWindow` in Unity?
Description Make a window draggable. Insert a call to this function inside your window code to make a window draggable. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public Rect windowRect = new Rect(20, 20, 120, 50); void OnGUI() { // Register the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c900d20deee0
unity_docs
rendering
In Unity's 'How Unity compiles branching shaders', what is 'Shader variants' and how does it work?
To use shader variants, use #pragma multi_compile or #pragma shader_feature to declare keywords. For example: ``` #pragma multi_compile RED GREEN if (RED) { // Output red } else if (GREEN) { // Output green } ``` At compile time, Unity splits the previous code into 2 separate but similar shader files called shader v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5acb4d38f0c
unity_docs
math
What is `Camera.backgroundColor` in Unity? Explain its purpose and usage.
Camera.backgroundColor public Color backgroundColor ; Description The color with which the screen will be cleared. Only used if clearFlags are set to CameraClearFlags.SolidColor (or CameraClearFlags.Skybox but the skybox is not set up). ```csharp // ping-pong animate background color using UnityEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2b3f36da342
unity_docs
physics
What are the parameters of `Collider.OnTriggerStay` in Unity?
Description OnTriggerStay is called almost all the frames for every Collider other that is touching the trigger. The function is on the physics timer so it won't necessarily run every frame. This message is sent to the trigger and the collider that touches the trigger. Note that trigger events are only sent if one of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5dc15f5e480
github
scripting
Write a Unity C# UI script for Executor Behavior
```csharp using System; using UnityEngine; using Object = UnityEngine.Object; namespace yaSingleton.Utility { /// <summary> /// Executor behaviour that can be used as a proxy to call Unity events. /// </summary> public class ExecutorBehavior : MonoBehaviour { [SerializeField, HideInInspector] ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93bb321a6f1d
unity_docs
editor
What is `Search.ObjectIndexer.IndexWordComponents` in Unity? Explain its purpose and usage.
ObjectIndexer.IndexWordComponents Declaration public void IndexWordComponents (int documentIndex , ref string word ); Parameters Parameter Description documentIndex Document where the indexed word was found. word Word to add to the index. Description Splits a word into multiple variations. See IndexPr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38e83ad091c6
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.strengthYMultiplier`.
ParticleSystem.NoiseModule.strengthYMultiplier public float strengthYMultiplier ; Description y-axis strength multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall strength multiplier. Additional resources: ParticleSystem.NoiseModule.stren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94c216cb2541_doc_17
github
scripting
What does `GetConfigCsvHeaderList` do in this Unity script? Explain its purpose and signature.
Returns the csv header of the config as a list of objects.List of objects containing the header as strings. Signature: ```csharp public static List<object> GetConfigCsvHeaderList() => new() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_580967531725
unity_docs
rendering
What is `Rendering.RenderPipelineManager.endCameraRendering` in Unity? Explain its purpose and usage.
RenderPipelineManager.endCameraRendering Description Delegate that you can use to invoke custom code after Unity renders an individual Camera. When Unity calls RenderPipeline.EndCameraRendering , it executes the methods in this delegate's invocation list. In the Universal Render Pipeline (URP) and the High Definit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb6e37bd220d
unity_docs
xr
Explain 'Set up your IIS server configuration for Web builds' in Unity.
Set up your Internet Information Services (IIS) server configuration file to use the IIS server with Unity Web builds. The IIS server is ideal for Windows-based environments and for use with Microsoft products. For more information on IIS and how to install and use the server, refer to the Microsoft IIS documentation ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b15c257b838
unity_docs
rendering
What is `LightmapParameters.AOQuality` in Unity? Explain its purpose and usage.
LightmapParameters.AOQuality public int AOQuality ; Description The number of rays to cast for computing ambient occlusion. Fewer rays produce a noisier result. In many cases using 256 rays gives a smooth result.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ca80e91af60e
unity_docs
scripting
In Unity's 'Troubleshooting on iOS devices', what is 'Xcode console displays Program received signal: “SIGBUS” or EXC_BAD_ACCESS error' and how does it work?
This message typically appears on iOS devices when your application receives a NullReferenceException . Use native stack traces to find out where the fault occurred. Native stack traces are a useful tool for fault investigation, but using them requires some expertise. You generally can’t continue after these hardware m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b18b7dcab97
unity_docs
performance
What is `Jobs.TransformAccessArray` in Unity? Explain its purpose and usage.
TransformAccessArray struct in UnityEngine.Jobs / Implemented in: UnityEngine.CoreModule Description TransformAccessArray. Properties Property Description capacity Returns array capacity. isCreated isCreated. length Length. this[int] Array indexer. Constructors Constructor Description TransformAc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6097f23bda8
unity_docs
scripting
What is `AndroidJNI.FromReflectedField` in Unity? Explain its purpose and usage.
AndroidJNI.FromReflectedField Declaration public static IntPtr FromReflectedField (IntPtr refField ); Description Converts a java.lang.reflect.Field to a field ID. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ec3962fee85
unity_docs
xr
What is `Networking.UnityWebRequest.error` in Unity? Explain its purpose and usage.
UnityWebRequest.error public string error ; Description A human-readable string describing any system errors encountered by this UnityWebRequest object while handling HTTP requests or responses. The default value is null . (Read Only) If the UnityWebRequest has not encountered a system error, this property...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2ba703a3db7
unity_docs
scripting
What is `UIElements.UxmlObjectReferenceAttribute.types` in Unity? Explain its purpose and usage.
UxmlObjectReferenceAttribute.types public Type[] types ; Description In UI Builder, when adding a UXML Object to a field that has multiple derived types, a dropdown list appears with a selection of available types that can be added to the field. By default, this list comprises all types that inherit from the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc68aa889a8b
unity_docs
audio
In Unity's 'Web request low-level API reference', what is 'Upload handlers' and how does it work?
Upload handlers allow you more detailed control of aspects of the upload process. The following upload handlers are available, which all specialize the base UploadHandler class: Handler type Description UploadHandlerRaw Accepts a data buffer at construction time. When this buffer is an array of bytes, it’s copied inter...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4afa91dde66a
unity_docs
scripting
What is `Experimental.GraphView.EdgeConnector_1.UnregisterCallbacksFromTarget` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeConnector<T0>.UnregisterCallbacksFromTarget Declaration protected void UnregisterCallbacksFromTarget (); Description Called to unregister event callbacks from the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78cd278a825d
unity_docs
editor
What is `Search.ParsedQuery_1` in Unity? Explain its purpose and usage.
ParsedQuery<T0> class in UnityEditor.Search / Inherits from: Search.ParsedQuery_2 Description Provides methods to define an operation that can be used to filter a data set. <T>: The filtered data type. Properties Property Description returnPayloadIfEmpty Boolean. Indicates if the original payload should be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14a57095303b
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnPreCull`.
can be a coroutine. For similar functionality that does not require the script to be on the same GameObject as a Camera component, refer to Camera.onPreCull . Note : OnPreCull depends on the Built-in Render Pipeline and won't be called in projects using the Scriptable or Universal Render Pieplines. For similar funct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ffe756c1d46
unity_docs
editor
Explain 'Use the Animation view' in Unity.
Use the Animation view to preview and edit Animation Clips for animated GameObjects in Unity. To open the Animation view in Unity, go to Window > Animation . ## Viewing Animations on a GameObject The Animation window is linked to the Hierarchy window, the Project window , the Scene view, and the Inspector window. Lik...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a8c18f686b2
unity_docs
rendering
What is `Rendering.CullingSplit.cullingMatrix` in Unity? Explain its purpose and usage.
CullingSplit.cullingMatrix public Matrix4x4 cullingMatrix ; Description Culling matrix. The model view projection matrix. Use this matrix to cull objects. The value comes from ShadowSplitData .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f95638ed1954
unity_docs
xr
What is `ComputeShader.IsSupported` in Unity? Explain its purpose and usage.
ComputeShader.IsSupported Declaration public bool IsSupported (int kernelIndex ); Parameters Parameter Description kernelIndex Which kernel to query. Returns bool True if the specified compute kernel is able to run on the current end user device, false otherwise. Description Allows you to check whet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_73ead9525cfe
github
scripting
Write a Unity C# XR/VR script for Head Gaze Controller
```csharp using System.Collections; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.XR.Interaction.Toolkit; using UnityEngine.InputSystem.LowLevel; using ExPresSXR.UI; using ExPresSXR.Rig.HeadGazeInputDevice; namespace ExPresSXR.Rig { public class HeadGazeController : MonoBehaviour { ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_a03d0ac01118
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnMouseOver`.
is called. This event is sent to all scripts attached to the Collider . This function is not called on objects that belong to Ignore Raycast layer. This function is called on Colliders and 2D Colliders marked as trigger when the following properties are set to true: For 3D physics: Physics.queriesHitTriggers For 2D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_93ab27b9f029
github
scripting
Write a Unity C# MonoBehaviour script called Composite Mono Behaviour
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables.Prototyping { public interface IMonoBehaviourComponent { void MyOnEnable(); void MyOnDisable(); void MyOnAwake(); } public abstract class Co...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_9483f687ba0a
unity_docs
scripting
Explain 'Troubleshoot common Web build errors' in Unity.
Resolve common Web build problems such as memory exhaustion, server configuration issues, and unsupported compression formats. ## Problem: The build runs out of memory This is a common problem, especially on 32-bit browsers. For more information on Web memory issues and how to fix them, refer to the documentation on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a0a12127ad5
unity_docs
input
What is `Experimental.Rendering.GraphicsFormatUtility.GetSRGBFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.GetSRGBFormat Declaration public static Experimental.Rendering.GraphicsFormat GetSRGBFormat ( Experimental.Rendering.GraphicsFormat format ); Description Returns the equivalent sRGB format of a Graph...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_712afe050632
unity_docs
rendering
Explain 'Web development' in Unity.
Before you start developing apps on the Unity Web platform, you might want to consider reading this section. This section covers the following Web topics: Page Description Web Player settings Refer to the UI description of Web Player settings . Interaction with browser scripting The different methods used for browser s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b72a69edfeb4
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh.vertexCount`.
Mesh.vertexCount public int vertexCount ; Description Returns the number of vertices in the Mesh (Read Only). ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Mesh mesh = GetComponent<MeshFilter>().mesh; print(mesh.vertexCount); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f3b59acb4147
unity_docs
scripting
Explain 'Package Manager caches' in Unity.
The Unity Package Manager uses a global cache to store the package contents and metadata for packages in the Unity Package Manager (UPM) format. The Package Manager maintains a separate cache for asset packages in the.unitypackage format. These caches make reusing and sharing packages more efficient, and allows you to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b99f95848dcb
unity_docs
rendering
What is `TerrainTools.TerrainPaintUtility.BuildTransformPaintContextUVToPaintContextUV` in Unity? Explain its purpose and usage.
TerrainPaintUtility.BuildTransformPaintContextUVToPaintContextUV Declaration public static void BuildTransformPaintContextUVToPaintContextUV ( TerrainTools.PaintContext src , TerrainTools.PaintContext dst , out Vector4 scaleOffset ); Parameters Parameter Description src Source PaintContext. dst Dest...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_74fc56c7f25a_doc_5
github
scripting
What does `OnPaintInspectorGUI` do in this Unity script? Explain its purpose and signature.
Callback for painting the inspector GUI for the PrefabBrush in the Tile Palette.The PrefabBrush Editor overrides this to have a custom inspector for this Brush. Signature: ```csharp public override void OnPaintInspectorGUI() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4c4fc3505c8d
unity_docs
performance
Explain 'Split tasks across frames with coroutines' in Unity.
A coroutine is a method that can suspend execution and resume at a later time. In Unity, this means coroutines can start running in one frame and then resume in another, allowing you to spread tasks across several frames. Topic Description Write and run coroutines Write and run coroutine methods to do work that takes e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22d8c9854fbc
unity_docs
xr
What is `Rendering.ObjectIdRequest.result` in Unity? Explain its purpose and usage.
ObjectIdRequest.result public Rendering.ObjectIdResult result ; Description A result field that is filled when the render request has been submitted and completed, containing the ObjectIdResult._idToObjectMapping that is needed to interpret the color-encoded object IDs that are rendered in the ObjectIdRequest....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1264b509149b
unity_docs
scripting
What is `Unity.Android.Gradle.PropertyEnum_1` in Unity? Explain its purpose and usage.
PropertyEnum<T0> class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.Property_1 Description Generic Enum property type. Public Methods Method Description Set Set enum property value. Inherited Members Public Methods Method Description AddElementDependencies Adds a list of dependencies by I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e2437865947b
unity_docs
editor
Explain 'Introduction to building' in Unity.
When you create a build of your application, you create a Player. A Player is the platform-specific runtime application that Unity builds from your project. This is also known as a project build , which is the workflow of building a project from the Unity Editor into an application that runs on a target platform. Build...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0858b95015d1
unity_docs
rendering
In Unity's 'Color gradients', what is 'Apply color gradient presets' and how does it work?
To apply a color gradient preset to text, reference the color gradient by name as <gradient="name-of-the-color-gradient">Your text</gradient> . If you apply the color gradient like this, the color of the text is multiplied by the object’s current vertex colors. To apply the pure gradient to a selection of text, use a <...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7e0b41cd8675_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Allows already [SerializField] fields to be non-editable in the inspector.This is useful to see values for debugging, but not permit (or purposefully support) changing values via inspectorReference: https://answers.unity.com/questions/489942/how-to-make-a-readonly-property-in-inspector.html Signature: ```csharp public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e32af6bb5cdb
unity_docs
editor
Explain 'User Reporting' in Unity.
com.unity.services.user-reporting ## Description This package is a SDK toolset that helps you collect and identify issues that users or testers encounter with your apps. ## Released for Unity Package version 2.0.14 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_d56dcfceaee6
unity_docs
math
Show me a Unity code example for 'Create a scriptable tile'.
. ## Use a script to create a scriptable tile To create the PipelineExampleTile scriptable tile and have it as an available option in the UnityEditor’s Asset menu: Create a blank MonoBehaviour script by going to Assets > Create > MonoBehaviour Script . Name the file to PipelineExampleTile.cs . Open the file in a text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_446002cab684
unity_docs
performance
What is `Rendering.CommandBuffer.SetInstanceMultiplier` in Unity? Explain its purpose and usage.
CommandBuffer.SetInstanceMultiplier Declaration public void SetInstanceMultiplier (uint multiplier ); Description Adds a command to multiply the instance count of every draw call by a specific multiplier. Changing the instance multiplier is useful for stereo rendering optimizations such as single pass instanc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75fd19055434
unity_docs
editor
What is `SearchService.ISceneSearchEngine` in Unity? Explain its purpose and usage.
ISceneSearchEngine interface in UnityEditor.SearchService Implements interfaces: IFilterEngine<T0> , ISearchEngineBase Description The interface for Scene engines to implement. It inherits from IFilterEngine<T0> .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fb08b28464c
unity_docs
editor
What is `SceneManagement.PrefabStageUtility` in Unity? Explain its purpose and usage.
PrefabStageUtility class in UnityEditor.SceneManagement Description Utility methods related to Prefab stages. Static Methods Method Description GetCurrentPrefabStage Get the current Prefab stage, or null if there is none. GetPrefabStage Get the Prefab stage which contains the given GameObject. OpenPrefab Ope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ff6555bee81
unity_docs
rendering
What is `ReflectionProbe.defaultTextureHDRDecodeValues` in Unity? Explain its purpose and usage.
ReflectionProbe.defaultTextureHDRDecodeValues public static Vector4 defaultTextureHDRDecodeValues ; Description HDR decode values of the default reflection probe texture. Additional resources: Shader properties in HLSL , ReflectionProbe.defaultTexture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d69f16863ea9
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.NativeSliceUnsafeUtility.SetAtomicSafetyHandle` in Unity? Explain its purpose and usage.
NativeSliceUnsafeUtility.SetAtomicSafetyHandle Declaration public static void SetAtomicSafetyHandle (ref NativeSlice<T> slice , Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety ); Parameters Parameter Description slice The NativeSlice to set. safety The AtomicSafetyHandle to use. Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_95587d6ca0d3
github
scripting
Write a Unity C# XR/VR script for Complex Cube
```csharp using UnityEngine; using UnityEngine.XR.Interaction.Toolkit; [RequireComponent(typeof(XRGrabInteractable), typeof(Renderer))] public class ComplexCube : MonoBehaviour { XRBaseInteractable m_Interactable; Renderer m_Renderer; static Color s_HoveredColor = new Color(0.929f, 0.094f, 0.278f); ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_8789568fe9c4
unity_docs
scripting
Explain 'Change the fade distance of lights with fall-off' in Unity.
In the real world, light fades over distance, and dim lights have a lower range than bright lights. The term “fall-off” refers to the rate at which light fades. Alongside Unity’s default fall-off lighting behaviour, you can also use custom fall-off settings. Progressive Lightmapper provides custom fall-off presets, whi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1403957f1e02
unity_docs
scripting
What is `HumanBone.limit` in Unity? Explain its purpose and usage.
HumanBone.limit public HumanLimit limit ; Description The rotation limits that define the muscle for this bone. The muscle contains the default orientation of the bone alone with the allowed limits of rotation away from the default around all three axes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29daeea64093
unity_docs
scripting
What is `Unity.Properties.PropertyPath.Equals` in Unity? Explain its purpose and usage.
PropertyPath.Equals Declaration public bool Equals ( Unity.Properties.PropertyPath other ); Parameters Parameter Description other The object to compare with the current instance. Returns bool true if obj and this instance are the same type and represent the same value; otherwise, false . Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_671d6a5dfac4
unity_docs
ui
What is `Experimental.GraphView.FreehandSelector` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. FreehandSelector class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.MouseManipulator Description Freehand selection tool. Constructors Constructor Description FreehandSelector FreehandSelector constru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61519d3d9fc4
unity_docs
performance
What is `Unity.Collections.NativeArray_1.CopyTo` in Unity? Explain its purpose and usage.
NativeArray<T0>.CopyTo Declaration public void CopyTo (T[] array ); Declaration public void CopyTo (NativeArray<T> array ); Parameters Parameter Description array The array to copy elements to. Description Copies all the elements to another NativeArray<T0> or a managed array of the same length.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7f688b995f2
unity_docs
scripting
What are the parameters of `Rendering.AsyncGPUReadback.RequestIntoNativeArray` in Unity?
Returns AsyncGPUReadbackRequest Returns an AsyncGPUReadbackRequest that you can use to determine when the data is available. Otherwise, returns a request with an error. Description Retrieves data asynchronously from a GPU Texture resource. If the return value is a request with an error, calling AsyncGPUReadbackRequest....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d725d52bb478
unity_docs
ui
What is `UIElements.BackgroundPosition` in Unity? Explain its purpose and usage.
BackgroundPosition struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Script interface for VisualElement background-position style property IStyle.BackgroundPosition.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db088ef90b62
unity_docs
physics
What is `Rigidbody2D.IsAwake` in Unity? Explain its purpose and usage.
Rigidbody2D.IsAwake Declaration public bool IsAwake (); Description Is the rigidbody "awake"? Sleeping is an optimisation that is used to temporarily remove an object from physics simulation when it is at rest. This function tells if the rigidbody is currently awake. Additional resources: Sleep , WakeUp , I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8502f2c3ee4
unity_docs
rendering
What is `Rendering.EditorCameraUtils.RenderToCubemap` in Unity? Explain its purpose and usage.
EditorCameraUtils.RenderToCubemap Declaration public static bool RenderToCubemap ( Camera camera , Texture target , int faceMask , StaticEditorFlags culledFlags ); Parameters Parameter Description camera The Camera to use during rendering. target The cubemap to render to. faceMask A bitmask which...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9723e36f3b2f
unity_docs
scripting
What is `AudioType.IT` in Unity? Explain its purpose and usage.
AudioType.IT Description The audio file you want to stream has the Impulse Tracker (IT) audio file format. Use this enumeration value to ensure the format type of the audio file has the IT audio file format. Use this audio type for audio files with the extension .it. If the audio file has a different format, Unity ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73ec7f4fc870
unity_docs
scripting
What is `Search.IPropertyDatabaseView.GetValueFromRecord` in Unity? Explain its purpose and usage.
IPropertyDatabaseView.GetValueFromRecord Declaration public TValue GetValueFromRecord ( Search.IPropertyDatabaseRecordValue recordValue ); Parameters Parameter Description recordValue A serialized record value. Returns TValue The deserialized value. Description Deserialize a record value into its pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43216f699756
unity_docs
scripting
What is `ScriptableObject.OnEnable` in Unity? Explain its purpose and usage.
ScriptableObject.OnEnable() Description This function is called when the object is loaded. OnEnable is called whenever a ScriptableObject instance is loaded into memory. This happens in the following scenarios: At Editor startup, for all ScriptableObjects referenced in open scenes. On creation of a new Scriptab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d295fade8fc
unity_docs
rendering
What is `WebCamTexture.isPlaying` in Unity? Explain its purpose and usage.
WebCamTexture.isPlaying public bool isPlaying ; Description Returns if the camera is currently playing. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Tries to start the camera and outputs to the console if is was sucessful or not. void Start() { WebCamTexture webcamTexture = new WebC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0b48729527b
unity_docs
editor
What is `PlayerSettings.WSA.wideTileShowName` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.wideTileShowName public static bool wideTileShowName ; Description Indicates whether to display the application name on the wide tile . In the Editor, Unity displays this under Tile section in UWP Player Settings . Note : If you do not set a logo image for this tile size , Unity ignores...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fb49339e943
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.GetAssetPath`.
); Parameters Parameter Description instanceID The instance ID of the asset. assetObject A reference to the asset. Returns string The asset path name, or an empty string if the asset doesn't exist. Description Returns the path name relative to the project folder where the asset is stored. All paths ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c69e72d0057e
unity_docs
rendering
What is `SceneViewCameraWindow.GetWindowSize` in Unity? Explain its purpose and usage.
SceneViewCameraWindow.GetWindowSize Declaration public Vector2 GetWindowSize (); Returns Vector2 Returns the width and height of the SceneViewCameraWindow window. Description Retrieves the dimensions of the SceneViewCameraWindow window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c29b84d1a1b
unity_docs
xr
Explain 'Foveated rendering' in Unity.
Foveated rendering is an optimization technique in which the areas of the display at the periphery of the user’s vision are rendered at a lower resolution. Foveated rendering can improve rendering performance with little impact on perceived visual quality. Foveated rendering gets its name from the fovea, which is a sma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2da6191ac44
unity_docs
input
What is `Experimental.GraphView.EdgeDragHelper.HandleMouseMove` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper.HandleMouseMove Declaration public void HandleMouseMove ( UIElements.MouseMoveEvent evt ); Parameters Parameter Description evt The event. Description Handle mouse move event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6bf385af21c
unity_docs
physics
Show me a Unity C# example demonstrating `ControllerColliderHit.normal`.
ControllerColliderHit.normal public Vector3 normal ; Description The normal of the surface we collided with in world space. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { // print the impact point's normal Debug.Log("Normal vect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95496ce26249
unity_docs
scripting
What is `Undo` in Unity? Explain its purpose and usage.
Undo class in UnityEditor Description Lets you register undo operations on specific objects you are about to perform changes on. The Undo system stores delta changes in the undo stack. Undo operations automatically combine together based on events. For example, mouse down events split undo groups. Grouped undo op...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_952c1fc00d33
unity_docs
rendering
Show me a Unity code example for 'An example of a YAML scene file'.
An example of a simple but complete scene is given below. The scene contains just a camera and a cube object. Note that the file must start with the two lines ``` %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ``` …in order to be accepted by Unity. Otherwise, the import process is designed to be tolerant of omissions - defau...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3c3c84999ab
unity_docs
scripting
What is `SystemLanguage.Hindi` in Unity? Explain its purpose and usage.
SystemLanguage.Hindi Description Hindi. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Hindi language if (Application.systemLanguage == SystemLanguage.Hindi) { //Outputs into console that the system is Hindi Debug....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf3dfc189ea3
unity_docs
physics
Show me a Unity C# example demonstrating `AI.NavMeshAgent.SetDestination`.
te to. Returns bool True if the destination was requested successfully, otherwise false. Description Sets or updates the destination thus triggering the calculation for a new path. Note that the path may not become available until after a few frames later. While the path is being computed, pathPending will b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ab654d5fbee5
unity_docs
rendering
In Unity's 'Enroll as a UPM publisher on the Publisher Portal', what is 'Verify your identity' and how does it work?
Unity uses Persona’s identity verification process to confirm that the person enrolling in the UPM Publisher Program is a real individual with the legal authority to act on behalf of the account. To complete this process, you need the following: A camera attached to your device. Government-issued ID that displays your ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_280de5c834f4
unity_docs
scripting
Explain 'Introduction to asset splitting' in Unity.
Depending on which publishing format your application uses, there is a different solution for asset splitting. The following table shows which asset splitting solution is for which publishing format: Publishing format Asset splitting solution APK APK expansion files Android App Bundle (AAB) Play Asset Delivery Note : S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0f75b9103f2
unity_docs
scripting
What is `Playables.PlayableExtensions.SetDuration` in Unity? Explain its purpose and usage.
PlayableExtensions.SetDuration Declaration public static void SetDuration (U playable , double value ); Parameters Parameter Description playable The Playable used by this operation. value The new duration in seconds, must be a positive value. Description Changes the duration of the Playable . Use t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a68320d2e51d
unity_docs
physics
What is `Collider2D.IsTouching` in Unity? Explain its purpose and usage.
Collider2D.IsTouching Declaration public bool IsTouching ( Collider2D collider ); Parameters Parameter Description collider The collider to check if it is touching this collider. Returns bool Whether this collider is touching the collider or not. Description Check whether this collider is touching...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4085d5476aca
unity_docs
performance
What is `Profiling.IProfilerFrameTimeViewSampleSelectionController.focusedThreadIndex` in Unity? Explain its purpose and usage.
IProfilerFrameTimeViewSampleSelectionController.focusedThreadIndex public int focusedThreadIndex ; Description The index of the the thread selected to be displayed in the Profiler module . If the Profiler module is in (Raw) Hierarchy view and is showing data for a specific thread, this property's value corre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1fb5167fefb
unity_docs
scripting
What is `JointDrive.positionSpring` in Unity? Explain its purpose and usage.
JointDrive.positionSpring public float positionSpring ; Description Strength of a rubber-band pull toward the defined direction. Only used if mode includes Position. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Create a JointDrive, configure it and assign the JointDrive to // the zD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b00db88cd68e
unity_docs
editor
What is `VersionControl.Provider.RevertIsValid` in Unity? Explain its purpose and usage.
Provider.RevertIsValid Declaration public static bool RevertIsValid ( VersionControl.AssetList assets , VersionControl.RevertMode mode ); Declaration public static bool RevertIsValid ( VersionControl.Asset asset , VersionControl.RevertMode mode ); Parameters Parameter Description assets List of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8abfa67374c7
unity_docs
scripting
What is `Transform.InverseTransformPoint` in Unity? Explain its purpose and usage.
Transform.InverseTransformPoint Declaration public Vector3 InverseTransformPoint ( Vector3 position ); Description Transforms position from world space to local space. This function is essentially the opposite of Transform.TransformPoint which is used to convert from local to world space. Note that the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4c7f30737bfc
unity_docs
rendering
Explain 'Render queues and sorting behaviours' in Unity.
The order in which Unity renders objects is based on two things: which render queue the object is in, and how Unity sorts objects within that render queue. ## Render queues Unity sorts objects into groups called render queues. Unity renders the contents of one render queue, and then renders the contents of another re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a8887653f879
unity_docs
rendering
Explain 'Managed code stripping and the Unity linker' in Unity.
The Unity build process uses a tool called the Unity linker to strip managed code. The Unity linker is a version of the IL Linker customized to work with Unity. Custom parts of the Unity linker specific to the Unity engine aren’t publicly available. The Unity linker is responsible for both managed code stripping and pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fcbb2581e19
unity_docs
rendering
What is `TextureImporterAlphaSource` in Unity? Explain its purpose and usage.
TextureImporterAlphaSource enumeration Description Select how the alpha of the imported texture is generated. Properties Property Description None No Alpha will be used. FromInput Use Alpha from the input texture if one is provided. FromGrayScale Generate Alpha from image gray scale.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7e8bcb5de1dc
unity_docs
editor
Explain 'Types of assets' in Unity.
Unity supports a variety of asset types that you can import and use in your project. You can import assets from a variety of sources, and manage them in the Unity Editor. You can also group together configurations of assets into prefabs to reuse across your project. Topic Description Supported asset type reference Refe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.