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_8b06748f09a3
unity_docs
physics
What is `PhysicsScene.CapsuleCast` in Unity? Explain its purpose and usage.
PhysicsScene.CapsuleCast Declaration public bool CapsuleCast ( Vector3 point1 , Vector3 point2 , float radius , Vector3 direction , out RaycastHit hitInfo , float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_44f6374420a8
unity_docs
scripting
Show me a Unity code example for 'Vector3Field'.
tor3Field lets users enter a Vector3 value. Note : To align a Vector3Field 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 Vector3Field You can create a Vector3Field with UI Builder, UXML, and C#. The followin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82ac1403f146
unity_docs
performance
What are the parameters of `Unity.IO.LowLevel.Unsafe.AsyncReadManager.Read` in Unity?
Returns ReadHandle Used to monitor the progress and status of the read command. Description Issues an asynchronous file read operation. Returns a ReadHandle. You can set the assetName , typeId , and subsystem parameters to collect asset-specific metrics for this read operation. When you enable metrics collection with A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_134d08cbf96a
unity_docs
rendering
What is `SpeedTreeImporter.enableSubsurfaceByDefault` in Unity? Explain its purpose and usage.
SpeedTreeImporter.enableSubsurfaceByDefault public bool enableSubsurfaceByDefault ; Description Gets and sets a boolean to enable the subsurface scattering effect for the SpeedTree asset (affects only SpeedTree v8 assets). This setting controls the light scattered out the back side of leaves and other two-side...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ce6fb4dee01f
unity_docs
physics
Explain 'Texture compression in Web' in Unity.
Use texture compression in the Web platform to create builds that target platforms based on the texture compression formats they support. ## Texture compression formats Desktop and mobile devices support different texture compression formats. For the best results, provide a format optimized for each. To run your game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57dac3bfe89b
unity_docs
editor
What is `Handles.FreeRotateHandle` in Unity? Explain its purpose and usage.
Handles.FreeRotateHandle Declaration public static Quaternion FreeRotateHandle (int id , Quaternion rotation , Vector3 position , float size ); Declaration public static Quaternion FreeRotateHandle ( Quaternion rotation , Vector3 position , float size ); Parameters Parameter Description i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3b545529fd6b
unity_docs
physics
In Unity's '2D preferences reference', what is '2D physics collider settings' and how does it work?
Set the colors for the following UI elements. Property Function Awake Color (Outline) Set the color of the Collider 2D Gizmo ’s outline when the Rigidbody 2D it’s attached to is Awake . Awake Color (Filled) Set the color of the Collider 2D Gizmo’s interior fill when the Rigidbody 2D it’s attached to is Awake . Asleep C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbd3a3c2559c
unity_docs
rendering
What is `Canvas.GetDefaultCanvasMaterial` in Unity? Explain its purpose and usage.
Canvas.GetDefaultCanvasMaterial Declaration public static Material GetDefaultCanvasMaterial (); Description Returns the default material that can be used for rendering normal elements on the Canvas.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01145bc998df
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.SetMainObject`.
tion mainObject The object to become the main object. assetPath Path to the asset file. Description Specifies which object in the asset file should become the main object after the next import. All other objects in the asset become children of the main object. NOTE: This function modifies the importer object, no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da48489cfb5e
unity_docs
rendering
What is `ParticleSystem.ColorBySpeedModule` in Unity? Explain its purpose and usage.
ColorBySpeedModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the ColorBySpeedModule of a Particle System. Additional resources: ParticleSystem , ParticleSystem.colorBySpeed . Properties Property Description color The gradient that controls t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_681438e5309d
unity_docs
animation
What is `Animator.SetTarget` in Unity? Explain its purpose and usage.
Animator.SetTarget Declaration public void SetTarget ( AvatarTarget targetIndex , float targetNormalizedTime ); Parameters Parameter Description targetIndex The avatar body part that is queried. targetNormalizedTime The current state Time that is queried. Description Sets an AvatarTarget and a targetN...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86f8753c9acb
unity_docs
math
Show me a Unity C# example demonstrating `GeometryUtility.TryCreatePlaneFromPolygon`.
aneFromPolygon creates a plane from the given list of vertices that define the polygon, as long as they do not characterize a straight line or zero area. There must be at least three vertices to create the plane; zero, one or two vertices cause false to return with no plane. This works for concave polygons and po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7baa87b0ac70
unity_docs
scripting
What is `AwaitableCompletionSource_1.TrySetResult` in Unity? Explain its purpose and usage.
AwaitableCompletionSource<T0>.TrySetResult Declaration public bool TrySetResult (ref T value ); Parameters Parameter Description value Value to pass to the awaitable continuation. Returns bool Indicates if the completion was successfully raised. Description Raise the awaitable completion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_68174d2a7fab
unity_docs
rendering
Explain 'Transparent Cutout Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . One consideration for this shader is that the Base texture’s alpha channel defines both the Transparent areas as well as the Specular Map. ## Transparent Cutout Properties Note. Unity 5 introduced the Standard Shader which replaces this shader....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3073bf2bead
unity_docs
physics
What is `ForceReserializeAssetsOptions.ReserializeMetadata` in Unity? Explain its purpose and usage.
ForceReserializeAssetsOptions.ReserializeMetadata Description Specifies that AssetDatabase.ForceReserializeAssets should load, upgrade, and save the .meta files for the assets at the paths passed to the function, but not the assets themselves.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_557c02e8c026
unity_docs
rendering
What is `EditorGUI.DrawPreviewTexture` in Unity? Explain its purpose and usage.
EditorGUI.DrawPreviewTexture Declaration public static void DrawPreviewTexture ( Rect position , Texture image , Material mat = null, ScaleMode scaleMode = ScaleMode.StretchToFill, float imageAspect = 0, float mipLevel = -1, Rendering.ColorWriteMask colorWriteMask = ColorWriteMask.All, float ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57b85bc560ee
unity_docs
rendering
What is `Profiling.Recorder.sampleBlockCount` in Unity? Explain its purpose and usage.
Recorder.sampleBlockCount public int sampleBlockCount ; Description Number of time Begin/End pairs was called during the previous frame. (Read Only) The counter represents the number of complete or running profiling block during previous frame. ```csharp using UnityEngine; using UnityEngine.Profiling;public cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa40e57f43d8
unity_docs
editor
What is `Device.SystemInfo.maxComputeWorkGroupSizeX` in Unity? Explain its purpose and usage.
SystemInfo.maxComputeWorkGroupSizeX public static int maxComputeWorkGroupSizeX ; Description This has the same functionality as SystemInfo.maxComputeWorkGroupSizeX 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_ac80f799a07b
unity_docs
audio
What is `AudioSource.reverbZoneMix` in Unity? Explain its purpose and usage.
AudioSource.reverbZoneMix public float reverbZoneMix ; Description The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones. The range from 0 to 1 is linear (like the volume property) while the range from 1 to 1.1 is an extra boost range that all...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28fe8ecb4536
unity_docs
scripting
What is `IMGUI.Controls.AdvancedDropdown.ItemSelected` in Unity? Explain its purpose and usage.
AdvancedDropdown.ItemSelected Declaration protected void ItemSelected ( IMGUI.Controls.AdvancedDropdownItem item ); Parameters Parameter Description item Item that got selected. Description Override this method to get notified when an item is selected.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7dd3abfa700
unity_docs
scripting
Give me an overview of the `AudioLowPassFilter` class in Unity.
AudioLowPassFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Low Pass Filter passes low frequencies of an AudioSource or all sounds reaching an AudioListener , while removing frequencies higher than the Cutoff Frequency. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_de269cbfd8ee
unity_docs
rendering
Explain 'Branch based on platform features' in Unity.
Direct use of these platform macros is discouraged, as they don’t always contribute to the future-proofing of your code. For example, if you’re writing a Shader that checks for D3D11, you may want to ensure that, in the future, the check is extended to include Vulkan. Instead, Unity defines several helper macros (in HL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_223caa56578a
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startSizeZ`.
ParticleSystem.MainModule.startSizeZ public ParticleSystem.MinMaxCurve startSizeZ ; Description The initial size of particles along the z-axis when the Particle System first spawns them. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(Parti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5dd06670294
unity_docs
audio
What is `Networking.UnityWebRequestMultimedia.GetAudioClip` in Unity? Explain its purpose and usage.
UnityWebRequestMultimedia.GetAudioClip Declaration public static Networking.UnityWebRequest GetAudioClip (string uri , AudioType audioType ); Declaration public static Networking.UnityWebRequest GetAudioClip (Uri uri , AudioType audioType ); Parameters Parameter Description uri The URI of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_08ff82dee53c_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A class that extends HandDataContainer, andobtains hand joint poses from the Microsoft.MixedReality.OpenXR.HandTracker class. Signature: ```csharp private class OpenXRHandContainer : HandDataContainer ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_eafbfe61e6d4
unity_docs
scripting
What is `EditorTools.ToolManager.RefreshAvailableTools` in Unity? Explain its purpose and usage.
ToolManager.RefreshAvailableTools Declaration public static void RefreshAvailableTools (); Description Call RefreshAvailableTools to rebuild the contents of the Scene View Tools Overlay. This method is useful when a tool can change the value of EditorTool.IsAvailable outside of selection and tool change event...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49c3f0fed01c
unity_docs
editor
What are the parameters of `MonoImporter.SetDefaultReferences` in Unity?
Description Sets default references for this MonoScript . When the Unity Editor instantiates this MonoScript , it uses the default values to populate the named fields. Additional resources: MonoImporter.GetDefaultReference . ```csharp using UnityEngine; using UnityEditor;class Example { [MenuItem("Examples/Set Defa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c218e6b1147
unity_docs
scripting
What is `UIElements.UxmlTypeRestriction.Equals` in Unity? Explain its purpose and usage.
UxmlTypeRestriction.Equals Declaration public bool Equals ( UIElements.UxmlTypeRestriction other ); Parameters Parameter Description other The object to compare with. Returns bool True if the otheer object is equal to this one. Description Indicates whether the current UxmlTypeRestriction object ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8f6d37268de
unity_docs
scripting
Give me an overview of the `ComputeShaderImporter` class in Unity.
ComputeShaderImporter class in UnityEditor / Inherits from: AssetImporter Description Define compute shader import settings in the Unity Editor. Properties Property Description preprocessorOverride This property has no effect. Inherited Members Properties Property Description assetBundleName Get or set t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5560c29ac941
unity_docs
math
What is `Ray` in Unity? Explain its purpose and usage.
Ray struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Representation of rays. A ray is an infinite line starting at origin and going in some direction . Properties Property Description direction The direction of the ray. origin The origin point of the ray. Constructors Constru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3960dca23fa3
unity_docs
scripting
Give me an overview of the `TileEditor` class in Unity.
TileEditor class in UnityEditor / Inherits from: TileBaseEditor Description Default editor for Tile assets. Public Methods Method Description OnInspectorGUI Draws the default Tile Inspector GUI. RenderStaticPreview Creates a texture preview for rendering the Tile asset preview. Inherited Members Propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_604f6ad4458b
unity_docs
xr
What is `Rendering.ObjectIdResult.DecodeIdFromColor` in Unity? Explain its purpose and usage.
ObjectIdResult.DecodeIdFromColor Declaration public static int DecodeIdFromColor ( Color color ); Description A utility function that can be used to decode colors from ObjectIdRequest._destination to an index that can then be looked up in ObjectIdResult._idToObjectMapping.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d51645fc4367
unity_docs
scripting
In Unity's 'Mesh Filter component reference', what is 'Mesh Filter Inspector reference' and how does it work?
Property Function Mesh A reference to a mesh asset . To change the mesh asset that the Mesh Filter component references, use the picker (circle icon) next to the mesh’s name. Note: The settings for other components on this GameObject don’t change when you change the mesh that the Mesh Filter references. For example, a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ec6e54f2e5e
unity_docs
rendering
What is `ShaderData.ActiveSubshaderIndex` in Unity? Explain its purpose and usage.
ShaderData.ActiveSubshaderIndex public int ActiveSubshaderIndex ; Description Returns the index of the active subshader or -1 if none is currently active. The active subshader is the first one that is supported and satisfied the LOD needs.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8de6fdc7c96a
unity_docs
editor
Show me a Unity C# example demonstrating `ProfilerWindow.SelectedFrameIndexChanged`.
Description value The zero-based index of the frame currently selected in the Profiler Window. A long. Description Calls the methods in its invocation list when the Profiler window’s selected frame index changes. The Profiler window’s selected frame index may change for a variety of reasons, such as a new frame be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8cfe079121d1
unity_docs
physics
Explain 'Event functions' in Unity.
Event functions are a set of predefined callbacks that all MonoBehaviour script components can potentially receive. The callbacks are triggered by various Unity Editor and Engine events, including: Regular frame and physics updates Scene and object lifecycle events , such as initialization and destruction of objects in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0af4f4b5d5a
unity_docs
animation
What is `ModelImporter.clipAnimations` in Unity? Explain its purpose and usage.
ModelImporter.clipAnimations public ModelImporterClipAnimation[] clipAnimations ; Description Animation clips to split animation into. Additional resources: ModelImporterClipAnimation . When you import a file for the first time clipAnimations will be always empty. If you need to populate clipAnimations before ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a2b3791c3de3
unity_docs
rendering
In Unity's 'Self-Illuminated Normal mapped Specular', what is 'Normal Mapped Properties' and how does it work?
Like a Diffuse shader, this computes a simple (Lambertian) lighting model. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on the angle, and does not change as the camera moves or rotates around. Normal mapping simulates small surface details using a text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5398d2a0851
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Danish`.
SystemLanguage.Danish Description Danish. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Danish language if (Application.systemLanguage == SystemLanguage.Danish) { //Outputs into console that the system is in Danish...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10fa78489756
unity_docs
scripting
What is `VersionControl.OnlineState` in Unity? Explain its purpose and usage.
OnlineState enumeration Description Represent the connection state of the version control provider. Properties Property Description Updating The version control provider is currently trying to connect to the version control server. Online Connection to the version control server has been established. Offline ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_271dc41fea17
unity_docs
scripting
What is `Search.SearchExpressionType.Variadic` in Unity? Explain its purpose and usage.
SearchExpressionType.Variadic Description Used in SearchExpressionEvaluatorAttribute to specify that a parameter can be used multiples times. For example count{Iterable1, Iterable2,... IterableN} can be executed with any number of iterables are parameters. ```csharp [SearchExpressionEvaluator(SearchExpressionType...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af700eef3591
unity_docs
networking
What is `Android.AndroidConfiguration.keyboardHidden` in Unity? Explain its purpose and usage.
AndroidConfiguration.keyboardHidden public Android.AndroidKeyboardHidden keyboardHidden ; Description Mirrors the Android property keyboardHidden . For information about this property, refer to the Android developer documentation on keyboardHidden .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a12ca7ee919
unity_docs
ui
What are the parameters of `Mathf.Clamp` in Unity?
Returns float The float result between the minimum and maximum values. Description Clamps the given value between the given minimum float and maximum float values. Returns the given value if it is within the minimum and maximum range. Returns the minimum value if the given float value is less than the minimum. Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e187ef9bf9e2
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture3D.GetPixelData`.
oint to the correct memory location if the texture has been modified or updated. If you use a small type for T such as byte , GetPixelData may fail because the NativeArray would exceed the maximum length ( Int32.MaxValue ). To avoid this, use a larger type or struct. GetPixelData throws an exception when it fai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04f38706786e
unity_docs
scripting
What is `AI.NavMeshData` in Unity? Explain its purpose and usage.
NavMeshData class in UnityEngine.AI / Inherits from: Object / Implemented in: UnityEngine.AIModule Description Contains and represents NavMesh data. An object of this class can be used for creating instances of NavMeshes. See NavMesh.AddNavMeshData . The contained NavMesh can be built and updated using the b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5c125b3bed0c
github
scripting
Write a Unity C# script called Vector3Property_Writeable
```csharp using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables { [CreateAssetMenu(menuName = "Game Properties/Vector3 Property - Writeable")] public class Vector3Property_Writeable : Vector3Property { new public void Set(Vector3 value) => SetAndNotify(value); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7d20d9759e1
unity_docs
editor
What is `EditorGUILayout.HorizontalScope` in Unity? Explain its purpose and usage.
HorizontalScope class in UnityEditor Description Disposable helper class for managing BeginHorizontal / EndHorizontal . This is an extension to GUILayout.HorizontalScope . It can be used for making compound controls Horizontal Compound group. ```csharp using UnityEngine; using UnityEditor;// Create a Horizo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66fd3e59c50e
unity_docs
scripting
What is `ObjectChangeEventStream.Builder.PushChangeGameObjectOrComponentPropertiesEvent` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.Builder.PushChangeGameObjectOrComponentPropertiesEvent Declaration public void PushChangeGameObjectOrComponentPropertiesEvent (ref ChangeGameObjectOrComponentPropertiesEventArgs data ); Parameters Parameter Description data The event data to add to the stream. Description Adds an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_152876d7b060
unity_docs
math
What is `AndroidJNI.CallStaticVoidMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticVoidMethodUnsafe Declaration public static void CallStaticVoidMethodUnsafe (IntPtr clazz , IntPtr methodID , jvalue* args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Java Nati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c29c04796311
unity_docs
scripting
What is `Tilemaps.Tilemap.GetUsedTilesCount` in Unity? Explain its purpose and usage.
Tilemap.GetUsedTilesCount Declaration public int GetUsedTilesCount (); Returns int The total number of different Tile s used in the Tilemap . Description Gets the total number of different Tile s used in the Tilemap .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43c92e136b88
unity_docs
math
What is `Rendering.RayTracingAccelerationStructure.ManagementMode` in Unity? Explain its purpose and usage.
ManagementMode enumeration Description Defines whether Unity updates a RayTracingAccelerationStructure automatically, or if the user updates it manually via API. Additional resources: RayTracingAccelerationStructure.Settings.managementMode . Properties Property Description Manual Gives user control over popul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a2203a74777
unity_docs
editor
What is `Search.SearchDocument.source` in Unity? Explain its purpose and usage.
SearchDocument.source public string source ; Description Original source from which the document was indexed. The source is usually the container asset, i.e. prefab, Unity scene or the imported asset itself.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ca0c673c8e9
unity_docs
scripting
Show me a Unity C# example demonstrating `Logger.filterLogType`.
enable debug log message. By settings filterLogType to LogType.Log (default setting) will display all log messages. LogType.Warning will display Warning, Assert, Error and Exception log messages. LogType.Assert will display Assert, Error and Exception log messages. LogType.Error will display Error and Exce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f72a38756981
unity_docs
math
What is `Rendering.ShadowSplitData` in Unity? Explain its purpose and usage.
ShadowSplitData struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Describes the culling information for a given shadow split (e.g. directional cascade). Static Properties Property Description maximumCullingPlaneCount The maximum number of culling planes. Properties Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb7fdf2f1379
unity_docs
scripting
Show me a Unity C# example demonstrating `Handles.color`.
Handles.color public static Color color ; Description Sets the color of handles. Color is a persistent state and affects any handles drawn after it is set. Use DrawingScope to set the color for a block of handles without affecting the color of other handles. White cone that points to 0,0,0. ```csharp // Na...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_087d14672b03
unity_docs
rendering
Show me a Unity code example for 'Create a shader file'.
ion on using Shader blocks. For information on how a Shader object works, and the relationship between Shader objects, SubShaders and Passes, see Shader objects introduction . This example code demonstrates the basic syntax and structure of a Shader object. The example Shader object has a single SubShader that contains...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2675a55bc449
unity_docs
scripting
What is `ClipboardUtility.copyingGameObjects` in Unity? Explain its purpose and usage.
ClipboardUtility.copyingGameObjects Parameters Parameter Description value An array containing the GameObjects that will be copied. Description Event triggered before the selected GameObjects are copied to the clipboard. Occurs after the selected GameObjects have been optionally filtered through canCopyGameOb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b93929b277e
unity_docs
editor
What is `Editor.CreateCachedEditorWithContext` in Unity? Explain its purpose and usage.
Editor.CreateCachedEditorWithContext Declaration public static void CreateCachedEditorWithContext ( Object targetObject , Object context , Type editorType , ref Editor previousEditor ); Declaration public static void CreateCachedEditorWithContext (Object[] targetObjects , Object context , Type edit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b0ea0deedf8
unity_docs
editor
What is `QualitySettings.GetQualitySettings` in Unity? Explain its purpose and usage.
QualitySettings.GetQualitySettings Declaration public static Object GetQualitySettings (); Returns Object Returns the QualitySettings object. Description Provides a reference to the QualitySettings object. This method is used by internal code to implement undo functionality in the Unity Editor. Additiona...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a939a3636bd
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.SetAsFirstSibling`.
Transform.SetAsFirstSibling Declaration public void SetAsFirstSibling (); Description Move the transform to the start of the local transform list. ```csharp using UnityEngine; using System.Collections; using UnityEngine.UI; //Required when using UI Elements. using UnityEngine.EventSystems; // Required when usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cd492265c5e
unity_docs
scripting
What is `BoxCollider2D.autoTiling` in Unity? Explain its purpose and usage.
BoxCollider2D.autoTiling public bool autoTiling ; Description Determines whether the BoxCollider2D's shape is automatically updated based on a SpriteRenderer's tiling properties. When this is true, the Collider's shape is generated from a SpriteRenderer, if one exists as a component of the parent GameObject. Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8eae6c9f37b3
unity_docs
editor
Show me a Unity C# example demonstrating `MenuCommand`.
MenuCommand class in UnityEditor Description Used to extract the context for a MenuItem . MenuCommand objects are passed to custom menu item functions defined using the MenuItem attribute. Note: The menu is added to the object and is accessible by right-clicking in the inspector. The script code requires th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8ba59b44b8d
unity_docs
math
Show me a Unity C# example demonstrating `Camera.cameraToWorldMatrix`.
.cameraToWorldMatrix public Matrix4x4 cameraToWorldMatrix ; Description Matrix that transforms from camera space to world space (Read Only). Use this to calculate where in the world a specific camera space point is. Note that camera space matches OpenGL convention: camera's forward is the negative Z axis. Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_92b56e9911d9
github
scripting
Write a Unity C# UI script for Singleton Test GUI
```csharp using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; public class SingletonTestGUI : MonoBehaviour { public void AssetDatabaseRefresh() { AssetDatabase.Refresh(); } public void Access() { UnitySingleton.Instance.Access(); } public void Create() { ScriptableObject.CreateIn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_70a8f8f7e549
unity_docs
scripting
Explain 'ToolbarSpacer' in Unity.
A ToolbarSpacer is an Editor-only control that creates empty spaces within a Toolbar for layout control and visual separation of elements. It’s a VisualElement with a predefined style that matches the Toolbar style. ## Create a ToolbarSpacer You can create a ToolbarSpacer with UI Builder, UXML, or C#. The following C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_047a01105e7d
unity_docs
scripting
What is `GridLayout` in Unity? Explain its purpose and usage.
GridLayout class in UnityEngine / Inherits from: Behaviour Description An abstract class that defines a grid layout. Additional resources: Grid & GridProxy. Properties Property Description cellGap The size of the gap between each cell in the layout. cellLayout The layout of the cells. cellSize The size ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48763e565c8a
unity_docs
scripting
What is `MonoImporter` in Unity? Explain its purpose and usage.
MonoImporter class in UnityEditor / Inherits from: AssetImporter Description Represents a C# script in the project. Public Methods Method Description GetDefaultReference Gets the default value for a reference field in the imported MonoScript. GetIcon Gets the icon to associate with the imported MonoScript. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d6af81c8c46
unity_docs
rendering
What is `RenderTexture.height` in Unity? Explain its purpose and usage.
RenderTexture.height public int height ; Description The height of the render texture in pixels. Note that unlike Texture.height property, this is both read and write - setting a value changes size. Additional resources: width , RenderTextureFormat , depth .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86f131df5dc5
unity_docs
xr
What is `XR.XRDisplaySubsystem.occlusionMaskScale` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.occlusionMaskScale public float occlusionMaskScale ; Description A scale applied to the standard occulsion mask. This property scales up the occlusion mask to allow pixels outside of the XR headset's field of vision are rendered to, allowing effects to access the required texture data. Scalin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3300450c2acb
github
scripting
Write a Unity C# ScriptableObject for Base Script Template
```csharp using CodeGeneration.Data; using System; using UnityEngine; namespace CodeGeneration.Base { /// <summary> /// Base script template object /// </summary> public abstract class BaseScriptTemplate : ScriptableObject { /// <summary> /// File name format string /// </s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88c208408905
unity_docs
scripting
What is `AssetImporters.AssetImportContext.GetObjects` in Unity? Explain its purpose and usage.
AssetImportContext.GetObjects Declaration public void GetObjects (List<Object> objects ); Parameters Parameter Description objects The list of objects to be filled by the context. Description Gets the list of objects set on the AssetImportContext. Throws ArgumentNullException, if the list is null.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2133ef15f236
github
scripting
Write a Unity C# script called Ray Neo Info
```csharp using com.rayneo.xr.extensions; using System; using UnityEngine; namespace RayNeo.API { public class RayNeoInfo { public static RayNeo.API.DeviceType CurrentDeviceType() { #if UNITY_EDITOR if (DebugMidway.IsInSimulator) { return DebugMidway.GetDe...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_0e24b7e7848a
unity_docs
input
In Unity's 'DoubleField', what is 'Create a DoubleField' and how does it work?
You can create a DoubleField with UI Builder, UXML, and C#. To create a DoubleField with C#, create a new instance of a DoubleField object. For example: ``` DoubleField myElement = new DoubleField("Label text"); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa46ddbb9749
unity_docs
scripting
What is `Experimental.GraphView.Scope.UpdateGeometryFromContent` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.UpdateGeometryFromContent Declaration public void UpdateGeometryFromContent (); Description Updates the size and position of the Scope based on its contents.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80c283371c68
unity_docs
math
Explain 'Property paths' in Unity.
Property paths are strings that describe the location of a property within a container object. You can use property paths to get or set the data of an object at a specific path or accept a visitor on a sub-property of an object. Property paths are constructed from strings and resolve a specific property instance from a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_287120a92924_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Cycles through supported splat files in a folder using VR controller buttons.VR Controls (right controller): B (secondaryButton) → next splat file A (primaryButton) → previous splat fileKeyboard fallback: R → next F → previousAlso accepts PageDown/PageUp/N/P as legacy shortcuts. Signature: ```csharp public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34a61e32baca
unity_docs
editor
Give me an overview of the `IHasCustomMenu` class in Unity.
IHasCustomMenu interface in UnityEditor Description Defines a method to add custom menu items to an Editor Window. Public Methods Method Description AddItemsToMenu Adds your custom menu items to an Editor Window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a3fc988a763e
unity_docs
rendering
In Unity's 'Use built-in shader functions in the Built-In Render Pipeline', what is 'Transform other values' and how does it work?
Function: Description: float3 WorldSpaceViewDir (float4 v) Returns world space direction (not normalized) from given object space vertex position towards the camera. float3 ObjSpaceViewDir (float4 v) Returns object space direction (not normalized) from given object space vertex position towards the camera. float2 Paral...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d9de6f5b5c9b
unity_docs
xr
In Unity's 'XR input options', what is 'Input System or Input Manager' and how does it work?
You can access the controls of XR Controllers, such as buttons and joysticks, in the same ways you would access any game controller . To access tracking data, use the XR.InputTracking API in code. You can also use the Input System TrackedPoseDriver component to control a GameObject with a tracked device such as a HMD o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dad5b76e37d
unity_docs
rendering
What is `ParticleSystem.Emit` in Unity? Explain its purpose and usage.
ParticleSystem.Emit Declaration public void Emit (int count ); Parameters Parameter Description count Number of particles to emit. Description Emit count particles immediately. Declaration public void Emit ( ParticleSystem.EmitParams emitParams , int count ); Parameters Parameter Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ce9446a44365
github
scripting
Write a Unity C# MonoBehaviour script called Update Transform Job Manager
```csharp using Gilzoide.UpdateManager.Jobs.Internal; using Unity.Jobs; using UnityEngine.Jobs; namespace Gilzoide.UpdateManager.Jobs { /// <summary> /// Singleton class that schedules <see cref="TransformAccess"/>-enabled jobs from registered <see cref="ITransformJobUpdatable{}>"/> objects every frame using U...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_0cdf0431c995
unity_docs
ui
What is `UIElements.VisualElement.SendEvent` in Unity? Explain its purpose and usage.
VisualElement.SendEvent Declaration public void SendEvent ( UIElements.EventBase e ); Parameters Parameter Description e The event to send. Description Sends an event to the event handler. The event is forwarded to the event dispatcher for processing. For more information, refer to Synthesize and s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_585af5e81de7
unity_docs
rendering
Explain 'Widen the view with Lens Shift' in Unity.
Lens Shift offsets the camera ’s lens from its sensor horizontally and vertically. This allows you to change the focal center, and reposition a subject in the rendered frame, with little or no distortion. This technique is common in architectural photography. For example, if you want to capture a tall building, you cou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d16bdc7006f
unity_docs
scripting
What is `IMGUI.Controls.TreeView.OnGUI` in Unity? Explain its purpose and usage.
TreeView.OnGUI Declaration public void OnGUI ( Rect rect ); Parameters Parameter Description rect Rect where the TreeView is rendered. Description This is the main GUI method of the TreeView, where the TreeViewItems are processed and drawn. Call this at the point at which the TreeView should be rendered ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37b26667a251
unity_docs
scripting
Give me an overview of the `GameObject` class in Unity.
GameObject class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Base class for all objects that can exist in a scene. Add components to a GameObject to control its appearance and behavior. The GameObject is the fundamental object type in Unity. Use GameObject ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0cda58449a1
unity_docs
scripting
What is `Unity.Android.Gradle.Block` in Unity? Explain its purpose and usage.
Block class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description A custom block. Can be used to create any custom named block with child elements. Constructors Constructor Description Block Element constructor. Inherited Members Public Methods Method Description AddElement A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d9d6426c0c4f
unity_docs
scripting
Explain 'EnumFlagsField' in Unity.
An EnumFlagsField lets users select multiple values from an enumeration that are marked with the Flags attribute. Note : To align an EnumFlagsField 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 an EnumFlagsFiel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_98251ee58fd3_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This is a very basic way of attaching an integer ID to a GameObject,but for this demo, it is sufficient. Signature: ```csharp public class IdentificationManager : MonoBehaviour ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c71249504a1
unity_docs
editor
What is `EditorWindowTitleAttribute.useTypeNameAsIconName` in Unity? Explain its purpose and usage.
EditorWindowTitleAttribute.useTypeNameAsIconName public bool useTypeNameAsIconName ; Description When set to true Unity sets the window's icon name to be the same as its type name. This is useful for common window types that are likely to have icons already. For example, if your window is an InspectorWindow, yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4ebd2d95e83
unity_docs
ui
What is `UIElements.VisualElement.UxmlSerializedData.Register` in Unity? Explain its purpose and usage.
VisualElement.UxmlSerializedData.Register Declaration public static void Register (); Description This is used by the code generator when a custom control is using the UxmlElementAttribute . You should not need to call it.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5d94461ce1d
unity_docs
scripting
What are the parameters of `Search.SearchExpression.FormatItem` in Unity?
Returns string Returns a string where selectors have been replaced by the selected values from a given SearchItem. Description Take a format string and replace all selectors in it with the selected values obtained from a SearchItem . ```csharp [Description("Convert arguments to a string allowing you to format the resul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72066bb81af3
unity_docs
scripting
What are the parameters of `ArticulationBody.AddTorque` in Unity?
Description Add torque to the articulation body. You can only apply a torque to an active ArticulationBody. If a GameObject is inactive, AddTorque has no effect. ForceMode.Force and ForceMode.Acceleration modes modify the Angular Velocity Per Second accumulator and ForceMode.Impulse and ForceMode.VelocityChange modify ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4338998e9718
unity_docs
scripting
What is `Playables.PlayableOutputExtensions.GetSourceOutputPort` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.GetSourceOutputPort Declaration public static int GetSourceOutputPort (U output ); Parameters Parameter Description output The PlayableOutput used by this operation. Returns int The output port. Description Returns the source playable's output connection index. Default val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fd9db0c3a8eb
unity_docs
xr
In Unity's 'Project manifest file', what is 'Example' and how does it work?
``` { "scopedRegistries": [{ "name": "My internal registry", "url": "https://my.internal.registry.com", "scopes": [ "com.company" ] }], "dependencies": { "com.unity.package-1": "1.0.0", "com.unity.package-2": "2.0.0", "com.company.my-package": "3.0.0", "com.unity.my-local-package": "file:<path>/my_package_f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6604df3099d5
unity_docs
editor
What is `Undo.RecordObjects` in Unity? Explain its purpose and usage.
Undo.RecordObjects Declaration public static void RecordObjects (Object[] objectsToUndo , string name ); Description Records multiple undoable objects in a single call. This is the same as calling Undo.RecordObject multiple times. Important: To correctly handle instances where objectToUndo is an instance o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_495b016d831f
unity_docs
physics
In Unity's 'Physics 2D reference', what is 'Simulation Mode: Update' and how does it work?
The followings properties are visible only when you select Update or Script for the Simulation Mode . Property Function Use Sub Stepping Enable this property to have the Editor use simulation sub-stepping during the simulation step. Use Sub Step Count Enable this property to have the Editor calculate contacts for all s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f5c3c342df4
unity_docs
rendering
What is `MaterialProperty.name` in Unity? Explain its purpose and usage.
MaterialProperty.name public string name ; Description Name of the property (Read Only). This is the variable name that is used in the shader, for example _MainTex. Additional resources: displayName .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d35d00a815c6
unity_docs
audio
What is `AudioCurveRendering.DrawSymmetricFilledCurve` in Unity? Explain its purpose and usage.
AudioCurveRendering.DrawSymmetricFilledCurve Declaration public static void DrawSymmetricFilledCurve ( Rect r , AudioCurveRendering.AudioCurveAndColorEvaluator eval ); Parameters Parameter Description r Rectangle determining the size of the graph. eval Normalized x-position in the range [0; 1] at which...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6852630eaacb
unity_docs
scripting
What is `ComputeBuffer.SetCounterValue` in Unity? Explain its purpose and usage.
ComputeBuffer.SetCounterValue Declaration public void SetCounterValue (uint counterValue ); Parameters Parameter Description counterValue Value of the append/consume counter. Description Sets counter value of append/consume buffer. Append/consume and counter buffers (see ComputeBufferType.Append , Compu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_46ed923d734e
unity_docs
scripting
Explain 'Using a custom update manager' in Unity.
Unity’s built-in per-frame event function updates such as Update , FixedUpdate and LateUpdate can impact performance at scale. Although the corresponding callbacks are invoked on your C# MonoBehaviour scripts , the function calls originate from Unity’s native code. Unity has to maintain internal lists to track which ob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.