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_139764e1968a
unity_docs
scripting
What are the parameters of `ParticleSystem.Pause` in Unity?
Description Pauses the system so no new particles are emitted and the existing particles are not updated. Additional resources: Play , Stop functions. The following example creates a GUI window for manipulating a Particle System. ```csharp using UnityEngine;public class ParticleSystemControllerWindow : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_962d088a6d99
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.SetCurrentGroupName`.
Undo.SetCurrentGroupName Declaration public static void SetCurrentGroupName (string name ); Parameters Parameter Description name New name of the current undo group. Description Set the name of the current undo group. Setting a name manually will override an implicitly generated name for the group. Additi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb62233fe0d0
unity_docs
editor
What is `FileUtil.ReplaceFile` in Unity? Explain its purpose and usage.
FileUtil.ReplaceFile Declaration public static void ReplaceFile (string src , string dst ); Description Replaces a file. Replaces the file located at dst with the file located at src . if dst doesnt exists it just copies the file. If dst exists then it deletes it and copies the file at src to dst A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3e4966f4dabe
unity_docs
rendering
In Unity's 'Customize how shaders contribute lightmap data in the Built-In Render Pipeline', what is 'Meta Pass technical information' and how does it work?
Enlighten Realtime Global Illumination and lightmapping use Unity’s Meta Pass to extract albedo values from surfaces and handle diffuse transport themselves by using surface albedo on each bounce. Metallic surfaces with a black (or almost black) albedo bounce very little light diffusely. Because the lightmappers handle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_03c5770b817b
unity_docs
networking
In Unity's 'Ads Mediation', what is 'Description' and how does it work?
After you’ve installed the Ads Mediation package, create a LevelPlay account and complete your app’s ad format integrations if you haven’t done so already. Here are the next steps: https://developers.is.com/ironsource-mobile/unity/levelplay-starter-kit/ IMPORTANT UPGRADE NOTES: Before updating from Ads Mediation <9.0.0...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_206277e81c71
unity_docs
math
What is `Mathf.MoveTowardsAngle` in Unity? Explain its purpose and usage.
Mathf.MoveTowardsAngle Declaration public static float MoveTowardsAngle (float current , float target , float maxDelta ); Description Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees. Variables current and target are assumed to be in degrees. For op...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3eef2794098a
unity_docs
input
What are the parameters of `GUILayout.Label` in Unity?
Description Make an auto-layout label. Labels have no user interaction, do not catch mouse clicks and are always rendered in normal style. If you want to make a control that responds visually to user input, use a Box control Label in the Game View. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94898a459a28
unity_docs
editor
What is `Device.SystemInfo.processorCount` in Unity? Explain its purpose and usage.
SystemInfo.processorCount public static int processorCount ; Description This has the same functionality as SystemInfo.processorCount 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_2d06bd13a3fd
unity_docs
scripting
What is `UIElements.IPointerEvent.commandKey` in Unity? Explain its purpose and usage.
IPointerEvent.commandKey public bool commandKey ; Description Gets a boolean value that indicates whether the Windows/Cmd key is pressed. True means the Windows/Cmd key is pressed. False means it isn't.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40c3701e6f16
unity_docs
scripting
Show me a Unity C# example demonstrating `ArticulationBody.PublishTransform`.
ArticulationBody.PublishTransform Declaration public void PublishTransform (); Description Reads the position and rotation of the Articulation Body from the physics system and applies it to the corresponding Transform component. Note: This method doesn't update the child Transforms. It should be called from ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a304ed0ac52
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.GetCopyFilesBuildPhaseByTarget`.
on content. 16 for embedding watch content. Returns string Returns the GUID of the matching phase or null if it does not exist. Description Returns the GUID of matching copy files build phase for the given target. The parameters of existing copy files build phase are matched to the arguments of this function ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c517d2d1cbf1
unity_docs
editor
What is `Build.Content.ObjectIdentifier` in Unity? Explain its purpose and usage.
ObjectIdentifier struct in UnityEditor.Build.Content Description Struct that identifies a specific object project wide. Note: this struct and its members exist to provide low-level support for the Scriptable Build Pipeline package. This is intended for internal use only; use the Scriptable Build Pipeline packa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e99c4f6b2f74
unity_docs
rendering
What is `UIElements.DynamicAtlasSettings` in Unity? Explain its purpose and usage.
DynamicAtlasSettings class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Contains the settings used by the dynamic atlas system. Static Properties Property Description defaultFilters Default filters for a dynamic atlas. defaults Specifies default values used t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d42e1690e27d
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioClip.GetData`.
reamed audio clips, including if you stream clips from the disk or use AudioClip.Create and set its stream parameter to true . If GetData can't read the audio clip, the data parameter will contain zeroes for all sample values, the console will log an error, and GetData will return false. For the best perfor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc549e0839fb
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.GlobalKeyword.Create`.
o represent the global shader keyword with the given name. If a global shader keyword with the given name does not yet exist in Unity's internal list of global shader keywords, Unity adds a global shader keyword with the given name to the list. The following example creates a GlobalKeyword struct with the name EXAMP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a256f047a504
unity_docs
rendering
Show me a Unity C# example demonstrating `Material.SetColor`.
Here are examples of the color properties in Unity pre-built shaders: _Color : the main color of a material (URP: _BaseColor ). You can access this shader property via the color property. _EmissionColor : the emissive color of a material. For more information on defining properties, refer to Properties in Shade...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c26d1747734f
unity_docs
scripting
What is `AI.OffMeshLinkData` in Unity? Explain its purpose and usage.
OffMeshLinkData struct in UnityEngine.AI / Implemented in: UnityEngine.AIModule Description State of OffMeshLink. Additional resources: NavMeshAgent.currentOffMeshLinkData , NavMeshAgent.nextOffMeshLinkData . Properties Property Description activated Is link active (Read Only). endPos Link end world posi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6ab960ad0e93
github
scripting
Write a Unity C# physics script for Nvblox Mesh Editor
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using Unity.Robotics.ROSTCPConnector; using RosMessageTypes.Nvblox; using System; using Unity.Robotics.ROSTCPConnector.ROSGeometry; #if UNITY_EDITOR using UnityEditor; [CustomEditor(typeof(NvbloxMesh))] public class NvbloxMeshE...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_c8a3b4a92a54
unity_docs
scripting
What is `ITerrainLayerCustomUI.OnTerrainLayerGUI` in Unity? Explain its purpose and usage.
ITerrainLayerCustomUI.OnTerrainLayerGUI Declaration public bool OnTerrainLayerGUI ( TerrainLayer terrainLayer , Terrain terrain ); Parameters Parameter Description terrainLayer The TerrainLayer object. terrain The Terrain object on which the TerrainLayer object, specified by the terrainLayer parameter,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c24c6a62ed1f
unity_docs
math
What are the parameters of `Mesh.GetVertexAttributes` in Unity?
Returns int The number of vertex attributes returned in the attributes container. Description Get information about vertex attributes of a Mesh, without memory allocations. Use these overloads of the GetVertexAttributes function to avoid having to allocate a new array each time the function is called. The List variant ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_967a6307b5d9_doc_11
github
scripting
What does `StartUp` do in this Unity script? Explain its purpose and signature.
StartUp is called on the first frame of the running Scene.Position of the Tile on the Tilemap.The Tilemap the tile is present on.The GameObject instantiated for the Tile.Whether StartUp was successful Signature: ```csharp public override bool StartUp(Vector3Int position, ITilemap tilemap, GameObject go) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e208f3464d35
unity_docs
rendering
What is `LightProbeProxyVolume.dataFormat` in Unity? Explain its purpose and usage.
LightProbeProxyVolume.dataFormat public LightProbeProxyVolume.DataFormat dataFormat ; Description The texture data format used by the Light Probe Proxy Volume 3D texture. This setting can impact the CPU and GPU performance when generating CPU texture data and sampling the texture on the GPU.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfecf25a39c9
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.onPostRender`.
to this delegate. For similar functionality that applies only to a single Camera and requires your script to be on the same GameObject, see MonoBehaviour.OnPostRender . If you're using a Scriptable Render Pipeline, for example the Universal Render Pipeline, use RenderPipelineManager instead. To execute code after Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ca7b276a857
unity_docs
scripting
What is `Experimental.GraphView.ResizableElement` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ResizableElement class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.VisualElement Description Instantiates a [ResizableElement] that you add as a child of the [VisualElement] that you want to resize. Con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fc671e4971c
unity_docs
rendering
What are the parameters of `Mesh.GetNativeVertexBufferPtr` in Unity?
Returns IntPtr Pointer to the underlying graphics API vertex buffer. Description Retrieves a native (underlying graphics API) pointer to the vertex buffer. Use this function to retrieve a pointer/handle corresponding to the mesh vertex buffer, as it is represented in the native graphics API. This can be used to enable ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c1eeb97b695
unity_docs
physics
What is `Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility` in Unity? Explain its purpose and usage.
NativeArrayUnsafeUtility class in Unity.Collections.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Contains unsafe methods for working with NativeArray instances. This class contains methods that you can use to perform unsafe operations that ignore the job safety system. For example,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba5abcc47098
unity_docs
scripting
What is `SkeletonBone` in Unity? Explain its purpose and usage.
SkeletonBone struct in UnityEngine / Implemented in: UnityEngine.AnimationModule Description Details of the Transform name mapped to the skeleton bone of a model and its default position and rotation in the T-pose. The skeleton models used in Unity have multiple bones. The SkeletonBone struct has properties t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00638b0b60cd
unity_docs
editor
What is `EditorWindow.maximized` in Unity? Explain its purpose and usage.
EditorWindow.maximized public bool maximized ; Description Whether or not this window is maximized? To maximize the custome Editor window to the size of the Unity screen, set maximized . It works only when the custom Editor window is docked within Unity. ```csharp using UnityEditor; using UnityEngine; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f82cb51563a0_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Checks if an item of a specific type and key exists in the locator. Signature: ```csharp public bool HasItem<TItem>(string key = "") where TItem : TBase ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_98cddae4eb5b
unity_docs
rendering
What is `Handles.currentCamera` in Unity? Explain its purpose and usage.
Handles.currentCamera public Camera currentCamera ; Description Gets or sets the camera that is currently rendering. When set in the lifecycle of SceneView.OnGUI, Handles.currentCamera determines where 3D handles are drawn. Handles.currentCamera only sets the currently rendering camera, it does not set up the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b981d46a71cc
unity_docs
scripting
What is `Experimental.GraphView.GraphView.viewTransformChanged` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.viewTransformChanged public Experimental.GraphView.GraphView.ViewTransformChanged viewTransformChanged ; Description View transform changed callback.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b77775fa705
unity_docs
animation
What is `Animator.SetIKHintPositionWeight` in Unity? Explain its purpose and usage.
Animator.SetIKHintPositionWeight Declaration public void SetIKHintPositionWeight ( AvatarIKHint hint , float value ); Parameters Parameter Description hint The AvatarIKHint that is set. value The translative weight. Description Sets the translative weight of an IK hint (0 = at the original animation b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_008b16960a5e
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture3D.SetPixelData`.
a into a texture. The size of the data array must be the width × height × depth of the mipmap level, and the data layout must match the texture format, otherwise SetPixelData fails. You can use byte for T if you don't want to define a custom struct to match the texture format. Unity throws an exception when Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_370d0578ac52
unity_docs
animation
Give me an overview of the `QueueMode` class in Unity.
QueueMode enumeration Description Used by Animation.Play function. Properties Property Description CompleteOthers Will start playing after all other animations have stopped playing. PlayNow Starts playing immediately. This can be used if you just want to quickly create a duplicate animation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0f3ee11c3ce
unity_docs
physics
Give me an overview of the `RaycastHit` class in Unity.
RaycastHit struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Structure used to get information back from a raycast. Additional resources: Physics.Raycast , Physics.Linecast , Physics.RaycastAll . Properties Property Description articulationBody The ArticulationBody of the coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_582d0a6ba75d
unity_docs
editor
What is `Unity.Profiling.Editor.ProfilerModuleMetadataAttribute.ctor` in Unity? Explain its purpose and usage.
ProfilerModuleMetadataAttribute Constructor Declaration public ProfilerModuleMetadataAttribute (string displayName ); Parameters Parameter Description displayName The display name of the attributed module. Description Initializes and returns an instance of ProfilerModuleMetadataAttribute . ```csharp usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f39b7989fd1
unity_docs
scripting
What is `ObjectChangeEvents` in Unity? Explain its purpose and usage.
ObjectChangeEvents class in UnityEditor Description Exposes events that allow you to track undoable changes to objects in the editor. Any undoable change to any object loaded in the editor (both GameObject and assets such as Material object) are recorded and exposed as a stream of events. See ObjectChangeKin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee16e65ef94b
unity_docs
physics
What is `EffectorForceMode2D` in Unity? Explain its purpose and usage.
EffectorForceMode2D enumeration Description The mode used to apply Effector2D forces. Properties Property Description Constant The force is applied at a constant rate. InverseLinear The force is applied inverse-linear relative to a point. InverseSquared The force is applied inverse-squared relative to a poi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_063666f9b4b9
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.stretchWidth`.
GUIStyle.stretchWidth public bool stretchWidth ; Description Can GUI elements of this style be stretched horizontally for better layouting? ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { GUI.skin.button.stretchWidth = true; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33356b693104
unity_docs
scripting
What is `SceneManagement.Stage.stageHandle` in Unity? Explain its purpose and usage.
Stage.stageHandle public SceneManagement.StageHandle stageHandle ; Description The StageHandle struct for this stage. You can use the StageHandle for various object queries in the stage.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_085a773ddbbe
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R32_UInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R32_UInt Description A one-component, 32-bit unsigned integer format that has a single 32-bit R component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43942c316837
unity_docs
input
What is `Input.mousePresent` in Unity? Explain its purpose and usage.
Input.mousePresent public static bool mousePresent ; Description Indicates if a mouse device is detected. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ac37a04c520
unity_docs
editor
What is `EditorWindow.EndWindows` in Unity? Explain its purpose and usage.
EditorWindow.EndWindows Declaration public void EndWindows (); Description Close a window group started with EditorWindow.BeginWindows . Simple editor Window with a window and a button inside. ```csharp using UnityEditor; using UnityEngine; using System.Collections; public class IMGUIWindowDemo : EditorWindo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f84ca7fe329
unity_docs
editor
What is `DragAndDrop.AddDropHandler` in Unity? Explain its purpose and usage.
DragAndDrop.AddDropHandler Declaration public static void AddDropHandler ( DragAndDrop.ProjectBrowserDropHandler handler ); Declaration public static void AddDropHandler ( DragAndDrop.SceneDropHandler handler ); Declaration public static void AddDropHandler ( DragAndDrop.HierarchyDropHandler handler );...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1492d91af45f
unity_docs
rendering
In Unity's 'Single-pass stereo rendering for Android', what is 'Shader code requirements' and how does it work?
To use single-pass stereo rendering with custom shaders, you may need to include additional shader code. You don’t need to include additional code if your custom shaders are: Surface Shaders that don’t have custom vertex processing. Fixed-function pipeline shaders. Note : These shader changes are compatible with multi-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f823c43f1c33
unity_docs
scripting
What is `UIElements.UxmlSerializedData` in Unity? Explain its purpose and usage.
UxmlSerializedData class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Generates an instance of the declaring element when the UxmlElementAttribute is used in a custom control. Public Methods Method Description CreateInstance Returns an instance of the declaring ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9a117087041e
unity_docs
rendering
In Unity's 'Branch based on shader pass or shader stage', what is 'Shader stage being compiled' and how does it work?
Preprocessor macros SHADER_STAGE_VERTEX , SHADER_STAGE_FRAGMENT , SHADER_STAGE_DOMAIN , SHADER_STAGE_HULL , SHADER_STAGE_GEOMETRY , SHADER_STAGE_COMPUTE are defined when compiling each Shader stage. Typically they are useful when sharing Shader code between pixel Shaders and compute Shaders, to handle cases where some ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc4b15e66426
unity_docs
rendering
What is `Rendering.ShaderPropertyFlags.PerRendererData` in Unity? Explain its purpose and usage.
ShaderPropertyFlags.PerRendererData Description In the Material Inspector, Unity queries the value for this property from the Renderer's MaterialPropertyBlock , instead of from the Material. The value will also appear as read-only. This flag corresponds to the "[PerRendererData]" attribute.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4dbf08715f42
unity_docs
scripting
What is `Build.Content.GameManagerDependencyInfo.includedTypes` in Unity? Explain its purpose and usage.
GameManagerDependencyInfo.includedTypes public ReadOnlyCollection<Type> includedTypes ; Description The project-wide identifiers for the game manager classes referenced in this collection of dependency information. Note: the elements of the managerObjects and includedTypes lists correspond to each other. An...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83988d4b5f72
unity_docs
scripting
What is `Android.AndroidProjectFilesModifierContext.AddFileAsGuidToCopy` in Unity? Explain its purpose and usage.
AndroidProjectFilesModifierContext.AddFileAsGuidToCopy Parameters Parameter Description guid The GUID of an asset in your Unity project. destination The path to place the asset copy. This is relative to the Gradle project root. Description Declare an asset to copy into the Gradle project. If another file wit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0c1ff389983
unity_docs
scripting
What is `DestroyAssetObjectEventArgs.ctor` in Unity? Explain its purpose and usage.
DestroyAssetObjectEventArgs Constructor Declaration public DestroyAssetObjectEventArgs (GUID guid , int instanceId , SceneManagement.Scene scene ); Parameters Parameter Description guid The GUID of the removed asset. instanceId The instance ID of the modified asset. scene The Scene that contained...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd8ed5edf30b
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddBuildConfig` in Unity? Explain its purpose and usage.
PBXProject.AddBuildConfig Declaration public void AddBuildConfig (string name ); Parameters Parameter Description name The name of the build configuration. Description Creates a new set of build configurations for all targets in the project. The number and names of the build configurations is a project-wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5889bb29b1c_doc_16
github
scripting
What does `Pick` do in this Unity script? Explain its purpose and signature.
Picks child GameObjects given the coordinates of the cells.The GameObjectBrush overrides this to provide GameObject picking functionality.Grid to pick data from.Target of the picking operation. By default the currently selected GameObject.The coordinates of the cells to paint data from.Pivot of the picking brush. Sign...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f5cd38a36685
unity_docs
scripting
What is `Logger` in Unity? Explain its purpose and usage.
Logger class in UnityEngine / Implemented in: UnityEngine.CoreModule Implements interfaces: ILogger , ILogHandler Description Initializes a new instance of the Logger. Create a new instance or use default Debug.unityLogger . Additional resources: ILogger , ILogHandler . ```csharp using UnityEngine; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44b86608aa95
unity_docs
scripting
Show me a Unity C# example demonstrating `Windows.Speech.KeywordRecognizer`.
er class in UnityEngine.Windows.Speech / Inherits from: Windows.Speech.PhraseRecognizer / Implemented in: UnityEngine.CoreModule Description KeywordRecognizer listens to speech input and attempts to match uttered phrases to a list of registered keywords. There can be many keyword recognizers active at any giv...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c2e4fd5703e
unity_docs
editor
What is `BuildOptions.ConnectToHost` in Unity? Explain its purpose and usage.
BuildOptions.ConnectToHost Description Sets the Player to connect to the Editor. Sets the Player to connect to the Editor and it requires BuildOptions.Development to be set. Please note that you should only use this in development. Additional resources: BuildPipeline.BuildPlayer .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eb1b5d224ee5
unity_docs
scripting
Explain 'Troubleshooting reflections' in Unity.
## Box projection Normally, the reflection cubemap is assumed to be at an infinite distance from any given object. Different angles of the cubemap will be visible as the object turns but it is not possible for the object to move closer or farther away from the reflected surroundings. This often works very well for out...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93e0cc92cc29
unity_docs
rendering
What is `Camera.OnWillRenderObject` in Unity? Explain its purpose and usage.
Camera.OnWillRenderObject() Description OnWillRenderObject is called for each camera if the object is visible. This function is called if the object is deemed visible from the current camera after the culling process. The method is useful if you need a preparation step for every camera that is rendering the object...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7512b803dc14
github
scripting
Write a Unity C# UI script for TMP_Ui Frame Rate Counter
```csharp using UnityEngine; using System.Collections; namespace TMPro.Examples { public class TMP_UiFrameRateCounter : MonoBehaviour { public float UpdateInterval = 5.0f; private float m_LastInterval = 0; private int m_Frames = 0; public enum FpsCounterAnchorPositions { Top...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b396f36119f
unity_docs
rendering
In Unity's 'Bumped Specular', what is 'Normal Mapped Properties' and how does it work?
Like a Diffuse shader , this computes a simple (Lambertian) lighting model. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on the angle, and does not change as the camera moves or rotates around. Normal mapping simulates small surface details using a tex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dac88c56c2ea
unity_docs
rendering
Explain 'Include a shader pass with the UsePass command' in Unity.
The UsePass command inserts a named Pass from another Shader object. You can use this command to reduce code duplication in shader source files. ## Example This example code creates a Shader object called ContainsNamedPass, which contains a Pass called ExampleNamedPass. ``` Shader "Examples/ContainsNamedPass" { SubS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0120985674a
unity_docs
scripting
Give me an overview of the `CoppaCompliance` class in Unity.
CoppaCompliance enumeration Description The enumerated states of the project's Coppa compliance setting. Properties Property Description CoppaUndefined The project has not yet defined the Coppa state. CoppaCompliant The project will adhere to Coppa regulations because it targets an audience under a certain age...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_251ba968bda6
unity_docs
physics
Explain '2D game creation workflow' in Unity.
Before you create a 2D game, you need to decide on a game perspective and an art style . To create a 2D game, set up your Unity project and then familiarize yourself with the relevant concepts in the following order: Fundamentals Scripting Sprites Building in-game environments Character animation Graphics Physics 2D Au...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25324b885ac1
unity_docs
scripting
What is `UIElements.Experimental.PointerMoveLinkTagEvent.GetPooled` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PointerMoveLinkTagEvent.GetPooled Declaration public static UIElements.Experimental.PointerMoveLinkTagEvent GetPooled ( UIElements.IPointerEvent evt , string linkID , string linkText ); Returns PointerMoveLinkTagEvent ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57346cac23ff
unity_docs
rendering
Give me an overview of the `ParticleSystemBakeTextureOptions` class in Unity.
ParticleSystemBakeTextureOptions enumeration Description Configure how a Particle System is baked into a texture. Properties Property Description BakeRotationAndScale Bake the Transform rotation and scale into the texture. BakePosition Bake the Transform position into the texture. PerVertex Bake each vertex o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b33a5081654c
unity_docs
rendering
What is `Shader.Find` in Unity? Explain its purpose and usage.
Shader.Find Declaration public static Shader Find (string name ); Description Finds a shader with the given name . Returns null if the shader is not found. Shader.Find can be used to switch to another shader without having to keep a reference to the shader. name is the name you can see in the shader po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_37a4886a7955
unity_docs
scripting
In Unity's 'Video playback in Web', what is 'Video formats' and how does it work?
Unity supports the following common video file formats: Format Extensions MPEG–4 Part 14.mp4 MPEG–4 file used for video downloaded from the Apple iTunes store.m4v Apple’s QuickTime movie format.mov Moving Picture Experts Group (MPEG).mpg MPEG video.mpeg WebM video.webm Ogg video file.ogv The only exception to this rest...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_332b34e6c511
unity_docs
scripting
What is `Time.inFixedTimeStep` in Unity? Explain its purpose and usage.
Time.inFixedTimeStep public static bool inFixedTimeStep ; Description Returns true if called inside a fixed time step callback (like MonoBehaviour's FixedUpdate ), otherwise returns false (Read Only).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfe22c6bf53f
unity_docs
scripting
Show me a Unity C# example demonstrating `Rendering.RenderPipelineManager.activeRenderPipelineDisposed`.
ed. Whenever you switch GraphicsSettings.currentRenderPipeline or QualitySettings.renderPipeline , Unity will dispose the current RenderPipeline before instantiate the new RenderPipeline . You can subscribe to this event to know when current RenderPipeline will be disposed. To access the currently disposing R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_055d893a796e
unity_docs
rendering
What is `DepthTextureMode.DepthNormals` in Unity? Explain its purpose and usage.
DepthTextureMode.DepthNormals Description Generate a depth + normals texture. Will generate a screen-space depth and view space normals texture as seen from this camera. Texture will be in RenderTextureFormat.ARGB32 format and will be set as _CameraDepthNormalsTexture global shader property. Depth and normals w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f98e74bec53b
unity_docs
math
What is `AndroidJNI.GetStringChars` in Unity? Explain its purpose and usage.
AndroidJNI.GetStringChars Declaration public static string GetStringChars (IntPtr str ); Description Returns a pointer to the array of Unicode characters of the string. This pointer is valid until ReleaseStringchars() is called. This method is a modification of the original GetStringChars , which returns a po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e37cbfeee4ef
unity_docs
scripting
Explain 'Managed plug-ins' in Unity.
Managed plug-ins are.NET assemblies you create and compile outside of Unity, into a dynamically linked library (DLL) with tools such as Visual Studio. This is a different process from standard C# scripts , which Unity stores as source files in the Assets folder in your Unity project. Unity compiles standard C# scripts ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3e70543f417
unity_docs
rendering
What is `LightTransport.IDeviceContext.Initialize` in Unity? Explain its purpose and usage.
IDeviceContext.Initialize Declaration public bool Initialize (); Returns bool True if the device context was initialized successfully. Description Initialize. Initialize the device context.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f65c10ef0592
unity_docs
scripting
Show me a Unity C# example demonstrating `JsonUtility.ToJson`.
ning the public fields of the array object itself (of which there are none). To serialize the actual content of an array or primitive type, you must wrap it in a class or struct. ToJson can be called from background threads. You should not alter the object that you pass to this function while it is still executing. Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ba636c8617c
unity_docs
rendering
What is `GL.Begin` in Unity? Explain its purpose and usage.
GL.Begin Declaration public static void Begin (int mode ); Parameters Parameter Description mode Primitives to draw: can be TRIANGLES , TRIANGLE_STRIP , QUADS or LINES . Description Begin drawing 3D primitives. In OpenGL this matches glBegin ; on other graphics APIs the same functionality is emulate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_145014efaad1
unity_docs
input
What is `Experimental.GraphView.EdgeConnector_1.OnMouseUp` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeConnector<T0>.OnMouseUp Declaration protected void OnMouseUp ( UIElements.MouseUpEvent e ); Parameters Parameter Description e The event. Description Called on mouse up event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de4a6b252d4e
unity_docs
scripting
What is `Input.accelerationEvents` in Unity? Explain its purpose and usage.
Input.accelerationEvents public static AccelerationEvent[] accelerationEvents ; Description Returns list of acceleration measurements which occurred during the last frame. (Read Only) (Allocates temporary variables). Note : This API is part of the legacy Input Manager. The recommended best practice is that you ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2203bf2ac342
unity_docs
ui
What is `UIElements.BaseVerticalCollectionView.GetRootElementForIndex` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.GetRootElementForIndex Declaration public UIElements.VisualElement GetRootElementForIndex (int index ); Parameters Parameter Description index The item index. Returns VisualElement The item's root element. Description Gets the root element of the specified collection vie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7203bd3e4fd2
unity_docs
scripting
What is `AssetBundleRecompressOperation` in Unity? Explain its purpose and usage.
AssetBundleRecompressOperation class in UnityEngine / Inherits from: AsyncOperation / Implemented in: UnityEngine.AssetBundleModule Description Asynchronous AssetBundle recompression from one compression method and level to another. Additional resources: AssetBundle.RecompressAssetBundleAsync , AsyncOpera...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f16dccabb366
unity_docs
rendering
In Unity's 'Set up your scene and lights for baking', what is 'Static versus Dynamic' and how does it work?
No matter which Global Illumination system you use, Unity will only consider objects that are marked as “Contribute GI” during the baking/precomputing of the lighting. Dynamic (i.e. non-static) objects have to rely on the Light Probes you placed throughout the scene to receive indirect lighting. Because the baking/prec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0628903f6eaf
unity_docs
rendering
What is `LightTransport.IProbeIntegrator.IntegrateOcclusion` in Unity? Explain its purpose and usage.
IProbeIntegrator.IntegrateOcclusion Declaration public LightTransport.IProbeIntegrator.Result IntegrateOcclusion ( LightTransport.IDeviceContext context , int positionOffset , int positionCount , int sampleCount , int maxLightsPerProbe , BufferSlice<int> perProbeLightIndices , BufferSlice<float> probeOcclu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_10bdae9ab197
unity_docs
rendering
Explain 'Set up a render pipeline' in Unity.
To create a new project with one of the render pipelines , use the Unity Hub . Refer to Manage your templates for more information. To convert a project from the Built-In Render Pipeline to URP or HDRP, refer to the following: URP Render Pipeline Converter HDRP Pipeline Wizard After you choose a rendering pipeline, you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4aaadd77187e
unity_docs
rendering
What is `Experimental.GlobalIllumination.PointLight.indirectColor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PointLight.indirectColor public Experimental.GlobalIllumination.LinearColor indirectColor ; Description The indirect light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5af6189487f3
github
scripting
Write a Unity C# XR/VR script for Manually Select Object
```csharp using UnityEngine; using UnityEngine.XR.Interaction.Toolkit; /// <summary> /// This script either forces the selection or deselection of an interactable objects by the interactor this script is on. /// </summary> public class ManuallySelectObject : MonoBehaviour { [Tooltip("What object are we selecting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34a98adcf9b4
unity_docs
rendering
What is `NVIDIA.DLSSCommandExecutionData` in Unity? Explain its purpose and usage.
DLSSCommandExecutionData struct in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description Represents the state of a DLSSContext. If you call Device.ExecuteDLSS, Unity sends the values in this struct to the runtime. After this, you can change the values in this struct without any side effects. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2989d8758172
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingResults.materialsCRC` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingResults.materialsCRC public RayTracingInstanceMaterialCRC[] materialsCRC ; Description An array of Material CRC and instance id pairs generated by RayTracingAccelerationStructure.CullInstances when using RayTracingInstanceCullingFlags.ComputeMaterialsCRC flag. The array can be used ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69e550b1d943
unity_docs
rendering
What is `ComputeBufferType.Constant` in Unity? Explain its purpose and usage.
ComputeBufferType.Constant Description ComputeBuffer that you can use as a constant buffer (uniform buffer). If you use this flag, you can use the ComputeBuffer as a parameter to ComputeShader.SetConstantBuffer and Material.SetConstantBuffer . If you also need the buffer to be bound as a structured buffer, yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a01338711fa8
unity_docs
scripting
What is `Vector3.ClampMagnitude` in Unity? Explain its purpose and usage.
Vector3.ClampMagnitude Declaration public static Vector3 ClampMagnitude ( Vector3 vector , float maxLength ); Description Returns a copy of vector with its magnitude clamped to maxLength . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { // Move the obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38dd1c429566
unity_docs
ui
Show me a Unity C# example demonstrating `SceneManagement.LoadSceneMode.Single`.
LoadSceneMode.Single Description Closes all current loaded Scenes and loads a Scene. Additional resources: SceneManager.LoadScene . ```csharp using UnityEngine; using UnityEngine.SceneManagement;public class Example : MonoBehaviour { void OnGUI() { //This displays a Button on the screen at position (20,30), w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a326a9e5b629_doc_5
github
scripting
What does `Start` do in this Unity script? Explain its purpose and signature.
Starts this coroutine. An alternative to calling .Spawns an instance of if not already present in the scene. Signature: ```csharp public static Coroutine Start(this IEnumerator coroutine) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_c08ff5632dcf
unity_docs
scripting
What is `WindZone.windTurbulence` in Unity? Explain its purpose and usage.
WindZone.windTurbulence public float windTurbulence ; Description The turbulence wind force. Produces a rapidly changing wind pressure. ```csharp // Creates a wind zone to produce a softly changing general wind // Just place this into an empty game object using UnityEngine;public class ExampleScript : MonoBeh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a22f7696703
unity_docs
scripting
What is `IMGUI.Controls.TreeView.ContextClickedItem` in Unity? Explain its purpose and usage.
TreeView.ContextClickedItem Declaration protected void ContextClickedItem (int id ); Parameters Parameter Description id TreeViewItem id. Description Override this method to handle a context click on an item with ID TreeViewItem.id . Additional resources: ContextClicked .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72f6f60afd1d
unity_docs
physics
What is `ShortcutManagement.ShortcutArguments` in Unity? Explain its purpose and usage.
ShortcutArguments struct in UnityEditor.ShortcutManagement Description Provides data for shortcut action methods invoked by the shortcut system. See ShortcutAttribute and ClutchShortcutAttribute . Properties Property Description context Instance of the context in which the shortcut was triggered. stage Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0656997088f5
unity_docs
ui
In Unity's 'Develop a native DSP audio plug-in', what is '1. Create an audio plug-in file' and how does it work?
To create an audio plug-in file: Download the latest audio plug-in SDK . In the folder, go to NativeAudioPlugins > NativeCode . The native example plug-in .cpp files are located here. You can duplicate one of the plug-in .cpp files so you can use it as a template for your own plug-in, work directly in one of the exampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f921a18ba7e0
unity_docs
scripting
What is `ArticulationBody.GetDofStartIndices` in Unity? Explain its purpose and usage.
ArticulationBody.GetDofStartIndices Declaration public int GetDofStartIndices (List<int> dofStartIndices ); Parameters Parameter Description dofStartIndices Supplied list of integers to read back and store the data. Returns int Total degrees of freedom for the entire hierarchy of articulation bodies. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9bb45e75b533
unity_docs
rendering
What is `Rendering.BatchPackedCullingViewID.GetSliceIndex` in Unity? Explain its purpose and usage.
BatchPackedCullingViewID.GetSliceIndex Declaration public int GetSliceIndex (); Description Returns the slice index of the culled view. The slice index depends on the view type. For cameras, the slice index is always zero. For cascaded shadow maps, it is equal to the index of the cascade.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f688079d2afc
unity_docs
math
Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.WriteAccessRequiredAttribute`.
to be invoked. When you add the ReadOnly attribute to a native container, it indicates that only operations that read data can be performed on the native container, and you can't use methods and properties on the native container that modify the array. The WriteAccessRequired attribute indicates which methods and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f8cf602c25f
unity_docs
rendering
What is `RenderTextureMemoryless.MSAA` in Unity? Explain its purpose and usage.
RenderTextureMemoryless.MSAA Description Render texture color pixels are memoryless when RenderTexture.antiAliasing is set to 2, 4 or 8. Note that memoryless render textures are only supported on iOS/tvOS 10.0+ Metal. Render textures are read/write protected and stored in CPU or GPU memory on other platforms. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a542eab0e48f
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefs.DeleteKey`.
Prefs.DeleteKey Declaration public static void DeleteKey (string key ); Description Removes the given key from the PlayerPrefs. If the key does not exist, DeleteKey has no impact. The following example shows a public function called ‘DeleteKey’. The function takes a string variable called ‘KeyName’ as a pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_817eab71638f
unity_docs
animation
What is `StateMachineBehaviour.OnStateMove` in Unity? Explain its purpose and usage.
StateMachineBehaviour.OnStateMove(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) Parameters Parameter Description animator The Animator evaluating this state machine. animatorStateInfo Information about the state being evaluated. layerIndex The current layer being evaluated. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.