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_83ecd668daea
unity_docs
scripting
What is `Plane.distance` in Unity? Explain its purpose and usage.
Plane.distance public float distance ; Description The distance measured from the Plane to the origin, along the Plane's normal. Note, this means a positive value for distance results in the Plane facing towards the origin. A negative distance value results in the Plane facing away from the origin. Additional ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ab520894eeb
unity_docs
scripting
What is `Experimental.GraphView.Port.Capacity` in Unity? Explain its purpose and usage.
Capacity enumeration Description Specify how many edges a port can have connected. Properties Property Description Single Port can only have a single connection. Multi Port can have multiple connections.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ac9c3fab6dd
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoClip.frameRate`.
frame rate of the clip in frames per second. (Read Only). The frame rate is the number of frames that are displayed in one second of the video clip. This is useful if you want to synchronize with other effects in your project, and monitor performance. However, VideoPlayer.frameRate usually gives a more accurate resu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cbca47ea6cb1
unity_docs
rendering
In Unity's 'UI Builder interface overview', what is 'StyleSheets' and how does it work?
StyleSheets and the USS Selectors in UI Toolkit are used to share and apply styles across many elements and UI Documents (UXML). The StyleSheets pane is where you can: Add, reorder, or remove StyleSheets (USS) in the current UI Document (UXML). Create, reorder, copy, or remove USS Selectors within StyleSheets to share ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd4418454fd9
unity_docs
editor
What is `TerrainTools.PaintTreesDetailsContext` in Unity? Explain its purpose and usage.
PaintTreesDetailsContext class in UnityEditor.TerrainTools Description Represents a context object for information used when scattering trees and detail objects across terrains. Properties Property Description neighborTerrains Neighboring terrain objects. neighborUvs Neighboring terrain UVs. Static Methods ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cffba05bee8
unity_docs
scripting
What is `UIElements.PointerEventBase_1.actionKey` in Unity? Explain its purpose and usage.
PointerEventBase<T0>.actionKey public bool actionKey ; Description Gets a boolean value that indicates whether the platform-specific action key is pressed. True means the action key is pressed. False means it isn't. The platform-specific action key is Cmd on macOS, and Ctrl on all other platforms.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04c95308a1f9
unity_docs
editor
Give me an overview of the `PropertyModification` class in Unity.
PropertyModification class in UnityEditor Description Defines a single modified property. Used by the Prefab system to track any changes applied to an instance. Properties Property Description objectReference The value being applied when it is an object reference (which can not be represented as a string). p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a651a0800d72
github
scripting
Write a Unity C# script called Android Com Mng
```csharp #if UNITY_ANDROID && !UNITY_EDITOR #define LYNX #endif using System; using UnityEngine; namespace Lynx { public static class AndroidComMng { //PUBLIC public delegate void AudioVolumeChangeEvent(int audioVolume); public static AudioVolumeChangeEvent OnAudioVolumeChange = null...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_ccfa9f466153
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.Invoke`.
next Update cycle before MonoBehaviour.Update . In this case, it's better to call the function directly. Note: Setting time to negative values is identical to setting it to 0. In other cases, the order of execution of the method depends on the timing of the invocation. If you need to pass parameters to your method, co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a92a14c9728c
unity_docs
scripting
What is `TerrainTools.TerrainPaintUtility.ReleaseContextResources` in Unity? Explain its purpose and usage.
TerrainPaintUtility.ReleaseContextResources Declaration public static void ReleaseContextResources ( TerrainTools.PaintContext ctx ); Parameters Parameter Description ctx The PaintContext containing the resources to release. Description Releases the allocated resources of the specified PaintContext. Addi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_89ed2f36fcb0
unity_docs
rendering
In Unity's 'Shader object fundamentals', what is 'Shader object' and how does it work?
A Shader object contains: Information about itself, such as its name An optional fallback Shader object, which Unity uses if it can’t use this one One or more SubShaders You can also define additional information such as shared shader code, or whether to use a custom editor . For information on defining a Shader object...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8487e905b6f
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.strength`.
ParticleSystem.NoiseModule.strength public ParticleSystem.MinMaxCurve strength ; Description How strong the overall noise effect is. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57471a0a9af0
unity_docs
editor
In Unity's 'Search the Unity Editor main menu', what is 'Provider filters' and how does it work?
The Menus provider has additional filters in the visual query builder . This table lists the filters and their textual query equivalents. Filter Search token Query example Description Menu Path m: id:<"path"> m: id:"2d/tiles" Searches only within the 2D > Tiles menu.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7b190ede380
unity_docs
scripting
Show me a Unity C# example demonstrating `Cloth.randomAcceleration`.
Cloth.randomAcceleration public Vector3 randomAcceleration ; Description A random, external acceleration applied to the cloth. Use this to simulate randomly changing forces on the cloth, such as wind turbulences waving a flag. Additional resources: Cloth.externalAcceleration . ```csharp using UnityEngine;p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b42c284e7a5e
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.TransformPoints`.
ion. Description Transforms multiple points from local space to world space overwriting each original point with the transformed version. Note that the positions of the returned points are affected by scale. Use Transform.TransformDirections if you are dealing with direction vectors. You can perform the opposite c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_947ef1b48a4c
unity_docs
scripting
What is `UIElements.StyleFont` in Unity? Explain its purpose and usage.
StyleFont struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IStyleValue<T0> Description Style value that can be either a Font or a StyleKeyword . Properties Property Description keyword The style keyword. value The Font value. Constructors...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_538290aaaa5b
unity_docs
xr
Explain 'Property bags' in Unity.
A property bag is a companion object for a given .NET object type. The bag contains a collection of properties for its companion type. You can use the property bag to efficiently traverse, access, and modify data for an instance of an object of the companion type. ## Generating property bags Unity uses one of the fol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f077883e4cf0
unity_docs
physics
In Unity's 'Configure a particle trigger', what is 'Interaction with a collider' and how does it work?
The example below causes particles to turn red as they enter the Collider’s bounds, then turn green as they leave the Collider’s bounds. ```csharp using UnityEngine; using System.Collections; using System.Collections.Generic; [ExecuteInEditMode] public class TriggerScript : MonoBehaviour { ParticleSystem ps; // the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d92aa3edc6e2
unity_docs
scripting
What is `UIElements.ClickEvent.ctor` in Unity? Explain its purpose and usage.
ClickEvent Constructor Declaration public ClickEvent (); Description Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c715cf0c6f6
unity_docs
ui
Show me a Unity C# example demonstrating `Overlays.OverlayCanvas.ShowPopup`.
OverlayCanvas.ShowPopup Declaration public void ShowPopup (); Declaration public void ShowPopup ( Vector2 position ); Parameters Parameter Description position The GUI position relative to the window. Description Displays an overlay as a pop-up in a EditorWindow . ```csharp using UnityEditor; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b763f076b344_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Checks for button input on an input action Signature: ```csharp public class OnButtonPress : MonoBehaviour ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_d4b1c445436b
unity_docs
xr
Explain 'Search for files' in Unity.
The Files search provider runs a file system search that supports regex and globs to match a specific pattern, such as file type, file name, or folder name. Unlike the Asset (project) search provider, the Files provider doesn’t require an index, so you can use it even if your project has no indices. Tip: You can use th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9a71ff05945
unity_docs
input
What is `UIElements.PointerId` in Unity? Explain its purpose and usage.
PointerId class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description A static class that holds pointer ID values. These values are used as the values for IPointerEvent.pointerId. Static Properties Property Description invalidPointerId Represents an invalid pointer ID ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_afc94863912a
unity_docs
audio
What is `AudioSettings.GetDSPBufferSize` in Unity? Explain its purpose and usage.
AudioSettings.GetDSPBufferSize Declaration public static void GetDSPBufferSize (out int bufferLength , out int numBuffers ); Parameters Parameter Description bufferLength Is the length of each buffer in the ring buffer. numBuffers Is number of buffers. Description Get the mixer's buffer size in samples...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7947782961d
unity_docs
scripting
What is `PluginImporter.GetPlatformData` in Unity? Explain its purpose and usage.
PluginImporter.GetPlatformData Declaration public string GetPlatformData ( BuildTarget platform , string key ); Declaration public string GetPlatformData (string platformName , string key ); Parameters Parameter Description platform Target platform. key Key value for data. Description Get platfor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c0e868657c8
unity_docs
editor
What are the parameters of `ExpressionEvaluator.Evaluate` in Unity?
Returns bool Indicates whether expression could be evauated successfully. Description Evaluates a math expression and returns the result. The expressions that can be evaluated support: arithmetic operators a+b , a-b , a*b , a/b , power ( a^b ) and modulo ( a%b ) operators, parentheses, math functions sqrt(a) , floor(a)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3fd1d3c7e335
unity_docs
scripting
Explain 'Adding profiler counters to your code' in Unity.
To add a profiler counter , create scripts to do the following: Create and define a new counter . Update the counter’s value . The code examples in these sections add a Profiler counter to track the total number of particles that Unity created for every instance of a GameObject ’s trail effects. In these examples, the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a3b011d062eb
unity_docs
ui
Explain 'Relative and absolute positioning' in Unity.
This example demonstrates the difference between relative and absolute positioning. This example also demonstrates how to use C# and UXML/USS to add and style UI controls. ## Example overview The example uses the automatic layout system to add boxes to an Editor and a runtime UI. One box demonstrates a relative offse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9f4917548802_doc_5
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Destroys the child GameObject and creates a clone of the given TComponent as a child transform.TComponent will be initialized with the given arguments.The child Component to destroy.The GameObject to clone.The TArgs object to be passed in on initialization.The type of Component to be created.The type of arguments to be...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_f9c30bcd4347
unity_docs
scripting
Show me a Unity C# example demonstrating `Debug.unityLogger`.
Debug.unityLogger public static ILogger unityLogger ; Description Get default debug logger. Logs message to the Unity Console using default logger. Additional resources: ILogger , ILogHandler . ```csharp using UnityEngine; using System.Collections;public class MyGameClass : MonoBehaviour { private stat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cf415f367ee7
unity_docs
editor
In Unity's 'Introduction to customizing the build pipeline', what is 'External build pipeline customizations' and how does it work?
You can use scripts or continuous integration (CI) tools that run on a build machine or cloud service (for example Unity Build Automation ) to customize the build pipeline. These tools perform one or more builds from the command line . External scripts can perform actions that don’t depend on the Unity API and can happ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_87727f0c447b
unity_docs
ui
In Unity's 'Use UXML instances as templates', what is 'Edit a UXML document template instance' and how does it work?
To edit an original UXML Document used as a Template Instance , right-click on a Template Instance , and select one of the following options: Open in UI Builder : Unload the current UXML Document, and load the Template Instance : Open in UI Builder example Open Instance in Isolation : Keep the current UXML Document loa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82de3f781594
unity_docs
rendering
Explain 'Properties block reference in ShaderLab' in Unity.
This page contains information on using a Properties block in your ShaderLab code to define material properties for a Shader object. ## Render pipeline compatibility Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Custom SRP Built-in Render Pipeline ShaderLab: Properties block Yes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1718a2b3ed1c
unity_docs
editor
Give me an overview of the `GlobalObjectId` class in Unity.
GlobalObjectId struct in UnityEditor Description Unique and stable project-scoped identifier for objects in scenes and in other types of assets for use at authoring time. Use this struct to obtain unique identifiers to objects that are part of scenes or inside other assets such as prefabs and ScriptableObjects. T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a88ca8030eee
unity_docs
scripting
What is `UIElements.Column.resizable` in Unity? Explain its purpose and usage.
Column.resizable public bool resizable ; Description Indicates whether the column can be resized interactively by the user. The resize behaviour of all columns in a column collection can be specified by setting Columns.resizable . A column is effectively resizable if both Column.resizable and Columns.r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33b8ae2ed41e
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.DrawWireCube`.
Handles.DrawWireCube Declaration public static void DrawWireCube ( Vector3 center , Vector3 size ); Description Draw a wireframe box with center and size . ```csharp using UnityEditor; using UnityEngine; using System.Collections;//this class should exist somewhere in your project public class WireCubeEx...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e263625ff60d
unity_docs
rendering
What is `Shader.GetGlobalMatrix` in Unity? Explain its purpose and usage.
Shader.GetGlobalMatrix Declaration public static Matrix4x4 GetGlobalMatrix (string name ); Declaration public static Matrix4x4 GetGlobalMatrix (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f30d5808b77c
unity_docs
scripting
What is `UIElements.PointerEventBase_1.commandKey` in Unity? Explain its purpose and usage.
PointerEventBase<T0>.commandKey public bool commandKey ; Description Gets a boolean value that indicates whether the Windows/Cmd key is pressed. True means the Windows/Cmd key is pressed. False means it isn't.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c17b379e1255
unity_docs
ui
Explain 'Position element with the layout engine' in Unity.
UI Toolkit includes a layout engine that positions elements based on layout and styling properties. The layout engine uses the layout principles of Yoga , which implements a subset of Flexbox , a HTML/CSS layout system. UI Toolkit properties match Yoga layout behavior. UI Toolkit supports most properties in Flexbox. By...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d52b4ab2cf1
unity_docs
rendering
What is `TerrainData.SetHolesDelayLOD` in Unity? Explain its purpose and usage.
TerrainData.SetHolesDelayLOD Declaration public void SetHolesDelayLOD (int xBase , int yBase , bool[,] holes ); Parameters Parameter Description xBase First x index of Terrain holes samples to set. yBase First y index of Terrain holes samples to set. holes Array of Terrain holes samples to set (array i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e92c8aebafa
unity_docs
scripting
What is `UIElements.NavigationEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
NavigationEventBase<T0>.GetPooled Declaration public static T GetPooled ( EventModifiers modifiers ); Parameters Parameter Description modifiers The modifier keys held down during the event. deviceType The type of device this event was created from. Returns T An initialized navigation event. Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_33513fda62ed
unity_docs
scripting
Show me a Unity code example for 'Adding profiler counters to your code'.
the ProfilerCounter API to push the counter data to the Profiler. If your data changes multiple times per frame, use the ProfilerCounterValue API. This makes the Profiler automatically pick up the last value at the end of the frame. The following example script defines the ProfilerCounterValue TankTrailParticleCount , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7469681c3302
unity_docs
scripting
Explain 'Write and run coroutines' in Unity.
A coroutine is a method that can suspend execution and resume at a later time. In Unity applications, this means coroutines can start running in one frame and then resume in another, allowing you to spread tasks across several frames. Regular, non-coroutine methods run to completion before returning control to the call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b15dea3e8d25
unity_docs
math
What are the parameters of `AI.NavMesh.SamplePosition` in Unity?
Returns bool True if the nearest point is found. Description Finds the nearest point based on the NavMesh within a specified range. The nearest point is found by projecting the input point onto nearby NavMesh instances along the vertical axis. This vertical axis has been chosen for each instance at the time of creation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdbf92855de5
unity_docs
physics
What is `Build.Content.SceneLoadInfo.internalName` in Unity? Explain its purpose and usage.
SceneLoadInfo.internalName public string internalName ; Description Internal name used to load the built Scene from an asset bundle. Internal names are used for loading to avoid collision if Scenes with similar file names are added to the same AssetBundle. Internal use only. See SceneLoadInfo .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2f051213d9d3
unity_docs
scripting
Explain 'GradientField' in Unity.
The GradientField is an Editor-only control that lets users set a color gradient from a Gradient Editor. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a GradientField You can create ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_112bbd2f1384
unity_docs
editor
In Unity's 'Cloud Code', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.services.cloudcode@2.10 released 2.10.0, 2.10.1, 2.10.2 com.unity.services.cloudcode@2.9 released 2.9.0-exp.1, 2.9.0-exp.2, 2.9.0 com.unity.services.cloudcode@2.8 released 2.8.0, 2.8.1 com.unity.ser...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73fe3f011580
unity_docs
scripting
Show me a Unity C# example demonstrating `QualitySettings.asyncUploadBufferSize`.
e Scene. If you encounter excessive memory usage or performance issues, consider lowering this value to conserve resources. Alternatively, you can disable asyncUploadPersistentBuffer , although this might lead to memory fragmentation and further complications. Be cautious when disabling persistent buffers, as fragment...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f675f686a83
unity_docs
scripting
What are the parameters of `Search.QueryEngine_1.RemoveOperator` in Unity?
Description Removes a custom operator that was added on the QueryEngine . ``` // Remove an operator based on its token var operatorToken = "%"; queryEngine.RemoveOperator(operatorToken); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f075bfcb9fe
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.position`.
Transform.position public Vector3 position ; Description The world space position of the Transform. The position property of a GameObject ’s Transform , which is accessible in the Unity Editor and through scripts. Alter this value to move a GameObject . Get this value to locate the GameObject in 3D wo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_56cea3ab992f
unity_docs
scripting
In Unity's 'AppCallbacks class reference', what is 'MainPage.xaml.cppfile' and how does it work?
``` MainPage::MainPage() { m_SplashScreenRemovalEventToken.Value = 0; m_OnResizeRegistrationToken.Value = 0; InitializeComponent(); NavigationCacheMode = ::NavigationCacheMode::Required; auto appCallbacks = AppCallbacks::Instance; bool isWindowsHolographic = false; #if UNITY_HOLOGRAPHIC // If application was...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_288019f85ce0
unity_docs
scripting
What is `XR.MeshId` in Unity? Explain its purpose and usage.
MeshId struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description A session-unique identifier for trackables in the environment, e.g., planes and feature points. Ids are generally unique to a particular XRSessionSubsystem, but multiple sessions may produce identical ids for different trackable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38281744649d
unity_docs
ui
What is `Experimental.GraphView.ShortcutHandler` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ShortcutHandler class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.Manipulator Description Shortcut handler. Constructors Constructor Description ShortcutHandler ShortcutHandler's constructor. Protec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5bd8e25e575
unity_docs
ui
What is `UIElements.VisualElement.contentRect` in Unity? Explain its purpose and usage.
VisualElement.contentRect public Rect contentRect ; Description The rectangle of the content area of the element, in the local space of the element. (Read Only) In the box model used by UI Toolkit, the content area refers to the inner rectangle for displaying text and images. It excludes the borders and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_600a1a3693c7
unity_docs
scripting
What is `RangeInt.end` in Unity? Explain its purpose and usage.
RangeInt.end public int end ; Description The end index of the range (not inclusive). Calculated by adding length to start (for instance, if you have a string “abcdef” and you care about “cde”, then this value is (start) 2 + (length) 3 = 5).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0351c93a8e1a
unity_docs
rendering
What is `ShaderKeywordFilter.SelectOrRemoveAttribute.ctor` in Unity? Explain its purpose and usage.
SelectOrRemoveAttribute Constructor Declaration public SelectOrRemoveAttribute (object condition , bool overridePriority , string filePath , int lineNumber , params string[] keywordNames ); Parameters Parameter Description condition Unity compares the data field to this value. The outcome determines the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a7d753cde446
unity_docs
rendering
In Unity's 'Global Illumination Profiler module reference', what is 'Module details pane' and how does it work?
When you select the Global Illumination module, the details pane displays a breakdown of where the application spent time in the selected frame. The data available is as follows: Data Description Total CPU Time Total Enlighten Global Illumination CPU time across all threads in ms. Probe Update Time Time spent updating ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfd7e9df69b3
unity_docs
rendering
What is `Rendering.PassType.MotionVectors` in Unity? Explain its purpose and usage.
PassType.MotionVectors Description Motion vector render pass. Used to generate motion vectors that can be used in Image Effects. This pass is rendered after opaque objects, but before opaque Image Effects.. Additional resources: Renderer.motionVectorGenerationMode , DepthTextureMode.MotionVectors , SkinnedMeshRe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_208214bd0cc7_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A class that follows the pinch point between the thumb and index finger using XR Hand Tracking.It updates its position to the midpoint between the thumb and index tip while optionally adjusting its rotationto look at a specified target. The rotation towards the target can also be smoothly interpolated over time. Signa...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_888f1b685261
github
scripting
Write a Unity Editor script for Simple Address Editor
```csharp using System.Linq; using UnityEditor; using UnityEditor.UIElements; using UnityEditorInternal; using UnityEngine; using UnityEngine.UIElements; namespace PassivePicasso.SimplyAddress { [CustomEditor(typeof(SimpleAddress), true)] public class SimpleAddressEditor : Editor { protected virtu...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_c947724f8a03
unity_docs
rendering
In Unity's 'Save and load lighting settings with Lightmap Parameters Assets', what is 'GameObjects' and how does it work?
To assign a Lightmap Parameters Asset to a single GameObject, ensure the GameObject has a Mesh Renderer or Terrain component attached. To assign a Lightmap Parameters Asset to a Mesh Renderer component: In the Inspector, go to Mesh Renderer > Lighting Enable Contribute Global Illumination In the mesh Renderer component...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6719ebb57521
unity_docs
scripting
Show me a Unity C# example demonstrating `Assertions.Assert`.
development build, unless specified explicitly. See BuildOptions.ForceEnableAssertions . The inclusion of an assertion is controlled by the UNITY_ASSERTIONS define. Assert throws exceptions whenever an assertion fails. If a debugger is attached to the project (System.Diagnostics.Debugger.IsAttached is true), A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_201658c30da5
unity_docs
animation
What is `Animations.TransformStreamHandle.GetRotationReadMask` in Unity? Explain its purpose and usage.
TransformStreamHandle.GetRotationReadMask Declaration public bool GetRotationReadMask ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns bool Returns true if the rotation can be read. Description Gets the rotat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac855ee3eae7
unity_docs
rendering
What are the parameters of `AssetDatabase.GUIDToAssetPath` in Unity?
Returns string Path of the asset relative to the project folder. Description Gets the corresponding asset path for the supplied GUID, or an empty string if the GUID can't be found. Returned paths are relative to the project folder, for example: "Assets/MyTextures/hello.png". ```csharp using UnityEditor; using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7ce9810e917
unity_docs
scripting
Give me an overview of the `GUISkin` class in Unity.
GUISkin class in UnityEngine / Inherits from: ScriptableObject / Implemented in: UnityEngine.IMGUIModule Description Defines how GUI looks and behaves. GUISkin contains GUI settings and a collection of GUIStyle objects that together specify GUI skin. Active GUI skin is get and set through GUI.skin . Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1804bcff6ec7
unity_docs
math
What are the parameters of `TrailRenderer.AddPositions` in Unity?
Description Add an array of positions to the trail. All points inside a TrailRenderer store a timestamp when they are born. This, together with the TrailRenderer.time property, is used to determine when they will be removed. For trails to disappear smoothly, each position must have a unique, increasing timestamp. When ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e0a6c4c4267
unity_docs
rendering
In Unity's 'Key concepts', what is 'Scripting' and how does it work?
Use scripts to create complex game behavior, such as: Trigger game events, such as move the user to a win or lose scene in response to changes in the user’s game stats. Change component properties over time. For example, change the visibility of a hidden door, shrink and enlarge an object, or collapse a wall. Respond t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b5f48e1e4f9
unity_docs
rendering
What is `ParticleSystem.MinMaxCurve.Evaluate` in Unity? Explain its purpose and usage.
ParticleSystem.MinMaxCurve.Evaluate Declaration public float Evaluate (float time ); Declaration public float Evaluate (float time , float lerpFactor ); Parameters Parameter Description time Normalized time (in the range 0 - 1, where 1 represents 100%) at which to evaluate the curve. This is valid whe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9cbd3d51b60b
github
scripting
Write a Unity C# script called Action To Button
```csharp using System; using System.Collections; using UnityEngine.InputSystem; using UnityEngine.UI; using UnityEngine.XR.Management; using UnityEngine.XR.OpenXR.Input; namespace UnityEngine.XR.OpenXR.Samples.ControllerSample { public class ActionToButton : ActionToControl { [SerializeField] private ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3f32704847b0
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.RenderPipeline.EndContextRendering`.
RenderPipeline.EndFrameRendering . It does everything that method does, and in addition it calls the RenderPipelineManager.endContextRendering delegate. If you are writing a custom Scriptable Render Pipeline, use this method instead of RenderPipeline.EndFrameRendering . The following code example demonstrates where ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_880cf557b273
unity_docs
scripting
What is `Experimental.Rendering.SceneStateHash.sceneObjectsHash` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SceneStateHash.sceneObjectsHash public Hash128 sceneObjectsHash ; Description A hash representing the state of Scene objects. This hash represents the state of: - Transforms of objects flagged as "Reflection Probe Static...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c8dae741801
unity_docs
scripting
What is `StaticOcclusionCulling.isRunning` in Unity? Explain its purpose and usage.
StaticOcclusionCulling.isRunning public static bool isRunning ; Description Used to check if asynchronous generation of static occlusion culling data is still running. Additional resources: StaticOcclusionCulling.GenerateInBackground , StaticOcclusionCulling.Cancel .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92ae93f846f5
unity_docs
math
Show me a Unity C# example demonstrating `Camera.backgroundColor`.
Camera.backgroundColor public Color backgroundColor ; Description The color with which the screen will be cleared. Only used if clearFlags are set to CameraClearFlags.SolidColor (or CameraClearFlags.Skybox but the skybox is not set up). ```csharp // ping-pong animate background color using UnityEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bf00e3971b8
unity_docs
scripting
What is `MPE.ChannelClient.UnregisterMessageHandler` in Unity? Explain its purpose and usage.
ChannelClient.UnregisterMessageHandler Declaration public void UnregisterMessageHandler (Action<string> handler ); Declaration public void UnregisterMessageHandler (Action<byte[]> handler ); Parameters Parameter Description handler The handler to unregister. Description Unregisters a specific channel ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40ce0dbfcceb
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.BeginSampleWithMetadata`.
a started section of the instrumented code. In the Timeline view of the Profiler Window the provided metadata is available in the tooltip message. Use HierarchyFrameDataView.GetItemMetadata to retrieve metadata programmatically. Note: Both BeginSampleWithMetadata and EndSample are thread safe and can be used ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_010eac62110e
unity_docs
scripting
What is `Unity.Properties.PropertyPath.Pop` in Unity? Explain its purpose and usage.
PropertyPath.Pop Declaration public static Unity.Properties.PropertyPath Pop (ref Unity.Properties.PropertyPath path ); Parameters Parameter Description path The <see cref="PropertyPath" /> Returns PropertyPath A new PropertyPath Description Returns a new PropertyPath that will not include the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e31387bafbf
unity_docs
scripting
What is `Search.PropertyDatabaseRecordKey.operator_ne` in Unity? Explain its purpose and usage.
PropertyDatabaseRecordKey.operator != public static bool operator != ( Search.PropertyDatabaseRecordKey lhs , Search.PropertyDatabaseRecordKey rhs ); Parameters Parameter Description lhs A record key. rhs A record key. Description The not equal operator.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_124b9548a905
unity_docs
ui
In Unity's 'MinMaxSlider', what is 'Create a MinMaxSlider' and how does it work?
You can create a MinMaxSlider with UI Builder, UXML, or C#. The following C# example creates a MinMaxSlider with a default value, low limit, and high limit: ``` var minMaxSlider = new MinMaxSlider(); minMaxSlider.value = new Vector2(0.25f, 0.75f); minMaxSlider.lowLimit = 0; minMaxSlider.highLimit = 1; ``` Note : To ali...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8fd151b8b95
unity_docs
scripting
What is `Unity.Android.Gradle.Dependencies.AddDependencyImplementationProject` in Unity? Explain its purpose and usage.
Dependencies.AddDependencyImplementationProject Declaration public Unity.Android.Gradle.Element AddDependencyImplementationProject (string name ); Parameters Parameter Description name Project name. Returns Element The added dependency. Description Adds a plugin implementation element with project:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ddba3bc88840
unity_docs
rendering
Explain 'Graphics performance and profiling' in Unity.
This section contains information on understanding and improving rendering performance. Page Description Reduce rendering work on the GPU or CPU Reduce the amount of rendering on the CPU or the GPU, or increase the rendering frame rate. Simplifying distant meshes with level of detail (LOD) Information about features th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9aee75f8de74
unity_docs
ui
What is `UIElements.VisualElement.languageDirection` in Unity? Explain its purpose and usage.
VisualElement.languageDirection public UIElements.LanguageDirection languageDirection ; Description Indicates the directionality of the element's text. The value will propagate to the element's children. Setting languageDirection to RTL can only get the basic RTL support like text reversal. To get m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa19db31b792
unity_docs
scripting
Give me an overview of the `ExposedReference_1` class in Unity.
ExposedReference<T0> struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Creates a type whos value is resolvable at runtime. ExposedReference is a generic type that can be used to create references to Scene objects and resolve their actual values at runtime and by using a context object. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07f80a188161
unity_docs
scripting
What is `LocalizationGroup.ctor` in Unity? Explain its purpose and usage.
LocalizationGroup Constructor Declaration public LocalizationGroup (); Declaration public LocalizationGroup ( Behaviour behaviour ); Declaration public LocalizationGroup (Type type ); Declaration public LocalizationGroup (object obj ); Description Default constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3057ea7b374
unity_docs
rendering
Show me a Unity C# example demonstrating `Shader.SetGlobalFloat`.
custom shaders that all use the same "global" float (for example, density of some custom fog type). Then you can set the global property from script and don't have to setup the same float in all materials. Additional resources: SetGlobalColor , SetGlobalTexture ; Material class, ShaderLab documentation . The follo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dde468302377
unity_docs
rendering
Explain 'Renderer module reference' in Unity.
The Renderer module’s settings determine how a particle ’s image or Mesh is transformed, shaded and overdrawn by other particles. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6790e5db0268
unity_docs
ui
In Unity's 'Apply masking effects in UI Toolkit', what is 'Masking with an element' and how does it work?
You can use an element to mask another element. To make a masking effect with an element, add the masking element as the parent element of the masked element. Set the overflow property to hidden on the masking element. This hides the parts of the masked element that are outside the bounds of the masking element. The fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b167d9fbb319
unity_docs
scripting
What is `Component.transform` in Unity? Explain its purpose and usage.
Component.transform public Transform transform ; Description The Transform attached to this GameObject . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { transform.Translate(1, 1, 1); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe756d771f27
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.DrawTexture3DSDF`.
as empty space. The default value is 0. customColorRamp The custom gradient that Unity uses as a color ramp. If this is not specified, Unity uses Google Turbo color ramp . Description Draws a 3D texture using Signed Distance Field rendering mode in 3D space. This visualization mode supports only non-directional S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eea3c8380dd2
unity_docs
scripting
What is `Search.IQueryEngineFilter.RemoveOperator` in Unity? Explain its purpose and usage.
IQueryEngineFilter.RemoveOperator Declaration public Search.IQueryEngineFilter RemoveOperator (string op ); Parameters Parameter Description op The operator identifier. Returns IQueryEngineFilter The current filter. Description Remove a custom operator specific to the filter. This removes a custom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b2665a4b3730
unity_docs
rendering
In Unity's 'Include sprites in text', what is 'Use a sprite asset' and how does it work?
To use sprites in the rich text tag, reference the sprite asset name and the sprite name as <sprite="assetName" name="spriteName"> or by index as <sprite="assetName" index=1> . You can add the tint=1 attribute to the tag to tint the sprite with the text object’s vertex color. You can also choose a different color by ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_281afeb79eb6
unity_docs
scripting
What is `Android.AndroidPluginImporterUtilities.GetAndroidCPU` in Unity? Explain its purpose and usage.
AndroidPluginImporterUtilities.GetAndroidCPU Declaration public static AndroidArchitecture GetAndroidCPU ( PluginImporter importer ); Returns AndroidArchitecture Returns the AndroidArchitecture that represents the Android CPU architecture the plugin supports. Description Gets the Android CPU architec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_984ff979a45f
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeaderState.Column.minWidth` in Unity? Explain its purpose and usage.
MultiColumnHeaderState.Column.minWidth public float minWidth ; Description Minimum width of the column. When resizing the column this is the minimum width which is allowed. Default value is 20.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5ef67906088
unity_docs
scripting
What is `AnimationEvent` in Unity? Explain its purpose and usage.
AnimationEvent class in UnityEngine / Implemented in: UnityEngine.AnimationModule Description AnimationEvent lets you call a script function similar to SendMessage as part of playing back an animation. Animation events support functions that take zero or one parameter. The parameter can be a float, an int, a st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c782a8237e4
unity_docs
scripting
What is `UIElements.IDataSourceProvider` in Unity? Explain its purpose and usage.
IDataSourceProvider interface in UnityEngine.UIElements Description Binding types deriving from Binding can implement this interface to gain an additional layer of data source and data source path. These will be used by the binding system to compute the final BindingContext.dataSource and BindingContext.da...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_857d4ca38710
unity_docs
scripting
What is `Vector3.Max` in Unity? Explain its purpose and usage.
Vector3.Max Declaration public static Vector3 Max ( Vector3 lhs , Vector3 rhs ); Description Returns a vector that is made from the largest components of two vectors. Additional resources: Min function. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07ce76ed15b4
unity_docs
scripting
Show me a Unity C# example demonstrating `Pool.UnsafeGenericPool_1`.
.Pool / Implemented in: UnityEngine.CoreModule Description Provides a static implementation of ObjectPool<T0> . This is an alternative to GenericPool<T0> which has collection checks disabled. Some objects generate garbage when they are compared during the collection checks. This version does not perform any co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_469f6d1662bc
unity_docs
rendering
In Unity's 'Rendering paths in Unity', what is 'Forward' and how does it work?
The Forward rendering path is the default rendering path in Unity projects. It works in the following way: Unity lights each GameObject in turn. Lighting has limits, for example how often or how well Unity can light each GameObject. These limits are different for each render pipeline . The Universal Render Pipeline (UR...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4790e5c6b1b3
unity_docs
animation
What is `Animations.TransformStreamHandle.SetRotation` in Unity? Explain its purpose and usage.
TransformStreamHandle.SetRotation Declaration public void SetRotation ( Animations.AnimationStream stream , Quaternion rotation ); Parameters Parameter Description stream The AnimationStream that holds the animated values. rotation The rotation of the transform in world space. Description Sets the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97535b43a259
unity_docs
rendering
What is `Device.SystemInfo.GetRenderTextureSupportedMSAASampleCount` in Unity? Explain its purpose and usage.
SystemInfo.GetRenderTextureSupportedMSAASampleCount Declaration public static int GetRenderTextureSupportedMSAASampleCount ( RenderTextureDescriptor desc ); Description This has the same functionality as SystemInfo.GetRenderTextureSupportedMSAASampleCount and also mimics platform-specific behavior in the Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_097ce662498d
unity_docs
rendering
In Unity's 'Enable mipmap streaming', what is 'Make a texture work with mipmap streaming' and how does it work?
Follow these steps: Select a texture asset in the Project window. In the Texture Import Settings window, select Advanced to open advanced settings. Ensure that Generate Mipmap is enabled. Enable Stream Mipmap Levels . If you build your project for Android, you must also follow these steps: Open the Build Profiles windo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.