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_e5d0ddc1a523
unity_docs
rendering
Show me a Unity code example for 'Pass information to shader compilers in HLSL'.
#pragma directive, to pass standard HLSL or Unity-specific directives. The Unity #define_for_platform_compiler directive. ## Add a #define directive Unity supports the standard HLSL #define directive. For more information, see [#define directive] (https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_21b7ae9cf67a
unity_docs
rendering
Explain 'Assets and media' in Unity.
An asset is any file you use in your project such as 3D models, textures, audio files, and scripts . Understand how to manage, import, and optimize assets, with Unity’s tools and workflows. Topic Description Introduction to assets in Unity How Unity manages assets in your project. Types of assets Understand the types o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eadfa2357d18
unity_docs
scripting
What are the parameters of `AndroidJavaObject.Set` in Unity?
Description Set the value of a field in an object (non-static). The generic parameter determines the field type. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { AndroidJavaObject javaObject = new AndroidJavaObject("android.text.format.Time"); javaObject.Set<bool...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef8e73443ca5
unity_docs
rendering
What is `Windows.WebCam.PhotoCapture.OnCapturedToMemoryCallback` in Unity? Explain its purpose and usage.
PhotoCapture.OnCapturedToMemoryCallback Declaration public delegate void OnCapturedToMemoryCallback ( Windows.WebCam.PhotoCapture.PhotoCaptureResult result , Windows.WebCam.PhotoCaptureFrame photoCaptureFrame ); Parameters Parameter Description result Indicates whether or not the photo was successfully c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e3466bab6a9a
unity_docs
physics
Show me a Unity code example for 'Create rule set files'.
-CSharp-Editor-firstpass.ruleset ## Workflow: Testing ruleset files in Unity To test ruleset files in Unity, follow these steps: ## Step 1: Set up the ruleset file Create a subfolder named “Subfolder” inside your project’s Assets folder. Inside Subfolder : Create a new .asmdef file. Save a duplicate copy of Rethrow...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e6edf5e3858
unity_docs
editor
What is `TerrainTools.OnInspectorGUIContext` in Unity? Explain its purpose and usage.
OnInspectorGUIContext class in UnityEditor.TerrainTools Implements interfaces: IOnInspectorGUI Description The context for drawing IMGUI elements pertaining to terrain tools brushes. Constructors Constructor Description OnInspectorGUIContext The constructor for creating OnInspectorGUIContext to make IMGUI cal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f810087f007
unity_docs
rendering
What is `TerrainTools.PaintContext.ctor` in Unity? Explain its purpose and usage.
PaintContext Constructor Declaration public PaintContext ( Terrain terrain , RectInt pixelRect , int targetTextureWidth , int targetTextureHeight , bool sharedBoundaryTexel = true, bool fillOutsideTerrain = true); Parameters Parameter Description terrain Terrain that defines terrain space for this ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46d4ed54069d
unity_docs
scripting
What are the parameters of `ParticleSystem.ExternalForcesModule.SetInfluence` in Unity?
Description Assigns the Force Field at the given index in the influencers list. When influenceFilter is set to ParticleSystemGameObjectFilter.List then only Force Fields in the influencers list affect the Particle System. ```csharp using UnityEngine;public class Example : MonoBehaviour { public ParticleSystem syste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebb0087f482f
unity_docs
editor
What is `PackageManager.UI.PackageManagerExtensions` in Unity? Explain its purpose and usage.
PackageManagerExtensions class in UnityEditor.PackageManager.UI Description Package Manager UI Extensions. Static Methods Method Description RegisterExtension Registers a new Package Manager UI extension.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2f98da184d59
unity_docs
editor
In Unity's 'Focus events', what is 'Unique properties' and how does it work?
The following section explains relevant properties unique to focus events. This isn’t a complete list of all properties within the focus event family. For a full list, see the FocusEventBase in the API documentation. relatedTarget : Contains the visual element that’s the secondary target of an event. For FocusOut and B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4465e157942
unity_docs
xr
What is `Experimental.GraphView.SearchWindowContext.ctor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SearchWindowContext Constructor Declaration public SearchWindowContext ( Vector2 screenMousePosition , float requestedWidth , float requestedHeight ); Parameters Parameter Description requestedHeight Requested height o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ece57c982e23
unity_docs
audio
What is `AudioLowPassFilter.customCutoffCurve` in Unity? Explain its purpose and usage.
AudioLowPassFilter.customCutoffCurve public AnimationCurve customCutoffCurve ; Description Returns or sets the current custom frequency cutoff curve. The curve will be scaled so that it is applied over AudioSource.maxDistance from the AudioSource. Note that if there is no curve set, or AudioLowPassFilter....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e7856ef02bb0_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
An object that allows users to edit objects when using the Unity inspector. Signature: ```csharp public sealed class EditableOrderedDictionary_string_Sprite : EditableEntry<OrderedDictionary_string_Sprite> ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_0f2826a50c46
unity_docs
input
What is `Font.GetMaxVertsForString` in Unity? Explain its purpose and usage.
Font.GetMaxVertsForString Declaration public static int GetMaxVertsForString (string str ); Parameters Parameter Description str Input string. Description Returns the maximum number of verts that the text generator may return for a given string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_575d756fd75f
unity_docs
scripting
Show me a Unity C# example demonstrating `QualitySettings.asyncUploadPersistentBuffer`.
epeated memory allocations and deallocations. However, if memory usage is a concern, you can reduce the runtime memory footprint by setting this property to false . Doing so releases the ring buffer memory when upload operations complete, but it might lead to memory fragmentation. Excessive fragmentation can negativel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05debc4101f1
unity_docs
physics
Show me a Unity C# example demonstrating `Profiling.Profiler.GetMonoUsedSizeLong`.
be collected since the first call, it might lower the value that Profiler.GetMonoUsedSizeLong returns even further. Also, Unity might allocate managed memory on threads, or threaded code might get rid of pointers to managed allocations, so while it might look like no code should have changed the amount of managed allo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_70786c55dee7
github
scripting
Write a Unity C# ScriptableObject for Character Interaction Module Asset
```csharp using UnityEngine; abstract class CharacterInteractionModuleAsset: ScriptableObject { public const string MENU_PATH = "Character/Interaction Modules/"; public abstract bool CanHandle(Interactable interactable); public abstract CharacterInteractionModule CreateModuleFor(Interactable interactable)...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_145cac159dee
unity_docs
physics
Explain 'How collider surface values combine' in Unity.
When two colliders are in contact, the physics system uses the surface properties of each collider to calculate the total friction and bounce between the two surfaces. In Unity, you use the Physic Material asset to control these parameters. The Physics Material asset is represented in the API by the PhysicsMaterial cla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cef5f176fa31
unity_docs
math
What is `Rendering.CommandBuffer.SetComputeFloatParams` in Unity? Explain its purpose and usage.
CommandBuffer.SetComputeFloatParams Declaration public void SetComputeFloatParams ( ComputeShader computeShader , string name , params float[] values ); Declaration public void SetComputeFloatParams ( ComputeShader computeShader , int nameID , params float[] values ); Parameters Parameter Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37647d9bd8d5
unity_docs
editor
What is `Actions.EditorAction.Start` in Unity? Explain its purpose and usage.
EditorAction.Start Declaration public static T Start (); Declaration public static T Start (T action ); Parameters Parameter Description action The EditorAction to start. Returns T The EditorAction that was engaged. Description Starts an EditorAction that spans over multiple frames.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_243fb6977d3b
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime.ToString` in Unity? Explain its purpose and usage.
DiscreteTime.ToString Declaration public string ToString (); Declaration public string ToString (string format , IFormatProvider formatProvider ); Description Returns a string representation of the time.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af5aeb24e937
unity_docs
scripting
What is `ArticulationBody.maxAngularVelocity` in Unity? Explain its purpose and usage.
ArticulationBody.maxAngularVelocity public float maxAngularVelocity ; Description The maximum angular velocity of the articulation body measured in radians per second. The angular velocity of articulation bodies is clamped to maxAngularVelocity to avoid numerical instability with fast rotating bodies. The max...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_946291eb1c3c
github
scripting
Write a Unity C# script called Debug Logger
```csharp using UnityEngine; using System; namespace TapLive.Utils { /// <summary> /// Centralized logging with levels and filtering /// </summary> public static class DebugLogger { public enum LogLevel { Verbose = 0, Info = 1, Warning = 2, ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_2740b8b3aae4
unity_docs
scripting
What is `GameObject.GetComponentsInParent` in Unity? Explain its purpose and usage.
GameObject.GetComponentsInParent Declaration public T[] GetComponentsInParent (); Declaration public T[] GetComponentsInParent (bool includeInactive ); Parameters Parameter Description includeInactive Whether to include inactive parent GameObjects in the search. Returns T[] An array containing all m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_091b90668ff8
unity_docs
scripting
What is `Animations.GameObjectRecorder` in Unity? Explain its purpose and usage.
GameObjectRecorder class in UnityEditor.Animations / Inherits from: Object Description Records the changing properties of a GameObject as the Scene runs and saves the information into an AnimationClip . This class binds GameObject properties, records their values as they change in the running Scene, and sa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a16a402baee
unity_docs
scripting
What is `Unity.Profiling.Memory.MemoryProfiler.CreatingMetadata` in Unity? Explain its purpose and usage.
MemoryProfiler.CreatingMetadata Description A metadata event that collection methods can subscribe to. This event is fired when you capture a memory snapshot. Use it to provide meta data to the snapshot file, for example information related to the context, such as the level, in which it was taken. ```csharp using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96c614011d7c
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.limitX`.
ParticleSystem.LimitVelocityOverLifetimeModule.limitX public ParticleSystem.MinMaxCurve limitX ; Description Maximum velocity curve for the x-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a20182ad287
unity_docs
scripting
What is `GridLayout.CellToLocalInterpolated` in Unity? Explain its purpose and usage.
GridLayout.CellToLocalInterpolated Declaration public Vector3 CellToLocalInterpolated ( Vector3 cellPosition ); Parameters Parameter Description cellPosition Interpolated cell position to convert. Returns Vector3 Local position of the cell position. Description Converts an interpolated cell positi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b16afd97d8e
unity_docs
editor
What is `Build.IPostBuildPlayerScriptDLLs` in Unity? Explain its purpose and usage.
IPostBuildPlayerScriptDLLs interface in UnityEditor.Build Implements interfaces: IOrderedCallback Description Implement this interface to receive a callback after Player scripts have been compiled. For more information about build callbacks, refer to Use build callbacks . Public Methods Method Description O...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_56f6a8d8c857_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Adds configurable interactability to objects, primarily designed for UI elements. Signature: ```csharp public class Interactable : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler, IBeginDragHandler, IEndDragHandler ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_e995d4fa635c
unity_docs
performance
What is `OverlapCapsuleCommand.ScheduleBatch` in Unity? Explain its purpose and usage.
OverlapCapsuleCommand.ScheduleBatch Declaration public static Unity.Jobs.JobHandle ScheduleBatch (NativeArray<OverlapCapsuleCommand> commands , NativeArray<ColliderHit> results , int minCommandsPerJob , int maxHits , Unity.Jobs.JobHandle dependsOn ); Parameters Parameter Description commands A Native...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c112dfcb4958
unity_docs
performance
What is `Unity.Profiling.ProfilerMarker.Auto` in Unity? Explain its purpose and usage.
ProfilerMarker.Auto Declaration public Unity.Profiling.ProfilerMarker.AutoScope Auto (); Returns AutoScope IDisposable struct which calls Begin and End automatically. Description Creates a helper struct for the scoped using blocks. Begin is called in the constructor and End in the Dispose met...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b98a0b37c0ad
unity_docs
scripting
What is `SerializedProperty.uintValue` in Unity? Explain its purpose and usage.
SerializedProperty.uintValue public uint uintValue ; Description Value of an integer property as an unsigned int. Contains a valid value when propertyType is SerializedPropertyType.Integer . Suitable for unsigned types of 32 bits or smaller (uint, ushort and byte). Additional resources: ulongValue , intV...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25ec04bc5434
unity_docs
editor
What is `SearchService.AdvancedObjectSelectorParameters` in Unity? Explain its purpose and usage.
AdvancedObjectSelectorParameters struct in UnityEditor.SearchService Description Struct containing the different parameters passed to the advanced object selector. Not all properties are set for each AdvancedObjectSelectorEventType . Properties Property Description context The search context. searchFilter S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_61a56569cdc5
unity_docs
ui
In Unity's 'Descendant selectors', what is 'Example' and how does it work?
To demonstrate how simple selectors match elements, here is an example UI Document. ``` <UXML xmlns="UnityEngine.UIElements"> <VisualElement name="container1"> <VisualElement name="container2" class="yellow"> <Button name="OK" class="yellow" text="OK" /> <Button name="Cancel" text="Cancel" /> </VisualElement> </V...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37e0b8021949
unity_docs
editor
What is `EditorGUILayout.ToolContextToolbar` in Unity? Explain its purpose and usage.
EditorGUILayout.ToolContextToolbar Declaration public static void ToolContextToolbar ( GUIContent content , IList<T> contexts ); Parameters Parameter Description content An optional prefix label to display before the toolbar. Pass null to omit this prefix. contexts The collection of editor tools for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94a760c3cccd
unity_docs
rendering
What is `GUILayout.VerticalScope.ctor` in Unity? Explain its purpose and usage.
GUILayout.VerticalScope Constructor Declaration public GUILayout.VerticalScope (params GUILayoutOption[] options ); Declaration public GUILayout.VerticalScope ( GUIStyle style , params GUILayoutOption[] options ); Declaration public GUILayout.VerticalScope (string text , GUIStyle style , params GUILa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a34aa4af8b2
unity_docs
scripting
What is `UIElements.IStyle.unityFontDefinition` in Unity? Explain its purpose and usage.
IStyle.unityFontDefinition public UIElements.StyleFontDefinition unityFontDefinition ; Description Font to draw the element's text, defined as a FontDefinition structure. It takes precedence over -unity-font . This property is inherited by default.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e2977c65710d
unity_docs
ui
Explain 'Toolbar' in Unity.
A Toolbar is an Editor-only control that serves as a horizontal container. You can add any visual elements into a Toolbar, but to have a consistent visual style within the Toolbar, use the following elements because they have a predefined style that matches the Toolbar style: ToolbarButton instead of Button . ToolbarTo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45f7efb25e8c
unity_docs
scripting
What is `Transform.TransformPoint` in Unity? Explain its purpose and usage.
Transform.TransformPoint Declaration public Vector3 TransformPoint ( Vector3 position ); Description Transforms position from local space to world space. Note that the returned position is affected by scale. Use Transform.TransformDirection if you are dealing with direction vectors. You can perform the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b6a76bcffd95
unity_docs
ui
Explain 'Receive callbacks when a bound property changes' in Unity.
Version : 2021.3+ This example demonstrates how to receive callbacks when a bound serialized property changes. ## Example overview This example creates a custom Editor window with a TextField that binds to the name of a GameObject in a scene . If the name of the GameObject is GameObject , the background color of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c3d3b3605c5e
unity_docs
xr
Explain 'XR Plugin Management' in Unity.
com.unity.xr.management ## Description Package that provides simple management of XR plug-ins. Manages and offers help with loading, initialization, settings, and build support for XR plug-ins. ## Released for Unity Package version 4.5.4 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.
gh_982c85173185_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Called as soon as the player stops touching the screen. The argument is the screen position. Signature: ```csharp public event Action<Vector2> onEndTouch; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_d8351eb47530
unity_docs
input
What is `UIElements.IPointerEvent.isPrimary` in Unity? Explain its purpose and usage.
IPointerEvent.isPrimary public bool isPrimary ; Description Gets a boolean value that indicates whether the pointer is a primary pointer. True means the pointer is a primary pointer. False means it isn't. A primary pointer is a pointer that manipulates the mouse cursor. The mouse pointer is always a primar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44dc63438ff1
github
scripting
Write a Unity C# UI script for Skew Text Example
```csharp using UnityEngine; using System.Collections; namespace TMPro.Examples { public class SkewTextExample : MonoBehaviour { private TMP_Text m_TextComponent; public AnimationCurve VertexCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.25f, 2.0f), new Keyframe(0.5f, 0), ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56aa7756898a
unity_docs
rendering
What is `LightingSettings.FilterType` in Unity? Explain its purpose and usage.
FilterType enumeration Description The available filter kernels for the Progressive Lightmapper. Properties Property Description Gaussian When enabled, the lightmap uses a Gaussian filter. ATrous When enabled, the lightmap uses an A-Trous filter. None When enabled, the lightmap uses no filtering.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6a22dc6c9f4b
unity_docs
editor
In Unity's 'Undo History window', what is 'Undoing and redoing actions' and how does it work?
To open the Undo History window, click the Undo icon ( ), or choose Edit > Undo History . Select an entry in the Undo History window to revert your project back to that point automatically. Once you have selected an action, redoable actions are indicated with a red line. Click any of the actions to add them back.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e88aa342a4c2_doc_9
github
scripting
What does `CreateVoiceChannel` do in this Unity script? Explain its purpose and signature.
Create a new voice channel by channel namewill create channel's nameThe channel type is indicated by the method used to initiate the channel join.JoinEchoChannelAsync joins an echo channel, JoinGroupChannelAsyc joins a group channel,and JoinPositionalChannelAsync joins a positional channel. Signature: ```csharp public...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_f28f15dee73f
unity_docs
math
What are the parameters of `Search.QueryEngine_1.SetSearchWordMatcher` in Unity?
Description Set the search word matching function to be used instead of the default one. Set to null to use the default. ```csharp using System; using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_QueryEngine_SetSearchWordMatcher { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2c2b5f10d82
unity_docs
scripting
Give me an overview of the `TerrainLayer` class in Unity.
TerrainLayer class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.TerrainModule Description Description of a terrain layer. Properties Property Description diffuseRemapMax A Vector4 value specifying the maximum RGBA value that the diffuse texture maps to when the value of the channel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c367f23f0a3e
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetrics.Flags` in Unity? Explain its purpose and usage.
Flags enumeration Description Flags controlling the behaviour of AsyncReadManagerMetrics.GetMetrics and AsyncReadManagerMetrics.GetCurrentSummaryMetrics . Properties Property Description None Pass no flags. ClearOnRead Clear metrics for completed read requests after returning.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e92d50d435f3
unity_docs
scripting
Give me an overview of the `SceneView` class in Unity.
SceneView class in UnityEditor / Inherits from: EditorWindow Implements interfaces: IHasCustomMenu , ISupportsOverlays Description Use this class to manage SceneView settings, change the SceneView camera properties, subscribe to events, call SceneView methods, and render open scenes. Static Properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_853cd9d69481
unity_docs
scripting
What is `Event.keyCode` in Unity? Explain its purpose and usage.
Event.keyCode public KeyCode keyCode ; Description The raw key code for keyboard events. Used in EventType.KeyDown and EventType.KeyUp events; this returns KeyCode value that matches the physical keyboard key. Use this for handling cursor keys, function keys etc. Additional resources: Event.character ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbb445301ae9
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchExpression.GetNumberValue`.
SearchExpression.GetNumberValue Declaration public double GetNumberValue (double defaultValue ); Parameters Parameter Description defaultValue Initial value if we cannot convert the innerText. Returns double Returns a numerical representation of the expression. Description Try to parse the innerText ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38e1fc17ecd9
github
scripting
Write a Unity Editor script for Code Generation Utils
```csharp using CodeGeneration.Data; using System; using System.IO; using System.Linq; using System.Reflection; using UnityEngine; namespace CodeGeneration { /// <summary> /// Utils for CodeGeneration /// </summary> public class CodeGenerationUtils { /// <summary> /// Get all <see ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_484cbcf43460_doc_1
github
scripting
What does `MonoPool` do in this Unity script? Explain its purpose and signature.
Initializes a new instance of the class with the specified pool configuration and parent transform.The configuration data for the pool, including initial size, default capacity, and maximum size.The parent transform under which the pooled MonoBehaviour objects will be instantiated. Signature: ```csharp public MonoPoo...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3560b195f108
unity_docs
scripting
What is `ParticleSystem.velocityOverLifetime` in Unity? Explain its purpose and usage.
ParticleSystem.velocityOverLifetime public ParticleSystem.VelocityOverLifetimeModule velocityOverLifetime ; Description Script interface for the VelocityOverLifetimeModule of a Particle System. This module sets the velocity of particles during their lifetime. Particle System modules do not need to be reassig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ee53b7a95b6
unity_docs
ui
Give me an overview of the `EditorGUILayout` class in Unity.
EditorGUILayout class in UnityEditor Description Auto laid out version of EditorGUI . Static Methods Method Description BeginBuildTargetSelectionGrouping Begin a build target grouping and get the selected BuildTargetGroup back. BeginFadeGroup Begins a group that can be be hidden/shown and the transition will...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07050a27067e
unity_docs
scripting
What is `RigidbodyConstraints.FreezeAll` in Unity? Explain its purpose and usage.
RigidbodyConstraints.FreezeAll Description Freeze rotation and motion along all axes. ```csharp //Attach this script to a GameObject with a Rigidbody. Press the up and down keys to move the Rigidbody up and down. //Press the space key to freeze all positions and rotations.using UnityEngine;public class Example : Mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d73205bea5f
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Profiler.EndThreadProfiling`.
rofiling (); Description Frees the internal resources used by the Profiler for the thread. Profiler allocates memory to store information about the thread. To free that memory use EndThreadProfiling . Once called, Profiler stops collecting any data on the thread. Note: Calling this method on an internal Unity th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf5deccb3fdf
unity_docs
scripting
Show me a Unity C# example demonstrating `LineRenderer.maskInteraction`.
ask . By default, lines do not interact with SpriteMasks and are visible regardless of whether you assign a SpriteMask or not. You can make the LineRenderer visible either inside or outside a SpriteMask. To do the former, set this to SpriteMaskInteraction.VisibleInsideMask . To do the latter, set this to SpriteMaskI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_084ee2917fde
unity_docs
animation
In Unity's 'Create presets to save and reuse settings', what is 'Save settings to a new preset' and how does it work?
To save configured settings, create a new preset asset for them as follows: Identify the asset or settings group you want to save as a preset: For GameObjects : Select a GameObject in the Hierarchy window to open its properties in the Inspector window. For assets : Select an asset in the Project window to open its impo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d81304fadd21
unity_docs
ui
Show me a Unity C# example demonstrating `EditorWindow.Close`.
EditorWindow.Close Declaration public void Close (); Description Close the editor window. This will destroy the editor window. Simple example to show Close() ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements; public class CloseWindow : EditorWindow { [MenuItem("Examples/Close Wind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a551a0b6ef76
unity_docs
scripting
What is `XR.MeshGenerationResult.Scale` in Unity? Explain its purpose and usage.
MeshGenerationResult.Scale public Vector3 Scale ; Description The scale associated with the generated mesh relative to the session origin. This value will be Vector3.one unless the MeshGenerationOptions.ConsumeTransform flag was provided to XRMeshSubsystem.GenerateMeshAsync .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b06903b1851a
unity_docs
rendering
What is `Rendering.GraphicsSettings.transparencySortAxis` in Unity? Explain its purpose and usage.
GraphicsSettings.transparencySortAxis public static Vector3 transparencySortAxis ; Description An axis that describes the direction along which the distances of objects are measured for the purpose of sorting. This is the default axis used by the rendering pipeline for sorting in TransparencySortMode.CustomA...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0cfd06ee77bc
unity_docs
scripting
Explain 'Unity UI' in Unity.
com.unity.ugui ## Description Unity UI is a set of tools for developing user interfaces for games and applications. It is a GameObject-based UI system that uses Components and the Game View to arrange, position, and style user interfaces. ​ You cannot use Unity UI to create or change user interfaces in the Unity Edit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65022fe0d25d
unity_docs
rendering
What is `ComputeBuffer.stride` in Unity? Explain its purpose and usage.
ComputeBuffer.stride public int stride ; Description Size of one element in the buffer in bytes (Read Only). Must be a multiple of 4 and less than 2048, and match the size of the buffer type in the shader. See Compute Shaders for cross-platform compatibility information. The stride you declare for your compu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99ab28f777ac
unity_docs
scripting
What is `MenuItem.priority` in Unity? Explain its purpose and usage.
MenuItem.priority public int priority ; Description The order to display the menu item in a menu. This field stores the value set by the itemName parameter passed to the constructor. The field is public only for the benefit of Unity systems. Initialize it via the constructor parameter and don't modify it agai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b551d490d1a
unity_docs
physics
What is `PhysicsShapeGroup2D.DeleteShape` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D.DeleteShape Declaration public void DeleteShape (int shapeIndex ); Parameters Parameter Description shapeIndex The index of the shape stored the PhysicsShapeGroup2D . Description When destroying a shape at the specified shapeIndex , all other shapes that exist above the specified sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ceba8cc6d422
unity_docs
scripting
Show me a Unity C# example demonstrating `Terrain.treeCrossFadeLength`.
Terrain.treeCrossFadeLength public float treeCrossFadeLength ; Description Total distance delta that trees will use to transition from billboard orientation to mesh orientation. Decreasing this value makes the transition happen faster. Setting it to 0 will produce a visible pop when switching from mesh to billb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e49144cfdb72
unity_docs
scripting
Show me a Unity C# example demonstrating `WindZone.windMain`.
WindZone.windMain public float windMain ; Description The primary wind force. It produces a softly changing wind Pressure. ```csharp // Creates a wind zone with the effect of a helicopter passing by // Just place this into an empty game object and move it over a tree using UnityEngine;public class ExampleScri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f46be2eff59b
unity_docs
scripting
What is `ParticleSystem` in Unity? Explain its purpose and usage.
ParticleSystem class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the Built-in Particle System. Unity's powerful and versatile particle system implementation. General parameters The Particle System's general parameters are kept...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b3381257381a
unity_docs
editor
Explain 'Extending the Editor with IMGUI' in Unity.
Note : It’s strongly recommended to use the UI Toolkit to extend the Unity Editor , as it provides a more modern, flexible, and scalable solution than IMGUI. Unity lets you extend the editor with your own custom inspectors and Editor Windows and you can define how properties are displayed in the inspector with custom P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4966bb3d6ad5
unity_docs
editor
What is `Search.SearchIndexer` in Unity? Explain its purpose and usage.
SearchIndexer class in UnityEditor.Search Description Base class for a document Indexer which provides methods for retrieving a document given a specific pattern in roughly log(n). This allows you to search a large index more quickly. This class contains resources that must be disposed when it is no longer needed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a75c7f0e3825
unity_docs
input
Show me a Unity C# example demonstrating `QualitySettings.renderPipeline`.
ality level. This is the override render pipeline for the current quality level. If this value is null , no override value exists for the current quality level. Unity uses this value and the default render pipeline defined in GraphicsSettings.renderPipeline to determine the active render pipeline for the current qual...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fff08254198f
unity_docs
scripting
What is `Unity.Android.Gradle.BaseBlock.GetElements` in Unity? Explain its purpose and usage.
BaseBlock.GetElements Declaration public IReadOnlyList<BaseElement> GetElements (); Returns IReadOnlyList<BaseElement> The list of all custom child elements. Description Gets all custom child elements.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_481f5727dc64
unity_docs
rendering
In Unity's 'JavaScript interface in Unity Web builds', what is 'Change WebGL context attributes' and how does it work?
Use webglContextAttributes to customize the creation attributes that the WebGL context is initialized with. You can only change the following attributes: powerPreference premultipliedAlpha preserveDrawingBuffer These options only apply when you use the WebGL rendering API. If you use the WebGPU rendering API, the webgl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_441957b9bd0c_doc_0
github
scripting
What does `SetThemeColors` do in this Unity script? Explain its purpose and signature.
change the colorblock of a button to match the selected theme Signature: ```csharp public void SetThemeColors() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba8057ad83d8
unity_docs
editor
Show me a Unity C# example demonstrating `HideFlags.DontSave`.
lags.DontSaveInBuild | HideFlags.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset. You must manually clear the object from memory using DestroyImmediate to avoid memory leaks. For Prefab instances in a scene, you can set the hideflag on the Prefab instance handle object as a way to set the same hideflags on all the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b384824afedd
unity_docs
scripting
What is `UIElements.CallbackEventHandler.HandleEventBubbleUp` in Unity? Explain its purpose and usage.
CallbackEventHandler.HandleEventBubbleUp Declaration protected void HandleEventBubbleUp ( UIElements.EventBase evt ); Parameters Parameter Description evt The event instance. Description Executes logic on this element during the BubbleUp phase, immediately before this element's BubbleUp callbacks. Call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_28d932344280
unity_docs
rendering
In Unity's 'Process to become a Verified Solution', what is 'Release-ready solution' and how does it work?
The solution must be release-ready, which means the product meets the following criteria: Has passed all internal QA processes. Is compliant with Unity’s Asset Store guidelines. Is in a ready-to-release state. Ready-to-release includes all aspects of the solution that the users interact with while they use the product....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5254a7158399
unity_docs
math
What is `ComputeBuffer.EndWrite` in Unity? Explain its purpose and usage.
ComputeBuffer.EndWrite Declaration public void EndWrite (int countWritten ); Parameters Parameter Description countWritten Number of elements written to the buffer. Counted from the first element. Description Ends a write operation to the buffer This call ends a write operation on the buffer. When you cal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c2852abd5b91_doc_2
github
scripting
What does `ActivatePassthrough` do in this Unity script? Explain its purpose and signature.
Activates the passthrough mode if available. Signature: ```csharp public abstract void ActivatePassthrough(); ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_d580c03076b5_doc_6
github
scripting
What does `ScreenPointToRayInWorld` do in this Unity script? Explain its purpose and signature.
Returns a 3D ray in the world space which starts from the passthrough camera origin and passes through the2D camera pixel.The passthrough cameraA 2D point on the camera texture. The point is positioned relative to the maximum available camera resolution. This resolution can be obtained using or methods. Signat...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_11be76450ea7
unity_docs
animation
What is `AnimationState.length` in Unity? Explain its purpose and usage.
AnimationState.length public float length ; Description The length of the animation clip in seconds. ```csharp using UnityEngine; using System.Collections;public class ExampleScript : MonoBehaviour { public Animation anim; void Start() { // Print the length of the walk animation in seconds print(anim["Walk"...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9a24b157b3a
unity_docs
scripting
Give me an overview of the `CanvasRenderer` class in Unity.
CanvasRenderer class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.UIModule Description A component that will render to the screen after all normal rendering has completed when attached to a Canvas . Designed for GUI application. Additional resources: Canvas . Properties Property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3b7490379f9
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R32G32B32A32_SFloat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R32G32B32A32_SFloat Description A four-component, 128-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_024df8d81102_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Creates a child GameObject with the given TComponent component.IHierarchyBehaviour's will be initialized.The type of Component to be added to the new child GameObject.The new TComponent Signature: ```csharp public static TComponent CreateChild<TComponent>(this GameObject parent) where TComponent : Component ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_ea595aa1bb31
unity_docs
scripting
What is `AnimationCullingType` in Unity? Explain its purpose and usage.
AnimationCullingType enumeration Description This enum controlls culling of Animation component. When culling is enabled, Unity might stop animating if it thinks that the results of the animation won't be visible to the user. This could save you some performance if you have things animating outside of the viewport...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ef99e5515da1
github
scripting
Write a Unity C# UI script for GUI Test Singleton
```csharp using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; public class GUITestSingleton : MonoBehaviour { public void AssetDatabaseRefresh() { AssetDatabase.Refresh(); } public void Access() { SingletonTest.Instance.Access(); } public void Create() { SingletonTest test = Scrip...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_579713481131
unity_docs
ui
Show me a Unity code example for 'Selector lists'.
A selector list is a comma-separated list of selectors that share the same style rule. ## Syntax A selector list consists of multiple selectors separated by commas: ``` selector1, selector2 {...} ``` ## Example The following two USS snippets have the same effect. ``` #container2 { background-color: pink; border-r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f66d5615e949
unity_docs
editor
What is `FileUtil.GetUniqueTempPathInProject` in Unity? Explain its purpose and usage.
FileUtil.GetUniqueTempPathInProject Declaration public static string GetUniqueTempPathInProject (); Description Returns a unique path in the Temp folder within your current project. The returned path is relative to the project folder. The returned path is of a form Temp/UnityTempFile- uniqueID , where uniqueI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06d9ecebdd65
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingFlags.EnableSolidAngleCulling` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingFlags.EnableSolidAngleCulling Description Causes RayTracingAccelerationStructure.CullInstances to perform solid-angle culling. The minimum solid angle in degrees is defined in the RayTracingInstanceCullingConfig.minSolidAngle property, and its apex is defined by the cameraPosition value...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61ceafd83a7f
unity_docs
math
What is `UIElements.BoundsIntField.ctor` in Unity? Explain its purpose and usage.
BoundsIntField Constructor Declaration public BoundsIntField (); Description Initializes and returns an instance of BoundsIntField. Declaration public BoundsIntField (string label ); Parameters Parameter Description label The text to use as a label. Description Initializes and returns an instance...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32b6699d6ed6
unity_docs
math
What is `Vector2Int.Scale` in Unity? Explain its purpose and usage.
Vector2Int.Scale Declaration public static Vector2Int Scale ( Vector2Int a , Vector2Int b ); Description Multiplies two vectors component-wise. Every component in the result is a component of a multiplied by the same component of b . Declaration public void Scale ( Vector2Int scale ); Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1375e0810afa
unity_docs
rendering
In Unity's 'Editing scene templates', what is 'Scene Template Pipeline' and how does it work?
Use these properties to add a Scene Template Pipeline script to this template. A Scene Template Pipeline script lets you execute custom code when you create a new scene from the template. See Customizing new scene creation .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_540c41f7d1da
unity_docs
rendering
In Unity's 'Introduction to linear color space in Unity', what is 'Linear Textures' and how does it work?
Selecting Color Space: Linear assumes your Textures are in gamma color space. Unity uses your GPU’s sRGB sampler by default to crossover from gamma to linear color space. If your Textures are authored in linear color space, you need to bypass the sRGB sampling. For more information, refer to Disable sRGB sampling for a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d2bdc1bdc6e
unity_docs
editor
What is `EditorApplication.projectChanged` in Unity? Explain its purpose and usage.
EditorApplication.projectChanged Description Event that is raised whenever the state of the project changes. Actions that trigger this event include creating, renaming, or reparenting assets, as well as moving or renaming folders in the project. Note that the event is not raised immediately in response to these act...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3708c983b851
unity_docs
scripting
What is `PhysicsMaterial` in Unity? Explain its purpose and usage.
PhysicsMaterial class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.PhysicsModule Description Physics material describes how to handle colliding objects (friction, bounciness). Additional resources: Collider . Properties Property Description bounceCombine Determines how the bounci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7f681d3a7046
unity_docs
ui
Show me a Unity code example for 'DropdownField'.
ector panel of the DropdownField, set the options in the Choices field. To set the default value, in the Inspector of the DropdownField, enter the numbering sequence of the option in Index , starting at 0 . C# The following C# example create a DropdownField with three options. The DropdownField selects the first option...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.