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_646de0ed4c68
unity_docs
input
What are the parameters of `LocationService.Start` in Unity?
Description Starts location service updates. After you call this function, you can access the device's last location coordinates by checking lastData in Input.location . Note : The location service doesn't start to send location data immediately. Therefore, check the current service status in Input.location . On Androi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d457edbfad9f
unity_docs
ui
What is `GUI.BeginScrollView` in Unity? Explain its purpose and usage.
GUI.BeginScrollView Declaration public static Vector2 BeginScrollView ( Rect position , Vector2 scrollPosition , Rect viewRect ); Declaration public static Vector2 BeginScrollView ( Rect position , Vector2 scrollPosition , Rect viewRect , bool alwaysShowHorizontal , bool alwaysShowVertical ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f8b65f5261a
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.Standalone` in Unity? Explain its purpose and usage.
Standalone enumeration Description Mirrors the Standalone enum. For more information about the attribute, see Android's documentation: Standalone attribute Properties Property Description Null Attribute is not set and will not appear in the element. Yes Mirrors standalone="yes". No Mirrors standalone="n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2975b523dba8
unity_docs
rendering
Show me a Unity code example for 'Example of Particle System GPU instancing in the Built-In Render Pipeline'.
Here is a complete working example of a Custom Shader using particle system GPU instancing. This custom shader adds a feature which the standard particle shader does not have - a fade between the individual frames of a texture sheet animation . ``` Shader "Instanced/ParticleMeshesCustom" { Properties { _MainTex("Alb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_207ef6833fe1
unity_docs
rendering
What is `PlayerSettings.Android.displayOptions` in Unity? Explain its purpose and usage.
PlayerSettings.Android.displayOptions public static AndroidDisplayOptions displayOptions ; Description Defines Android display settings that determine how your application renders on the Android devices at runtime. For example, you can use this property to control whether Unity automatically renders the came...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Event invoked when the asynchronous load is complete. Signature: ```csharp public event Action<T> OnAsyncLoadComplete; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2dd4e67d5e23
github
scripting
Write a Unity Editor script for Voxel World Generator Editor
```csharp /* * VoxelWorldGeneratorEditor.cs * Created by Arian - GameDevBox * YouTube Channel: https://www.youtube.com/@GameDevBox * * 🎮 Want more Unity tips, tools, and advanced systems? * 🧠 Learn from practical examples and well-explained logic. * 📦 Subscribe to GameDevBox for more game dev content!...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_9955c4636d1e
unity_docs
scripting
Give me an overview of the `WaitForSecondsRealtime` class in Unity.
WaitForSecondsRealtime class in UnityEngine / Inherits from: CustomYieldInstruction / Implemented in: UnityEngine.CoreModule Description Suspends the coroutine execution for the specified real (unscaled) time in seconds. WaitForSecondsRealtime can only be used with a yield statement in coroutines. To wai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_254696c268d4
unity_docs
rendering
Explain 'Velocity over Lifetime module reference' in Unity.
The Velocity over Lifetime module allows you to control the velocity of particles over their lifetime. ## 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 time . Property Function Lin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f9f59408778
unity_docs
input
What is `UIElements.IntegerField` in Unity? Explain its purpose and usage.
IntegerField class in UnityEngine.UIElements / Inherits from: UIElements.TextValueField_1 / Implemented in: UnityEngine.UIElementsModule Description Makes a text field for entering an integer. For more information, refer to UXML element LongField . Static Properties Property Description inputUssClassNa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b16091e96b8e
unity_docs
scripting
What are the parameters of `Object.Instantiate` in Unity?
Returns Object The instantiated clone. Description Clones the object original and returns the clone. This function makes a copy of an object in a similar way to the Duplicate command in the editor. If you are cloning a GameObject you can specify its position and rotation (these default to the original GameObject's posi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a40b816d1c12
unity_docs
scripting
What is `UIElements.HelpBoxMessageType` in Unity? Explain its purpose and usage.
HelpBoxMessageType enumeration Description User message types. Properties Property Description None Neutral message. Info Info message. Warning Warning message. Error Error message.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_60fa0f2fe83d
unity_docs
xr
In Unity's 'Set up an XR scene', what is 'Set up a scene for XR' and how does it work?
The basic steps to set up a scene for XR include: Create or open the scene in the Unity Editor. Add one of the XR Origin options to the scene with the GameObject > XR menu. You will see different options in the menu depending on which XR packages you have added to your project. Refer to XR Origin for a description of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b34547c3f437
unity_docs
xr
What is `PackageManager.Requests.PackRequest` in Unity? Explain its purpose and usage.
PackRequest class in UnityEditor.PackageManager.Requests / Inherits from: PackageManager.Requests.Request_1 Description Represents an asynchronous request to pack a package folder. The PackageManager Client class returns a PackRequest instance when you call the Client.Pack method. Use this object to dete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8c5c99809c4
unity_docs
rendering
Show me a Unity C# example demonstrating `GL.Color`.
Description Sets current vertex color. In OpenGL this matches glColor4f(c.r,c.g,c.b,c.a) ; on other graphics APIs the same functionality is emulated. In order for per-vertex colors to work reliably across different hardware, you have to use a shader that binds in the color channel. See BindChannels documentation. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ffb2703e1732
unity_docs
math
What is `TerrainData.GetHoles` in Unity? Explain its purpose and usage.
TerrainData.GetHoles Declaration public bool[,] GetHoles (int xBase , int yBase , int width , int height ); Parameters Parameter Description xBase First x index of Terrain holes samples to retrieve. yBase First y index of Terrain holes samples to retrieve. width Number of samples to retrieve along the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8dd3485dbe49
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingFlags` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingFlags enumeration Description Flags used by RayTracingAccelerationStructure.CullInstances . Properties Property Description None No flags are specified in RayTracingAccelerationStructure.CullInstances. EnableSphereCulling Causes RayTracingAccelerationStructure.CullInstances to perform...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36ba0ee63045
unity_docs
rendering
What is `ParticleSystem.MainModule.startRotationYMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startRotationYMultiplier public float startRotationYMultiplier ; Description The initial rotation multiplier of particles around the y-axis when the Particle System first spawns them.. Changing this property is more efficient than accessing the entire curve, if you only want to change...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3535789305b
unity_docs
rendering
What is `MaterialPropertyBlock.SetConstantBuffer` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.SetConstantBuffer Declaration public void SetConstantBuffer (string name , ComputeBuffer value , int offset , int size ); Declaration public void SetConstantBuffer (int nameID , ComputeBuffer value , int offset , int size ); Declaration public void SetConstantBuffer (string ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24714d6ed21d
unity_docs
editor
What is `PlatformIcon.kind` in Unity? Explain its purpose and usage.
PlatformIcon.kind public PlatformIconKind kind ; Description The PlatformIconKind is specific to the target platform. The icon kind defines various meta information about the icon slot such as the required layer count. Specific icon kinds can be found in platform extension namespaces.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee49232b1e67
unity_docs
performance
What is `Profiling.Profiler.logFile` in Unity? Explain its purpose and usage.
Profiler.logFile public static string logFile ; Description Specifies the file to use when writing profiling data. In addition to specifying a valid file path, you must set both Profiler.enabled and Profiler.enableBinaryLog to true in order to save profiling information. Specifying a new valid file path w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cca372d39115
unity_docs
editor
What is `VersionControl.Provider.GetAssetByPath` in Unity? Explain its purpose and usage.
Provider.GetAssetByPath Declaration public static VersionControl.Asset GetAssetByPath (string unityPath ); Parameters Parameter Description unityPath Path to asset. Description Returns the version control information about an asset. Can be used with " AssetList.Add" to add assets to a list for further ve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ab755b3ef1e4
unity_docs
rendering
In Unity's 'IL2CPP managed stack traces', what is 'IL2CPP stack trace information' and how does it work?
You can configure IL2CPP to include file and line number information in managed stack traces in one of the following ways: Through Player settings in the Editor: Edit > Project Settings > Player > Other Settings . Then, under the Configuration heading, set the IL2CPP Stacktrace Information property to the Method Name, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b49a5b981a57
unity_docs
xr
What is `Application.onBeforeRender` in Unity? Explain its purpose and usage.
Application.onBeforeRender Description An event that is invoked every frame, on all platforms, immediately before rendering. This callback runs as part of the frame loop on VR and non-VR platforms. It's commonly used for VR to sample input with minimal latency before rendering, but you can use it for any work that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d06b1693c38f
unity_docs
math
What is `Search.PropertyDatabaseType` in Unity? Explain its purpose and usage.
PropertyDatabaseType enumeration Description An enum representing the type of data stored in a record. Properties Property Description None Indicates that nothing is stored in the record. FixedString Indicates that a fixed length string is stored in the record. String Indicates that a string is stored in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfd6d9d5c69a
unity_docs
scripting
Show me a Unity C# example demonstrating `GUISettings.cursorFlashSpeed`.
GUISettings.cursorFlashSpeed public float cursorFlashSpeed ; Description The speed of text field cursor flashes. This is how many flashes / second. If you set it to 0, flashing will be disabled. If you set it to -1, the flashing speed will match the system default of the end user. ```csharp using UnityEngine;p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2146b848397f
unity_docs
scripting
What is `UIElements.IRuntimePanel` in Unity? Explain its purpose and usage.
IRuntimePanel interface in UnityEngine.UIElements Implements interfaces: IPanel Description Interface for classes implementing UI runtime panels. Properties Property Description panelSettings The UnityEngine.UIElements.PanelSettings asset associated with this panel. selectableGameObject A GameObject...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ca30109d9f4
unity_docs
scripting
What is `WWWForm` in Unity? Explain its purpose and usage.
WWWForm class in UnityEngine / Implemented in: UnityEngine.UnityWebRequestModule Description Helper class to generate form data to post to web servers using the UnityWebRequest or WWW classes. ```csharp using UnityEngine; using UnityEngine.Networking; using System.Collections;public class WWWFormImage : MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7840dff2cf82
unity_docs
rendering
What is `EditorGUIUtility.PingObject` in Unity? Explain its purpose and usage.
EditorGUIUtility.PingObject Declaration public static void PingObject ( Object obj ); Declaration public static void PingObject (int targetInstanceID ); Parameters Parameter Description obj The object to be pinged. Description Ping an object in the Scene like clicking it in an inspector. PingObject ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6fc7d2c8d01
unity_docs
input
What is `AI.NavMeshBuilder` in Unity? Explain its purpose and usage.
NavMeshBuilder class in UnityEngine.AI / Implemented in: UnityEngine.AIModule Description Navigation mesh builder interface. Static Methods Method Description BuildNavMeshData Builds a NavMesh data object from the provided input sources. Cancel Cancels an asynchronous update of the specified NavMesh data. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e68e5a35033
unity_docs
math
What is `GridBrushBase.Erase` in Unity? Explain its purpose and usage.
GridBrushBase.Erase Declaration public void Erase ( GridLayout gridLayout , GameObject brushTarget , Vector3Int position ); Parameters Parameter Description grid Grid used for layout. brushTarget Target of the erase operation. By default the currently selected GameObject. position The coordinates...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ce8f575523e9
unity_docs
rendering
In Unity's 'Troubleshooting Light Probes', what is 'Troubleshooting Light Probe placement' and how does it work?
Your choice of Light Probe positions must take into account that the lighting is interpolated between sets of Light Probes. Problems can arise if your Light Probes don’t adequately cover the changes in lighting across your Scene . The example below shows a night-time Scene with two bright street lamps on either side, a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f40e888d07c0
unity_docs
physics
In Unity's 'Wheel collider friction', what is 'Wheel friction curve properties' and how does it work?
The Wheel collider has two groups of properties for wheel friction: Forward Friction and Sideways Friction . Each group has the same four settings (refer to the Wheel collider component reference for detailed information on each property): Extremum Slip ( WheelFrictionCurve.extremumSlip ) Extremum Value ( WheelFriction...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4a9eb5606db
unity_docs
scripting
What is `Actions.EditorAction` in Unity? Explain its purpose and usage.
EditorAction class in UnityEditor.Actions Description An EditorAction is a temporary tool that can represent either an atomic action or an interactive utility. When started, an EditorAction temporarily overrides the currently active EditorTool and remains active until either cancelled or completed. The action c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eba5b117c44b
unity_docs
rendering
What is `Texture.imageContentsHash` in Unity? Explain its purpose and usage.
Texture.imageContentsHash public Hash128 imageContentsHash ; Description The hash value of the Texture. Note: The hash is an Editor-only property. The hash value is a 128-bit number computed in such a way that even slightly different Textures have different hash values. The principal use of the hash in this c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_350c02d904cf
unity_docs
rendering
What is `WebCamKind` in Unity? Explain its purpose and usage.
WebCamKind enumeration Description Enum representing the different types of web camera device. On iOS devices, the WebCamDevice.kind is reported directly by the hardware. On Android devices, the hardware does not report this value, so Unity determines the WebCamDevice.kind by calculating the Equivalent Focal ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9c2d3ee575e
unity_docs
physics
Explain 'Tilemap component reference' in Unity.
The Tilemap component stores and manages Tile Assets for creating 2D levels. It transfers the required information from the tiles placed on it to other related components such as the Tilemap Renderer and the Tilemap Collider 2D . The 2D Tilemap Editor package is automatically installed when you create a project with th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0509c04544df
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.Search`.
ed. provider The search provider that initiated the search. maxScore Maximum match score of any matched Search Result. See SearchResult.score . patternMatchLimit Maximum number of matched Search Results that can be returned. See SearchResult . Returns IEnumerable<SearchResult> Returns a collection of Search...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44f5c30b5ee3
unity_docs
editor
What is `Device.SystemInfo.maxComputeBufferInputsCompute` in Unity? Explain its purpose and usage.
SystemInfo.maxComputeBufferInputsCompute public static int maxComputeBufferInputsCompute ; Description This has the same functionality as SystemInfo.maxComputeBufferInputsCompute 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_87942d63b11b
unity_docs
rendering
What is `MaterialEditor.BeginProperty` in Unity? Explain its purpose and usage.
MaterialEditor.BeginProperty Declaration public static void BeginProperty ( MaterialProperty property ); Declaration public static void BeginProperty ( Rect rect , MaterialProperty property ); Declaration public static void BeginProperty ( SerializedProperty property ); Declaration public static ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e00091e093f
unity_docs
rendering
In Unity's 'GPU texture formats reference', what is 'Texture formats, by quality' and how does it work?
The table below shows each format available in Unity, and their quality details. Texture format Description Channels Quality Bits per pixel Size of 1024x1024 texture, in MB Alpha 8 Uncompressed single channel (A) A High 8 1 R 8 Uncompressed single channel (R) R High 8 1 R 16 bit Uncompressed single channel (R), very hi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f997629d60ef
unity_docs
input
In Unity's 'Shortcuts Manager', what is 'The key map' and how does it work?
This section explains how to use the key map to view shortcut assignments. For information on using the key map to add, remove, and modify shortcuts, see Managing shortcuts . The key map shows you which keys and key combinations are assigned to commands. Item Description Pink keys are assigned to global commands. Blue ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_affd2db8f2ee
unity_docs
physics
Show me a Unity C# example demonstrating `Undo.postprocessModifications`.
Undo.postprocessModifications public static Undo.PostprocessModifications postprocessModifications ; Description Callback that is triggered whenever a new set of property modifications is created. Additional resources: PostprocessModifications . ```csharp using UnityEditor; using UnityEngine;public class Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c40fe1bc9ef4
unity_docs
editor
What is `EditorGUI.BoundsIntField` in Unity? Explain its purpose and usage.
EditorGUI.BoundsIntField Declaration public static BoundsInt BoundsIntField ( Rect position , BoundsInt value ); Declaration public static BoundsInt BoundsIntField ( Rect position , string label , BoundsInt value ); Declaration public static BoundsInt BoundsIntField ( Rect position , GUIC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82a6ee1eb7cc
unity_docs
physics
Give me an overview of the `PhysicsMaterialCombine` class in Unity.
PhysicsMaterialCombine enumeration Description Describes how physics materials of the colliding objects are combined. The friction force as well as the residual bounce impulse are applied symmetrically to both of the colliders in contact, so each pair of overlapping colliders must have a single set of friction and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cfd0c7e6a08b
unity_docs
ui
Explain 'AudioGroup Inspector' in Unity.
Selecting an AudioGroup in the AudioGroup Hierarchy, the AudioGroup View or the Project window (as a sub-asset) will show the inspector for that AudioGroup. The inspector for the AudioGroup consists of a number of elements: ## Inspector Header At the top of the AudioGroup Inspector there is the name of the AudioGroup...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9bdb1190f79
unity_docs
physics
In Unity's 'Physics Debug window reference', what is 'Info' and how does it work?
The Info tab contains data about any selected Rigidbody or ArticulationBody GameObjects. You can use this data to monitor the physics body’s behavior. You cannot edit the property values in this tab. You can modify them via script, but it is not recommended; in most cases, you should apply forces via the physics system...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2316558dca0
unity_docs
editor
What is `AssetDatabase.LoadAssetByGUID` in Unity? Explain its purpose and usage.
AssetDatabase.LoadAssetByGUID Declaration public static Object LoadAssetByGUID (GUID assetGUID , Type type ); Parameters Parameter Description assetGUID GUID of the object. type Data type of the asset. Returns Object The asset matching the parameters. Description Loads an asset object of type typ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82834bb80f10
unity_docs
scripting
Show me a Unity C# example demonstrating `Gizmos.DrawWireSphere`.
Gizmos.DrawWireSphere Declaration public static void DrawWireSphere ( Vector3 center , float radius ); Description Draws a wireframe sphere with center and radius . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public float explosionRadius = 5.0f; void ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_41b4df9f54d1
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.Destroy`.
already destroyed before the scheduled time, no error is thrown when the timer expires. Unity’s internal system tracks the object's state and won't attempt to destroy it again. The delay parameter t is affected by Time.timeScale . If Time.timeScale is set to 0 (for example, if the game is paused), the destruction ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_cb8d87b7334d
github
scripting
Write a Unity C# script called Component Data Author Collection Extensions
```csharp using System.Collections.Generic; using Unity.Entities; using UnityEngine; using System; using Object = UnityEngine.Object; namespace HybridEZS { [Serializable] public static class ComponentDataAuthorCollectionExtensions { public static void InsertComponentDatasIntoEntity(this List<ComponentDataAuthor>...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_7059387dd9e0
unity_docs
physics
What is `Rigidbody2D.GetPointVelocity` in Unity? Explain its purpose and usage.
Rigidbody2D.GetPointVelocity Declaration public Vector2 GetPointVelocity ( Vector2 point ); Parameters Parameter Description point The global space point to calculate velocity for. Description The velocity of the rigidbody at the point Point in global space. GetPointVelocity will take the angularVelo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a847c54195cc
unity_docs
xr
In Unity's 'XR Interaction Toolkit', 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.xr.interaction.toolkit@3.5 compatible 3.5.0-pre.1, 3.5.0-pre.2 com.unity.xr.interaction.toolkit@3.4 released 3.4.0-pre.1, 3.4.0-pre.2, 3.4.0, 3.4.1 com.unity.xr.interaction.toolkit@3.3 released 3.3....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fc657af9129
unity_docs
scripting
What is `TransformUtils.GetConstrainProportions` in Unity? Explain its purpose and usage.
TransformUtils.GetConstrainProportions Declaration public static bool GetConstrainProportions ( Transform transform ); Declaration public static bool GetConstrainProportions (Transform[] transforms ); Parameters Parameter Description transform Transform to check Constrain Proportions value for. transf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b8342d009d5
unity_docs
scripting
What is `UIElements.FontDefinition.FromFont` in Unity? Explain its purpose and usage.
FontDefinition.FromFont Declaration public static UIElements.FontDefinition FromFont ( Font f ); Parameters Parameter Description f The font to use to display text. Returns FontDefinition A new FontDefinition object. Description Create a FontDefinition from Font .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef5a4dc0ec80
unity_docs
rendering
What is `Shader.SetGlobalColor` in Unity? Explain its purpose and usage.
Shader.SetGlobalColor Declaration public static void SetGlobalColor (string name , Color value ); Declaration public static void SetGlobalColor (int nameID , Color value ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_553e87f57fd4
unity_docs
editor
In Unity's 'Integrated development environment (IDE) support', what is 'Visual Studio configuration for debugging' and how does it work?
In addition to your installation of Visual Studio, the full IDE experience including debugging Unity C# code requires: For your Visual Studio IDE: Visual Studio Tools for Unity For your Unity Editor: Unity Visual Studio Editor package (Included in a Unity Editor installation as part of the Engineering feature set ) Vis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_892345fba890
unity_docs
rendering
What is `ParticleSystem.IsAlive` in Unity? Explain its purpose and usage.
ParticleSystem.IsAlive Declaration public bool IsAlive (); Declaration public bool IsAlive (bool withChildren = true); Parameters Parameter Description withChildren Check all child Particle Systems as well. Returns bool True if the Particle System contains live particles or is still creating new pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6476cc164823
unity_docs
physics
In Unity's 'Configurable Joint component reference', what is 'Properties' and how does it work?
Property Description Edit Angular Limits Adds a visual gizmo to the Scene view that helps you edit joint angular limits. To use this gizmo, set the Angular X, Y, Z Motion to Limited and then handles appear for you to drag and adjust the joint’s rotational space. Connected Body The Rigidbody object which the joint conne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e0e27fc03126
unity_docs
rendering
In Unity's 'Position an overlay', what is 'Move overlays' and how does it work?
Put overlays anywhere in the Scene view. To move an overlay in the Scene view: Click and hold the handle ( = ) of the overlay you want to move. Drag the overlay to move it. Note: Overlays that float in the Scene view can overlap each other. Select an overlay to bring it to the front.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec2ef23950c3
unity_docs
audio
Give me an overview of the `iOSBackgroundMode` class in Unity.
iOSBackgroundMode enumeration Description Background modes supported by the application corresponding to project settings in Xcode. For more information, refer to the BackgroundFetch GitHub project . Properties Property Description None No background modes supported. AudioAirplayPiP Audio, AirPlay and Pictur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c58eda8deabc
unity_docs
input
Show me a Unity C# example demonstrating `Touch.phase`.
phase of the touch. The touch phase refers to the action the finger has taken on the most recent frame update. Since a touch is tracked over its "lifetime" by the device, the start and end of a touch and movements in between can be reported on the frames they occur. The phase property can be used as the basis of a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_145faeaab8d1
unity_docs
networking
Show me a Unity code example for 'Create callbacks between Unity C#, JavaScript, and C/C++/C# code'.
JavaScript browser, JavaScript plug-in , and C/C++/C# plug-ins. You might want to call functions from your C/C++/C# or JavaScript code in your Unity C# code, and callbacks are an effective way to do this. ## Use the makeDynCall function to make callbacks Use makeDynCall to call C, C++, or C# callbacks from JavaScript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f792ae12950b
unity_docs
scripting
What is `ReflectionProbe.boxProjection` in Unity? Explain its purpose and usage.
ReflectionProbe.boxProjection public bool boxProjection ; Description Should this reflection probe use box projection? Box projection is affected by the center and the size of the probe. Additional resources: ReflectionProbe.center , Additional resources: ReflectionProbe.size .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c96089b0dcb
unity_docs
rendering
What is `Rendering.SphericalHarmonicsL2.AddAmbientLight` in Unity? Explain its purpose and usage.
SphericalHarmonicsL2.AddAmbientLight Declaration public void AddAmbientLight ( Color color ); Description Add an ambient light to the spherical harmonics. If the spherical harmonics represent a light probe, this function adds an ambient light into the light probe data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_072570b67ab3
github
scripting
Write a Unity C# script called Material Extensions
```csharp using UnityEngine; namespace Unity.MaterialPropertyProvider { public static class MaterialExtensions { /// <summary> /// Notifies MaterialPropertyProviders of a change in source Material. /// </summary> /// <param name="material"></param> public static void Has...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_68a4c2a3579d
unity_docs
scripting
Explain 'Adding profiler markers to your code' in Unity.
Add profiler markers to your code to view the samples that ProfilerMarker.Begin , ProfilerMarker.End , or ProfilerMarker.Auto generates in the Timeline View and Hierarchy View of the CPU Usage module in the Profiler window : ## Marking up your code To use the ProfilerMarker API , place the code you want to profile be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3eecc32b1c07
unity_docs
scripting
What is `Video.VideoTimeReference.InternalTime` in Unity? Explain its purpose and usage.
VideoTimeReference.InternalTime Description The internal reference clock the VideoPlayer observes to detect and correct drift. The VideoPlayer relies on its own internal clock to manage the timing and playback of the video. Unity uses Time.realtimeSinceStartup as a point of reference to detect and correct any d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d8cf13cdc20
unity_docs
scripting
What is `ParticleSystem.ExternalForcesModule.SetInfluence` in Unity? Explain its purpose and usage.
ParticleSystem.ExternalForcesModule.SetInfluence Declaration public void SetInfluence (int index , ParticleSystemForceField field ); Parameters Parameter Description index Index to assign the Force Field. field Force Field that to assign. Description Assigns the Force Field at the given index in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a0231806b3c
unity_docs
editor
What is `Profiling.IProfilerFrameTimeViewSampleSelectionController` in Unity? Explain its purpose and usage.
IProfilerFrameTimeViewSampleSelectionController interface in UnityEditor.Profiling Description This Interface defines an IProfilerFrameTimeViewSampleSelectionController object that you can use to control the selection in Profiler modules that display timing information of Profiler samples, such as the CPU Usa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c14580d35b0
unity_docs
scripting
What is `Search.SearchItem.GetDescription` in Unity? Explain its purpose and usage.
SearchItem.GetDescription Declaration public string GetDescription ( Search.SearchContext context , bool stripHTML ); Parameters Parameter Description context Any search context for the item search provider. stripHTML True if any HTML tags should be dropped (if the control does not support HTML). Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f10dc8cedd2
unity_docs
scripting
What is `MPE.ProcessService.HasCapability` in Unity? Explain its purpose and usage.
ProcessService.HasCapability Declaration public static bool HasCapability (string capName ); Parameters Parameter Description capName The capability name. Returns bool True if the process has the capability. False otherwise. Description Checks whether the current process has a given capability.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8637687de721
unity_docs
ui
Explain 'Introduction to UXML' in Unity.
The UXML format is inspired by HTML , XAML , and XML . If you’ve worked with these formats before, you’ll find similarities in UXML. However, the UXML format includes small differences to provide an efficient way to work with Unity. This page introduces the format of UXML by an example. The following is an example UXML...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b7a890664bd
unity_docs
rendering
What is `RenderTextureDescriptor.volumeDepth` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.volumeDepth public int volumeDepth ; Description Volume extent of a 3D render texture. For volumetric render textures (see dimension ), this variable determines the volume extent. Ignored for non-3D textures. The valid range for 3D textures is 1 to 2000.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02084bd68255
unity_docs
scripting
What are the parameters of `SceneManagement.SceneManager.MoveGameObjectToScene` in Unity?
Description Move a GameObject from its current Scene to a new Scene. You can only move root GameObjects from one Scene to another. This means the GameObject to move must not be a child of any other GameObject in its Scene. This only works on GameObjects being moved to a Scene that is already loaded (additive). If you w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e00bb3c1b696
unity_docs
scripting
What is `UIElements.ObjectField` in Unity? Explain its purpose and usage.
ObjectField class in UnityEditor.UIElements / Inherits from: UIElements.BaseField_1 Description Makes a field to receive any object type. For more information, refer to UXML element ObjectField . Static Properties Property Description inputUssClassName USS class name of input elements in elements of th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ee4cfd6f8d14
unity_docs
scripting
Explain 'Supporting presets for custom types' in Unity.
Use the ObjectFactory class in your Editor scripts to create new GameObjects , components, and assets that support and inherit presets by default. The ObjectFactory class automatically applies default presets to these items. To support and enable presets by default for your custom classes, they must inherit from one of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_32
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive nine or more arguments as part of its initialization process,with the twelfth one being an object of type . Type of the twelfth argument. Signature: ```csharp public interface INinthArgument<TNinthArgument> ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_bd97c669b727
unity_docs
animation
What is `Animation.localBounds` in Unity? Explain its purpose and usage.
Animation.localBounds public Bounds localBounds ; Description AABB of this Animation animation component in local space. By default it is computed based on animation states (i.e. attached animation clips), unless user overrides it by setting value to localBounds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_633fa464dcae
unity_docs
input
What is `MouseCursor.CustomCursor` in Unity? Explain its purpose and usage.
MouseCursor.CustomCursor Description The current user defined cursor. Many custom cursors are available on the internet. Additional resources: Cursor.SetCustomCursor . ``` no example available in C# ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bcb9d55091f
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.LightsModule.maxLights`.
ParticleSystem.LightsModule.maxLights public int maxLights ; Description Set a limit on how many Lights this Module can create. This value is useful for avoiding bad performance. It is very easy to create a high number of Lights, which negatively effects performance. Capping the number of Lights helps to maint...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e88f44b03c7d
unity_docs
scripting
What is `RenderingLayerMask.GetMask` in Unity? Explain its purpose and usage.
RenderingLayerMask.GetMask Declaration public static uint GetMask (params string[] renderingLayerNames ); Parameters Parameter Description renderingLayerNames List of layer names to convert to a rendering layer mask. Returns uint The rendering layer mask created from the renderingLayerNames . Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35a0d4f135db
unity_docs
input
What is `UnityLinker.UnityLinkerBuildPipelineData.ctor` in Unity? Explain its purpose and usage.
UnityLinkerBuildPipelineData Constructor Declaration public UnityLinkerBuildPipelineData ( BuildTarget target , string inputDirectory ); Description Creates a new instance of an UnityLinkerBuildPipelineData.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42d255d97e3d
unity_docs
physics
What is `Rigidbody2D.GetRelativePoint` in Unity? Explain its purpose and usage.
Rigidbody2D.GetRelativePoint Declaration public Vector2 GetRelativePoint ( Vector2 relativePoint ); Parameters Parameter Description relativePoint The local space point to transform into global space. Description Get a global space point given the point relativePoint in rigidBody local space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_788f0e7a78d7
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.RotationBySpeedModule.x`.
ParticleSystem.RotationBySpeedModule.x public ParticleSystem.MinMaxCurve x ; Description Rotation by speed curve for the x-axis. 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_sr_9ae52a648385
unity_docs
xr
What is `ObjectChangeEventStream.GetChangeChildrenOrderEvent` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.GetChangeChildrenOrderEvent Declaration public void GetChangeChildrenOrderEvent (int eventIdx , out ChangeChildrenOrderEventArgs data ); Parameters Parameter Description eventIdx The index of the event to get the data for. data The data associated with the event. Description Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d21d0d4e882
unity_docs
animation
In Unity's 'Create presets to save and reuse settings', what is 'Apply settings from a preset' and how does it work?
There are two ways to apply a preset: Via the Select Preset window. For component presets, you can drag a preset from the Project window onto a GameObject that contains the component type. Note: Applying a preset copies properties from the preset to the item. It doesn’t link the preset to the item. Changes you make to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4444ccda5e2f
unity_docs
scripting
Show me a Unity C# example demonstrating `WaitForSecondsRealtime.waitTime`.
WaitForSecondsRealtime.waitTime public float waitTime ; Description The given amount of seconds that the yield instruction will wait for. ```csharp using System.Collections; using UnityEngine;public class WaitForSecondsRealtimeExample : MonoBehaviour { public float waitTime = 3; WaitForSecondsRealtime waitForS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b18b61ae09a
unity_docs
scripting
What is `Vector4.Scale` in Unity? Explain its purpose and usage.
Vector4.Scale Declaration public static Vector4 Scale ( Vector4 a , Vector4 b ); Description Multiplies two vectors component-wise. Every component in the result is a component of a multiplied by the same component of b . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3bf7dd873cc
unity_docs
editor
What is `DataModeChangeEventArgs` in Unity? Explain its purpose and usage.
DataModeChangeEventArgs struct in UnityEditor Description Container for the different parameters of the IDataModeController.dataModeChanged event. Properties Property Description changedThroughUI Whether the change was initiated by the DataMode switcher UI at the top-right of the EditorWindow. nextDataMode ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01e525797eb4
unity_docs
math
What is `Color.operator_Vector4` in Unity? Explain its purpose and usage.
Color.Color Description Colors can be implicitly converted to and from Vector4 . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color newColor = new Vector4(0.3f, 0.4f, 0.6f); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f777a8fad240_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stateless-style minimap renderer over deterministic grid data.Coordinate convention: y-up simulation indexing and y-up texture addressing (row-major index = x + y * width). Signature: ```csharp public sealed class GridMinimapRenderer ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_66a63cebac85
unity_docs
input
What is `UIElements.Toggle.inputUssClassName` in Unity? Explain its purpose and usage.
Toggle.inputUssClassName public static string inputUssClassName ; Description USS class name of input elements in Toggle elements. Unity adds this USS class to the input sub-element of the Toggle . The input sub-element provides responses to the manipulator.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e968b7ac12ce
unity_docs
performance
What is `Rendering.BatchFilterSettings.allDepthSorted` in Unity? Explain its purpose and usage.
BatchFilterSettings.allDepthSorted public bool allDepthSorted ; Description Indicates whether all draw commands in the current draw range have the BatchDrawCommandFlags.HasSortingPosition flag set. Set this to true if all the draw commands have the flag set, and false otherwise. As an optimization, Unity ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3ea2c762f20
unity_docs
input
What is `Event.GetTypeForControl` in Unity? Explain its purpose and usage.
Event.GetTypeForControl Declaration public EventType GetTypeForControl (int controlID ); Parameters Parameter Description controlID The ID of the control you are querying from. Description Get a filtered event type for a given control ID. This function is used to implement mouse locking and keyboard foc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77ce05978a8e
unity_docs
scripting
What is `WSA.Toast.arguments` in Unity? Explain its purpose and usage.
Toast.arguments public string arguments ; Description Arguments to be passed for application when toast notification is activated. Passed arguments can be accessed via Application.arguments . Note, that arguments are only supported in XAML builds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_012cd51984f1
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.TimestampToNanosecondsConversionRatio`.
ProfilerUnsafeUtility.TimestampToNanosecondsConversionRatio public static Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.TimestampConversionRatio TimestampToNanosecondsConversionRatio ; Description Gets conversion ratio from Profiler timestamp to nanoseconds. Use to convert profiler timestamp value obt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe256d2475a2
unity_docs
animation
What is `HeadDof.LastHeadDof` in Unity? Explain its purpose and usage.
HeadDof.LastHeadDof Description The last value of the HeadDof enum. This value can be used in for loops. ```csharp using UnityEngine;using UnityEngine.Animations;public class ExampleClass : MonoBehaviour { void Start() { for (int i = 0; i < (int)HeadDof.LastHeadDof; ++i) { var handle = new MuscleHandle((H...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d540b50c7c31
unity_docs
scripting
Explain 'Inspector-configurable custom events' in Unity.
Unity provides the UnityEvent API as a Unity-specific alternative to standard C# events and delegates . The main advantage of Unity events over standard C# events is that Unity events are serializable, meaning you can configure them in the Inspector window . A UnityEvent can be added to any MonoBehaviour and is execute...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcf12d9c8bf2
unity_docs
scripting
What is `iOS.Xcode.PBXProject.AddLocaleVariantFile` in Unity? Explain its purpose and usage.
PBXProject.AddLocaleVariantFile Declaration public void AddLocaleVariantFile (string groupName , string code , string path ); Parameters Parameter Description groupName The name of the variant group where the Locale will be added. code The identifier of the provided Locale. path The path of the directo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.