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_cdc7ace4e57b
unity_docs
scripting
Give me an overview of the `ArmDof` class in Unity.
ArmDof enumeration Description Enumeration of all the muscles in an arm. These muscles are a sub-part of a human part. Additional resources: HumanPartDof . Properties Property Description ShoulderDownUp The shoulder down-up muscle. ShoulderFrontBack The shoulder front-back muscle. ArmDownUp The arm down-up ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4328188474ae
unity_docs
scripting
What is `DragAndDropVisualMode` in Unity? Explain its purpose and usage.
DragAndDropVisualMode enumeration Description Visual indication mode for Drag & Drop operation. Additional resources: DragAndDrop class. Properties Property Description None No indication (drag should not be performed). Copy Copy dragged objects. Link Link dragged objects to target. Move Move dragged obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_951719198e79
unity_docs
rendering
What is `TerrainData.SetAlphamaps` in Unity? Explain its purpose and usage.
TerrainData.SetAlphamaps Declaration public void SetAlphamaps (int x , int y , float[,,] map ); Description Assign all splat values in the given map area. The array supplied to this function determines the width and height of the portion to be replaced. The third dimension of the array corresponds to the num...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9e3a4fe73a1
unity_docs
scripting
What is `UIElements.CallbackEventHandler` in Unity? Explain its purpose and usage.
CallbackEventHandler class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IEventHandler Description Interface for classes capable of having callbacks to handle events. Public Methods Method Description HasBubbleUpHandlers Return true if event handlers fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2a490ed93ce8
unity_docs
rendering
In Unity's 'Preparing your model files for export', what is 'Scaling factors' and how does it work?
Unity’s physics and lighting systems expect 1 meter in the game world to be 1 unit in the imported Model file . The defaults for different 3D packages are as follows:.fbx, .max, .jas = 0.01 .3ds = 0.1.mb, .ma, .lxo, .dxf, .blend, .dae = 1 When importing Model files into Unity from a 3D modeling application with a diffe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8183bca6c6f9
unity_docs
ui
In Unity's 'Analysis preferences reference', what is 'Profiler' and how does it work?
Property Function Frame count Set the maximum number of frames for the Profiler to capture. You can set this number between 300 and 2,000. Show stats for current frame By default, when you select the Current Frame button and enter Current Frame mode, the frame indicator line doesn’t have annotations with the stats for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c87f5673ca2
unity_docs
scripting
Show me a Unity C# example demonstrating `SceneManagement.SceneManager.GetActiveScene`.
Scene which will be used as the destination for new GameObjects and the source of current lighting settings. Note that while a Scene is being loaded, new GameObjects created in the Awake() and OnEnable() lifetime callbacks will always be added to the scene being loaded instead of the active scene. Note the active S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbe91939da3c
unity_docs
scripting
What are the parameters of `XR.XRDisplaySubsystem.displayFocusChanged` in Unity?
Description Event sent when XR display focus changes. This event is sent on the main thread. ```csharp using UnityEngine; using UnityEngine.XR;public class ExampleClass : MonoBehaviour { public XRDisplaySubsystem display; void OnEnable() { display.displayFocusChanged += HandleFocusChanged; } v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cc6eff59bbb
unity_docs
xr
What is `Experimental.Licensing.LicensingUtility.HasEntitlement` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LicensingUtility.HasEntitlement Declaration public static bool HasEntitlement (string entitlement ); Parameters Parameter Description entitlement The requested entitlement string. Returns bool Returns true if the user...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_888e8bed1261
unity_docs
scripting
What is `SystemLanguage.Arabic` in Unity? Explain its purpose and usage.
SystemLanguage.Arabic Description Arabic. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Arabic language if (Application.systemLanguage == SystemLanguage.Arabic) { //Outputs into console that the system is Arabic D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1658971d43c5
unity_docs
scripting
What is `RangeInt.ctor` in Unity? Explain its purpose and usage.
RangeInt Constructor Declaration public RangeInt (int start , int length ); Parameters Parameter Description start The starting index of the range. length The length of the range. Description Constructs a new RangeInt with given start, length values.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72bfbc769876
unity_docs
scripting
What is `UIElements.EventBase.originalMousePosition` in Unity? Explain its purpose and usage.
EventBase.originalMousePosition public Vector2 originalMousePosition ; Description The original mouse position of the IMGUI event, before it is transformed to the current target local coordinates.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3dcedf956d85
unity_docs
scripting
What is `Search.IPropertyDatabaseView.CreatePropertyHash` in Unity? Explain its purpose and usage.
IPropertyDatabaseView.CreatePropertyHash Declaration public Hash128 CreatePropertyHash (string propertyPath ); Parameters Parameter Description propertyPath The path or name of a property. Returns Hash128 The computed property hash. Description Creates a property hash from a property path. Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36efa8842399
unity_docs
physics
What is `ParticleSystemOverlapAction` in Unity? Explain its purpose and usage.
ParticleSystemOverlapAction enumeration Description What action to perform when the particle trigger module passes a test. Properties Property Description Ignore Do nothing. Kill Kill all particles that pass this test. Callback Send the OnParticleTrigger command to the Particle System's script.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10a0a839206f
unity_docs
physics
What is `HandleUtility.PlaceObject` in Unity? Explain its purpose and usage.
HandleUtility.PlaceObject Declaration public static bool PlaceObject ( Vector2 guiPosition , out Vector3 position , out Vector3 normal ); Parameters Parameter Description guiPosition The GUI position in the SceneView . You can pass Event.current.mousePosition to this parameter in most cases. positio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92aae6ed62b8
unity_docs
scripting
What is `ConvertToPrefabInstanceSettings.gameObjectsNotMatchedBecomesOverride` in Unity? Explain its purpose and usage.
ConvertToPrefabInstanceSettings.gameObjectsNotMatchedBecomesOverride public bool gameObjectsNotMatchedBecomesOverride ; Description If a GameObject is not matched up then it can become an added GameObject on the new Prefab instance. This property is only used when used together with ObjectMatchMode.ByHierarchy ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a494ff1e7f1a
unity_docs
animation
What is `HumanPose` in Unity? Explain its purpose and usage.
HumanPose struct in UnityEngine / Implemented in: UnityEngine.AnimationModule Description Retargetable humanoid pose. Represents a humanoid pose that is completely abstracted from any skeleton rig. Additional resources: HumanPoseHandler . Properties Property Description bodyPosition The human body position...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f894e4b5d1c
unity_docs
scripting
What is `Experimental.GraphView.GraphViewMinimapWindow.ctor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewMinimapWindow Constructor Declaration public GraphViewMinimapWindow (); Description Constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_212ad55aa04c
unity_docs
scripting
What is `Experimental.GraphView.IDropTarget.DragPerform` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IDropTarget.DragPerform Declaration public bool DragPerform ( UIElements.DragPerformEvent evt , IEnumerable<ISelectable> selection , Experimental.GraphView.IDropTarget dropTarget , Experimental.GraphView.ISelection dragS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bd21b0744a4
unity_docs
math
Show me a Unity C# example demonstrating `ScriptableWizard.OnWizardUpdate`.
his is called when the wizard is opened or whenever the user changes something in the wizard. This allows you to set the helpString , errorString and enable/disable the Create button via isValid . Also it lets you change labels (for timers i.e.) or buttons when the wizard is being shown Additional resources: Scri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bb1af531c1b
unity_docs
editor
Show me a Unity C# example demonstrating `EditorUserBuildSettings.SwitchActiveBuildTarget`.
cript code for the given target, which can't be done while script code is executing. This isn't a problem in the Editor, as the operation is deferred to the next Editor update. However, in batch mode the Editor will stop after executing the designated script code, so deferring the operation isn't possible. To set the b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10ea377056fa
unity_docs
animation
Give me an overview of the `Avatar` class in Unity.
Avatar class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.AnimationModule Description Avatar definition. Additional resources: Animator.avatar , AvatarBuilder . Properties Property Description humanDescription Returns the HumanDescription used to create this Avatar. isHuman Ret...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e541ae547088
unity_docs
editor
Show me a Unity C# example demonstrating `SketchUpImporter.GetDefaultCamera`.
rter.GetDefaultCamera Declaration public SketchUpImportCamera GetDefaultCamera (); Returns SketchUpImportCamera The default camera. Description The default camera or the camera of the active Scene which the SketchUp file was saved with. The following is an example of extracting the default camera and l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c879f5b0e6b5
unity_docs
xr
Explain 'Submit a license request from the Hub' in Unity.
Submit a license request from the Unity Hub to manually activate your license if you’re unable to use the other activation methods . Note : The manual activation method doesn’t work with floating license subscriptions or Unity Personal. To activate a license for Unity Personal, log in to the Unity Hub. To return a Pers...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5375b80de992
unity_docs
scripting
Show me a Unity C# example demonstrating `PhysicsScene2D.Simulate`.
s deterministic because of the unpredictable fluctuations in framerate that can arise. To achieve more deterministic physics results, you should pass a fixed step value to Physics2D.Simulate every time you call it. Additional resources: Physics2D.simulationMode and Physics2D.Simulate . Here is an example of a basic ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6dcc257232ef
unity_docs
rendering
What is `Rendering.BuiltinRenderTextureType.GBuffer2` in Unity? Explain its purpose and usage.
BuiltinRenderTextureType.GBuffer2 Description Deferred shading G-buffer #2 (typically normals). Built-in deferred shaders put world-space normals into RGB channels of this texture. But your own custom shaders could be outputting anything there of course. Additional resources: CommandBuffer .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8baa365055e5
unity_docs
rendering
What is `Device.SystemInfo.supportsMultisampledTextures` in Unity? Explain its purpose and usage.
SystemInfo.supportsMultisampledTextures public static int supportsMultisampledTextures ; Description This has the same functionality as SystemInfo.supportsMultisampledTextures 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_44c27f704bbd
unity_docs
xr
What is `Search.SearchService.CreateContext` in Unity? Explain its purpose and usage.
SearchService.CreateContext Declaration public static Search.SearchContext CreateContext (string searchText ); Declaration public static Search.SearchContext CreateContext (string searchText , Search.SearchFlags flags ); Declaration public static Search.SearchContext CreateContext ( Search.SearchP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ebf79628d50d
unity_docs
networking
In Unity's 'Trusting the web proxy security certificate', what is 'Set certificates with the NODE_EXTRA_CA_CERTS environment variable' and how does it work?
To enable Unity Package Manager operations with a web proxy that uses SSL inspection, you must set the NODE_EXTRA_CA_CERTS environment variable or set certificates with a configuration file . The certificate file must be distributed to each computer running Unity. Then, the NODE_EXTRA_CA_CERTS environment variable must...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_acc5ded9097c
unity_docs
scripting
What is `RenderTargetSetup.depthLoad` in Unity? Explain its purpose and usage.
RenderTargetSetup.depthLoad public Rendering.RenderBufferLoadAction depthLoad ; Description Load Action for Depth Buffer. It will override any actions set on RenderBuffer itself. Please note that not all platforms have load/store actions, so this setting might be ignored at runtime. Generally mobile-oriented ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6c8f3ac54b4
unity_docs
scripting
What is `SerializedProperty.rectIntValue` in Unity? Explain its purpose and usage.
SerializedProperty.rectIntValue public RectInt rectIntValue ; Description Value of a rectangle with integer values property. Additional resources: propertyType , SerializedPropertyType.RectInt , RectInt .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_386643c56a87
unity_docs
performance
What is `Unity.Collections.NativeArray_1.Copy` in Unity? Explain its purpose and usage.
NativeArray<T0>.Copy Declaration public static void Copy (NativeArray<T> src , NativeArray<T> dst ); Declaration public static void Copy (T[] src , NativeArray<T> dst ); Declaration public static void Copy (ReadOnly<T> src , NativeArray<T> dst ); Declaration public static void Copy (NativeArray<T> ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a68fbe00728
unity_docs
rendering
What are the parameters of `LightTransport.RadeonRaysContext.CreateBuffer` in Unity?
Returns BufferID ID of the newly created buffer. Description Create a new buffer for a number of elements with a given stride. ```csharp using UnityEngine.LightTransport;IDeviceContext ctx = new RadeonRaysContext(); ctx.Initialize(); const int numberOfElements = 4; const int strideInBytes = 4; var bufferID = ctx.Create...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a64cb636362
unity_docs
math
What is `AnimatedValues.AnimVector3.ctor` in Unity? Explain its purpose and usage.
AnimVector3 Constructor Declaration public AnimVector3 (); Declaration public AnimVector3 ( Vector3 value ); Declaration public AnimVector3 ( Vector3 value , Events.UnityAction callback ); Parameters Parameter Description value Start Value. Description Constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62ab1ab53277
unity_docs
animation
What is `AnimationCurve.MoveKey` in Unity? Explain its purpose and usage.
AnimationCurve.MoveKey Declaration public int MoveKey (int index , Keyframe key ); Parameters Parameter Description index The index of the key to move. key The keyframe containing the new time and value. Returns int The index of the keyframe after moving it. Description Moves the key at index ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69b07fbeebf7
unity_docs
rendering
What is `Rendering.LocalKeywordSpace.operator_eq` in Unity? Explain its purpose and usage.
LocalKeywordSpace.operator == public static bool operator == ( Rendering.LocalKeywordSpace lhs , Rendering.LocalKeywordSpace rhs ); Description Returns true if the local shader keyword spaces are the same. Otherwise, returns false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00b44a3d559d
unity_docs
scripting
Give me an overview of the `ChangeChildrenOrderEventArgs` class in Unity.
ChangeChildrenOrderEventArgs struct in UnityEditor Description A change of this type indicates that a GameObject's children have been reordered. This happens when Undo.RegisterChildrenOrderUndo is called or when reordering a child in the hierarchy under the same parent. Properties Property Description instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bedb355413a4
unity_docs
scripting
In Unity's 'RectField', what is 'Create a RectField' and how does it work?
You can create a RectField with UI Builder, UXML, or C#. The following C# example creates a RectField with a Rect value: ``` var rectField = new RectField(); rectField.value = new Rect(0, 0, 100, 100); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c33062c80bb8
unity_docs
editor
What is `MouseCursor.ResizeUpRight` in Unity? Explain its purpose and usage.
MouseCursor.ResizeUpRight Description Resize up-right for window edges. ```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 displays a small window tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dc9b3994264
unity_docs
scripting
What is `UIElements.GroupBox` in Unity? Explain its purpose and usage.
GroupBox class in UnityEngine.UIElements / Inherits from: UIElements.BindableElement / Implemented in: UnityEngine.UIElementsModule Description This is an enclosing container for a group of IGroupBoxOption. All group options within this container will interact together to allow a single selection, using the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f214545ce71c
unity_docs
math
What is `Mesh.MeshData.GetVertexData` in Unity? Explain its purpose and usage.
Mesh.MeshData.GetVertexData Declaration public NativeArray<T> GetVertexData (int stream = 0); Parameters Parameter Description stream The vertex buffer stream to get data for. The default value is 0. Returns NativeArray<T> Returns a NativeArray containing the vertex buffer data. Description Gets ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0475e77b86a6
github
scripting
Write a Unity C# MonoBehaviour script called Camera Rotate
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraRotate : MonoBehaviour { public float Speed = 8; // Update is called once per frame void FixedUpdate () { transform.Rotate(Vector3.up, Speed * Time.deltaTime, Space.World); } } ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_f072244db171
unity_docs
rendering
What is `ShaderVariantCollection` in Unity? Explain its purpose and usage.
ShaderVariantCollection class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description ShaderVariantCollection records which shader variants are actually used in each shader. This is used for shader preloading ("warmup"), so that a game can make sure "actually required" shad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d65f81abdbe
unity_docs
ui
What is `UIElements.MultiColumnController.DestroyItem` in Unity? Explain its purpose and usage.
MultiColumnController.DestroyItem Declaration public void DestroyItem ( UIElements.VisualElement element ); Parameters Parameter Description element The element being destroyed. Description Destroys a VisualElement when the view is rebuilt or cleared.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd6888b3a48b
unity_docs
math
What are the parameters of `Handles.Button` in Unity?
Returns bool True when the user clicks the button. Description Make a 3D Button. This button works like one drawn with GUI.Button , but it has a 3D position and is drawn by a handle function. Button Handle as a rectangle in the Scene View. Add the following script to your Assets folder as ButtonExample.cs and add the B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_7
github
scripting
What does `SetPosition` do in this Unity script? Explain its purpose and signature.
Set the explicit latitude and longitude coordinates of this Positioner.The position as a LatLong. Signature: ```csharp public void SetPosition(LatLong position) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3fcaffbffa06
unity_docs
editor
What are the parameters of `EditorGUILayout.LabelField` in Unity?
Description Make a label field. (Useful for showing read-only info.) Shows a label in the editor (Label) with the seconds since the editor started (Label2). ```csharp // Shows a label in the editor with the seconds since the editor started using UnityEditor; using UnityEngine;public class LabelFieldExample : EditorWind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87e6755c9cb1
unity_docs
editor
What is `Progress.Item.name` in Unity? Explain its purpose and usage.
Progress.Item.name public string name ; Description Returns the progress indicator's name. The name is usually used as a title when you display the progress bar in the Editor. Additional resources: Progress.GetName .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d64431d552bd
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemPath` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemPath Declaration public string GetItemPath (int id ); Parameters Parameter Description id Hierarchy item identifier. Description Retrieves the hierarchy item path as a string. Each level is delimited by forward slashes ('/').
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d434ee936c44
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R32G32_SInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R32G32_SInt Description A two-component, 64-bit signed integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ba42d4da98a
unity_docs
scripting
What is `Windows.Speech.PhraseRecognizer.PhraseRecognizedDelegate` in Unity? Explain its purpose and usage.
PhraseRecognizer.PhraseRecognizedDelegate Declaration public delegate void PhraseRecognizedDelegate ( Windows.Speech.PhraseRecognizedEventArgs args ); Parameters Parameter Description args Information about a phrase recognized event. Description Delegate for OnPhraseRecognized event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9bf7cddbfcc6
unity_docs
rendering
What is `RenderTextureFormat.ARGB2101010` in Unity? Explain its purpose and usage.
RenderTextureFormat.ARGB2101010 Description Color render texture format. 10 bits for colors, 2 bits for alpha. Note that not all graphics cards support this format. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFormat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6bb62493a6a
unity_docs
rendering
What is `GUIStyleState.scaledBackgrounds` in Unity? Explain its purpose and usage.
GUIStyleState.scaledBackgrounds public Texture2D[] scaledBackgrounds ; Description Background images used by this state when on a high-resolution screen. It should either be left empty, or contain a single image that is exactly twice the resolution of background . This is only used by the editor. The field is n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_70233a910b07
unity_docs
scripting
Show me a Unity code example for 'Assign tags to GameObjects'.
ags are useful for triggers in Collider control scripts that need to determine if the player interacts with an enemy, a prop, or a collectable, for example. You can use the GameObject.FindWithTag function to find any GameObject that contains a tag you specify. The following example uses GameObject.FindWithTag() . It in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_477d75862776
unity_docs
scripting
What is `Search.SearchService.ShowContextual` in Unity? Explain its purpose and usage.
SearchService.ShowContextual Declaration public static Search.ISearchView ShowContextual (params string[] providerIds ); Parameters Parameter Description providerIds Unique IDs of search providers to enable when opening the search view. Returns ISearchView Returns the search view window instance. De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31245ee8069e
unity_docs
physics
What is `Physics2D.IsTouching` in Unity? Explain its purpose and usage.
Physics2D.IsTouching Declaration public static bool IsTouching ( Collider2D collider1 , Collider2D collider2 ); Parameters Parameter Description collider1 The Collider to check if it is touching collider2 . collider2 The Collider to check if it is touching collider1 . Returns bool Whether collid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01440f72db37
unity_docs
math
Show me a Unity C# example demonstrating `TestTools.Coverage.GetSequencePointsFor`.
tatic CoveredSequencePoint[] GetSequencePointsFor (MethodBase method ); Parameters Parameter Description method The method to get the sequence points for. Returns CoveredSequencePoint[] Array of sequence points. Description Returns the coverage sequence points for the method you specify. See CoveredSe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d2ba11556af
unity_docs
audio
What is `Video.VideoPlayer.GetAudioChannelCount` in Unity? Explain its purpose and usage.
VideoPlayer.GetAudioChannelCount Declaration public ushort GetAudioChannelCount (ushort trackIndex ); Parameters Parameter Description trackIndex Index for the audio track being queried. Returns ushort Number of audio channels. Description The number of audio channels in the specified audio track. F...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_442342c26197
unity_docs
math
What is `Bounds.SetMinMax` in Unity? Explain its purpose and usage.
Bounds.SetMinMax Declaration public void SetMinMax ( Vector3 min , Vector3 max ); Description Sets the bounds to the min and max value of the box. Using this function is faster than assigning min and max separately.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bda5086b335
unity_docs
rendering
What is `ParticleSystem.VelocityOverLifetimeModule` in Unity? Explain its purpose and usage.
VelocityOverLifetimeModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the VelocityOverLifetimeModule. This module sets the velocity of particles during their lifetime. Additional resources: ParticleSystem , ParticleSystem.velocityOverLifetime . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bb2cb8beeb97
unity_docs
rendering
Explain 'Optimize shadow rendering in URP' in Unity.
This page describes optimization techniques that help you make shadow rendering faster in your project. Factors that affect the shadow rendering time include: The number of visible objects that cast shadows. This number depends on the Max Distance property. The number of visible objects that receive shadows. The number...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_933b876688b4
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.main`.
articleSystem.main public ParticleSystem.MainModule main ; Description Access the main Particle System settings. This module provides access to the general settings that are displayed above all of the other module settings in the Particle System's Inspector window. Particle System modules do not need to be r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_131b6ac2eb20
unity_docs
rendering
In Unity's 'Enable GPU instancing for a prebuilt material', what is 'Change the properties of instances' and how does it work?
To change the properties of instances at runtime, for example to give each instance a different color or position, create a script to do the following: Create a MaterialPropertyBlock with the property value for the instance. Attach the script to the Mesh Renderer component of the GameObject. For more information, refer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bec35c17085
unity_docs
physics
What is `Rigidbody2D.gravityScale` in Unity? Explain its purpose and usage.
Rigidbody2D.gravityScale public float gravityScale ; Description The degree to which this object is affected by gravity. In 2D physics, the gravity is a global setting in the Physics2D class but you can also control the proportion of that gravity applied to each object individually using gravityScale . For exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_88c85a6cdf2e_doc_1
github
scripting
What does `Init` do in this Unity script? Explain its purpose and signature.
Provides the with the object that it depends on.You can think of the function as a parameterized constructor alternative for the component. gets called when the script is being loaded, before the , OnEnable and Start events whenthe component is created using or.Note that gets called immediately following object cre...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_b788ae4e5816
unity_docs
scripting
Explain 'Selector precedence' in Unity.
When an element matches more than one selector, Unity considers several factors to determine which selector takes precedence. How Unity determines precedence depends on whether the conflicting selectors are in the same style sheet or in different style sheets. ## Precedence for selectors in the same style sheet When ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03961c74d850
unity_docs
animation
What is `Animations.RotationConstraint.AddSource` in Unity? Explain its purpose and usage.
RotationConstraint.AddSource Declaration public int AddSource ( Animations.ConstraintSource source ); Parameters Parameter Description source The source object and its weight. Returns int Returns the index of the added source. Description Adds a constraint source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d52026bdeb9
unity_docs
editor
Show me a Unity C# example demonstrating `SceneManagement.EditorSceneManager.OpenPreviewScene`.
tion scenePath Scene file to open. Returns Scene The created preview Scene. Description Opens a Scene Asset in a preview Scene. You can use this function for tooling that needs to access GameObjects but where the scene should not be displayed in the Hierarchy. Make sure to call ClosePreviewScene to prevent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_09c0a03ca836
unity_docs
physics
In Unity's 'Create a custom build script', what is 'Create a basic build script with menu item' and how does it work?
This example demonstrates a simple custom build script that builds a Windows player, copies a README file to the build folder, and automatically launches the built Player. It uses the MenuItem attribute to add a Build > Build Windows Player With Readme menu item to the Unity Editor, which allows you to start the build ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f267632c58f
unity_docs
physics
What is `Physics.Linecast` in Unity? Explain its purpose and usage.
Physics.Linecast Declaration public static bool Linecast ( Vector3 start , Vector3 end , int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters Parameter Description start Start point. end End point. layerMask A La...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46a2b380a849
unity_docs
scripting
What is `UIElements.UxmlUnsignedLongAttributeDescription.TryGetValueFromBag` in Unity? Explain its purpose and usage.
UxmlUnsignedLongAttributeDescription.TryGetValueFromBag Declaration public bool TryGetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc , ref ulong value ); Parameters Parameter Description bag The bag of attributes. cc The context in which the values are retrieved. value ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9472792c349
unity_docs
scripting
What is `ParticleSystem.NoiseModule.strengthZMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.NoiseModule.strengthZMultiplier public float strengthZMultiplier ; Description z-axis strength multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall strength multiplier. Additional resources: ParticleSystem.NoiseModule.stren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d59652e15d3a
unity_docs
math
What is `AndroidJavaObject.ctor` in Unity? Explain its purpose and usage.
AndroidJavaObject Constructor Declaration public AndroidJavaObject (string className , params object[] args ); Parameters Parameter Description className Specifies the Java class name (e.g. " java.lang.String " or " java/lang/String "). args An array of parameters passed to the constructor. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8e29a292e21
unity_docs
editor
What is `SerializedProperty.enumDisplayNames` in Unity? Explain its purpose and usage.
SerializedProperty.enumDisplayNames public string[] enumDisplayNames ; Description Display-friendly names of enumeration of an enum property. Similar to enumNames, but formatted with spaces and capitalization. Additional resources: enumNames , propertyType , SerializedPropertyType.Enum , enumValueIndex , I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_edd006a0315c
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.SetSubMesh`.
eshDescriptor-bounds , SubMeshDescriptor-firstVertex and SubMeshDescriptor-vertexCount values of SubMeshDescriptor are calculated automatically by SetSubMesh , unless MeshUpdateFlags.DontRecalculateBounds flag is passed. Note that this only applies to the bounds of the SubMesh. You must call Mesh.RecalculateB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3625c22a29a8
unity_docs
editor
Show me a Unity C# example demonstrating `RuntimeInitializeOnLoadMethodAttribute`.
tion order within each of the RuntimeInitializeLoadType callbacks is not guaranteed. Note: Use the AlwaysLinkAssemblyAttribute on package or precompiled assemblies that contain one or more methods with the [RuntimeInitializeOnLoadMethod] attribute, but which may not contain types used directly or indirectly in a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ac4dc9d70a49
unity_docs
scripting
In Unity's 'Performing a search', what is 'Using fuzzy search' and how does it work?
To use fuzzy search on an item, you can use FuzzySearch.FuzzyMatch , as in the following example: ``` if (FuzzySearch.FuzzyMatch(sq, CleanString(item.label), ref score, matches)) item.label = RichTextFormatter.FormatSuggestionTitle(item.label, matches); ``` All search items are sorted against items of the same provide...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82c86ab8af48
unity_docs
editor
Explain 'Introduction to customizing the build pipeline' in Unity.
A build pipeline is the automated processing and tooling that transforms your project from source assets and code into a Player for one or more target platforms. Unity includes a build pipeline for creating Player builds for many target platforms, and you can also create content-only builds, for example when using Addr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3faae1970a45
unity_docs
rendering
What is `ParticleSystem.EmissionModule` in Unity? Explain its purpose and usage.
EmissionModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the EmissionModule of a Particle System. Additional resources: ParticleSystem , ParticleSystem.emission . Properties Property Description burstCount The current number of bursts. enab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c64fed24e527
unity_docs
rendering
What is `Texture.updateCount` in Unity? Explain its purpose and usage.
Texture.updateCount public uint updateCount ; Description This counter is incremented when the Texture is updated. Note: If you perform an update from the GPU side, you should increment the counter yourself. (For instance, when blitting into a RenderTexture ). (see IncrementUpdateCount ). ```csharp using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02d3b9b51c00
unity_docs
editor
What is `EditorGUIUtility.pixelsPerPoint` in Unity? Explain its purpose and usage.
EditorGUIUtility.pixelsPerPoint public static float pixelsPerPoint ; Description The scale of GUI points relative to screen pixels for the current view This value is the number of screen pixels per point of interface space. For instance, 2.0 on retina displays. Note that the value may differ from one view to the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc05f0d9f7e7
unity_docs
rendering
Show me a Unity code example for 'Upgrade to Unity 6.0'.
ou must set RenderTextureDescriptor.shadowSamplingMode to ShadowSamplingMode.CompareDepths to enable depth-compare sampling. Because GraphicsFormat.DepthAuto and GraphicsFormat.ShadowAuto were both considered depth stencil formats but used as colors formats, you may need to adjust your code. For example, in the followi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92f3c2120fad
unity_docs
scripting
What is `UIElements.PopupWindow` in Unity? Explain its purpose and usage.
PopupWindow class in UnityEngine.UIElements / Inherits from: UIElements.TextElement / Implemented in: UnityEngine.UIElementsModule Description Styled visual text element. This element doesn't have any functionality. It's just a container with a border and a title, rather than a window or popup. For more infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8908b691f026
unity_docs
scripting
What is `Rendering.RenderTargetBinding.colorStoreActions` in Unity? Explain its purpose and usage.
RenderTargetBinding.colorStoreActions public RenderBufferStoreAction[] colorStoreActions ; Description Store actions for color buffers. Not all platforms support store actions. If the platform you are using does not support store actions, RenderBufferStoreAction.Store will be used instead.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bc28f27f176
unity_docs
scripting
What is `PackageManager.PackageSource` in Unity? Explain its purpose and usage.
PackageSource enumeration Description Source of packages. Properties Property Description Unknown The package source is unknown. Registry The package is from a registry. BuiltIn The package is built-in and part of Unity. Embedded The package is embedded in the Unity project. Local The package is referenced...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1aa91d00bc8
unity_docs
scripting
What is `SceneView` in Unity? Explain its purpose and usage.
SceneView class in UnityEditor / Inherits from: EditorWindow Implements interfaces: IHasCustomMenu , ISupportsOverlays Description Use this class to manage SceneView settings, change the SceneView camera properties, subscribe to events, call SceneView methods, and render open scenes. Static Properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8ea05a2923f0
unity_docs
editor
Show me a Unity code example for 'Command events'.
ent. Call the Event.StopPropogation() method on the event before executing the actual logic of the command, so the Editor knows that the comment has been executed. ## Example The following example uses command events to support copy and paste in a custom Editor Window. The example displays a list of fruits in a custo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b95306fa533b
unity_docs
scripting
What is `UIElements.Experimental.StyleValues.marginRight` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StyleValues.marginRight public float marginRight ; Description Space reserved for the right edge of the margin during the layout phase.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f213e9dbd32a
unity_docs
rendering
What is `Rendering.BuiltinRenderTextureType.GBuffer1` in Unity? Explain its purpose and usage.
BuiltinRenderTextureType.GBuffer1 Description Deferred shading G-buffer #1 (typically specular + roughness). Built-in deferred shaders put specular color into RGB channels, and roughness into A channel of this texture. But your own custom shaders could be outputting anything there of course. Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10217d01081a
unity_docs
scripting
What is `Rendering.RenderPipelineGraphicsSettingsCollection` in Unity? Explain its purpose and usage.
RenderPipelineGraphicsSettingsCollection class in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Container class for a list of IRenderPipelineGraphicsSettings objects. Properties Property Description settingsList The list of IRenderPipelineGraphicsSettings.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a3df2ef8aa62
unity_docs
rendering
In Unity's 'Material Inspector window reference', what is 'Advanced Options' and how does it work?
The properties the Unity Editor displays for a Material depend on the Material Properties defined by the shader that this Material uses. However, all Materials share three Advanced Options . Advanced Options Function Render Queue Select a Render Queue. The Material’s shader determines the default Render Queue value. Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f0ae236a756f
unity_docs
physics
Explain 'Built-in 3D physics' in Unity.
Unity’s built-in 3D physics system is an integration of the Nvidia PhysX engine. You can use this system in object-oriented 3D projects. This section includes the following topics. Topic Description Character control Configure physics-based character control for first-person and third-person characters. Rigidbody physi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c34001b2b181
unity_docs
scripting
What is `UIElements.InspectorElement` in Unity? Explain its purpose and usage.
InspectorElement class in UnityEditor.UIElements / Inherits from: UIElements.BindableElement Description Create a VisualElement inspector from a SerializedObject. Upon Bind(), the InspectorElement will generate PropertyFields inside according to the SerializedProperties inside the bound SerializedObject. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f8642c04ec3
unity_docs
math
What is `ComputeShader.SetMatrix` in Unity? Explain its purpose and usage.
ComputeShader.SetMatrix Declaration public void SetMatrix (string name , Matrix4x4 val ); Declaration public void SetMatrix (int nameID , Matrix4x4 val ); Parameters Parameter Description name Variable name in shader code. nameID Property name ID, use Shader.PropertyToID to get it. val Valu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_884435990fc2
unity_docs
scripting
What is `GL.RenderTargetBarrier` in Unity? Explain its purpose and usage.
GL.RenderTargetBarrier Declaration public static void RenderTargetBarrier (); Description Resolves the render target for subsequent operations sampling from it. At the moment the advanced OpenGL blend operations are the only case requiring this barrier. Additional resources: BlendOp .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96f635ec25b3
unity_docs
ui
What is `UIElements.MouseEventBase_1.button` in Unity? Explain its purpose and usage.
MouseEventBase<T0>.button public int button ; Description A value that indicates which mouse button was pressed or released (if any) to cause this event: 0 is the left button, 1 is the right button, 2 is the middle button. A negative value indicates that no mouse button changed state during this event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_89211301da65_doc_1
github
scripting
What does `OnLoadSceneRequestCommand` do in this Unity script? Explain its purpose and signature.
Before the change is made Signature: ```csharp private async void OnLoadSceneRequestCommand( LoadSceneRequestCommand loadSceneRequestCommand) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_5359f3c71e5f
unity_docs
scripting
In Unity's 'Deep linking', what is 'Enable deep linking' and how does it work?
Before you can process deep links, you need to configure your application to react to them. The process to configure an application to react to specific URLs is platform-specific. Unity supports deep links for the following platforms: iOS Android Universal Windows Platform macOS Web platform (no enabling required) Note...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db08b3ae62cb
unity_docs
physics
What is `RaycastCommand.queryParameters` in Unity? Explain its purpose and usage.
RaycastCommand.queryParameters public QueryParameters queryParameters ; Description Structure for specifying additional parameters for a batch query such as layer mask, hit multiple mesh faces, hit triggers and hit backfaces.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_299813631130
unity_docs
scripting
Give me an overview of the `GradientMode` class in Unity.
GradientMode enumeration Description Color interpolation mode used by Gradient . Additional resources: Gradient.mode , Gradient.Evaluate . Properties Property Description Blend Linearly interpolate between the gradient keys. Fixed Use a constant color between the keys. PerceptualBlend Linearly interpolate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.