id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_c0d455e3f6fb
unity_docs
rendering
In Unity's 'Activate and deactivate search providers', what is 'Usage example' and how does it work?
The toggle impacts only the current Search window. That means you can have multiple Search windows open, each with different search providers active. For example, you can: Open a Search window for the Hierarchy search provider, showing GameObjects . Have a second Search window open for the Project search provider, show...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91aa09531a7a
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.TargetGuidByName` in Unity?
Returns string The GUID identifying the native target. Description Returns the GUID of the native target with the given name. Note : To retrieve a GUID for a Unity generated target, use GetUnityMainTargetGuid or GetUnityFrameworkTargetGuid ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7acb04c097d2
unity_docs
editor
What are the parameters of `SettingsProvider.ctor` in Unity?
Description Creates a new SettingsProvider. ```csharp using System.Collections.Generic; using System.IO; using System.Linq; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; using UnityEditor.UIElements;// Create a new type of Settings asset. class MyCustomSettings : ScriptableObject { public cons...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23a76a6e579b
unity_docs
rendering
What is `TerrainData.AlphamapTextureName` in Unity? Explain its purpose and usage.
TerrainData.AlphamapTextureName public static string AlphamapTextureName ; Description The name for the Terrain alpha map textures. Use this name when you call CopyActiveRenderTextureToTexture , DirtyTextureRegion , SyncTexture , or TerrainCallbacks.onTextureChanged to identify the Terrain alpha map textures...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d80192dfac8f
unity_docs
rendering
Explain 'UI Builder interface overview' in Unity.
To open the UI Builder window: Select Window > UI Toolkit > UI Builder . This opens a UXML document that has been previously loaded with UIBuilder. From the Project window, double-click a UXML file. The following image shows an example UI Builder window: To open a UI Document in UI Builder: Use the File menu inside the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7458af4bbd9
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.RemoveFrameworkFromProject` in Unity?
Description Removes a system framework dependency for the specified target. The function assumes system frameworks are located in the System/Library/Frameworks folder in the SDK source tree. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_Remove...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14ea15b126f6
unity_docs
math
What is `Mesh.MeshData.GetTangents` in Unity? Explain its purpose and usage.
Mesh.MeshData.GetTangents Declaration public void GetTangents (NativeArray<Vector4> outTangents ); Parameters Parameter Description outTangents The destination vertex tangents array. Description Populates an array with the vertex tangents from the MeshData . The destination array must have at least ver...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e0aa912d26d
unity_docs
scripting
What are the parameters of `Search.CustomObjectIndexerAttribute.ctor` in Unity?
Description Register a new Indexing function bound to the specific type. ```csharp [CustomObjectIndexer(typeof(SceneAsset), version = 2 /* update me when the code below changes */)] internal static void IndexSceneName(CustomObjectIndexerTarget context, ObjectIndexer indexer) { if (!(context.target is SceneAsset sce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3b37aa88ace
unity_docs
rendering
What is `SpriteRenderer.color` in Unity? Explain its purpose and usage.
SpriteRenderer.color public Color color ; Description Rendering color for the Sprite graphic. The selected vertex color becomes the rendering color, and is accessible in a pixel shader. The default color is white when no color is selected. ```csharp //This example outputs Sliders that control the red green a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de7e2402ea1c
unity_docs
rendering
What is `Shader.GetPropertyNameId` in Unity? Explain its purpose and usage.
Shader.GetPropertyNameId Declaration public int GetPropertyNameId (int propertyIndex ); Parameters Parameter Description propertyIndex The index of the shader property. Description Returns the nameId of the shader property at the specified index. If Unity cannot find a property at the specified index, th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_feff6412a968
unity_docs
editor
Show me a Unity C# example demonstrating `PrefabUtility.SaveAsPrefabAssetAndConnect`.
unter a similar problem in the case of preserving references to existing Components when you save over an existing Prefab, if a single GameObject within the Prefab has more than one of the same Component type attached. In this case you cannot predict which of them will be matched to the existing references. Additional ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9dd75fa3886f
unity_docs
rendering
What is `ReflectionProbe.textureHDRDecodeValues` in Unity? Explain its purpose and usage.
ReflectionProbe.textureHDRDecodeValues public Vector4 textureHDRDecodeValues ; Description HDR decode values of the reflection probe texture. Additional resources: Shader properties in HLSL , ReflectionProbe.texture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_393a6b642603
unity_docs
rendering
What is `GUI.Button` in Unity? Explain its purpose and usage.
GUI.Button Declaration public static bool Button ( Rect position , string text ); Declaration public static bool Button ( Rect position , Texture image ); Declaration public static bool Button ( Rect position , GUIContent content ); Declaration public static bool Button ( Rect position , s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_982a417bfc0b
unity_docs
rendering
What is `UIElements.PanelRenderMode` in Unity? Explain its purpose and usage.
PanelRenderMode enumeration Description Determines how a panel is rendered. Properties Property Description ScreenSpaceOverlay Renders the panel as a 2D overlay on top of the screen, independent of any camera or world geometry. WorldSpace Renders the panel as an object within the 3D world.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_11
github
scripting
What does `FindLocaleIndex` do in this Unity script? Explain its purpose and signature.
Finds the index of the desired locale in the LocalizationSettings.The locale.The index of the locale or -1 if not found. Signature: ```csharp public int FindLocaleIndex(Locale desiredLocale) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3364b9c89209
unity_docs
scripting
Show me a Unity C# example demonstrating `AI.NavMeshBuildSource`.
ng that to the list of sources that are passed to the bake function. Alternatively, you can use the collect API to quickly create NavMesh build sources from available render meshes or physics colliders. See NavMeshBuilder.CollectSources . If you use this function at runtime, any meshes with read/write access disabled ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33f4421f91df
unity_docs
scripting
What is `TerrainTools.TerrainPaintToolWithOverlays_1` in Unity? Explain its purpose and usage.
TerrainPaintToolWithOverlays<T0> class in UnityEditor.TerrainTools / Inherits from: TerrainTools.TerrainPaintToolWithOverlaysBase Description Base class for Terrain painting tools, which inherit from Editor Tools. Derive from this class to implement your own terrain painting tools, which also appear in the Terr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_db3c48163822_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
interface IGameObjectFactoryThe interface represents a factory of objects of GameObject type. Usethe implementation of this interface should be used as a replacementfor GameObject.Instantiate invocations Signature: ```csharp public interface IGameObjectFactory ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ddc8fbabed8
unity_docs
scripting
What is `Rendering.VertexAttributeFormat.SInt32` in Unity? Explain its purpose and usage.
VertexAttributeFormat.SInt32 Description 32-bit signed integer. This format matches the @int@ data type in C#, with values ranging from -2147483648 to 2147483647. Additional resources: Mesh class, VertexAttribute enum, Mesh.GetVertexAttributeFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe02f6b47f18
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.SetSampleFramesAvailableNativeHandler` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.SetSampleFramesAvailableNativeHandler Declaration public void SetSampleFramesAvailableNativeHandler ( Experimental.Audio.AudioSampleProvider.SampleFramesEventNativeFunction handler , IntPtr userData ); P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_15
github
scripting
What does `MoveTo` do in this Unity script? Explain its purpose and signature.
Moves the camera to view the supplied interest point instantaneously, without any animation. Requires that a camera has been set using SetControlledCamera.The latitude and longitude of the point on the ground which the camera should look at.The latitude, longitude and altitude from which the camera will look at the int...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_2f94f0d7ff0b
unity_docs
animation
What is `Animator.bodyRotation` in Unity? Explain its purpose and usage.
Animator.bodyRotation public Quaternion bodyRotation ; Description The rotation of the body center of mass. The rotation is in worldspace. You should only set this value from within an OnAnimatorIK() function call.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67761689a464
unity_docs
physics
Show me a Unity C# example demonstrating `Compilation.CompilationPipeline.compilationStarted`.
ou can use the context to associate timing, logging, error counts, or any per-compilation data with the right compilation cycle. For example, on compilation start, you can create an entry referenced by the context as a key, and capture start time or relevant state. On compilation finish, you can then look up the sa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c00e19843516
unity_docs
physics
What is `RigidbodySleepMode2D` in Unity? Explain its purpose and usage.
RigidbodySleepMode2D enumeration Description Settings for a Rigidbody2D's initial sleep state. Properties Property Description NeverSleep Rigidbody2D never automatically sleeps. StartAwake Rigidbody2D is initially awake. StartAsleep Rigidbody2D is initially asleep.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_df48513e3e1e
unity_docs
editor
In Unity's 'Analyzing AssetBundles', what is 'BuildReport' and how does it work?
The BuildReport file (located at Library/LastBuild.buildreport in your project directory) is a Unity SerializedFile that records the content of each AssetBundle. This SerializedFile contains detailed information about the build, including timings for build steps and a granular view of AssetBundle contents. You can view...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d6849b673dc0
unity_docs
rendering
Explain 'Smooth hard edges in lightmaps' in Unity.
Seam stitching is a feature that smooths unwanted hard edges in GameObjects rendered with baked lightmap textures generated by the Progressive Lightmapper . When Unity bakes lightmap textures, it identifies mesh faces that are close together but separate from each other as being separate in texture space; the edges bet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_faffdc280da9
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseElement` in Unity? Explain its purpose and usage.
BaseElement class in Unity.Android.Gradle.Manifest / Implemented in: Unity.Android.Gradle Description Abstract base class for all existing Android manifest elements. Properties Property Description CustomElements Custom child elements. Public Methods Method Description AddCustomElement Adds a new element...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c35cfc46cac1
unity_docs
scripting
Show me a Unity C# example demonstrating `Rendering.OnDemandRendering.effectiveRenderFrameRate`.
SyncCount is 0 and Application.targetFrameRate is also greater than 0: FPS = Application.targetFrameRate / OnDemandRendering.renderFrameInterval Android, iOS and tvOS use 30 FPS as the default framerate when no other value has been specified. In that case 30 / OnDemandRendering.renderFrameInterval is retu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a3137ced1eda
unity_docs
scripting
What is `WSA.Tile.PeriodicBadgeUpdate` in Unity? Explain its purpose and usage.
Tile.PeriodicBadgeUpdate Declaration public void PeriodicBadgeUpdate (string uri , float interval ); Parameters Parameter Description uri A remote location from where to retrieve tile update interval A time interval in minutes, will be rounded to a value, supported by the system Description Starts perio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2058d0e5178
unity_docs
animation
What is `Animator.StartPlayback` in Unity? Explain its purpose and usage.
Animator.StartPlayback Declaration public void StartPlayback (); Description Sets the animator in playback mode. In playback mode, you control the animator by setting a time value. The animator is not updated from game logic. Use playbackTime to explicitly manipulate the progress of time.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_741aa15a51ee
unity_docs
math
What is `TerrainData.ComputeDetailInstanceTransforms` in Unity? Explain its purpose and usage.
TerrainData.ComputeDetailInstanceTransforms Declaration public DetailInstanceTransform[] ComputeDetailInstanceTransforms (int patchX , int patchY , int layer , float density , out Bounds bounds ); Parameters Parameter Description patchX The x index of the patch. patchY The y index of the patch. laye...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_23fbec171028
unity_docs
performance
Explain 'Bucket allocator example' in Unity.
## Example configuration The bucket allocator reserves blocks of memory for allocations. Each block is divided into subsections of 16 KB. The following example configuration demonstrates the process of reserving blocks for allocations: In this setup, the total block size ( Bucket Allocator Block Size ) is 4 MB, and th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_17f95d73c9d8
unity_docs
editor
In Unity's 'Create looping transitions', what is 'Create the example' and how does it work?
Create a project in Unity with any template. In your Project window , create a folder named loop-transition-example . Right-click in the folder, and select Create > UI Toolkit > Editor Window . In the UI Toolkit Editor Window Creator window, enter LoopingExample . Save your changes. This creates three files as LoopingE...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fdf990b92b7
unity_docs
scripting
What is `WebGLCompressionFormat` in Unity? Explain its purpose and usage.
WebGLCompressionFormat enumeration Description An enum containing different compression types. This enum is used within the WebGL platform to define what type of compression will be used for resources. Properties Property Description Brotli WebGL resources are stored using Brotli compression. Gzip WebGL resou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8df88ada0ba2
unity_docs
rendering
Explain 'Register meshes and materials with the BatchRendererGroup API in URP' in Unity.
Mesh and Material are managed C# objects in Unity which means you can’t use them from Burst C# code. This means that to use them in BRG draw commands, you must pre-register with the BRG. To register Mesh and Material objects, use BatchRendererGroup.RegisterMesh and BatchRendererGroup.RegisterMaterial respectively. Thes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f197bc095688
unity_docs
performance
What is `Rendering.BatchRendererGroup.GetThreadedBatchContext` in Unity? Explain its purpose and usage.
BatchRendererGroup.GetThreadedBatchContext Declaration public Rendering.ThreadedBatchContext GetThreadedBatchContext (); Returns ThreadedBatchContext Thread-safe and Burst-safe context. Description Get the thread-safe API for interacting with a BatchRendererGroup from Burst jobs.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a5c1cbefc042
unity_docs
physics
In Unity's 'Image', what is 'Create an image' and how does it work?
You must use either UXML or C# code to add an Image element in your UI and provide the image source to the --unity-image USS custom property. You can set the image scale mode with the --unity-image-size USS custom property. You can also set the image tint color with the --unity-image-tint-color USS custom property. The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3fb6d28b74b6
unity_docs
editor
Explain 'Install Unity using Download Assistant' in Unity.
Unity Download Assistant is a small-sized executable file provided as.exe for Windows and.dmg for macOS. The Download Assistant guides you through downloading and installing Unity Editor and other components together. To install Unity using the Download Assistant, follow these steps: Access the Unity download archive w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af2d5cd5fb5f
unity_docs
physics
What is `IMGUI.Controls.JointAngularLimitHandle.zMin` in Unity? Explain its purpose and usage.
JointAngularLimitHandle.zMin public float zMin ; Description Returns or specifies the minimum angular motion about the z-axis. The value returned by this property depends on the current value of the zMotion property. If it is ConfigurableJointMotion.Locked , then it will always return 0. If it is Configurab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31f7f0eaab68
unity_docs
physics
What is `Collider2D.bounciness` in Unity? Explain its purpose and usage.
Collider2D.bounciness public float bounciness ; Description The bounciness used by the Collider2D . A Collider2D can be assigned a PhysicsMaterial2D either directly via to the Collider2D.sharedMaterial , indirectly via the attached Rigidbody2D.sharedMaterial , the global default or if no PhysicsMaterial...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_691c2fee1e6e
unity_docs
scripting
What is `GraphicsBuffer.GetNativeBufferPtr` in Unity? Explain its purpose and usage.
GraphicsBuffer.GetNativeBufferPtr Declaration public IntPtr GetNativeBufferPtr (); Returns IntPtr Pointer to the underlying graphics API buffer. Description Retrieve a native (underlying graphics API) pointer to the buffer. Use this function to retrieve a pointer/handle corresponding to the graphics buffe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b3364c95752a
unity_docs
xr
In Unity's 'Ambisonic Audio', what is 'Selecting an ambisonic audio decoder' and how does it work?
To select an ambisonic audio decoder in your project, open your project’s Audio settings (menu: Edit > Project Settings > Audio ). Select an Ambisonic Decoder Plugin from the list of available decoders in the project. There are no built-in decoders included with Unity, but you can do one of the following options: You c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7e40fa9c443d
unity_docs
rendering
In Unity's 'Transparent Bumped Diffuse', what is 'Transparent Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is completely transparent while 255 (white) is completely opaque. If your main texture does not have an alp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dcbfac9ef55
unity_docs
physics
Show me a Unity C# example demonstrating `MonoBehaviour.OnParticleTrigger`.
MonoBehaviour.OnParticleTrigger() Description OnParticleTrigger is called when any particles in a Particle System meet the conditions in the trigger module. This can be used to kill or modify particles that are inside or outside a collision volume. ```csharp using UnityEngine; using System.Collections; using Syst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_798e668770c0
unity_docs
scripting
What are the parameters of `GameObject.BroadcastMessage` in Unity?
Description Calls the specified method on every MonoBehaviour attached to the GameObject or any of its children. A parameter specified for a method that doesn't accept parameters is ignored. If options is set to SendMessageOptions.RequireReceiver an error is printed when the message is not picked up by any component. `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b1a3b46d0c9
unity_docs
scripting
What is `SceneManagement.SceneUtility` in Unity? Explain its purpose and usage.
SceneUtility class in UnityEngine.SceneManagement / Implemented in: UnityEngine.CoreModule Description Scene and Build Settings related utilities. Static Methods Method Description GetBuildIndexByScenePath Get the build index from a Scene path. GetScenePathByBuildIndex Get the Scene path from a build index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f74e45c09b9f
unity_docs
performance
What is `Profiling.IProfilerFrameTimeViewSampleSelectionController.ClearSelection` in Unity? Explain its purpose and usage.
IProfilerFrameTimeViewSampleSelectionController.ClearSelection Declaration public void ClearSelection (); Description Call this method to clear the current selection in this frame time view based Profiler module .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0083a0146520
unity_docs
scripting
What is `UIElements.PointerCaptureOutEvent` in Unity? Explain its purpose and usage.
PointerCaptureOutEvent class in UnityEngine.UIElements / Inherits from: UIElements.PointerCaptureEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent when a VisualElement releases a pointer. Inherited Members Properties Property Description bubbles Returns whether this even...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5af1d78e8d8f
github
scripting
Write a Unity C# script called Scene Manager
```csharp using System; using System.Collections.Generic; using System.Linq; using Solid.Attributes; using UnityEngine.SceneManagement; using Object = UnityEngine.Object; /*Copyright (c) Created by Oleksii Volovich 2021*/ namespace Solid.SceneManagement { public static class SceneManager { private sta...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_67b1b8f5495f
unity_docs
scripting
Show me a Unity C# example demonstrating `Progress.Start`.
sing Report or SetDescription. parentId The unique ID of the parent progress indicator, if any. If the progress indicator has no parent, pass -1. options The progress indicator's initial progress options. Returns int The newly created progress identifier. This identifier is used for all other APIs to update the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94c38b305c2f
unity_docs
editor
What is `Handles.DrawingScope.Dispose` in Unity? Explain its purpose and usage.
Handles.DrawingScope.Dispose Declaration public void Dispose (); Description Automatically reverts Handles.color and Handles.matrix to their values prior to entering the scope, when the scope is exited. You do not need to call this method manually.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57bb5cf8be74
unity_docs
scripting
In Unity's 'Troubleshooting on iOS devices', what is 'Application stops responding and Xcode displays interrupted in the status bar' and how does it work?
The following list provides some common reasons for this issue: Scripting errors, such as using uninitialized variables. Use of third party Thumb compiled native libraries. These libraries can trigger a known problem in the iOS SDK linker and might cause random crashes. Use of generic types with value types as paramete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b4c1dbd24d7
unity_docs
scripting
What is `RenderSettings.fogColor` in Unity? Explain its purpose and usage.
RenderSettings.fogColor public static Color fogColor ; Description The color of the fog. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { // Set the fog color to be blue RenderSettings.fogColor = Color.blue; // And enable fog RenderSetting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ae1ad3aaa75
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.ObjectIndexer`.
ObjectIndexer class in UnityEditor.Search / Inherits from: Search.SearchIndexer Description A specialized SearchIndexer which provides methods to index a Unity Object from custom indexers. The ObjectIndexer can only be used in the context of a CustomObjectIndexerAttribute and therefore cannot be instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_613b2a4da95e
unity_docs
scripting
Show me a Unity code example for 'RepeatButton'.
the specified interval. Note : A RepeatButton doesn’t have the same styling as a regular Button. You can apply the.unity-button USS class to it to make it look like a regular Button. ## Create a RepeatButton Although you can create a RepeatButton with UXML, you must create the action logic in C#. The following C# exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_92cdf4144f24
unity_docs
rendering
In Unity's 'Unity Editor command line arguments reference', what is 'Configuration arguments' and how does it work?
You can run the Unity Editor and build Unity applications with additional commands and information on startup. This page lists the command line arguments you can use to launch and configure Unity Editor and Unity Player instances. Command Description -createProject <pathname> Create an empty project at the given path. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d649ddf19ce9
unity_docs
editor
Give me an overview of the `RuntimeInitializeOnLoadMethodAttribute` class in Unity.
RuntimeInitializeOnLoadMethodAttribute class in UnityEngine / Inherits from: Scripting.PreserveAttribute / Implemented in: UnityEngine.CoreModule Description Use this attribute to get a callback when the runtime is starting up and loading the first scene. Use the various options for RuntimeInitializeLoadType...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_54d4d2cecdae
unity_docs
rendering
In Unity's 'Marking textures as “Virtual Texturing Only”', what is 'How it works' and how does it work?
By default, when you load a Scene in the Unity Editor, the Editor loads all referenced textures into both CPU and GPU memory. The Unity Editor cannot stream textures into GPU memory from disk, but SVT can stream them from CPU memory. When you mark a texture as Virtual Texture Only , this means that on scene load the Ed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0d18182473a
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.RegisterFullObjectHierarchyUndo`.
hould use the dedicated functions. See Undo.SetTransformParent , Undo.AddComponent , Undo.DestroyObjectImmediate . If any object involved is part of the current Scene (e.g. a game object in the Hierarchy window or a component attached to such game object), calling this function will immediately mark the Scene as mod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_eb08936aa213
github
scripting
Write a Unity Editor script for Android Target Build
```csharp /* * MIT License * * Copyright (c) 2025 Diego Cangas Moldes * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_aa4824362852
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchService.CreateIndex`.
exing option set. roots Search index roots, for example "Assets" to index all Assets under Assets. includes Exclusive list of assets to be indexed. If this list is empty, everything will be indexed. excludes Patterns to exclude assets to be indexed under roots. onIndexReady Callback that gets invoked when the i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e21c1e2f81b
unity_docs
physics
What is `Collider2D.GetShapes` in Unity? Explain its purpose and usage.
Collider2D.GetShapes Declaration public int GetShapes ( PhysicsShapeGroup2D physicsShapeGroup ); Parameters Parameter Description physicsShapeGroup The PhysicsShapeGroup2D to store the retrieved PhysicsShape2D in. Returns int Returns the number of PhysicsShape2D retrieved from the Collider2D . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcbafc1128ce
unity_docs
physics
Give me an overview of the `ParticleSystemCollisionType` class in Unity.
ParticleSystemCollisionType enumeration Description The type of collisions to use for a given Particle System. Properties Property Description Planes Collide with a list of planes. World Collide with the world geometry.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba6e681ae301
unity_docs
math
Show me a Unity C# example demonstrating `AI.NavMesh.AddNavMeshData`.
ion Translate the navmesh to this position. rotation Rotate the navmesh to this orientation. Returns NavMeshDataInstance Representing the added navmesh. Description Adds the specified NavMeshData to the game. This function is similar to AddNavMeshData above, but the position and rotation specified is appl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_024df8d81102
github
scripting
Write a Unity C# script called Create Child
```csharp using UnityEngine; namespace Duck.HierarchyBehaviour { public static partial class GameObjectExtensions { /// <summary> /// Creates a new GameObject as a child transform. /// </summary> /// <param name="name">The desired GameObject name</param> /// <returns>The new GameObject</returns> public s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_977c4fbad56b
unity_docs
rendering
Explain 'Add per-instance properties to GPU instancing shaders in the Built-In Render Pipeline' in Unity.
By default, Unity GPU instances GameObjects with different Transforms in each instanced draw call. To add more variation to the instances, modify the shader to add per-instance properties such as color. You can do this both in surface shaders and in vertex/fragment shaders. Custom shaders don’t need per-instance data, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f263ebbd491
unity_docs
math
What is `Handles.CapFunction` in Unity? Explain its purpose and usage.
Handles.CapFunction Declaration public delegate void CapFunction (int controlID , Vector3 position , Quaternion rotation , float size , EventType eventType ); Parameters Parameter Description controlID The control ID for the handle. position The position of the handle in the space of Handles.mat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d11e5b8b5f4
unity_docs
editor
What is `Rendering.EditorGraphicsSettings.TryGetFirstRenderPipelineSettingsFromInterface` in Unity? Explain its purpose and usage.
EditorGraphicsSettings.TryGetFirstRenderPipelineSettingsFromInterface Declaration public static bool TryGetFirstRenderPipelineSettingsFromInterface (out TSettingsInterfaceType settings ); Parameters Parameter Description settings The settings object of type TSettingsInterfaceType if found, or null . Retu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a030477ff5b
unity_docs
ui
Show me a Unity C# example demonstrating `CursorLockMode`.
CursorLockMode enumeration Description How the cursor should behave. These are various modes that control the behaviour of the Cursor. A default cursor must be set in PlayerSettings > Default Cursor . ```csharp //This script makes Buttons that control the Cursor's lock state. Note that the Confined mode only w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3f7d922a68b
unity_docs
scripting
What is `Search.ObjectIndexer` in Unity? Explain its purpose and usage.
ObjectIndexer class in UnityEditor.Search / Inherits from: Search.SearchIndexer Description A specialized SearchIndexer which provides methods to index a Unity Object from custom indexers. The ObjectIndexer can only be used in the context of a CustomObjectIndexerAttribute and therefore cannot be instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a77b52b99ce
unity_docs
math
Show me a Unity C# example demonstrating `Matrix4x4.SetTRS`.
Matrix4x4.SetTRS Declaration public void SetTRS ( Vector3 pos , Quaternion q , Vector3 s ); Description Sets this matrix to a translation, rotation and scaling matrix. The current matrix is modified so that it places objects at position pos , oriented in rotation q and scaled by s . ```csharp // Tr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c233ee3cc6cc
unity_docs
editor
Show me a Unity C# example demonstrating `LightProbeGroup.probePositions`.
LightProbeGroup.probePositions public Vector3[] probePositions ; Description Editor only function to access and modify probe positions. Probe positions are specified in local space relative to the parent object. At runtime this function will return an empty Vector3 array and setting it will have no effect. ``...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b48d5385142c
unity_docs
rendering
What is `Rendering.BatchDrawCommandType` in Unity? Explain its purpose and usage.
BatchDrawCommandType enumeration Description Enumerates the different draw command types a BatchRendererGroup can draw. This is used in BatchDrawRange to say from what draw command stream the batch will read the commands. Properties Property Description Direct A direct draw command with a mesh and material...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2decf1154c38
unity_docs
scripting
What is `Device.Application.temporaryCachePath` in Unity? Explain its purpose and usage.
Application.temporaryCachePath public static string temporaryCachePath ; Description This has the same functionality as Application.temporaryCachePath . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_064357b1cda8
unity_docs
scripting
Explain 'Clock management with the Video Player component' in Unity.
This section describes the different time update modes available for the Video Player component and how it interacts with them. You can use the Video Player component to control how to time video playback relative to other interactive behaviors. For example, you can synchronize video playback with animation or with aud...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92201e03c841
unity_docs
rendering
What is `Rendering.RayTracingMeshInstanceConfig.material` in Unity? Explain its purpose and usage.
RayTracingMeshInstanceConfig.material public Material material ; Description The Material the ray tracing instance uses. This value is optional. If you use ray tracing shaders and don't set a Material, the GPU doesn't execute any code when rays hit an axis-aligned bounding box (AABB) associated with this in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1385d5bb0a83
unity_docs
rendering
In Unity's 'Configure reflections in prebuilt shaders', what is 'Configure reflections in the metallic workflow' and how does it work?
To make a material metallic or non-metallic, set the Metallic value to 1 or 0. Values between 0 and 1 blend the two results. To control the blurriness or sharpness of the reflection, adjust the Smoothness property. To make different parts of a material more or less metallic, add a texture map to control the Metallic an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c5bfbba9a3d4
unity_docs
ui
Explain 'Multiplayer Sessions Building Block' in Unity.
Implement Unity’s multiplayer sessions in your project with this Unity Building Block’s pre-made UI elements. Learn what sessions are, how to set them up, how to debug them, and how to connect to Unity’s Netcode packages. ## Introduction The Multiplayer Session Building Block helps you integrate Unity’s multiplayer s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e966ed564220
unity_docs
editor
What is `BuildAssetBundleOptions.ChunkBasedCompression` in Unity? Explain its purpose and usage.
BuildAssetBundleOptions.ChunkBasedCompression Description Use chunk-based LZ4 compression when creating the AssetBundle. When chunk-based compression is used, the content of the AssetBundle is broken into individual segments, which are compressed independently using the CompressionType.Lz4HC algorithm. The resu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db06ec6a5dd9
unity_docs
scripting
What is `Scripting.RequiredMemberAttribute` in Unity? Explain its purpose and usage.
RequiredMemberAttribute class in UnityEngine.Scripting / Implemented in: UnityEngine.CoreModule Description When a type is marked, all of its members with [RequiredMember] are marked. ```csharp using System; using UnityEngine; using UnityEngine.Scripting;public class NewBehaviourScript : MonoBehaviour { void S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d1758fd2029
unity_docs
scripting
What is `Ping` in Unity? Explain its purpose and usage.
Ping class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Ping any given IP address (given in dot notation). The ping operation is asynchronous and a ping object can be polled for status using Ping.isDone . When a response is received it is in Ping.time . Windows Store Apps : A stream soc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d26b1f545a04
unity_docs
rendering
What is `LightmapParameters.irradianceBudget` in Unity? Explain its purpose and usage.
LightmapParameters.irradianceBudget public int irradianceBudget ; Description The amount of data used for Enlighten Realtime Global Illumination texels. Specifies how detailed view of the Scene a texel has. Small values mean more averaged out lighting. Performance impact: It affects the memory footprint and t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18a55d1ffa7a
unity_docs
rendering
What is `ParticleSystem.MainModule.flipRotation` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.flipRotation public float flipRotation ; Description Makes some particles spin in the opposite direction. Set between 0 and 1. Higher values cause a higher proportion of particles to spin in the opposite direction. ```csharp using UnityEngine; using System.Collections;[RequireCompone...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_218bc89df48a
unity_docs
rendering
What is `Experimental.Lightmapping.BakeAsync` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Lightmapping.BakeAsync Declaration public static bool BakeAsync ( SceneManagement.Scene targetScene ); Parameters Parameter Description targetScene The Scene to generate lighting data for. Returns bool Returns true i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3dffb47c8951
unity_docs
animation
What is `Animations.AnimatorController.SetStateEffectiveBehaviours` in Unity? Explain its purpose and usage.
AnimatorController.SetStateEffectiveBehaviours(AnimatorState,int,StateMachineBehaviourInfo[]) Parameters Parameter Description state The AnimatorState which we want to set the Behaviour list. layerIndex The layer to set the Behaviour list. behaviours The Behaviour list that will be set. Description Sets the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c672b3e99bd6
unity_docs
math
What is `AndroidJNI.NewString` in Unity? Explain its purpose and usage.
AndroidJNI.NewString Declaration public static IntPtr NewString (string chars ); Declaration public static IntPtr NewString (char[] chars ); Description Constructs a new java.lang.String object from an array of Unicode characters. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac26fd85b472
unity_docs
editor
What is `Device.Application.isConsolePlatform` in Unity? Explain its purpose and usage.
Application.isConsolePlatform public static bool isConsolePlatform ; Description This has the same functionality as Application.isConsolePlatform 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_043bef51b3b9
unity_docs
scripting
What is `UIElements.BaseTreeView.AddToSelectionById` in Unity? Explain its purpose and usage.
BaseTreeView.AddToSelectionById Declaration public void AddToSelectionById (int id ); Parameters Parameter Description id The item id. Description Adds an item to the current selection by id. This will also expand the selected item if not expanded already.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b2150ac9fbb
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingConfig.transparentMaterialConfig` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingConfig.transparentMaterialConfig public Rendering.RayTracingInstanceMaterialConfig transparentMaterialConfig ; Description A configuration for defining when a Material is considered being transparent. RayTracingAccelerationStructure.CullInstances can specify a RayTracingSubMeshFlags...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a38e3bcf04ef
unity_docs
animation
What is `Animations.GenericBindingUtility.GetValues` in Unity? Explain its purpose and usage.
GenericBindingUtility.GetValues Declaration public static void GetValues (NativeArray<BoundProperty> boundProperties , NativeArray<float> values ); Declaration public static void GetValues (NativeArray<BoundProperty> boundProperties , NativeArray<int> values ); Parameters Parameter Description boundPro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab18e3321afa
unity_docs
rendering
What is `Rendering.PlatformKeywordSet` in Unity? Explain its purpose and usage.
PlatformKeywordSet struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description A collection of ShaderKeyword that represents a specific platform variant. Additional resources: ShaderKeyword , Rendering.ShaderKeywordSetUtility, Shader.EnableKeyword , Shader.EnableKeyword , Shader v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c0c0bc27b5b9
unity_docs
rendering
Explain 'SketchUp Import Settings window reference' in Unity.
SketchUp is software that is commonly used for architecture modeling. Unity reads SketchUp files directly and supports the following SketchUp features: Textures and Materials, which Unity imports according to the settings on the Materials tab . Component Definitions and Groups, which are converted into meshes, instance...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_065abd085fbf
unity_docs
scripting
Show me a Unity C# example demonstrating `Event.commandName`.
Event.commandName public string commandName ; Description The name of an ExecuteCommand or ValidateCommand Event. Available commands are: "Copy", "Cut", "Paste", "Delete", "SoftDelete", "Duplicate", "FrameSelected", "FrameSelectedWithLock", "SelectAll", "Find" and "FocusProjectWindow". Sent only in the editor. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d21a703d5a9
unity_docs
scripting
What is `Experimental.GraphView.StickyNote.SetPosition` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StickyNote.SetPosition Declaration public void SetPosition ( Rect rect ); Description Sets the position of the [StickyNote].
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cac14e7e4bfe
unity_docs
scripting
What is `SearchService.ObjectSelectorSearchContext.engineScope` in Unity? Explain its purpose and usage.
ObjectSelectorSearchContext.engineScope public SearchService.SearchEngineScope engineScope ; Description An enum that identifies the scope of the current search. This property is automatically set to SearchService.ObjectSelector.EngineScope.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f001b1cafc6
unity_docs
scripting
In Unity's 'Handle Game Controller input', what is 'Game Controller input mapping' and how does it work?
You can map controller input in the Unity Input settings using the following: Name KeyCode Axis A joystick button 14 joystick axis 14 B joystick button 13 joystick axis 13 X joystick button 15 joystick axis 15 Y joystick button 12 joystick axis 12 Left Stick N/A Axis 1 (X) - Horizontal, Axis 2 (Y) - Vertical Right Stic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad8b2c40653f
unity_docs
input
What is `Rendering.OnDemandRendering.renderFrameInterval` in Unity? Explain its purpose and usage.
OnDemandRendering.renderFrameInterval public static int renderFrameInterval ; Description Get or set the current frame rate interval. To restore rendering back to the value of Application.targetFrameRate or QualitySettings.vSyncCount set this to 0 or 1. ```csharp using UnityEngine; using UnityEngine.Renderi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_17ce64784a64
unity_docs
rendering
In Unity's 'Reflective Normal mapped Vertex-lit', what is 'Vertex-Lit Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader is Vertex-Lit , which is one of the simplest shaders. All lights shining on it are rendered in a single pass and calculated at vertices only. Because it is vertex-lit, it won’t display any pixel-based rendering effects, such as light c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bbbc22caa735
unity_docs
scripting
In Unity's 'Creating, loading, and saving scenes', what is 'Creating a new scene from the New Scene dialog' and how does it work?
Use the New Scene dialog to create new scenes from specific scene templates in your Project. You can also use the New Scene dialog to find and manage scene templates. For details see The New Scene dialog . By default, the New Scene dialog opens when you create a new scene from the menu ( File > New Scene ) or by using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24d34acd3894
unity_docs
scripting
Show me a Unity C# example demonstrating `ForceMode.Force`.
e in each FixedUpdate over a duration of time. This mode depends on the mass of rigidbody so more force must be applied to push or twist higher-mass objects the same amount as lower-mass objects. This mode is useful for setting up realistic physics where it takes more force to move heavier objects. In this mode, the un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.