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_c7224fb7ea77
unity_docs
editor
What is `SceneTemplate.ISceneTemplatePipeline` in Unity? Explain its purpose and usage.
ISceneTemplatePipeline interface in UnityEditor.SceneTemplate Description Derive from this interface to package a custom code sequence when a Scene template is instantiated. ISceneTemplatePipeline is instantiated once when a template is instantiated, and is notified multiple times during the instantiation sequence...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2329a7941cc1_doc_5
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Game Object which represents the right hand when teleporting. Signature: ```csharp public GameObject rightTeleportController ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8b8d9cc41c5
unity_docs
math
What are the parameters of `Vector3.ToString` in Unity?
Description Returns a formatted string for this vector. Defaults to two digits displayed (format="F2"). For more information, see Microsoft's documentation on Standard numeric format strings . ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void Start() { // let Unity show these...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b2c9116dc7c
unity_docs
input
What are the parameters of `Rect.Contains` in Unity?
Returns bool True if the point lies within the specified rectangle. Description Returns true if the x and y components of point is a point inside this rectangle. If allowInverse is present and true, the width and height of the Rect are allowed to take negative values (ie, the min value is greater than the max), and the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5ff050d702cb
unity_docs
rendering
In Unity's 'Validate and upload a UPM package for the Asset Store', what is 'Validate and upload to the Editor' and how does it work?
Install Asset Store Publishing Tools . Open the Unity Editor and go to Window > Tools > Asset Store > Validator . Select UPM as the Validation Type and run the Validator. After you’ve fixed any issues the Validator highlights, open the Asset Store Uploader ( Window > Tools > Asset Store > Uploader ). Select the UPM Pac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa665b6e3209
unity_docs
scripting
What is `Undo.ClearUndo` in Unity? Explain its purpose and usage.
Undo.ClearUndo Declaration public static void ClearUndo ( Object identifier ); Description Removes all Undo operation for the identifier object registered using Undo.RegisterCompleteObjectUndo from the undo stack.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f94a6b0847f
unity_docs
ui
Show me a Unity C# example demonstrating `EditorUtility.DisplayProgressBar`.
t to notify the user about the progress. Use this method for long operations that make the editor non-responsive. For long operations that happen in the background, use the Progress class instead. After you display the progress bar, clear it using ClearProgressBar . Additional resources: DisplayCancelableProgressBa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5984095751de
unity_docs
scripting
What is `Unity.Properties.PropertyPath.FromKey` in Unity? Explain its purpose and usage.
PropertyPath.FromKey Declaration public static Unity.Properties.PropertyPath FromKey (object key ); Parameters Parameter Description key The key of the <see cref="PropertyPathPart" />. Returns PropertyPath A new PropertyPath Description Returns a new PropertyPath from the provided key.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c3f1627808d2
unity_docs
input
Explain 'tvOS' in Unity.
tvOS is the operating system used on Apple TVs. It’s based on the iOS operating system and has many similar frameworks, technologies, and concepts. For more information about tvOS, see Apple’s tvOS Overview Use the following information to develop, build, and publish an application for tvOS. Topic Description tvOS requ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a01e73010fc
unity_docs
input
What is `TerrainTools.PaintContext.heightWorldSpaceMin` in Unity? Explain its purpose and usage.
PaintContext.heightWorldSpaceMin public float heightWorldSpaceMin ; Description The minimum height of all Terrain tiles that this PaintContext touches in world space. Unity uses this value to transform a height value from a world space Y-coordinate to a value in the [0, 1] range.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_be9136c20491
unity_docs
scripting
In Unity's 'Scale Constraint component', what is 'Properties' and how does it work?
Property Description Activate After you resize the constrained GameObject and its source GameObjects, click Activate to save this information. Activate saves the current offset from the source GameObjects in Scale At Rest and Scale Offset then enables Is Active and Lock . Zero Sets the rotation of the constrained GameO...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b733acae089
unity_docs
editor
Give me an overview of the `BuildTarget` class in Unity.
BuildTarget enumeration Description Target build platform. Additional resources: BuildPipeline.BuildPlayer , EditorUserBuildSettings.activeBuildTarget , BuildAssetBundlesParameters.targetPlatform . Properties Property Description StandaloneOSX Build a macOS standalone. StandaloneWindows Build a Windows 32-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d73b0bd88679
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.TextCursorPlacement.MoveLineStart`.
TextCursorPlacement.MoveLineStart Description Move the cursor to the beginning of the line of text. ```csharp [MenuItem("Examples/ISearchView/SetSearchText_WithCursorPosition")] public static void SetSearchText_WithCursorPosition() { var view = SearchService.ShowContextual("asset"); view.SetSearchText("t:material...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9c8f29ccf9c
unity_docs
rendering
What is `DepthTextureMode` in Unity? Explain its purpose and usage.
DepthTextureMode enumeration Description Depth texture generation mode for Camera . The flags can be combined, so you can set a Camera to generate any combination of: Depth, Depth+Normals, and MotionVector textures if needed. Additional resources: Using camera's depth textures , Camera.depthTextureMode . Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a68f01076f7
unity_docs
animation
What is `Animator.StopPlayback` in Unity? Explain its purpose and usage.
Animator.StopPlayback Declaration public void StopPlayback (); Description Stops the animator playback mode. When playback stops, the avatar resumes getting control from game logic. Additional resources: StartRecording , StopRecording , recorderStartTime , recorderStopTime , StartPlayback , , playbackTim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e966a135ae5
unity_docs
scripting
What is `WaitWhile.ctor` in Unity? Explain its purpose and usage.
WaitWhile Constructor Declaration public WaitWhile (Func<bool> predicate ); Parameters Parameter Description predicate The supplied delegate will be evaluated each frame after MonoBehaviour.Update and before MonoBehaviour.LateUpdate until delegate returns false . Description Initializes a yield instru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_344b0eab8f2a
unity_docs
xr
Show me a Unity C# example demonstrating `WWWForm.data`.
WWWForm.data public byte[] data ; Description (Read Only) The raw data to pass as the POST request body when sending the form. Usually, you just pass the WWWForm object directly to the WWW constructor, but you will need this variable if you want to change the request headers sent to the web server. Additional r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31420b92f5e2
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingResults.transformsChanged` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingResults.transformsChanged public bool transformsChanged ; Description This property is true if a Renderer in the Scene changed its Transform during the last frame. Renderers that use Ray Tracing Mode Off are not taken into account. The property can be used for example to reset the conve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42e3deb8425e
unity_docs
rendering
What are the parameters of `AssetDatabase.RenameAsset` in Unity?
Returns string An empty string, if the asset has been successfully renamed, otherwise an error message. Description Rename an asset file. All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png". ```csharp using UnityEngine; using UnityEditor;public class AssetDatabaseExamples : MonoBeha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69f11d038275
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.IsMainAssetAtPathLoaded`.
Returns bool Returns true if the main asset object at assetPath is loaded in memory. Description Checks whether the main asset object at assetPath is loaded in memory. All paths are relative to the Project folder, for example: "Assets/MyTextures/hello.png". Additional resources: AssetDatabase.LoadMainAsset...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68b295227173
unity_docs
scripting
What is `RuntimePlatform.IPhonePlayer` in Unity? Explain its purpose and usage.
RuntimePlatform.IPhonePlayer Description In the player on iPhone or iPad devices. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.IPhonePlayer) { Debug.Log("...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f00d44a47c61
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightPyramidShape.color` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightPyramidShape.color public Experimental.GlobalIllumination.LinearColor color ; Description The direct light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c0057653a20
unity_docs
editor
What is `AssetModificationProcessor.IsOpenForEdit` in Unity? Explain its purpose and usage.
AssetModificationProcessor.IsOpenForEdit(string[],List<string>,StatusQueryOptions) Parameters Parameter Description assetOrMetaFilePaths Paths to Assets or their .meta files, relative to the project folder. outNotEditablePaths Destination list of non-editable Asset paths. statusQueryOptions Specifies how Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7ffbe29537a
unity_docs
math
What is `Matrix4x4.zero` in Unity? Explain its purpose and usage.
Matrix4x4.zero public static Matrix4x4 zero ; Description Returns a matrix with all elements set to zero (Read Only). ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void Start() { // will print: // 0.00000 0.00000 0.00000 0.00000 // 0.00000 0.00000 0.00000 0.00000 // 0.00000 0....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_17cc55eed6d3
unity_docs
ui
Show me a Unity code example for 'RadioButton'.
e default group. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a RadioButton You can create a RadioButton with UI Builder, UXML, or C#. The following C# example creates two new radio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b76d3b039056
unity_docs
rendering
In Unity's 'Standard Particle Shaders Material Inspector window reference for the Built-In Render Pipeline', what is 'Blending Options' and how does it work?
All of the Standard Particle Shaders have Blending Options that enable you to blend particles with the objects surrounding them in different ways. Property: Function: Rendering Mode The Standard Particle Shaders can have the following Rendering Mode options, which control how the final color from the shader is combined...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81ba73109930
unity_docs
scripting
What is `Rendering.BatchDrawCommandIndirect.visibleInstancesBufferWindowOffset` in Unity? Explain its purpose and usage.
BatchDrawCommandIndirect.visibleInstancesBufferWindowOffset public uint visibleInstancesBufferWindowOffset ; Description Offset of the visible instances buffer that will be bound as element zero.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15248aa98cea
unity_docs
editor
Show me a Unity C# example demonstrating `SettingsProvider`.
er IMGUI or UIElements to draw it). It also provides an API that allows you to specify keywords which are used in the Settings and Preferences windows in two ways: 1) The search bar filters out SettingsProviders that don't have matching keywords. 2) Property Labels are highlighted with matching keywords. This example d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a21600a6fc65
github
scripting
Write a Unity Editor script for Gaussian Tool
```csharp // SPDX-License-Identifier: MIT using GaussianSplatting.Runtime; using UnityEditor.EditorTools; using UnityEngine; namespace GaussianSplatting.Editor { abstract class GaussianTool : EditorTool { protected GaussianSplatRenderer GetRenderer() { var gs = target as GaussianSp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ffc0ab02c5d1
unity_docs
animation
What is `AssetImporters.MaterialDescription` in Unity? Explain its purpose and usage.
MaterialDescription class in UnityEditor.AssetImporters Description Contains a set of typed properties for describing a texture input of a MaterialDescription. Properties Property Description materialName The name of the material Public Methods Method Description GetFloatPropertyNames Retrieves the propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f5deb088ef5
unity_docs
scripting
What is `AI.NavMeshObstacle.carvingMoveThreshold` in Unity? Explain its purpose and usage.
NavMeshObstacle.carvingMoveThreshold public float carvingMoveThreshold ; Description Threshold distance for updating a moving carved hole (when carving is enabled). If the NavMeshObstacle has moved a distance shorter than the threshold since last carving then the navmesh will not be updated. Additional resour...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21599f3dd282
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.UnregisterCustomDependencyPrefixFilter`.
AssetDatabase.UnregisterCustomDependencyPrefixFilter Declaration public static uint UnregisterCustomDependencyPrefixFilter (string prefixFilter ); Parameters Parameter Description prefixFilter Prefix filter for the custom dependencies to unregister. Returns uint Number of custom dependencies removed. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9850ccf08d04
unity_docs
rendering
What is `MaterialProperty.textureDimension` in Unity? Explain its purpose and usage.
MaterialProperty.textureDimension public Rendering.TextureDimension textureDimension ; Description Texture dimension (2D, Cubemap etc.) of the property (Read Only). Additional resources: type , textureValue , TextureDimension .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_337af2ece3a9
github
scripting
Write a Unity C# ScriptableObject for Mapping
```csharp using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARKit; [Serializable] public class Mapping { public ARKitBlendShapeLocation location; public string name; } [CreateAssetMenu(fileName = "ARFaceBlendShapesMapping", menuName = "AR Face Tracking Tools/Create Blend ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_2f1129114e51
unity_docs
editor
What are the parameters of `EditorGUIUtility.GetFlowLayoutedRects` in Unity?
Returns List<Rect> List of rectangles for the passed items. Description Layout list of string items left to right, top to bottom in the given area. Example of buttons positioned with GetFlowLayoutedRects. ```csharp using UnityEngine; using UnityEditor; using System.Collections.Generic;public class MyWindow : EditorWind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4eb81ed3e7ea
unity_docs
rendering
Explain 'Rendering paths in the Built-In Render Pipeline' in Unity.
Resources for choosing between the Forward, Deferred and Legacy Vertex Lit rendering paths in the Built-In Render Pipeline . Page Description Introduction to rendering paths Learn about how rendering paths have different capabilities and performance characteristics, and understand the difference between Forward, Deferr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe04678b4c2a
unity_docs
editor
What is `SerializedProperty.arraySize` in Unity? Explain its purpose and usage.
SerializedProperty.arraySize public int arraySize ; Description The number of elements in the array. If the SerializedObject contains a single object, this property returns the number of elements in the array. If the SerializedObject contains multiple objects, this property returns the smallest number of elemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d6a1238a4b1
unity_docs
scripting
What is `Search.PropertyDatabaseType.String` in Unity? Explain its purpose and usage.
PropertyDatabaseType.String Description Indicates that a string is stored in the record. When a string is small enough, it can be stored directly into the PropertyDatabase . If not, it is stored in a separate string table, and we store the symbol that references the string in the string table.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf50b5094120
unity_docs
scripting
What is `IMGUI.Controls.TreeView.SingleClickedItem` in Unity? Explain its purpose and usage.
TreeView.SingleClickedItem Declaration protected void SingleClickedItem (int id ); Parameters Parameter Description id ID of TreeViewItem that was single clicked. Description Override this method to handle single click events on an item.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0854da594225
unity_docs
ui
In Unity's 'Local folder or tarball paths', what is 'Example of an absolute path in Linux or macOS' and how does it work?
After the file: prefix, the path is a standard Portable Operating System Interface (POSIX) path, starting with a forward slash / : ``` { "dependencies": { "my_package_a": "file:/Users/my_username/github/my_package_folder", "my_package_b": "file:/Users/my_username/Downloads/my_package_tarball.tgz" } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d212a84f79e6
unity_docs
scripting
What is `UIElements.LengthUnit` in Unity? Explain its purpose and usage.
LengthUnit enumeration Description Describes how to interpret a Length value. Properties Property Description Pixel Interprets length as pixel. Percent Interprets length as a percentage, with 100 representing 100%. The value is not constrained and can range from negative numbers to values greater t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0e77471ca6f
unity_docs
rendering
What is `ParticleSystem.ShapeModule.textureClipThreshold` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.textureClipThreshold public float textureClipThreshold ; Description Discards particles when they spawn on an area of the Texture with a value lower than this threshold. Additional resources: ParticleSystem.ShapeModule.textureClipChannel , ParticleSystem.ShapeModule.texture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b661a72c0d2b
unity_docs
math
Give me an overview of the `Vector3` class in Unity.
Vector3 struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Representation of 3D vectors and points. This structure is used throughout Unity to pass 3D positions and directions around. It also contains functions for doing common vector operations. Besides the functions listed below, other...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cfa5b62e3d93
unity_docs
audio
Explain 'Audio Filters' in Unity.
You can modify the output of Audio Source and Audio Listener components by applying Audio Effects . These can filter the frequency ranges of the sound or apply reverb and other effects. The effects are applied by adding effect components to the object with the Audio Source or Audio Listener. The ordering of the compone...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_61678630eb59
unity_docs
scripting
In Unity's 'Avoid C# reflection overhead', what is 'Use code generation' and how does it work?
Instead of storing type names, you can generate a C# file at Editor time that contains a static array of types or delegates, eliminating all runtime reflection. The following code example generates a file Assets/GeneratedFeatureTypes.cs with a static array of the discovered types, which you can use at runtime with no r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b58cada6317
unity_docs
physics
What is `Collider.ClosestPoint` in Unity? Explain its purpose and usage.
Collider.ClosestPoint Declaration public Vector3 ClosestPoint ( Vector3 position ); Parameters Parameter Description position Location you want to find the closest point to. Returns Vector3 The closest point on the collider, returned in world space coordinates. Description The closest point on the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4294f4124f67
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_DXT5_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_DXT5_SRGB Description A four-component, block-compressed format (also known as BC3) where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c3dd67afe34
unity_docs
rendering
What are the parameters of `CubemapArray.GetPixelData` in Unity?
Returns NativeArray<T> A native array that points directly to the texture's data buffer in CPU memory. Description Gets the raw data from a texture. This method returns a NativeArray<T0> that points directly to the texture's data on the CPU and has the size of the mipmap level. The array doesn't contain a copy of the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f464c4a7e616
unity_docs
physics
What is `Rigidbody2D.GetAttachedColliders` in Unity? Explain its purpose and usage.
Rigidbody2D.GetAttachedColliders Declaration public int GetAttachedColliders (out Collider2D[] results , bool findTriggers = true); Parameters Parameter Description results An array of Collider2D used to receive the results. findTriggers Whether Collider2D that are triggers should be returned or not....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1075b4ad196
unity_docs
scripting
What are the parameters of `Component.TryGetComponent` in Unity?
Returns bool Returns true if the component is found, false otherwise. Description Gets the component of the specified type, if it exists. TryGetComponent attempts to retrieve the component of the given type. The notable difference compared to GameObject.GetComponent is that this method does not allocate in the Editor w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2fd5f2064cae
unity_docs
rendering
What is `LightTransport.BufferID` in Unity? Explain its purpose and usage.
BufferID struct in UnityEngine.LightTransport Description Unique identifier to a memory buffer in device. BufferID serves as an opaque handle to memory buffers allocated through IDeviceContext.CreateBuffer . The buffer can reside in CPU memory, GPU memory, or unified memory, depending on the implementation. The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_287a022a6388
unity_docs
rendering
What is `Light.lightShadowCasterMode` in Unity? Explain its purpose and usage.
Light.lightShadowCasterMode public LightShadowCasterMode lightShadowCasterMode ; Description Allows you to override the global Shadowmask Mode per light. Only use this with render pipelines that can handle per light Shadowmask modes. Incompatible with the legacy renderers.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d59c7863fc89
unity_docs
ui
What is `UIElements.MultiColumnTreeViewController` in Unity? Explain its purpose and usage.
MultiColumnTreeViewController class in UnityEngine.UIElements / Inherits from: UIElements.BaseTreeViewController / Implemented in: UnityEngine.UIElementsModule Description Multi-column tree view controller. View controllers of this type are meant to take care of data virtualized by any MultiColumnTreeView i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c29dc0a1799
unity_docs
editor
What are the parameters of `Profiling.FrameDataView.GetCounterValueAsLong` in Unity?
Returns long Returns the counter value as long . Description Gets the last value of a counter marker in the frame as a long data type. Use to retrieve the last data sample of a marker with MarkerFlags.Counter flag. ```csharp using UnityEditor.Profiling;class Example { static unsafe long ExtractMyCounterValue(FrameD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_453ca1d244a0
unity_docs
ui
Explain 'Migrate from uGUI to UI Toolkit' in Unity.
This page guides developers with experience in uGUI(Unity UI) to transition to the new UI Toolkit system. It explores the similarities and differences between uGUI and the UI Toolkit. As uGUI is a runtime-only UI system, this page focuses on runtime UI. UI Toolkit can create both runtime and Editor UI. This guide appli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85ab5f2e3d99
unity_docs
rendering
What is `RenderTexture.colorBuffer` in Unity? Explain its purpose and usage.
RenderTexture.colorBuffer public RenderBuffer colorBuffer ; Description Color buffer of the render texture (Read Only). Additional resources: RenderBuffer , depthBuffer , Graphics.SetRenderTarget , Graphics.Blit .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e10a0e8689c
unity_docs
animation
What is `Animations.AnimationHumanStream.GetMuscle` in Unity? Explain its purpose and usage.
AnimationHumanStream.GetMuscle Declaration public float GetMuscle ( Animations.MuscleHandle muscle ); Parameters Parameter Description muscle The Muscle that is queried. Returns float The muscle value. Description Returns the muscle value. Additional resources: MuscleHandle .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1447b518fd1d
unity_docs
scripting
What is `UIElements.CustomStyleProperty_1.ctor` in Unity? Explain its purpose and usage.
CustomStyleProperty<T0> Constructor Declaration public CustomStyleProperty<T0> (string propertyName ); Parameters Parameter Description propertyName Name of the property. Must start with a -- prefix. Description Creates custom property from a string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83cb60522b00
unity_docs
physics
What is `JointTranslationLimits2D.min` in Unity? Explain its purpose and usage.
JointTranslationLimits2D.min public float min ; Description Minimum distance the Rigidbody2D object can move from the Slider Joint's anchor. Additional resources: Rigidbody2D class, AnchoredJoint2D.connectedAnchor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bdad63dae21d
unity_docs
rendering
What is `NVIDIA.DLSSDebugFeatureInfos` in Unity? Explain its purpose and usage.
DLSSDebugFeatureInfos struct in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description Represents debug information for a particular DLSSContext. Properties Property Description execData The last execution data which the DLSSContext during execution. Additional resources: GraphicsDevice.Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c27e85677617
unity_docs
rendering
What is `PlatformIcon.width` in Unity? Explain its purpose and usage.
PlatformIcon.width public int width ; Description The width of the icon in pixels. The actual texture can be of any size and will be automatically upscaled or downscaled when building the Unity project.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4adace70ad5b_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A base class for MonoBehaviours that can beinstantiatedor addedto a with seven arguments passed to the function of the created instance.Instances of classes inheriting from receive the arguments via the method where they can be assigned to member fields or properties. Type of the first argument received in the func...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_c4d662369c6f
unity_docs
rendering
What are the parameters of `Rendering.RayTracingShader.Dispatch` in Unity?
Description Dispatches this RayTracingShader . When a ray generation shader is executed, the GPU launches a 3D grid of threads. In HLSL, the values of width, height and depth can be retrieved using DispatchRaysDimensions() function. To retrieve the index of the ray generation shader invocation, DispatchRaysIndex() HLSL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6176266618d1
unity_docs
math
What is `EditorJsonUtility.FromJsonOverwrite` in Unity? Explain its purpose and usage.
EditorJsonUtility.FromJsonOverwrite Declaration public static void FromJsonOverwrite (string json , object objectToOverwrite ); Parameters Parameter Description json The JSON representation of the object. objectToOverwrite The object to overwrite. Description Overwrite data in an object by reading from ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a51494e7b2c7
unity_docs
physics
Show me a Unity C# example demonstrating `Unity.Profiling.Memory.MemoryProfiler`.
he current target of the Player Connection via the Editor through the Profiler Window , the Memory Profiler or the Console Window . You can open the resulting snapshot files with the Memory Profiler , if they are saved with the .snap file extension. Listeners of the MemoryProfiler.CreatingMetadata event will on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_937a5dc4f1bf
unity_docs
scripting
What is `LightProbes` in Unity? Explain its purpose and usage.
LightProbes class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Stores light probe data for all currently loaded Scenes. The data includes: probe positions, Spherical Harmonics (SH) coefficients and the tetrahedral tessellation. You can modify the probe positions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2410727d1d8d
unity_docs
scripting
What is `SceneManagement.SceneManager.activeSceneChanged` in Unity? Explain its purpose and usage.
SceneManager.activeSceneChanged Parameters Parameter Description value Use a subscription of either a UnityAction< Scene , Scene > or a method that takes two Scene types arguments. Description Subscribe to this event to get notified when the active Scene has changed. This script added to activeSceneChanged...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21a33e7e21d7
unity_docs
scripting
Give me an overview of the `ImageEffectOpaque` class in Unity.
ImageEffectOpaque class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Any Image Effect with this attribute will be rendered after opaque geometry but before transparent geometry. This allows for effects which extensively use the depth buffer (SSAO, etc) to affect only opaque pixels. This a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14ddb6357a4c
unity_docs
editor
What is `MouseCursor.ScaleArrow` in Unity? Explain its purpose and usage.
MouseCursor.ScaleArrow Description Arrow with the scale symbol next to it for the sceneview. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5147fb41675
unity_docs
rendering
What is `TerrainLayerInspector.RenderStaticPreview` in Unity? Explain its purpose and usage.
TerrainLayerInspector.RenderStaticPreview Declaration public Texture2D RenderStaticPreview (string assetPath , Object[] subAssets , int width , int height ); Description Draws the default Terrain Layer static preview. Additional resources: Editor.RenderStaticPreview .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6ab5eda5f953
unity_docs
scripting
In Unity's 'JSON Serialization', what is 'Performance' and how does it work?
Benchmark tests indicate that JsonUtility is significantly faster than popular .NET JSON solutions, even though this class provides fewer features in some cases. Memory usage for garbage collection (GC) is at a minimum: ToJson allocates GC memory only for the returned string. FromJson allocates GC memory only for the r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c2f8da4e1b4
unity_docs
scripting
What is `VersionControl.Asset.isInCurrentProject` in Unity? Explain its purpose and usage.
Asset.isInCurrentProject public bool isInCurrentProject ; Description Returns true if the asset file exists and is in the current project. Returns false if the asset file does not exist. Multiple projects and files outside of the current project could be stored in version control. This method can be used to ide...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c11a8dcb477
unity_docs
editor
What are the parameters of `VersionControl.Provider.Merge` in Unity?
Description Initiates a merge task to handle the merging of conflicting Assets. This invokes a merge tool, which you can set in the External Tools section of the Preferences window, on the conflicting Assets. When the merge task finishes, the AssetList only contains the Assets that the tool could merge. To correctly re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21bc7f437710
unity_docs
scripting
What is `PlayerSettings.WSAImageType.UWPSquare71x71Logo` in Unity? Explain its purpose and usage.
PlayerSettings.WSAImageType.UWPSquare71x71Logo Description The image to display as the small tile in the start menu. The Universal Windows Platform asset file name for this is SmallTile.png. For more information about application icons and logos, see Microsoft's documentation .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_277555c29015
unity_docs
ui
What is `UIElements.VisualElement.name` in Unity? Explain its purpose and usage.
VisualElement.name public string name ; Description The name of this VisualElement. Use this property to write USS selectors that target a specific element. The standard practice is to give an element a unique name.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This event is raised when the initial map scene has completed streaming all resources. Signature: ```csharp public event Action OnInitialStreamingComplete; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_7a590c71b68c
unity_docs
input
What is `UIElements.TextField` in Unity? Explain its purpose and usage.
TextField class in UnityEngine.UIElements / Inherits from: UIElements.TextInputBaseField_1 / Implemented in: UnityEngine.UIElementsModule Description A TextField accepts and displays text input. For more information, refer to UXML element TextField . Static Properties Property Description inputUssClass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6c37ce4eb0bb
unity_docs
editor
Explain 'Native memory allocators reference' in Unity.
You can control how native memory is allocated through using command line arguments, or using the settings in the Unity Editor ( Edit > Project Settings > Memory Settings ). For information on how to customize native memory allocators, refer to Customizing native memory allocators . The following table contains informa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc034606fd7e
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.ScrollToItem` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.ScrollToItem Declaration public void ScrollToItem (int index ); Parameters Parameter Description index Item index to scroll to. Specify -1 to make the last item visible. Description Scrolls to a specific item index and makes it visible.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1da792a11f30
unity_docs
scripting
What is `Unity.Profiling.Memory.CaptureFlags.ManagedObjects` in Unity? Explain its purpose and usage.
CaptureFlags.ManagedObjects Description Specifies that the entire managed heap and all the data needed to parse it should be captured as part of the Memory Snapshot. This includes the managed Types and their field information and connections from Native Objects to Managed Objects. Corresponds to the ManagedHeapSe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9658f2025d3b
github
scripting
Write a Unity C# UI script for Scene System View
```csharp using System; using System.Threading.Tasks; using RMC.Core.Borrowed.DesignPatterns.Creational.Singletons; using RMC.Mini.View; using UnityEngine; using UnityEngine.Events; using UnityEngine.UIElements; // ReSharper disable Unity.NoNullPropagation namespace RMC.Mini.Features.SceneSystem { /// <summary> ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_32af2a1e1ab6
unity_docs
rendering
What is `EditorWindow.OnLostFocus` in Unity? Explain its purpose and usage.
EditorWindow.OnLostFocus() Description Called when the window loses keyboard focus. Additional resources: OnFocus . Restores normal view when you lose focus on this window. ```csharp // Simple script that lets you preview your main camera in // Orthographic view when selected. using UnityEngine; using UnityEdit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77fa97bac8c2
unity_docs
rendering
What is `LightingSettings.exportTrainingData` in Unity? Explain its purpose and usage.
Method group is Obsolete LightingSettings.exportTrainingData Obsolete Training data export for baked lighting is deprecated. public bool exportTrainingData ; Description Whether the Progressive Lightmapper exports machine learning training data to the Project folder when it performs the bake. ( Editor only)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16fd3e9292e1
unity_docs
ui
What is `UIElements.ToggleButtonGroupState.GetHashCode` in Unity? Explain its purpose and usage.
ToggleButtonGroupState.GetHashCode Declaration public int GetHashCode (); Returns int The hashcode of this ToggleButtonGroupState. Description Get the hashcode of this ToggleButtonGroupState.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_06a70a575f9c
unity_docs
rendering
In Unity's 'Occlusion Culling window reference', what is 'Object tab' and how does it work?
In the Object tab, you can click the All , Renderers , and Occlusion Areas buttons to filter the contents of the Hierarchy window. When the Renderers filter is active, select a Renderer in the Hierarchy window or Scene view to view and change its occlusion culling settings in the Occlusion Culling window. When the Occl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4170103c7112
unity_docs
scripting
What is `ModelImporterIndexFormat` in Unity? Explain its purpose and usage.
ModelImporterIndexFormat enumeration Description Format of the imported mesh index buffer data. Index buffer can either be 16 bit (supports up to 65535 vertices in a mesh), or 32 bit (supports up to 4 billion vertices). Default behavior is ModelImporterIndexFormat.Auto , which picks the format based on vertex cou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1239c7b4c5c1
unity_docs
scripting
In Unity's 'Avoid C# reflection overhead', what is 'Scan assemblies in the Editor' and how does it work?
The following example shows how to scan assemblies in the Editor, serialize the data, and use it at runtime without reflection. Suppose you want to find all types that implement an interface called IMyFeature and use that information at runtime. You can write an Editor script that scans for all types implementing IMyFe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ede890de25f6
unity_docs
ui
Show me a Unity code example for 'Coordinate and position systems'.
no influence on the element’s position. Similarly, the element doesn’t influence the position and size of other siblings under the same parent. Each visual element determines the coordinate system used to calculate its position. You can configure which coordinate system to use in the element stylesheet. The following C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e03973e6a564
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.CustomDataModule.SetColor`.
tem.MinMaxGradient gradient ); Parameters Parameter Description stream The name of the custom data stream to apply the gradient to. gradient The gradient to be used for generating custom color data. Description Set a MinMaxGradient , in order to generate custom HDR color data. Additional resources: Part...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df2fdbe73fad
unity_docs
animation
What is `Animator.GetBoneTransform` in Unity? Explain its purpose and usage.
Animator.GetBoneTransform Declaration public Transform GetBoneTransform ( HumanBodyBones humanBoneId ); Parameters Parameter Description humanBoneId The human bone to be queried. See the HumanBodyBones enum for a list of possible values. Returns Transform Returns the Transform mapped to the human...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b807347ddfd4
unity_docs
rendering
What is `ParticleSystem.MainModule.startRotation` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startRotation public ParticleSystem.MinMaxCurve startRotation ; Description The initial rotation of particles when the Particle System first spawns them. Note that you should specify the value in radians. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using Syste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27bbdcffd6c9
unity_docs
math
Show me a Unity C# example demonstrating `TerrainData.SetDetailLayer`.
r of detail objects to procedurally place in the terrain area that corresponds to the pixel. These values depend on which DetailScatterMode is set. Because several different detail types may be used, the map is arranged into "layers" - the array indices of the layers are determined by the order of the detail types d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c61ae0c17ce4
github
scripting
Write a Unity C# XR/VR script for Basic Menu Logic
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace ExPresSXR.UI.Menu { public class BasicMenuLogic : MonoBehaviour { /// <summary> /// Menu to switch to when `GoBack` is called. /// </summary> [SerializeField] protected Bas...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_18cc344d4a39
unity_docs
editor
Explain 'Customize your workspace layout' in Unity.
The Unity Editor manages its interface as a collection of tabs. You can customize the layout of the tabs, save layouts, and choose between built-in layouts. ## Manage tabs Any window you add from the main menu opens as a new tab. You can also right-click a tab’s name to: Maximise the tab. Close the tab. Add tabs. Man...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35d1d2cfd3f5
unity_docs
scripting
What is `SleepTimeout` in Unity? Explain its purpose and usage.
SleepTimeout class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Constants for special values of Screen.sleepTimeout . Use them to specify something other than a fixed amount of seconds before dimming the screen. Static Properties Property Description NeverSleep Prevent screen dimming...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aba26e270493
unity_docs
rendering
What is `Rendering.ShaderRequirements` in Unity? Explain its purpose and usage.
ShaderRequirements enumeration Description Shader features required by a specific shader. Features are bit flags. Properties Property Description None No shader requirements. BaseShaders Indicates that basic shader capability i.e. Shader Model level 2.0 is required. Interpolators10 Indicates that support for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_96866a612226
unity_docs
performance
In Unity's 'Introduction to NativeContainer', what is 'Memory allocators' and how does it work?
When you create a NativeContainer instance, you must specify the memory allocation type that you need. The allocation type you use depends on how long you would like to keep the native container available for. This way you can tailor the allocation to get the best performance possible in each situation. There are three...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9921d71ca15d
unity_docs
scripting
What is `ArticulationDrive.upperLimit` in Unity? Explain its purpose and usage.
ArticulationDrive.upperLimit public float upperLimit ; Description The upper limit of motion for a particular degree of freedom. Units of measurement - meters for linear and degrees for angular motion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_456d2f2f6673
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh.OptimizeReorderVertexBuffer`.
used where the ordering of the vertices is not significant as it will change - the order of the geometry itself is unaffected. You should only use this function on meshes you generate procedurally in code, for regular mesh assets it is called automatically by the import pipeline when 'Optimize Mesh' is enabled in the m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02679b7cf64d
unity_docs
physics
What is `CapsuleDirection2D` in Unity? Explain its purpose and usage.
CapsuleDirection2D enumeration Description The direction that the capsule sides can extend. Additional resources: :CapsuleCollider::direction. Properties Property Description Vertical The capsule sides extend vertically. Horizontal The capsule sides extend horizontally.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.