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_b1d17782fd53
unity_docs
scripting
What is `UIElements.Columns.Remove` in Unity? Explain its purpose and usage.
Columns.Remove Declaration public bool Remove ( UIElements.Column column ); Parameters Parameter Description column The column to remove. Returns bool Whether it was removed or not. Description Removes the first occurence of a column from the collection.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b44d062f49a7
unity_docs
editor
What is `Device.SystemInfo.maxComputeWorkGroupSizeY` in Unity? Explain its purpose and usage.
SystemInfo.maxComputeWorkGroupSizeY public static int maxComputeWorkGroupSizeY ; Description This has the same functionality as SystemInfo.maxComputeWorkGroupSizeY and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3df285b546c1
unity_docs
editor
Show me a Unity C# example demonstrating `SearchService.ProjectSearch`.
in UnityEditor.SearchService Description Use this API to perform searches in the Project. Engines for this type of search implement the IProjectSearchEngine interface. Registered Project search engines are called during searches in the Project browser. When the default object selector is used, they are also call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b53b0055822c
unity_docs
rendering
What is `Rendering.SupportedRenderingFeatures.ambientProbeBaking` in Unity? Explain its purpose and usage.
SupportedRenderingFeatures.ambientProbeBaking public bool ambientProbeBaking ; Description Determines if this renderer supports ambient probe baking. This property enables ambient probe baking for projects using compatible render pipelines. Additional resources: RenderSettings.ambientProbe .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2cda18ea713
unity_docs
editor
What is `GameObject.isStatic` in Unity? Explain its purpose and usage.
GameObject.isStatic public bool isStatic ; Description Whether there are any Static Editor Flags set for the GameObject. Returns true if any StaticEditorFlags are set. Returns false if no Static Editor Flags are set. Set to true to enable all Static Editor Flags. Set to false to disable all Static Ed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76518396c8a1
unity_docs
scripting
What is `PlayerSettings.SetScriptingBackend` in Unity? Explain its purpose and usage.
PlayerSettings.SetScriptingBackend Declaration public static void SetScriptingBackend ( Build.NamedBuildTarget buildTarget , ScriptingImplementation backend ); Obsolete Use SetScriptingBackend(NamedBuildTarget buildTarget, ScriptingImplementation backend) instead. Declaration public static void SetScrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcfc77097995
unity_docs
rendering
What is `Unity.Profiling.Memory.CaptureFlags` in Unity? Explain its purpose and usage.
CaptureFlags enumeration Description Flags that specify what kind of data to capture in a snapshot. These flags provide control for what broad data categories should be included in the snapshot. For general purpose captures it is recommended to capture with all flags, or at least with CaptureFlags.ManagedObjects ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8aaad4bed85
unity_docs
rendering
What is `Mesh.GetBoneWeights` in Unity? Explain its purpose and usage.
Mesh.GetBoneWeights Declaration public void GetBoneWeights (List<BoneWeight> boneWeights ); Parameters Parameter Description boneWeights A list of BoneWeight structs to populate. Description Gets the bone weights for the Mesh. Use this method instead of Mesh.boneWeights if you want to avoid allocatin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64923e0647a6
unity_docs
rendering
What is `Rendering.PassIdentifier` in Unity? Explain its purpose and usage.
PassIdentifier struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents an identifier of a specific Pass in a Shader. Additional resources: Shader , ShaderUtil , Pass . Properties Property Description PassIndex The index of the pass within the subshader (Read Only)....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_339eb2d93a7b_doc_3
github
scripting
What does `JobData` do in this Unity script? Explain its purpose and signature.
Shortcut for UpdateTransformJobManager&lt;TData&gt;.Instance.GetData(this). Signature: ```csharp public TData JobData => this.GetJobData(); ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3bf2d8c8ab30
unity_docs
scripting
What is `ModelImporter.useFileUnits` in Unity? Explain its purpose and usage.
ModelImporter.useFileUnits public bool useFileUnits ; Description Detect file units and import as 1FileUnit=1UnityUnit, otherwise it will import as 1cm=1UnityUnit. This setting is used only for .max files. It was introduced for backwards compatibility: there is a bug in some FBX 2011 plugins - they fail to pick...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe69c62320ba
unity_docs
physics
Show me a Unity code example for 'Optimizing arrays'.
ormance of your code when using arrays . ## Pass arrays as parameters to methods Sometimes it might be convenient to write a method that creates a new array, fills the array with values and then returns it. However, if this method is called repeatedly, then new memory gets allocated each time. The following example c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78756fc82f90
unity_docs
scripting
Show me a Unity C# example demonstrating `AndroidJavaObject.SetStatic`.
tStatic Declaration public void SetStatic (string fieldName , FieldType val ); Parameters Parameter Description fieldName The name of the field (e.g. int counter; would have fieldName = "counter"). val The value to assign to the field. It has to match the field type. Description Set the value of a sta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1bd2239f459f
unity_docs
physics
What is `PhysicsScene.OverlapSphere` in Unity? Explain its purpose and usage.
PhysicsScene.OverlapSphere Declaration public int OverlapSphere ( Vector3 position , float radius , Collider[] results , int layerMask = AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters Parameter Description position Center of the sphere. r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7b24ec53e31
unity_docs
scripting
What is `Transform.GetSiblingIndex` in Unity? Explain its purpose and usage.
Transform.GetSiblingIndex Declaration public int GetSiblingIndex (); Description Gets the sibling index. Use this to return the sibling index of the GameObject. If a GameObject shares a parent with other GameObjects and are on the same level (i.e. they share the same direct parent), these GameObjects are known...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e6684b5e411d
unity_docs
scripting
Explain 'App slicing' in Unity.
App slicing allows you to dynamically download Assets according to the specification of the device the application is running on. For example, app slicing can download high-resolution Assets for larger devices and low-resolution Assets for smaller devices. App slicing works by defining AssetBundles, with the added prov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04121ee749a0
unity_docs
scripting
What is `Playables.PlayableExtensions.Destroy` in Unity? Explain its purpose and usage.
PlayableExtensions.Destroy Declaration public static void Destroy (U playable ); Parameters Parameter Description playable The Playable used by this operation. Description Destroys the current Playable . NOTE: Any other Playables connected to the destroyed Playable's output ports will be orphaned; they...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd19b89c5282
unity_docs
editor
What is `EditorGUILayout.ScrollViewScope` in Unity? Explain its purpose and usage.
ScrollViewScope class in UnityEditor Description Disposable helper class for managing BeginScrollView / EndScrollView . These work just like ScrollViewScope but feel more application-like and should be used in the editor Label inside a scroll view. ```csharp using UnityEngine; using UnityEditor;// Simple E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_871425c4eb78
unity_docs
input
What is `UIElements.KeyboardEventBase_1.character` in Unity? Explain its purpose and usage.
KeyboardEventBase<T0>.character public char character ; Description Gets the character entered. This is the character entered when a key is pressed, taking into account the current keyboard layout. For example, pressing the "A" key causes this property to return either "a" or "A", depending on whether the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_055859ea930f
unity_docs
editor
What is `Application.isBatchMode` in Unity? Explain its purpose and usage.
Application.isBatchMode public static bool isBatchMode ; Description Returns true when Unity is launched with the -batchmode flag from the command line (Read Only). In batch mode, Unity runs from the command line without user interaction, typically used for automation (builds, tests, CI). For details, refer t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e31890bdac5
unity_docs
editor
What is `IMGUI.Controls.ArcHandle.radiusHandleDrawFunction` in Unity? Explain its purpose and usage.
ArcHandle.radiusHandleDrawFunction public Handles.CapFunction radiusHandleDrawFunction ; Description The CapFunction to use when displaying the radius control handle. Defaults to Handles.DotHandleCap for new instances of ArcHandle . No radius handle will be drawn if a value of null is assigned. Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31372e1cf3ec
unity_docs
scripting
What is `PlayerSettings.WSAImageType.UWPWide310x150Logo` in Unity? Explain its purpose and usage.
PlayerSettings.WSAImageType.UWPWide310x150Logo Description The image to display as the wide tile in the start menu and Microsoft Store. The Universal Windows Platform asset file name for this is Square310x150Logo.png. For more information about application icons and logos, see Microsoft's documentation .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9790fcf48b12
unity_docs
ui
What is `UIElements.VisualTreeAsset.CloneTree` in Unity? Explain its purpose and usage.
VisualTreeAsset.CloneTree Declaration public UIElements.TemplateContainer CloneTree (); Returns TemplateContainer The root of the tree of VisualElements that was just cloned. Description Build a tree of VisualElements from the asset. Declaration public UIElements.TemplateContainer CloneTree (strin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67f138f8a76e
unity_docs
physics
What is `JointSuspension2D` in Unity? Explain its purpose and usage.
JointSuspension2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Joint suspension is used to define how suspension works on a WheelJoint2D . Additional resources: WheelJoint2D class. Properties Property Description angle The world angle (in degrees) along which the suspen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d3dee24a7c63
unity_docs
xr
In Unity's 'VR and MR development in Unity', what is 'Basic VR and MR scene elements' and how does it work?
A basic VR or MR scene should contain an XR Origin , which defines the 3D origin for tracking data. This collection of GameObjects and components also contains the main scene Camera and the GameObjects representing the user’s controllers. Refer to Set up an XR scene for instructions on setting up a basic VR scene. You ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2039fd67b6b4
unity_docs
rendering
In Unity's '3D texture preview reference', what is 'SDF' and how does it work?
In SDF preview mode, Unity displays the 3D texture as a signed distance field (SDF) in 3D space. This preview mode supports only non-directional signed distance fields. Control Description Scale Set the value by which to multiply the ray step size. The ray step size is the distance between 2 neighboring pixels. Increas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4df2cdea7c61
unity_docs
physics
In Unity's 'Add collision to trees', what is 'Add a collider to Tree Editor trees' and how does it work?
To add a Capsule Collider to a tree asset, add it to the tree’s prefab : In the Hierarchy window, click > next to the tree GameObject to open its prefab. In the prefab’s Inspector window, select Add Component > Physics > Capsule Collider to add the collider. For information on how to configure the collider, refer to Ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4d887fddb80
unity_docs
performance
What are the parameters of `GraphicsBuffer.SetData` in Unity?
Description Set the buffer with values from an array. Declaration public void SetData (Array data , int managedBufferStartIndex , int graphicsBufferStartIndex , int count ); Declaration public void SetData (List<T> data , int managedBufferStartIndex , int graphicsBufferStartIndex , int count ); Declaration public void ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_325526292915
unity_docs
rendering
Explain 'Mesh vertex data' in Unity.
The elements of vertex data are called vertex attributes . Every vertex can have the following attributes: Position Normal Tangent Color Up to 8 texture coordinates Bone weights and blend indices (skinned meshes only) Internally, all vertex data is stored in separate arrays of the same size. If your mesh contains an ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82f1e162166c
unity_docs
scripting
What is `Search.PropertyDatabase.Dispose` in Unity? Explain its purpose and usage.
PropertyDatabase.Dispose Declaration public void Dispose (); Description Dispose of the resources used by this PropertyDatabase . You should try to always call dispose when you no longer need the PropertyDatabase . Even if it is recommended to keep the PropertyDatabase alive as much as possible and use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed8846138a4a
unity_docs
ui
What is `UIElements.MouseEventBase_1.pressedButtons` in Unity? Explain its purpose and usage.
MouseEventBase<T0>.pressedButtons public int pressedButtons ; Description A bitmask that describes the currently pressed buttons. Pressing a mouse button sets a bit; releasing the button clears it. The left mouse button sets/clears Bit 0. The right mouse button sets/clears Bit 1. The middle mouse button set...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c2e880cf3312
unity_docs
scripting
Explain 'Package Manager preferences reference' in Unity.
Use the Package Manager preferences to change the default cache location for the following packages: Packages installed from the Unity Registry Packages downloaded from the Asset Store To open the preferences, go to Edit > Preferences > Packag Manager (macOS: Unity > Settings > Package Manager ). Property Function Pack...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77627d7f054a
unity_docs
math
What is `Color.operator_Color` in Unity? Explain its purpose and usage.
Color.Vector4 Description Colors can be implicitly converted to and from Vector4 . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector4 newV4 = new Color(0.3f, 0.4f, 0.6f); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c4a7ac38d37
unity_docs
scripting
Show me a Unity C# example demonstrating `DeviceType.Handheld`.
DeviceType.Handheld Description A handheld device, like a mobile phone, a tablet, or a gaming handheld. ```csharp //Attach this script to a GameObject //This script checks what device type the Application is running on and outputs this to the consoleusing UnityEngine;public class DeviceTypeExample : MonoBehaviour {...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f624e7850d5e
unity_docs
rendering
What is `TextureFormat.RGBAHalf` in Unity? Explain its purpose and usage.
TextureFormat.RGBAHalf Description RGB color and alpha texture format, 16 bit floating point per channel. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_86a806969c87_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
/ ---------------------------------------------------------------------------------------/ IBlendTreeElement : END/ --------------------------------------------------------------------------------------- Signature: ```csharp protected struct NullElement : IBlendTreeElement ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7c8c55fa9bbe
unity_docs
ui
What is `UIElements.MeshWriteData.SetAllVertices` in Unity? Explain its purpose and usage.
MeshWriteData.SetAllVertices Declaration public void SetAllVertices (Vertex[] vertices ); Parameters Parameter Description vertices The array of vertices to copy from. The length of the array must match the allocated vertex count. Description Fills the values of the allocated vertices with values copied d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_89d67bc330c6
unity_docs
editor
Explain 'Analyze built assets' in Unity.
Included in every Unity Editor installation are the low-level command-line tools WebExtract and binary2text, which you can use to inspect the contents of built Unity data. Use these tools to extract files embedded within a Unity archive, such as AssetBundles, or build outputs. WebExtract : Extracts the files in a Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c052b395e04
unity_docs
rendering
What is `Rendering.GlobalKeyword` in Unity? Explain its purpose and usage.
GlobalKeyword struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents a global shader keyword. Shader keywords determine which shader variants Unity uses. You can use a GlobalKeyword to enable, disable, or check the state of a global shader keyword. For information on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0062aa20ac0
unity_docs
rendering
Give me an overview of the `ShaderMessage` class in Unity.
ShaderMessage struct in UnityEditor Description Contains information about messages generated by Unity's Shader Compiler. Properties Property Description file The source file where the shader message was found. line The line of code where the shader message was found. message The message returned by the Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0b1272f781b
unity_docs
editor
What are the parameters of `AssetDatabase.GetMainAssetTypeFromGUID` in Unity?
Returns Type Returns the type of the main asset object with guid . Description Obtains the type of the main object of a given asset. ```csharp using System.Collections.Generic; using UnityEngine; using UnityEditor;public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Print Type Count")] ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_60b11967c579
unity_docs
scripting
In Unity's 'Install Unity Accelerator with Docker Hub', what is 'Set up persistent storage' and how does it work?
To host Unity Accelerator’s configuration and cache, you must set up a persistent storage area. To set this up, use one or more of the following variables when running the container for the first time. The variables are only used if the startup doesn’t find a configuration file so it’s safe to run with them on successi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa08b28c694f
unity_docs
rendering
In Unity's 'USS common properties', what is 'All' and how does it work?
The all property resets all properties to their default value. This property doesn’t apply to the custom USS properties. ``` all: initial ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e88c3f6e42ab
unity_docs
scripting
What is `Search.PropertyDatabaseRecordKey.CompareTo` in Unity? Explain its purpose and usage.
PropertyDatabaseRecordKey.CompareTo Declaration public int CompareTo ( Search.PropertyDatabaseRecordKey other ); Parameters Parameter Description other A record key to compare against. Returns int An integer representing the equality result. -1 if the current key is smaller, 0 if it is equal and 1 if it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2970b954a45c
unity_docs
ui
What is `UIElements.Column` in Unity? Explain its purpose and usage.
Column class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: INotifyBindablePropertyChanged Description Represents a column in multi-column views such as multi-column list view or multi-column tree view. Provides the properties to define how user interacts with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e46647c7ba58
unity_docs
xr
Explain 'Run an XR application' in Unity.
Running an XR app developed in Unity works the same as running any type of app on a device. In most cases, you can use the Unity Build and Run function to both build and run an app on a connected device. Note: The method you use to install an already built app on a device varies by platform, and you should refer to the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e52ea0897b92
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.CustomSampler.End`.
CustomSampler.End Declaration public void End (); Description End profiling a piece of code with a custom label. This will show up in the Profiler hierarchy. ```csharp using UnityEngine; using UnityEngine.Profiling;public class ExampleClass : MonoBehaviour { CustomSampler sampler; void Start() { sampler = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5889bb29b1c_doc_25
github
scripting
What does `GetCellIndex` do in this Unity script? Explain its purpose and signature.
Gets the index to the GameObjectBrush::ref::BrushCell based on the position of the BrushCell.Position of the BrushCell. Signature: ```csharp public int GetCellIndex(Vector3Int brushPosition) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_c9682c7f0f28
unity_docs
scripting
Explain 'The Debug class' in Unity.
The Debug class allows you to visualize information in the Unity Editor that might help you understand or investigate what is going on in your project while it’s running. For example, you can use it to print messages into the Console window, draw visualization lines in the Scene view and Game view, and pause Play mode ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9c47675b5023
unity_docs
animation
In Unity's 'Mecanim FAQ', what is 'Layers' and how does it work?
Does the ordering of the layers matter? Yes. Layers are evaluated from top to bottom in order. Layers set to override will always override the previous layers (based on their mask, if they have a mask). Should the weight value of the base layer always be set to one or should the weight be zero when using another layer?...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_694646666cdd
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.ctor` in Unity? Explain its purpose and usage.
MultiColumnHeader Constructor Declaration public MultiColumnHeader ( IMGUI.Controls.MultiColumnHeaderState state ); Parameters Parameter Description state Column header state and Column state. Description Constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_795e6c2d3e55
unity_docs
rendering
Give me an overview of the `DefaultLightingExplorerExtension` class in Unity.
DefaultLightingExplorerExtension class in UnityEditor Implements interfaces: ILightingExplorerExtension Description Default definition for the Lighting Explorer. Can be overridden completely or partially. Constructors Constructor Description DefaultLightingExplorerExtension Constructor. Public Methods Metho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d975650df2d0
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.OnCollisionExit`.
mation about contact points, impact velocity etc. If you don't use collisionInfo in the function, leave out the collisionInfo parameter as this avoids unneccessary calculations. Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events will be sent to di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20adeb443b80
unity_docs
rendering
What is `ParticleSystem.Particle.GetCurrentColor` in Unity? Explain its purpose and usage.
ParticleSystem.Particle.GetCurrentColor Declaration public Color32 GetCurrentColor ( ParticleSystem system ); Parameters Parameter Description system The Particle System from which this particle was emitted. Returns Color32 Current color. Description Calculate the current color of the particle by...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_636ecb42b52a
unity_docs
scripting
What is `PlayerSettings.SetUseDefaultGraphicsAPIs` in Unity? Explain its purpose and usage.
PlayerSettings.SetUseDefaultGraphicsAPIs Declaration public static void SetUseDefaultGraphicsAPIs ( BuildTarget platform , bool automatic ); Parameters Parameter Description platform Platform to set the flag for. automatic Should best available graphics API be used? Description Should a build platform...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aba907ca057f
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_PVRTC_2Bpp_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_PVRTC_2Bpp_SRGB Description A four-component, PVRTC compressed format where each 64-bit compressed texel block encodes a 8×4 rectangle of unsigned normalized RGBA texel data with the first 32 bits encoding alp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f01162cd0e2
unity_docs
rendering
What is `Experimental.GlobalIllumination.Cookie.instanceID` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Cookie.instanceID public int instanceID ; Description The cookie texture's instance id projected by the light.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80ba800bc7ba
unity_docs
rendering
What are the parameters of `Texture2DArray.SetPixelData` in Unity?
Description Sets the raw data of an entire mipmap level directly in CPU memory. This method sets pixel data for the texture in CPU memory. Texture.isReadable must be true , and you must call Apply after SetPixelData to upload the changed pixels to the GPU. SetPixelData is useful if you want to load compressed or other ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_844f76f95419
unity_docs
scripting
What is `Video.VideoPlayer.isLooping` in Unity? Explain its purpose and usage.
VideoPlayer.isLooping public bool isLooping ; Description Determines whether the VideoPlayer restarts from the beginning when it reaches the end of the clip. If set to false , the VideoPlayer will stop playback at the end of the clip and will not reset the time to the start of the clip.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0468bb7a89b
unity_docs
editor
What are the parameters of `Build.IFilterBuildAssemblies.OnFilterAssemblies` in Unity?
Returns string[] Returns the filtered list of assemblies that are included in the build. Description Will be called after building script assemblies, but makes it possible to filter away unwanted scripts to be included. Each implementation will be called in the order sorted by callbackOrder. The result of each invocati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_09a241263e9b
unity_docs
scripting
In Unity's 'Visual query builder reference', what is 'Convert a textual query to a visual query' and how does it work?
If you have a saved textual search query, use the Search window to convert it to a visual query: Paste the textual query into the search field, or load it from your saved searches . Select Toggle Query Builder Mode . The visual query builder converts the textual query to a visual query.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70b6e348a928
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.AnimatorController`.
AnimatorController class in UnityEditor.Animations / Inherits from: RuntimeAnimatorController Description The Animator Controller controls animation through layers with state machines, controlled by parameters. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Animations; using System.Collection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7bd2f810421
unity_docs
rendering
What is `Texture.nonStreamingTextureMemory` in Unity? Explain its purpose and usage.
Texture.nonStreamingTextureMemory public static ulong nonStreamingTextureMemory ; Description The amount of memory Unity allocates for non-streaming Textures in the scene. This only includes instances of Texture2D and CubeMap Textures. This does not include any other Texture types, or 2D and CubeMap Textures tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6152eb224f66
github
scripting
Write a Unity Editor script for Gaussian Splat Asset Editor
```csharp // SPDX-License-Identifier: MIT using GaussianSplatting.Runtime; using Unity.Collections.LowLevel.Unsafe; using UnityEditor; using UnityEngine; namespace GaussianSplatting.Editor { [CustomEditor(typeof(GaussianSplatAsset))] [CanEditMultipleObjects] public class GaussianSplatAssetEditor : UnityEd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f3ea0a2466ba_doc_5
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Save any meta game data, such as "FirstBossKilled".Has similar usage to Unity's own "PlayerPrefs" Signature: ```csharp public void SetMetaGameData<T>(string name, T value) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_49cde0569ac2
unity_docs
audio
Show me a Unity C# example demonstrating `Audio.AudioMixer.GetFloat`.
dow, click on the Exposed Parameters button to show the list of exposed parameters. To rename or remove a parameter, right click the item in the list. If the parameter you want to expose isn't in the list, you need to expose the parameter. To expose a parameter, right click the parameter you want to expose in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_975084a7d88b
unity_docs
xr
Show me a Unity code example for 'Graphics tiers in the Built-In Render Pipeline'.
s tiers. Note: These tier shader variants work differently to regular shader variants. At runtime, when Unity loads a Shader object into CPU memory, it only loads the variants for the active tier; it does not load the variants for other tiers. This helps to reduce the runtime impact of tier variants. To generate tier s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_46ede4254318
unity_docs
editor
Explain 'Save your work' in Unity.
Unity categorizes most saved information into either scene changes or project-wide changes . To save all current scene and project-wide changes, go to File > Save (or Save as ). To save Project-wide changes, but not Scene changes, go to File > Save Project . Note : If you edit in prefab editing mode , saving through Fi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8a3b09042df
unity_docs
scripting
What is `ShortcutManagement.IShortcutManager.CreateProfile` in Unity? Explain its purpose and usage.
IShortcutManager.CreateProfile Declaration public void CreateProfile (string profileId ); Parameters Parameter Description profileId ID of created profile. Description Creates a new profile with the given profile ID. Throws ArgumentNullException if profileId is null . Throws ArgumentException if p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a8fb631dde7
unity_docs
ui
What is `GUIStyle.fixedHeight` in Unity? Explain its purpose and usage.
GUIStyle.fixedHeight public float fixedHeight ; Description If non-0, any GUI elements rendered with this style will have the height specified here. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints the value of fixedHeight. void OnGUI() { Debug.Log(GUI.skin.button.fixedHeight); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3d635b54bc7
unity_docs
scripting
What is `GameObjectUtility.GetUniqueNameForSibling` in Unity? Explain its purpose and usage.
GameObjectUtility.GetUniqueNameForSibling Declaration public static string GetUniqueNameForSibling ( Transform parent , string name ); Parameters Parameter Description parent Target parent for a new GameObject . Null means root level. name Requested name for a new GameObject . Returns string Unique...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df856bb420a9
unity_docs
scripting
What is `Progress.GetTimeDisplayMode` in Unity? Explain its purpose and usage.
Progress.GetTimeDisplayMode Declaration public static Progress.TimeDisplayMode GetTimeDisplayMode (int id ); Parameters Parameter Description id The progress indicator's unique ID. Returns TimeDisplayMode The progress indicator's time display mode. Description Get a progress indicator's time displa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9a3659d18eab
unity_docs
rendering
In Unity's 'Change or detect the active render pipeline', what is 'Activating URP, HDRP, or a custom render pipeline based on SRP' and how does it work?
To set the active render pipeline to one that is based on SRP, tell Unity which Render Pipeline Asset to use as the default active render pipeline, and optionally which Render Pipeline Assets to use for each quality level. To do this: In your Project folder, locate the Render Pipeline Asset(s) that you want to use. Set...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfa26de7c1fb
unity_docs
rendering
What is `TextureImporterSwizzle.OneMinusB` in Unity? Explain its purpose and usage.
TextureImporterSwizzle.OneMinusB Description Use the inverted blue color channel. Additional resources: TextureImporter.swizzleR , TextureImporter.swizzleG , TextureImporter.swizzleB , TextureImporter.swizzleA .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9530f508a766
unity_docs
physics
Explain 'Collider surfaces' in Unity.
In real-world physics, objects that can collide have different surface textures and properties that affect how they collide with each other, and how they interact with each other. To control how objects collide with each other in the physics simulation, you can adjust the friction and bounciness of your colliders . In ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b5e2ce8e610b
unity_docs
scripting
Show me a Unity code example for 'Create USS variables'.
You can create a USS variable and use it in other USS properties. When you update a USS variable, all of the USS properties that use that variable update. You can also specify default values for USS variables. ## Create and use USS variables To create a USS variable, prefix its name with a double-hyphen ( -- ). ``` -...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb7d5b082bf1
unity_docs
scripting
What is `VersionControl.Provider.DeleteChangeSetsIsValid` in Unity? Explain its purpose and usage.
Provider.DeleteChangeSetsIsValid Declaration public static bool DeleteChangeSetsIsValid ( VersionControl.ChangeSets changesets ); Parameters Parameter Description changesets Changesets to test. Description Tests if deleting the given changesets is a valid task to perform.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_973f96aad485
unity_docs
input
Show me a Unity code example for 'Troubleshooting common cross-platform issues'.
e platforms that rely on touchscreen input. The standard desktop keyboard input is only suitable for porting typed text to mobile devices. You can add a layer of abstraction to your input code if you are considering porting to other platforms in the future. For example, if you are making a driving game, then you might ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cf75f8a9cb25
unity_docs
input
In Unity's 'GameActivity requirements and compatibility', what is 'Unity and GameActivity library version compatibility' and how does it work?
The following table lists the recommended GameActivity library version for each Unity version. Unity version GameActivity library version 6000.0.22f1 and later 3.0.5 6000.0.0b16 - 6000.0.21f1 3.0.2 6000.0.0b14 - 6000.0.0b15 3.0.0 6000.0.0a1 - 6000.0.0b13 2.0.0
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d09661c10ef6
unity_docs
editor
Show me a Unity code example for 'Create a drag-and-drop UI to drag between Editor windows'.
indows Define the content of each Editor window in a UXML file with built-in visual elements . Each Editor window includes a background, a header, a drop area, and text. Style the visual elements in a USS file. Create a Unity project with any template. Create a folder named drag-and-drop-across-window to store all the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d70d597623e2
unity_docs
rendering
What is `RenderTextureDescriptor.depthStencilFormat` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.depthStencilFormat public Experimental.Rendering.GraphicsFormat depthStencilFormat ; Description The desired format of the depth/stencil buffer. A RenderTexture can use a different but compatible format if the format is not supported on this platform or graphics API. See Also: RenderT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6011f5be6f94
unity_docs
physics
What is `ContactFilter2D.maxNormalAngle` in Unity? Explain its purpose and usage.
ContactFilter2D.maxNormalAngle public float maxNormalAngle ; Description Sets the contact filter to filter the results to only include contacts with collision normal angles that are less than this angle. This is only used if useNormalAngle is true. If the maxNormalAngle is set to - Mathf.Infinity or Mathf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_873037f78b76
unity_docs
rendering
Explain 'Lightmap texture Import Settings window reference' in Unity.
The Directional Lightmap texture type formats the texture asset so it’s suitable to use as a directional Lightmap . Unity locks Texture Shape to 2D for this texture type. For more information, refer to Texture Shape . Property Description Non Power of 2 Specifies how Unity scales the dimension size if the texture sourc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_861e37f06f80
unity_docs
scripting
Show me a Unity C# example demonstrating `TextMesh.fontStyle`.
TextMesh.fontStyle public FontStyle fontStyle ; Description The font style to use (for dynamic fonts). If this is set to a value other then normal, the font style set in the font importer is overriden with a custom style. This is only supported for fonts set to use dynamic font rendering. Other fonts will al...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80c1da87a25e
unity_docs
rendering
In Unity's 'Use Animation curves', what is 'Curves, keys and keyframes' and how does it work?
An Animation Curve has multiple keys which are control points that the curve passes through. These are visualized in the Curve Editor as small diamond shapes on the curves. A frame in which one or more of the shown curves have a key is called a keyframe . The Curve Editor only shows curves for the selected properties. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_210bd0f0673d
unity_docs
scripting
Give me an overview of the `TrueTypeFontImporter` class in Unity.
TrueTypeFontImporter class in UnityEditor / Inherits from: AssetImporter Description AssetImporter for importing Fonts. Properties Property Description ascentCalculationMode Calculation mode for determining font's ascent. characterPadding Border pixels added to character images for padding. This is useful i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52aec50fd56f
unity_docs
math
What are the parameters of `AudioSource.GetSpectrumData` in Unity?
Description Provides the block of audio frequencies (spectrum data) of the AudioSource that is currently playing. This method fills the array you pass as the samples parameter with the spectrum data of the AudioSource. The frequency domain represents the frequencies and amplitude of an audio signal. Spectrum data provi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aafa321f77bc
unity_docs
rendering
What is `Search.SearchViewFlags.TableView` in Unity? Explain its purpose and usage.
SearchViewFlags.TableView Description The Search Picker window will open in table view. This can be useful if you want to use a search expression to display selected (that is using a select{} statement) values in a Search table. ```csharp [SearchContext("select{p:t:material, @label, @size}", "expression;asset", Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1e93798dc67
unity_docs
scripting
What is `AndroidJavaProxy.ctor` in Unity? Explain its purpose and usage.
AndroidJavaProxy Constructor Declaration public AndroidJavaProxy (string javaInterface ); Declaration public AndroidJavaProxy ( AndroidJavaClass javaInterface ); Parameters Parameter Description javaInterface Java interface to be implemented by the proxy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9782d8384506
unity_docs
rendering
What are the parameters of `AssetDatabase.AddObjectToAsset` in Unity?
Description Adds objectToAdd to an existing asset at path . Please note that you should only add objects to '.asset' assets, imported models or texture objects for example will lose their data. All paths are relative to the project folder. Note: You can not add GameObjects; use PrefabUtility instead. ```csharp using Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f24948a31ee1
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.ResizeVertical`.
MouseCursor.ResizeVertical Description Vertical resize arrows. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a small window that has a c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5533918d021
unity_docs
scripting
Show me a Unity C# example demonstrating `AssetBundle.LoadFromMemory`.
iled. Description Synchronously load an AssetBundle from a memory region. Use this method to load an AssetBundle from an array of bytes. This is useful when you have downloaded the data with encryption and need to load the AssetBundle from the decrypted bytes. Compared to LoadFromMemoryAsync , this version is syn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5085ad631a48
unity_docs
physics
What is `Rigidbody2D.SlideMovement.gravitySlipAngle` in Unity? Explain its purpose and usage.
Rigidbody2D.SlideMovement.gravitySlipAngle public float gravitySlipAngle ; Description When the gravity movement causes a contact with a Collider2D , slippage maybe occur if the surface angle is greater than this angle. Use this angle threshold to control whether slippage will occur on surface slopes above the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ce910dae327
unity_docs
editor
What is `SearchService.ProjectSearch` in Unity? Explain its purpose and usage.
ProjectSearch class in UnityEditor.SearchService Description Use this API to perform searches in the Project. Engines for this type of search implement the IProjectSearchEngine interface. Registered Project search engines are called during searches in the Project browser. When the default object selector is use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ad4f2744500c
unity_docs
ui
Show me a Unity code example for 'Relative and absolute positioning'.
placement. Create a Unity project with any template. Right-click in the Project window, then select Create > UI Toolkit > Editor Window . In the C# box of the UI Toolkit Editor Window Creator window, enter PositioningTestWindow . Clear the UXML and USS checkboxes. Select Confirm . This creates a C# file called Position...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d23e76e5b5a3
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.IsCopiable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.IsCopiable Declaration public bool IsCopiable (); Returns bool Returns true if the GraphElement is copiable. Returns false otherwise. Description Checks whether the GraphElement is copiable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_56711a71c0d3
unity_docs
input
In Unity's 'Mobile device input', what is 'Accelerometer' and how does it work?
As the mobile device moves, a built-in accelerometer reports linear acceleration changes along the three primary axes in three-dimensional space. Acceleration along each axis is reported directly by the hardware as G-force values. A value of 1.0 represents a load of about +1g along a given axis while a value of –1.0 re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_262ef549bdcc
unity_docs
rendering
In Unity's 'Lightmap Parameters Asset Inspector window reference', what is 'Baked GI' and how does it work?
These parameters configure lightmapping . See render pipeline feature comparison for more information about support for lightmapping across render pipelines. Property Function Anti-aliasing Samples Determines the number of sub-texel positions to use when sampling a lightmap texel. Set the value above 1 to use supersamp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84bddce160ee
unity_docs
rendering
Show me a Unity C# example demonstrating `ShaderKeywordFilter.RemoveIfAttribute`.
RemoveIfAttribute class in UnityEditor.ShaderKeywordFilter / Inherits from: ShaderKeywordFilter.FilterAttribute Description Remove the specified shader keywords from the build if the data field matches the condition. If the data field under RemoveIf matches the value of condition , Unity removes keywordName...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_276df08b5f21
unity_docs
scripting
What is `UIElements.PointerCaptureHelper.GetCapturingElement` in Unity? Explain its purpose and usage.
PointerCaptureHelper.GetCapturingElement Declaration public static UIElements.IEventHandler GetCapturingElement ( UIElements.IPanel panel , int pointerId ); Parameters Parameter Description panel The panel that holds the element. pointerId The captured pointer. Returns IEventHandler The element tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.