id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_45b4199cf54a
unity_docs
audio
What is `Video.VideoPlayer.controlledAudioTrackMaxCount` in Unity? Explain its purpose and usage.
VideoPlayer.controlledAudioTrackMaxCount public static ushort controlledAudioTrackMaxCount ; Description Maximum number of audio tracks that can be controlled. (Read Only) When playing audio from a URL, the number of audio tracks is not known in advance. It is up to the user to specify the number of controlled ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b569d6d3c8bb
unity_docs
scripting
What is `Component` in Unity? Explain its purpose and usage.
Component class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Base class for everything attached to a GameObject . Note that your code will never directly create a Component. Instead, you write script code, and attach the script to a GameObject . Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1574b6101aa3
unity_docs
rendering
Show me a Unity code example for 'Example of Particle System GPU instancing in a Surface Shader'.
Here is a complete working example of Surface Shader using Particle System GPU Instancing: ```csharp Shader "Instanced/ParticleMeshesSurface" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1))...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e89ec1ebed90
unity_docs
physics
What is `Collider.OnCollisionStay` in Unity? Explain its purpose and usage.
Collider.OnCollisionStay(Collision) Parameters Parameter Description other The Collision data associated with this collision event. Description OnCollisionStay is called once per frame for every Collider or Rigidbody that touches another Collider or Rigidbody. In contrast to OnTriggerStay, OnCollisionStay is p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_995c0996fd70
unity_docs
animation
In Unity's 'Playables Examples', what is 'Create an animation blend tree' and how does it work?
This example demonstrates how to use the AnimationMixerPlayable to blend two animation clips. Before blending the animation clips, they must be wrapped by playables. To do this, an AnimationClipPlayable (clipPlayable0 and clipPlayable1) wraps each AnimationClip (clip0 and clip1). The SetInputWeight() method dynamically...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56a4e47232b6
unity_docs
rendering
What is `VertexChannelCompressionFlags` in Unity? Explain its purpose and usage.
VertexChannelCompressionFlags enumeration Description Use these enum flags to specify which elements of a vertex to compress. Default settings: Position and TexCoord1 are uncompressed because high precision is usually desired. Everything else is compressed to save memory and conserve bandwidth. Properties Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81b16c660384
unity_docs
physics
What is `Rigidbody2D.interpolation` in Unity? Explain its purpose and usage.
Rigidbody2D.interpolation public RigidbodyInterpolation2D interpolation ; Description Physics interpolation used between updates. Interpolation is used to estimate the position of the Rigidbody between physics updates. It can be useful to switch this on when the graphics update is much more frequent than the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_64aee8ac03d3
unity_docs
rendering
Explain 'Pass block in ShaderLab reference' in Unity.
To define a Pass in ShaderLab , use a Pass block. This page contains information on using Pass blocks. For information on how a Shader object works, and the relationship between Shader objects , SubShaders and Passes, see Shader object fundamentals . Inside the Pass block, you can: Assign a name to the Pass, using a Na...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06302cc7301a
unity_docs
rendering
What is `LightTransport.RadeonRaysProbeIntegrator` in Unity? Explain its purpose and usage.
RadeonRaysProbeIntegrator class in UnityEngine.LightTransport Implements interfaces: IProbeIntegrator Description RadeonRays-based light probe integrator. This integrator implementation uses the RadeonRaysContext class, which implements the IDeviceContext interface. It uses the RadeonRays SDK for ray-triangl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_753d52212c2e
unity_docs
physics
What is `Experimental.GraphView.Placemat.MinSizePolicy` in Unity? Explain its purpose and usage.
MinSizePolicy enumeration Description Determines the behavior of the CalculateSelectedNodeBounds method. Properties Property Description EnsureMinSize Enforce the placemat minimum size when calculating the bounds. DoNotEnsureMinSize Ignore the placemat minimum size when calculating the bounds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_494f80b8f87f
unity_docs
animation
What is `Tilemaps.TileBase.GetTileAnimationData` in Unity? Explain its purpose and usage.
TileBase.GetTileAnimationData Declaration public bool GetTileAnimationData ( Vector3Int position , Tilemaps.ITilemap tilemap , ref Tilemaps.TileAnimationData tileAnimationData ); Parameters Parameter Description position Position of the Tile on the Tilemap . tilemap The Tilemap the tile is presen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe07137bf64d
unity_docs
scripting
Show me a Unity C# example demonstrating `FrameTiming.cpuTimeFrameComplete`.
ic ulong cpuTimeFrameComplete ; Description This is the CPU clock time at the point GPU finished rendering the frame and interrupted the CPU. The CPU clock time at the point when the GPU finishes rendering the frame. On most platforms, this value is calculated and equals firstSubmitTimestamp + gpuFrameTime . U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fff556e15ac7
unity_docs
math
What is `AndroidJNI.CallStaticCharMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticCharMethodUnsafe Declaration public static char CallStaticCharMethodUnsafe (IntPtr clazz , IntPtr methodID , jvalue* args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Java Nati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02082c5d8bfc
unity_docs
editor
What is `Undo.RegisterImporterUndo` in Unity? Explain its purpose and usage.
Undo.RegisterImporterUndo Declaration public static void RegisterImporterUndo (string path , string name ); Parameters Parameter Description path Path of the asset importer to register for Undo. name The name of the undo operation. Description Copies the state of the importer for the given asset path. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3acd5c8d45f0
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.ElementsList_1` in Unity? Explain its purpose and usage.
ElementsList<T0> class in Unity.Android.Gradle.Manifest / Implemented in: Unity.Android.Gradle Description A list of Android manifest elements. Properties Property Description Count Gets the number of elements contained in the list. this[int] Access ElementsList elements by index. Public Methods Method D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_31ad4bb3f508
unity_docs
editor
Explain 'Use unsupported video files in the Editor' in Unity.
To use video files that are compatible with target platforms but incompatible with the Unity Editor (such as AV1 and VP9), set them up as streaming assets . Drag your video file into the StreamingAssets folder. Reference the StreamingAssets URL in the Video Player component. Alternatively, you can use Application.strea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77e62b59f83e
unity_docs
math
What is `Graphics.RenderMeshPrimitives` in Unity? Explain its purpose and usage.
Graphics.RenderMeshPrimitives Declaration public static void RenderMeshPrimitives (ref RenderParams rparams , Mesh mesh , int submeshIndex , int instanceCount = 1); Parameters Parameter Description rparams The parameters Unity uses to render the Mesh primitives. mesh The Mesh to render. submeshI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc6a057c31c9
unity_docs
scripting
In Unity's 'ToolbarMenu', what is 'Create a ToolbarMenu' and how does it work?
You can create a ToolbarMenu with UI Builder, UXML, or C#. The following C# example creates a ToolbarMenu with three menu items: ```csharp using UnityEditor.UIElements; ... var toolbarMenu = new ToolbarMenu() { text = "Menu Text" }; toolbarMenu.menu.AppendAction("Menu item 1", (a) => { Debug.Log("Menu item 1 clicked");...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_49d7554b6575
github
scripting
Write a Unity C# script called Mod Bus Poll
```csharp /* * Copyright (c) University of Sheffield AMRC 2025. * See LICENSE file */ using System; using System.Collections; using System.Linq; using System.Threading.Tasks; using UnityEngine; namespace AMRC.UnityModBus.Classes { /// <summary> /// Class to handle polling a register address over ModBus. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_376334b5c803
unity_docs
rendering
In Unity's 'Remove unused resources from your Web build', what is 'Remove or disable unused packages' and how does it work?
Unused packages might affect the final output size of the build. Remove or disable all packages the project doesn’t use. This includes built-in packages and packages that might be enabled by default, such as the Input System package , which can significantly increase the build size if it’s not removed. You can use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7ae77a71b80b
unity_docs
rendering
Explain 'Visual Studio Editor' in Unity.
com.unity.ide.visualstudio ## Description Code editor integration for supporting Visual Studio as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc. ## Released for Unity Package version 2.0.27 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_sr_f98d3b82678e
unity_docs
animation
What is `Animations.GenericBindingUtility.SetValues` in Unity? Explain its purpose and usage.
GenericBindingUtility.SetValues Declaration public static void SetValues (NativeArray<BoundProperty> boundProperties , NativeArray<float> values ); Declaration public static void SetValues (NativeArray<BoundProperty> boundProperties , NativeArray<int> values ); Parameters Parameter Description boundPro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75fe43394007
unity_docs
scripting
What are the parameters of `UIElements.CallbackEventHandler.HandleEventBubbleUp` in Unity?
Description Executes logic on this element during the BubbleUp phase, immediately before this element's BubbleUp callbacks. Calling StopPropagation will prevent further invocations of this method along the propagation path. This method is designed to be overriden by subclasses. Use it to implement event handling with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c667d7c4b330
unity_docs
scripting
In Unity's 'Move elements at runtime', what is 'Create the UI container' and how does it work?
Create a UXML in your project and define a VisualElement within it. The VisualElment acts as the parent container for any child elements that you plan to move dynamically during runtime. Create a Unity project with any template. In the Project window , create a folder named UI to store the UXML and USS files. In the UI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1b0338b11651
github
scripting
Write a Unity C# script called Character Capsule
```csharp using System; using UnityEngine; using GameFramework.Extensions; using System.Diagnostics.Contracts; struct CharacterCapsule { public const float COLLISION_OFFSET = .001f; public const float RECALCULATE_NORMAL_FALLBACK = .01f; public const float RECALCULATE_NORMAL_ADDON = .001f; public bool ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52ecfdd42e2c
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.DrawSolidArc`.
e normal of the circle. from The direction of the point on the circumference, relative to the center, where the sector begins. angle The angle of the sector, in degrees. radius The radius of the circle Note: Use HandleUtility.GetHandleSize where you might want to have constant screen-sized handles. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a4efd21097d
unity_docs
scripting
What is `Experimental.Rendering.SceneStateHash.ambientProbeHash` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SceneStateHash.ambientProbeHash public Hash128 ambientProbeHash ; Description A hash representing the state of the ambient probe.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_298d5e0dda7d
unity_docs
input
Show me a Unity C# example demonstrating `WebGLInput.captureAllKeyboardInput`.
KeyboardInput ; Description Capture all keyboard inputs. This property determines whether keyboard inputs are captured by WebGL. If this is enabled (default), all inputs will be received by the WebGL canvas regardless of focus, and other elements in the webpage will not receive keyboard inputs. You need to disable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_361ff8c17d45
github
scripting
Write a Unity C# UI script for Base Screen
```csharp using UnityEngine; using DG.Tweening; //Abstract class to be implemented by Screens //Has a simple Singleton system and some functionalities that are common inside screens public abstract class BaseScreen<T> : MonoBehaviour where T : Component { public const float TIME_TO_TWEEN = 1f; public static T insta...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_e90ee696461c
unity_docs
scripting
What is `UIElements.TransitionStartEvent` in Unity? Explain its purpose and usage.
TransitionStartEvent class in UnityEngine.UIElements / Inherits from: UIElements.TransitionEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent when a transition's delay phase ends. Inherited Members Properties Property Description bubbles Returns whether this event type bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a99a7f756904
unity_docs
scripting
In Unity's 'TreeView', what is 'Refresh the collection view' and how does it work?
To refresh the collection view, you can call either RefreshItems / RefreshItem or Rebuild . In general, call the RefreshItems or RefreshItem method—these methods only refresh the collection view and are less expensive. If you call Rebuild , the collection view is completely rebuilt, which can be expensive. However, you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f58c2d1290e
unity_docs
scripting
What is `Experimental.GraphView.GraphView.ReleaseBlackboard` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.ReleaseBlackboard Declaration public void ReleaseBlackboard ( Experimental.GraphView.Blackboard toRelease ); Parameters Parameter Description toRelease The blackboard to release. Description Releases an assoc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_624bfb04a271
unity_docs
rendering
What are the parameters of `ParticleSystemRenderer.SetMeshes` in Unity?
Description Sets the Meshes that the ParticleSystemRenderer uses to display particles when the ParticleSystemRenderer.renderMode is set to ParticleSystemRenderMode.Mesh . Additional resources: ParticleSystemRenderer.renderMode . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSyst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1de88429669
unity_docs
scripting
What is `ObjectChangeEventStream.Builder.PushChangeGameObjectStructureHierarchyEvent` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.Builder.PushChangeGameObjectStructureHierarchyEvent Declaration public void PushChangeGameObjectStructureHierarchyEvent (ref ChangeGameObjectStructureHierarchyEventArgs data ); Parameters Parameter Description data The event data to add to the stream. Description Adds an ChangeGa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b3205a8b9b1
unity_docs
rendering
What is `AMD.AMDUnityPlugin` in Unity? Explain its purpose and usage.
AMDUnityPlugin class in UnityEngine.AMD / Implemented in: UnityEngine.AMDModule Description Provides methods to manage loading and unloading AMD module plugins. AMDUnityPlugin contains the implementation for AMD's FidelityFX Super Resolution 2 (FSR2) temporal upscaler. To access this API, follow these steps:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fa043416847
unity_docs
xr
What is `Progress.RegisterCancelCallback` in Unity? Explain its purpose and usage.
Progress.RegisterCancelCallback Declaration public static void RegisterCancelCallback (int id , Func<bool> callback ); Parameters Parameter Description id The progress indicator's unique ID. callback The function called when a request to cancel a progress indicator's associated task is made. The function ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3aca4853235
unity_docs
rendering
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.FlowEvent`.
FlowEvent (uint flowId , Unity.Profiling.ProfilerFlowEventType flowEventType ); Parameters Parameter Description flowId Profiler flow identifier. flowEventType Flow event type. Description Add flow event to a Profiler sample. Use Profiler flow events to highlight the dependencies between task execution ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10f72f9352a6
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.B8G8R8A8_SNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.B8G8R8A8_SNorm Description A four-component, 32-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8b3779fda91
unity_docs
scripting
What is `Video.VideoTimeUpdateMode.UnscaledGameTime` in Unity? Explain its purpose and usage.
VideoTimeUpdateMode.UnscaledGameTime Description Update the VideoPlayer's time based on Time.unscaledTime . Use this value to synchronize playback with gameplay and to continue updates when gameplay is paused. For example, use this mode for menu transitions that are updated while the game is paused.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47bec4cf5864
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.GetUnityMainTargetGuid`.
tion public string GetUnityMainTargetGuid (); Returns string The GUID for the main target. Description Returns the GUID of the main target in Unity project. Returns the GUID of the main target. This target includes everything except source code, plugins, dependent frameworks, and source compile and link bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6910d9d9a9ea_doc_18
github
scripting
What does `OnMouseUpAsObservable` do in this Unity script? Explain its purpose and signature.
OnMouseUp is called when the user has released the mouse button. Signature: ```csharp public static IObservable<Unit> OnMouseUpAsObservable(this Component component) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7da77baa4167
unity_docs
performance
What is `Unity.Collections.NativeArray_1.ReadOnly.UnsafeElementAt` in Unity? Explain its purpose and usage.
NativeArray<T0>.UnsafeElementAt Declaration public ref readonly T UnsafeElementAt (int index ); Parameters Parameter Description index The index of the element. Returns T A ref readonly to a value of type T . Description Provides read-only access to ReadOnly elements by index. This method is da...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4952186da90a
unity_docs
rendering
Explain 'Writing custom shaders for the BatchRendererGroup API' in Unity.
Resources for writing custom shaders that support Data-Oriented Technology Stack (DOTS) Instancing, so they can be used with the BatchRendererGroup API. Page Description DOTS Instancing shaders Learn about the characteristics and advantages of shaders that support DOTS Instancing. Support DOTS Instancing in a a custom ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38a1071e82e8_doc_5
github
scripting
What does `isSpawnOptionRandomized` do in this Unity script? Explain its purpose and signature.
Whether this behavior will select a random object from each time it spawns. Signature: ```csharp public bool isSpawnOptionRandomized => m_SpawnOptionIndex < 0 || m_SpawnOptionIndex >= m_ObjectPrefabs.Count; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c1828d1ff4b5_doc_1
github
scripting
What does `AfterParallelUpdate` do in this Unity script? Explain its purpose and signature.
This method is called after WaitAll is complelete. You can put in any Unity's api inside this method Signature: ```csharp protected virtual void AfterParallelUpdate(int frameIndex) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_0199f6d21818
unity_docs
scripting
What is `UIElements.CollectionViewController.GetItemForIndex` in Unity? Explain its purpose and usage.
CollectionViewController.GetItemForIndex Declaration public object GetItemForIndex (int index ); Parameters Parameter Description index The item index. Returns object The object in the source at this index. Description Returns the item with the specified index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8b0a573e2f05
unity_docs
physics
Explain 'Roslyn analyzers and source generators' in Unity.
Use Roslyn analyzers, source generators and ruleset files in Unity projects to inspect your code for style, quality, and other issues. You can use existing analyzer libraries to inspect your code, and write your own analyzers to promote the best practices or conventions within your organization. Note : Roslyn analyzers...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_77fac824b108
unity_docs
scripting
Explain 'Association launching for UWP' in Unity.
You can use the association launching API to launch the user’s default app for a file type or protocol. For more information, refer to UnityEngine.WSA.Launcher . You can also enable your app to be the default app for a file type or protocol in Player settings > File and Protocol Associations . More settings are availab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_747fa860ad5b
unity_docs
scripting
What is `Application.RequestAdvertisingIdentifierAsync` in Unity? Explain its purpose and usage.
Application.RequestAdvertisingIdentifierAsync Declaration public static bool RequestAdvertisingIdentifierAsync ( Application.AdvertisingIdentifierCallback delegateMethod ); Parameters Parameter Description delegateMethod Delegate method. Returns bool Returns true if successful, and false for platforms w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8735ed31f1df
unity_docs
xr
What is `Networking.DownloadHandlerBuffer.ctor` in Unity? Explain its purpose and usage.
DownloadHandlerBuffer Constructor Declaration public DownloadHandlerBuffer (); Description Default constructor. ```csharp using System.Collections; using UnityEngine; using UnityEngine.Networking;public class Example : MonoBehaviour { IEnumerator Start() { using (var uwr = new UnityWebRequest("https://unity3...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b9611c70132
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Latvian`.
SystemLanguage.Latvian Description Latvian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Latvian language if (Application.systemLanguage == SystemLanguage.Latvian) { //Outputs into console that the system is Latvi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e64c4001a846
unity_docs
scripting
What is `Video.VideoPlayer.FrameReadyEventHandler` in Unity? Explain its purpose and usage.
VideoPlayer.FrameReadyEventHandler Declaration public delegate void FrameReadyEventHandler ( Video.VideoPlayer source , long frameIdx ); Parameters Parameter Description source The VideoPlayer that is emitting the event. frameNum The current frame of the VideoPlayer . Description Delegate type for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80e1fb08387d
unity_docs
scripting
What is `BuildPlayerOptions.locationPathName` in Unity? Explain its purpose and usage.
BuildPlayerOptions.locationPathName public string locationPathName ; Description Specifies the path for the application to be built. The value of locationPathName determines both the location and the file name of the built application. This path can be either relative to the project directory or an absolute ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_08d83f99a5ff
unity_docs
editor
In Unity's 'Call native plug-ins for iOS', what is 'Check Application.platform' and how does it work?
Use the following to implement Application.platform and return placeholder values in the Editor: ```csharp void MyMethod() { if (Application.platform != RuntimePlatform.OSXEditor) { return _GetLookupStatus(); } else { return "Done"; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53c816e1d3d8
unity_docs
math
What is `Vector2Int.RoundToInt` in Unity? Explain its purpose and usage.
Vector2Int.RoundToInt Declaration public static Vector2Int RoundToInt ( Vector2 v ); Description Converts a Vector2 to a Vector2Int by doing a Round to each value. As there is a conversion of float to integer, there is a loss of precision.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_99d2cae4deef
unity_docs
input
In Unity's 'Input Manager', what is 'Physical keys' and how does it work?
The Physical keys option allows you to map key codes to the physical keyboard layout, rather than to the language-specific layout that may vary between users in different regions. For example, on some keyboards the first row of letters reads “QWERTY”, and on others it reads “AZERTY”. This means if you scripted specific...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c56197dfe90
unity_docs
scripting
What is `RenderTargetSetup.ctor` in Unity? Explain its purpose and usage.
RenderTargetSetup Constructor Declaration public RenderTargetSetup ( RenderBuffer color , RenderBuffer depth ); Declaration public RenderTargetSetup ( RenderBuffer color , RenderBuffer depth , int mipLevel ); Declaration public RenderTargetSetup ( RenderBuffer color , RenderBuffer depth , int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e58d47063f9c
unity_docs
rendering
In Unity's 'Optimize the size of the iOS Player', what is 'Reduce the build size' and how does it work?
Use the following checklist to help reduce the size of your build: Enable compression for textures and minimize the number of uncompressed sounds. For more information, and tips on file size reduction, refer to Reducing the file size of your build . From the iOS Player settings window: Enable Strip Engine Code Set the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6a121dc2a44
unity_docs
scripting
What is `LayerMask.GetMask` in Unity? Explain its purpose and usage.
LayerMask.GetMask Declaration public static int GetMask (params string[] layerNames ); Parameters Parameter Description layerNames List of layer names to convert to a layer mask. Returns int The layer mask created from the layerNames . Description Given a set of layer names as defined by either a Bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5668e75aace6
unity_docs
scripting
What is `UIElements.Toggle.ussClassName` in Unity? Explain its purpose and usage.
Toggle.ussClassName public static string ussClassName ; Description USS class name for Toggle elements. Unity adds this USS class to every instance of the Toggle element. Any styling applied to this class affects every Toggle located beside, or below the stylesheet in the visual tree.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d6130821b55
unity_docs
rendering
Give me an overview of the `MotionVectorGenerationMode` class in Unity.
MotionVectorGenerationMode enumeration Description The type of motion vectors that should be generated. Additional resources: DepthTextureMode.MotionVectors , SkinnedMeshRenderer.skinnedMotionVectors , PassType.MotionVectors , SystemInfo.supportsMotionVectors . Properties Property Description Camera Use on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97c8b7ef6f55
unity_docs
scripting
What is `Android.AndroidAssetPackInfo` in Unity? Explain its purpose and usage.
AndroidAssetPackInfo class in UnityEngine.Android / Implemented in: UnityEngine.AndroidJNIModule Description Represents the download progress of a single Android asset pack. The download progress is received as a callback after AndroidAssetPacks.DownloadAssetPackAsync is called. Additional resources: AndroidAs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82ed00b8e81c
unity_docs
editor
Explain 'File Access Profiler module reference' in Unity.
The File Access Profiler module displays information about the file activity in your application, such as the number of read or write operations Unity performs or the number of file handles open. The module can display this information either for a specific frame or across all frames in a capture. You can use this info...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e17b9b610dda
unity_docs
scripting
What is `U2D.SpriteAtlasAsset.SetScriptablePacker` in Unity? Explain its purpose and usage.
SpriteAtlasAsset.SetScriptablePacker Declaration public void SetScriptablePacker ( U2D.ScriptablePacker obj ); Description Sets the ScriptablePacker ScriptableObject to SpriteAtlasAsset so custom packing can be implemented.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f8d95d2238a
unity_docs
physics
What is `Collider2D.friction` in Unity? Explain its purpose and usage.
Collider2D.friction public float friction ; Description The friction used by the Collider2D . A Collider2D can be assigned a PhysicsMaterial2D either directly via to the Collider2D.sharedMaterial , indirectly via the attached Rigidbody2D.sharedMaterial , the global default or if no PhysicsMaterial2D is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_37266790173b
unity_docs
rendering
In Unity's 'Texture type and shape settings reference', what is 'Texture Type' and how does it work?
Use the Texture Type property to select the type of Texture you want to create from the source image file. The other properties in the Texture Import settings window change depending on the value you set. Property Function Default This is the most common setting used for all Textures. It provides access to most of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01f2aaf12f69
unity_docs
scripting
Show me a Unity C# example demonstrating `ScriptableObject`.
game would have a reference to the asset corresponding to its type, rather than keeping its own redundant copy of each parameter. This design makes it convenient to tweak vehicle behaviour in a central location. It is also good for performance, especially in cases where the size of the shared data is substantial. The f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3472b44c6bb4
unity_docs
physics
What is `IMGUI.Controls.JointAngularLimitHandle.xMax` in Unity? Explain its purpose and usage.
JointAngularLimitHandle.xMax public float xMax ; Description Returns or specifies the maximum angular motion about the x-axis. The value returned by this property depends on the current value of the xMotion property. If it is ConfigurableJointMotion.Locked , then it will always return 0. If it is Configurab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b7a3b888453
unity_docs
physics
What is `Physics2D.Distance` in Unity? Explain its purpose and usage.
Physics2D.Distance Declaration public static ColliderDistance2D Distance ( Collider2D colliderA , Collider2D colliderB ); Parameters Parameter Description colliderA A Collider used to calculate the minimum distance against colliderB . colliderB A Collider used to calculate the minimum distance again...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1090c937ff10
unity_docs
editor
Give me an overview of the `LocalizationGroup` class in Unity.
LocalizationGroup class in UnityEditor Description This provides an auto dispose Localization system. This can be called recursively. Properties Property Description locGroupName A current group name for the localization. Constructors Constructor Description LocalizationGroup Default constructor. Public M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4f842a85c77
unity_docs
physics
What is `Scripting.GarbageCollector.isIncremental` in Unity? Explain its purpose and usage.
GarbageCollector.isIncremental public static bool isIncremental ; Description Reports whether incremental garbage collection is enabled. IsIncremental is true if incremental garbage collection is enabled in the project PlayerSettings and supported on the currently running platform. The value is false otherwi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac07fdc257d5
unity_docs
input
What is `Input.ResetPenEvents` in Unity? Explain its purpose and usage.
Input.ResetPenEvents Declaration public static void ResetPenEvents (); Description Clears the pen event queue. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cf53082627f9
unity_docs
ui
Explain 'Bind with binding path in C# script' in Unity.
Version : 2021.3+ This example demonstrates how to bind with the binding path in a C# script. ## Example overview This examples create a custom Editor window to change the name of a GameObject . You can find the completed files that this example creates in this GitHub repository . ## Bind with the binding path Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad76a4a59209
unity_docs
scripting
What is `PlayerSettings.SetStaticBatchingForPlatform` in Unity? Explain its purpose and usage.
PlayerSettings.SetStaticBatchingForPlatform Declaration public static void SetStaticBatchingForPlatform ( BuildTarget platform , bool enable ); Parameters Parameter Description platform BuildTarget to set static batching for. enable Should static batching be enabled. Description Sets static batching f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed4061801c7d
unity_docs
editor
What is `AnimationMode.IsPropertyAnimated` in Unity? Explain its purpose and usage.
AnimationMode.IsPropertyAnimated Declaration public static bool IsPropertyAnimated ( Object target , string propertyPath ); Parameters Parameter Description target The object to determine if it contained the animation. propertyPath The name of the animation to search for. Returns bool Whether the pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7fc167d5d34d_doc_22
github
scripting
What does `BehaviourManager` do in this Unity script? Explain its purpose and signature.
Make sure m_Instance always exist. Signature: ```csharp static BehaviourManager() => instance = new BehaviourManager(); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1965633759a3
github
scripting
Write a Unity C# MonoBehaviour script called Weapon Initializer
```csharp using UnityEngine; [DisallowMultipleComponent] class WeaponInitializer : MonoBehaviour { public bool destroyAfterUse = false; public WeaponAsset weaponAsset = null; public WeaponBulletAsset bulletDataAsset = null; } ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b554e803e593
unity_docs
rendering
What is `TextureImporterNormalFilter` in Unity? Explain its purpose and usage.
TextureImporterNormalFilter enumeration Description Normal map filtering mode for TextureImporter . Additional resources: TextureImporter.normalmapFilter . Properties Property Description Standard Standard normal map filter. Sobel Sobel normal map filter.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e3f3b94075a
unity_docs
scripting
What are the parameters of `Transform.GetChild` in Unity?
Returns Transform Transform child by index. Description Returns a transform child by index. If the transform has no child, or the index argument has a value greater than the number of children then an error will be generated. In this case "Transform child out of bounds" error will be given. The number of children can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37a1ebd7fe2e
unity_docs
scripting
What is `UIElements.DynamicAtlasFilters` in Unity? Explain its purpose and usage.
DynamicAtlasFilters enumeration Description Options to enable or disable filters for the dynamic atlas. Filters exclude individual textures from the texture atlas based on specific criteria. Properties Property Description None No filtering is performed. Readability Excludes readable textures. Rea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a82ad2c3e465
unity_docs
scripting
What is `Rendering.RenderPipelineManager.activeRenderPipelineAssetChanged` in Unity? Explain its purpose and usage.
RenderPipelineManager.activeRenderPipelineAssetChanged Parameters Parameter Description value The delegate that will be executed when the current RenderPipelineAsset has changed between frames. The first argument will be the previous RenderPipelineAsset, and the second argument will be the current RenderPipelineA...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa43e4f13403
unity_docs
rendering
What is `Rendering.RayTracingShader.maxRecursionDepth` in Unity? Explain its purpose and usage.
RayTracingShader.maxRecursionDepth public float maxRecursionDepth ; Description The maximum number of ray bounces this shader can trace (Read Only). This value can be set in a .raytrace file using #pragma max_recursion_depth followed by a positive number. If you set max_recursion_depth value too low, your g...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d842159853d
unity_docs
editor
What is `IMGUI.Controls.TreeView.SetupDragAndDropArgs` in Unity? Explain its purpose and usage.
SetupDragAndDropArgs struct in UnityEditor.IMGUI.Controls Description Method arguments to the virtual method SetupDragAndDrop. Properties Property Description draggedItemIDs TreeViewItem IDs being dragged.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e369b475911
unity_docs
animation
What is `LODGroup.crossFadeAnimationDuration` in Unity? Explain its purpose and usage.
LODGroup.crossFadeAnimationDuration public static float crossFadeAnimationDuration ; Description The cross-fading animation duration in seconds. ArgumentException will be thrown if it is set to zero or a negative value. Additional resources: animateCrossFading .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0572889db50f
unity_docs
scripting
What is `UIElements.ExecuteCommandEvent` in Unity? Explain its purpose and usage.
ExecuteCommandEvent class in UnityEngine.UIElements / Inherits from: UIElements.CommandEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description This event is sent by the Editor when an element in the panel should execute a command. See also: Command Events . Inherited Members Properties...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d56b170d9ea2
unity_docs
rendering
In Unity's 'Make shader behavior conditional on keywords', what is 'Use other statements to make shader behavior conditional' and how does it work?
You can also use the following HLSL pre-processor directives to create conditional code with shader_feature or multi_compile : #if, #elif, #else and #endif . #ifdef and #ifndef . Using these instead of if makes it more difficult to change the #pragma keyword directive later. For example, if you need to reduce the numbe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bde86b46bfd
unity_docs
rendering
What is `HandleUtility.DistanceToArc` in Unity? Explain its purpose and usage.
HandleUtility.DistanceToArc Declaration public static float DistanceToArc ( Vector3 center , Vector3 normal , Vector3 from , float angle , float radius ); Description Returns the distance in pixels from the mouse pointer to a 3D section of a disc. Calculates the screen space distance from the mouse po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aea401f57fdc
unity_docs
scripting
Show me a Unity C# example demonstrating `RenderingLayerMask.NameToRenderingLayer`.
RenderingLayerMask.NameToRenderingLayer Declaration public static int NameToRenderingLayer (string layerName ); Parameters Parameter Description layerName Provide a rendering layer name. Returns int Returns -1 if not found. Description Given a rendering layer name, returns the rendering layer index a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3f03f5b3aefe
unity_docs
animation
Explain 'Retarget Humanoid animations' in Unity.
One of the most powerful features of Mecanim is the ability to retarget humanoid animations . This means that you can apply the same set of animations to different character models. Retargeting is only possible for humanoid models with a configured Avatar . A configured avatar provides the ability to correspondence bet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_859de80f88ac
unity_docs
physics
What is `ImportAssetOptions` in Unity? Explain its purpose and usage.
ImportAssetOptions enumeration Description Asset importing options. Additional resources: AssetDatabase.ImportAsset , AssetDatabase.Refresh . Properties Property Description Default Default import options. ForceUpdate User initiated asset import. ForceSynchronousImport Import all assets synchronously. Imp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5a71bfe1311
unity_docs
scripting
What is `Undo.MoveGameObjectToScene` in Unity? Explain its purpose and usage.
Undo.MoveGameObjectToScene Declaration public static void MoveGameObjectToScene ( GameObject go , SceneManagement.Scene scene , string name ); Parameters Parameter Description go GameObject to move. scene Scene to move the GameObject into. name Name of the undo action. Description Move a GameObjec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1f067f3a0fae
unity_docs
performance
In Unity's 'Memory in Unity introduction', what is 'Managed memory' and how does it work?
Mono and IL2CPP’s scripting virtual machines (VM) implement the managed memory system, which is sometimes referred to as the scripting memory system. The VM offer a controlled memory environment divided into the following different types: The managed heap : A section of memory that the VM automatically controls with a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee4a26db5210
unity_docs
physics
Give me an overview of the `ArticulationJacobian` class in Unity.
ArticulationJacobian struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description The floating point dense Jacobian matrix of the articulation body hierarchy. Jacobian matrix is important concept used in robotics and inverse kinematics. Multiplication with the Jacobian matrix maps the reduced ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfad80412462
unity_docs
rendering
What is `Search.SearchViewFlags.DisableInspectorPreview` in Unity? Explain its purpose and usage.
SearchViewFlags.DisableInspectorPreview Description This flag disables the use of the Inspector Preview in the Search Picker window. This flag is not set by default. When it is set, the Search Picker window will not show any panel or button related to the Inspector Preview. The flag OpenInspectorPreview will not ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_01f90abd3597
github
scripting
Write a Unity Editor script for Gaussian Tool Context
```csharp // SPDX-License-Identifier: MIT using System; using GaussianSplatting.Runtime; using UnityEditor; using UnityEditor.EditorTools; using UnityEngine; namespace GaussianSplatting.Editor { [EditorToolContext("GaussianSplats", typeof(GaussianSplatRenderer)), Icon(k_IconPath)] class GaussianToolContext :...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_b8fc2c86dd0d
unity_docs
rendering
What is `Rendering.AmbientMode.Flat` in Unity? Explain its purpose and usage.
AmbientMode.Flat Description Flat ambient lighting. Ambient is defined by a single color. Additional resources: RenderSettings.ambientEquatorColor , RenderSettings.ambientMode , Lighting Window .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7393f05e7aa0
unity_docs
rendering
What is `Experimental.GlobalIllumination.LightType` in Unity? Explain its purpose and usage.
LightType enumeration Description The light type. Properties Property Description Directional An infinite directional light. Point A point light emitting light in all directions. Spot A spot light emitting light in a direction with a cone shaped opening angle. Rectangle A light shaped like a rectangle emitti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f635067b337d
unity_docs
physics
What is `SoftJointLimit.contactDistance` in Unity? Explain its purpose and usage.
SoftJointLimit.contactDistance public float contactDistance ; Description Determines how far ahead in space the solver can "see" the joint limit. Distance inside the limit value at which the limit will be considered to be active by the solver. For translational joints the unit is meters. For rotational joints...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d5b63fde216
unity_docs
physics
What is `PhysicsMaterialCombine` in Unity? Explain its purpose and usage.
PhysicsMaterialCombine enumeration Description Describes how physics materials of the colliding objects are combined. The friction force as well as the residual bounce impulse are applied symmetrically to both of the colliders in contact, so each pair of overlapping colliders must have a single set of friction and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2f5583491fd
unity_docs
animation
Give me an overview of the `Keyframe` class in Unity.
Keyframe struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description A single keyframe that can be injected into an animation curve. Properties Property Description inTangent Sets the incoming tangent for this key. The incoming tangent affects the slope of the curve from the previous key to th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.