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_70cab1f0d4be
unity_docs
rendering
What is `ParticleSystemRenderer.renderMode` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.renderMode public ParticleSystemRenderMode renderMode ; Description Specifies how the system draws particles. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps; private ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6599593c73b5
unity_docs
scripting
Show me a Unity code example for 'Remove a layer from a layerMask'.
To remove a layer from a layermask, use the logical AND operator on the original layermask and the bitwise complement of the layer to remove it. ``` originalLayerMask &= ~(1 << layerToRemove); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e153e5d04b79
unity_docs
physics
What is `SurfaceEffector2D` in Unity? Explain its purpose and usage.
SurfaceEffector2D class in UnityEngine / Inherits from: Effector2D / Implemented in: UnityEngine.Physics2DModule Description Applies tangent forces along the surfaces of colliders. When the source Collider2D is a trigger, the effector will apply forces whenever the target Collider2D overlaps the source. W...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ece38b9613d4
unity_docs
math
What is `Vector2Int.operator_multiply` in Unity? Explain its purpose and usage.
Vector2Int.operator * public static Vector2Int operator * ( Vector2Int a , Vector2Int b ); public static Vector2Int operator * ( Vector2Int a , int b ); Description Multiplies a vector by a number.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6def0998ec1
unity_docs
audio
What is `AudioSettings.SetSpatializerPluginName` in Unity? Explain its purpose and usage.
AudioSettings.SetSpatializerPluginName Declaration public static void SetSpatializerPluginName (string pluginName ); Parameters Parameter Description pluginName The spatializer plugin name. Description Sets the spatializer plugin for all platform groups. If a null or empty string is passed in, the existin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_676dd468a068
unity_docs
scripting
What is `Device.Application.isFocused` in Unity? Explain its purpose and usage.
Application.isFocused public static bool isFocused ; Description This has the same functionality as Application.isFocused . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_349d474ad2d7
unity_docs
animation
What is `Animations.AnimationHumanStream.leftFootHeight` in Unity? Explain its purpose and usage.
AnimationHumanStream.leftFootHeight public float leftFootHeight ; Description The left foot height from the floor. (Read Only) The foot height is the distance between the ankle and the floor computed when the avatar was configured.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0698b64c1bad
unity_docs
editor
In Unity's 'Binding examples', what is 'Advanced Editor binding examples' and how does it work?
Topics Description Bind to a list with ListView Create a list of toggles and binds the list to an underlying list of objects. Bind to a list without ListView Create a binding that binds to a list with array instead of ListView. Bind a custom control Create a custom control and bind it to a native Unity type. Bind a cus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3cddebed7bd6
unity_docs
scripting
What is `QualitySettings.lodBias` in Unity? Explain its purpose and usage.
QualitySettings.lodBias public static float lodBias ; Description Global multiplier for the LOD's switching distance. A larger value leads to a longer view distance before a lower resolution LOD is picked.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eef9b405e0ec
unity_docs
scripting
What is `Unity.Properties.Property_2.HasAttribute` in Unity? Explain its purpose and usage.
Property<T0,T1>.HasAttribute Declaration public bool HasAttribute (); Returns bool true if the property has the given attribute type; otherwise, false . Description Returns true if the property has any attributes of the given type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3ba27db67f2
unity_docs
scripting
What is `Cache.readOnly` in Unity? Explain its purpose and usage.
Cache.readOnly public bool readOnly ; Description Returns true if the cache is readonly. Only if the cache is in the StreamingAssets folder or the folder for the cache path is readonly, the cache is readonly.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c5950d4a080
unity_docs
editor
What are the parameters of `Unity.Profiling.Editor.ProfilerModuleMetadataAttribute.ctor` in Unity?
Description Initializes and returns an instance of ProfilerModuleMetadataAttribute . ```csharp using System; using Unity.Profiling; using Unity.Profiling.Editor;[Serializable] [ProfilerModuleMetadata("Garbage Collection")] public class GarbageCollectionProfilerModule : ProfilerModule { static readonly ProfilerCount...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe03df450d4f
unity_docs
physics
What is `Compilation.CompilationPipeline.compilationFinished` in Unity? Explain its purpose and usage.
CompilationPipeline.compilationFinished Parameters Parameter Description context A token generated by Unity, which uniquely identifies a single compilation cycle and is valid only for the duration of that cycle. Description An event that is invoked on the main thread when the compilation of assemblies finishes....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37094cd697ae
unity_docs
ui
What is `GUILayout.FlexibleSpace` in Unity? Explain its purpose and usage.
GUILayout.FlexibleSpace Declaration public static void FlexibleSpace (); Description Insert a flexible space element. Flexible spaces use up any leftover space in a layout. Note: This will override the GUILayout.ExpandWidth and GUILayout.ExpandHeight Flexible Space in a GUILayout Area. ```csharp using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84f74ec29c39
unity_docs
rendering
What is `HDROutputSettings.format` in Unity? Explain its purpose and usage.
HDROutputSettings.format public RenderTextureFormat format ; Description The RenderTextureFormat of the display buffer for the active HDR display. Accessing this member results in an exception if HDR is not available on the display. Use HDROutputSettings.available for the display to check that HDR is avai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dc0f2e577b9
unity_docs
rendering
What is `ParticleSystemVertexStream` in Unity? Explain its purpose and usage.
ParticleSystemVertexStream enumeration Description All possible Particle System vertex shader inputs. Properties Property Description Position The position of each particle vertex, in world space. Normal The vertex normal of each particle. Tangent The tangent vector for each particle (for normal mapping). Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_50cebbcadded
unity_docs
xr
Explain 'XR audio' in Unity.
You can use 3D audio to enhance the immersiveness of your VR game or application. 3D audio goes beyond typical stereo or multi-speaker audio set ups that typically change only the relative volume of point audio sources in each speaker. An ambisonic decoder plug-in decodes specially recorded ambisonic audio. Ambisonic e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9379aef7812
unity_docs
scripting
What is `Build.Reporting.BuildStep.depth` in Unity? Explain its purpose and usage.
BuildStep.depth public int depth ; Description The nesting depth of the build step. The build process is broken down into steps, and steps may themselves be broken down into sub-steps recursively. The nesting depth indicates how many higher-level build steps enclose this step. The step that represents the overa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9efcc7ef801
unity_docs
scripting
What is `Logger.LogWarning` in Unity? Explain its purpose and usage.
Logger.LogWarning Declaration public void LogWarning (string tag , object message ); Declaration public void LogWarning (string tag , object message , Object context ); Parameters Parameter Description tag Used to identify the source of a log message. It usually identifies the class where the log c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_852fb8e59ed4
unity_docs
math
Show me a Unity C# example demonstrating `Font.GetOSInstalledFontNames`.
g[] GetOSInstalledFontNames (); Returns string[] An array of the names of all fonts installed on the machine. Description Get names of fonts installed on the machine. GetOSInstalledFontNames lets you get the names of all the fonts installed on the machine. These names can be passed to CreateDynamicFontFrom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6c859822b50d
unity_docs
ui
In Unity's 'Multiplayer Sessions Building Block', what is 'Multiplayer sessions' and how does it work?
A multiplayer session represents a group of connected players and provides an abstraction layer for managing multiplayer game states, including initial player connections, host election, players joining and leaving, and network connection establishment. Multiplayer sessions don’t facilitate gameplay synchronization, bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3eda51c81533
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetImporters.AssetImportContext.GetArtifactFilePath`.
er generating a Material and setting its base color using the first pixel color saved in an Artifact File from the example inside AssetImportContext.GetOutputArtifactFilePath . Note: While there is no limit on how many Artifact Files are created using AssetImportContext.GetOutputArtifactFilePath , it is only possible...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c11bf0eb3c7e
unity_docs
math
What is `IMGUI.Controls.MultiColumnHeaderState.sortedColumns` in Unity? Explain its purpose and usage.
MultiColumnHeaderState.sortedColumns public int[] sortedColumns ; Description The array of column indices for multiple column sorting. Use this array to sort your data by multiple columns. The first entry in the array is the primary sorted column. The sorting order for a column index can be determined by using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9b2348a42a8
unity_docs
animation
What is `Animations.AnimationHumanStream.GetHintWeightPosition` in Unity? Explain its purpose and usage.
AnimationHumanStream.GetHintWeightPosition Declaration public float GetHintWeightPosition ( AvatarIKHint index ); Parameters Parameter Description index The AvatarIKHint that is queried. Returns float The position weight of the IK Hint. Description Returns the position weight of the IK Hint.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7fd040a9f29
unity_docs
scripting
What is `AI.NavMeshData.ctor` in Unity? Explain its purpose and usage.
NavMeshData Constructor Declaration public NavMeshData (); Description Constructs a new object for representing a NavMesh for the default agent type. At construction this NavMesh is empty, i.e. there are no polygons. You can use this class to create, build and add a NavMesh at runtime. Declaration public NavM...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4750d82022b5
unity_docs
xr
What is `Unity.Properties.VisitReturnCode` in Unity? Explain its purpose and usage.
VisitReturnCode enumeration Description Internal return code used during path visitation. Properties Property Description Ok The visitation resolved successfully. NullContainer The container being visited was null. InvalidContainerType The given container type is not valid for visitation. Miss...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9c908710c680
unity_docs
animation
In Unity's 'Animation tab', what is 'Clip selection list' and how does it work?
You can perform these tasks in this area of the Animation tab: Select a clip from the list to display its clip-specific properties . Play a selected clip in the clip preview pane . Create a new clip for this file with the add ( + ) button. Remove the selected clip definition with the delete ( - ) button. If you manuall...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11717161306d
unity_docs
scripting
What is `Search.StringView.operator_ne` in Unity? Explain its purpose and usage.
StringView.operator != public static bool operator != (stringView lhs , stringView rhs ); Parameters Parameter Description lhs A StringView . rhs A StringView . Description The not equals operator. public static bool operator != (stringView lhs , string rhs ); Parameters Parameter Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ad460649fe35
github
scripting
Write a Unity Editor script for Update Manifest Setup Step
```csharp #region using System; using System.Collections.Generic; using System.IO; using MagicLeap.SetupTool.Editor.Interfaces; using MagicLeap.SetupTool.Editor.Utilities; using UnityEditor; using UnityEngine; #endregion namespace MagicLeap.SetupTool.Editor.Setup { /// <summary> /// Updates the SDK manifest...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_a76b418ef147
unity_docs
math
Show me a Unity C# example demonstrating `Vector3.sqrMagnitude`.
rations. Calculating the squared magnitude instead of using the magnitude property is much faster - the calculation is basically the same only without the slow Sqrt call. If you are using magnitudes simply to compare distances, then you can just as well compare squared magnitudes against the squares of distances sinc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a11b104a9b8
unity_docs
animation
What is `Playables.PlayableBehaviour` in Unity? Explain its purpose and usage.
PlayableBehaviour class in UnityEngine.Playables / Implemented in: UnityEngine.CoreModule Implements interfaces: IPlayableBehaviour Description PlayableBehaviour is the base class from which every custom playable script derives. A PlayableBehaviour can be used to add user-defined behaviour to a PlayableGraph ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f507135a9991
unity_docs
physics
Explain 'Panel Settings properties reference' in Unity.
The following tables describe the Panel Settings asset properties: Property Description Theme Style Sheet Apply a default TSS file to every UI Document that the panel renders. Text Settings Set the UITK Text Settings asset for this panel. If this asset isn’t set, UI Toolkit automatically creates one with the default se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ab6d4a0a69e
unity_docs
scripting
What is `Experimental.GraphView.RectangleSelector.RegisterCallbacksOnTarget` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RectangleSelector.RegisterCallbacksOnTarget Declaration protected void RegisterCallbacksOnTarget (); Description Called to register click event callbacks on the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5904a6ac074f
unity_docs
scripting
What is `UIElements.SortColumnDescription` in Unity? Explain its purpose and usage.
SortColumnDescription class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: INotifyBindablePropertyChanged Description This represents a description on what column to sort and in which order. Properties Property Description column The sorted column. co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c32ab904671
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchProposition`.
SearchProposition struct in UnityEditor.Search Description Search propositions are used to display choices to the user to add new filters to a search query. ``` static IEnumerable<SearchProposition> EnumerateDecalPropositions(SearchContext context, SearchPropositionOptions options) { if (!options.flags.HasAny(Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e6ff0b9814d
unity_docs
input
In Unity's 'Requirements and compatibility', what is 'Compatibility' and how does it work?
It’s best practice to create a separate branch or copy of your application and port that to Apple TV. tvOS only supports a subset of the iOS framework. This means that plug-ins that are compatible with iOS might not be compatible with tvOS. If your app uses more than 4 GB on disk, break it into smaller parts and use On...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_283f1765e1ed
unity_docs
rendering
Show me a Unity C# example demonstrating `TrailRenderer.textureMode`.
TrailRenderer.textureMode public LineTextureMode textureMode ; Description Choose whether the U coordinate of the trail texture is tiled or stretched. Stretching maps the texture along the trail with no repeats. Tiling maps the texture along the trail with repeats every world unit. To change the repeat rate,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00215504358e
unity_docs
scripting
What is `Unity.Android.Types.DebugSymbolFormat.LegacyExtensions` in Unity? Explain its purpose and usage.
DebugSymbolFormat.LegacyExtensions Description Produces debug metadata files with .so extension in the zip package. By default, gradle produces debug metadata files with .so.sym or .so.dbg extensions. Use this option to create debug metadata files with .so extension for the distribution services which don’t rec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5432c52f85db
unity_docs
rendering
What is `Texture2D.alphaIsTransparency` in Unity? Explain its purpose and usage.
Texture2D.alphaIsTransparency public bool alphaIsTransparency ; Description Indicates whether this texture was imported with TextureImporter.alphaIsTransparency enabled. This setting is available only in the Editor scripts. Note that changing this setting will have no effect; it must be enabled in TextureImpo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a043d46bbf6e
unity_docs
physics
What is `RaycastCommand.ctor` in Unity? Explain its purpose and usage.
RaycastCommand Constructor Declaration public RaycastCommand ( Vector3 from , Vector3 direction , QueryParameters queryParameters , float distance ); Parameters Parameter Description from The starting point of the ray in world coordinates. direction The direction of the ray. distance The maximum ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39db92c87dd7
unity_docs
rendering
Give me an overview of the `SpriteMetaData` class in Unity.
SpriteMetaData struct in UnityEditor Description Editor data used in producing a Sprite. Additional resources: TextureImporter.spritesheet . Properties Property Description alignment Edge-relative alignment of the sprite graphic. border Edge border size for a sprite (in pixels). name Name of the Sprite. p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e0de7c2446a
unity_docs
scripting
What is `MonoBehaviour.OnDestroy` in Unity? Explain its purpose and usage.
MonoBehaviour.OnDestroy() Description Called when a GameObject or component is about to be destroyed. OnDestroy is called in the following scenarios: When a component or its parent GameObject is explicitly destroyed with Object.Destroy . When a scene ends or is unloaded, all GameObjects not preserved with a ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f2fcbcc1784
unity_docs
input
What is `UnityEngine.SubsystemsModule` in Unity? Explain its purpose and usage.
UnityEngine.SubsystemsModule Description The Subsystem module contains the definitions and runtime support for general subsystems in Unity. Classes Class Description IntegratedSubsystem An IntegratedSubsystem is initialized from an IntegratedSubsystemDescriptor for a given Subsystem (Example, Input, Environment,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c2c6236572e
unity_docs
scripting
What is `AndroidJNI.SetObjectField` in Unity? Explain its purpose and usage.
AndroidJNI.SetObjectField Declaration public static void SetObjectField (IntPtr obj , IntPtr fieldID , IntPtr val ); Description Sets the value of an instance field of the specified object. The value to set is a reference to either a java.lang.Object , or a subclass thereof. Additional resources: Java Nati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b920c665eb7b
unity_docs
input
In Unity's 'LongField', what is 'Customize the input text selection' and how does it work?
Input text is selectable by default. You can customize the selection behaviors such as selectAllOnMouseUP and selectAllOnFocus . In C#, set them through textSelection : ``` myElement.textSelection.selectAllOnMouseUp = false; myElement.textSelection.selectAllOnFocus = false; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3233a385573e
unity_docs
scripting
What is `Video.VideoPlayer.length` in Unity? Explain its purpose and usage.
VideoPlayer.length public double length ; Description The length of the VideoClip , or the URL, in seconds. (Read Only) For URL sources, this will only be set once the source preparation is completed. See VideoPlayer.Prepare .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2ccd70cc7ce
unity_docs
scripting
Show me a Unity C# example demonstrating `RequireComponent`.
the same GameObject. When you use RequireComponent, this is done automatically, so you are unlikely to get the setup wrong. Note: RequireComponent only checks for missing dependencies when GameObject.AddComponent is called. This happens both in the Editor, or at runtime. Unity does not automatically add any missing ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5aeed493c3f8
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetNodeTypeHandlerBase` in Unity? Explain its purpose and usage.
Hierarchy.GetNodeTypeHandlerBase Declaration public T GetNodeTypeHandlerBase (); Returns T The hierarchy node type handler instance for that type if already created, null otherwise. Description Gets a hierarchy node type handler instance from this hierarchy. Declaration public Unity.Hierarchy.Hierar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2372ee5bf3b6
github
scripting
Write a Unity C# script called Addressable Skybox
```csharp using System; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; namespace PassivePicasso.SimplyAddress { [ExecuteAlways] public class AddressableSkybox : SimpleAddress { [NonSerialized] public Material material; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_56c847dd0f3f
unity_docs
audio
Explain 'Audio Low Pass Effect' in Unity.
The Audio Low Pass Effect passes low frequencies of an AudioMixer group while removing frequencies higher than the Cutoff Frequency . ## Properties Property: Function: Cutoff freq Lowpass cutoff frequency in Hertz (range 10.0 to 22000.0, default = 5000.0). Resonance Lowpass resonance quality value (range 1.0 to 10.0,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f4dc8507f847
unity_docs
physics
Explain 'Collision' in Unity.
To configure collision between GameObjects in Unity, you need to use colliders. colliders define the shape of a GameObject for the purposes of physical collisions. You can then use these colliders to manage collision events. You can configure collisions via collider components, or their corresponding C# class. This doc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4692f5ba1d9
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.CopyAssets`.
urce assets. newPaths Filesystem paths of the new assets to create. Returns bool Returns true if the copy operation is successful or false if part of the process fails. Description Duplicates assets in paths and stores them in newPaths . All paths are relative to the project folder, for example: "Assets p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ff8802d38cf
unity_docs
animation
Show me a Unity C# example demonstrating `AnimationUtility.GetCurveBindings`.
s in an animation clip. Unity has two types of animation: float curve and object reference curve. A float curve is a classic curve that animates a float property over time. An object reference curve is a construct that animates an object reference property over time. This method returns the float curve bindings. See ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e812cfdb7a9
unity_docs
scripting
Show me a Unity C# example demonstrating `Scripting.RequiredInterfaceAttribute`.
RequiredInterfaceAttribute class in UnityEngine.Scripting / Implemented in: UnityEngine.CoreModule Description When a type is marked, all interface implementations of the specified types will be marked. ```csharp using System; using UnityEngine; using UnityEngine.Scripting;public class NewBehaviourScript : Mono...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ada939548d4
unity_docs
physics
What is `Rigidbody2D.MovePosition` in Unity? Explain its purpose and usage.
Rigidbody2D.MovePosition Declaration public void MovePosition ( Vector2 position ); Parameters Parameter Description position The new position for the Rigidbody object. Description Moves the rigidbody to position . Moves the rigidbody to the specified position by calculating the appropriate linear vel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_14daa51a855c
unity_docs
input
In Unity's 'Create a slide toggle custom control', what is 'Style the slide toggle' and how does it work?
Style the slide toggle with a USS file. In the slide-toggle folder, create a USS file named SlideToggle.uss . Open SlideToggle.uss in a text editor and replace its contents with the following: ```.slide-toggle__input { background-color: var(--unity-colors-slider_groove-background); max-width: 25px; border-top-left-r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_563875d7d690
unity_docs
scripting
In Unity's 'Create trees and leaves from meshes', what is 'Import a mesh' and how does it work?
To learn about exporting models from a 3D modeling application and importing them into Unity, refer to Models . The mesh you want to use needs to be in the Ambient-Occlusion folder the trees are in. For more information, refer to Shaders and the Ambient-Occlusion folder .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d77b160a9d5
unity_docs
input
What is `GUIUtility.hotControl` in Unity? Explain its purpose and usage.
GUIUtility.hotControl public static int hotControl ; Description The controlID of the current hot control. The hot control is one that is temporarily active. When the user mousedown's on a button, it becomes hot. No other controls are allowed to respond to mouse events while some other control is hot. once t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dda8b7797858
unity_docs
scripting
In Unity's 'Create high-precision occlusion areas', what is 'Occlusion Area component reference' and how does it work?
Property: Function: Size Set the size of the Occlusion Area. Center Set the center of the Occlusion Area. By default this is 0,0,0 and is located in the center of the box. Is View Volume If enabled, the Occlusion Area defines a View Volume. If disabled, the Occlusion Area does not define a View Volume. This must be ena...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5bd8774d2da0
github
scripting
Write a Unity C# UI script for Tele Type
```csharp using UnityEngine; using System.Collections; namespace TMPro.Examples { public class TeleType : MonoBehaviour { //[Range(0, 100)] //public int RevealSpeed = 50; private string label01 = "Example <sprite=2> of using <sprite=7> <#ffa000>Graphics Inline</color> <sprite=5...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_e7cb76dd73a4
unity_docs
scripting
What is `WSA.Tile.Exists` in Unity? Explain its purpose and usage.
Tile.Exists Declaration public static bool Exists (string tileId ); Parameters Parameter Description tileId An identifier for secondary tile. Description Whether secondary tile is pinned to start screen. When hasUserConsent is true , this property determines, whether tile is present on start screen. Alwa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85e08600627a
unity_docs
ui
What is `Overlays.OverlayCanvas.ResetOverlay` in Unity? Explain its purpose and usage.
OverlayCanvas.ResetOverlay Declaration public void ResetOverlay ( Overlays.Overlay overlay ); Parameters Parameter Description overlay The Overlay to reset. Description Resets the overlay to its default state.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bde9f545b846
unity_docs
editor
In Unity's 'Native memory allocators reference', what is 'Other Allocators' and how does it work?
Allocations used for type trees and the file cache. It has the following settings: Setting Description Command line argument Default value File Cache Block Size The file cache has its own allocator to avoid fragmentation. This is its block size. memorysetup-cache-allocator-block-size 4194304 bytes Type Tree Block Size ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d04e3440e6b
unity_docs
rendering
Show me a Unity C# example demonstrating `MaterialPropertyDrawer`.
r material properties, without having to write custom MaterialEditor classes. This is similar to how PropertyDrawer enables custom UI without writing custom inspectors. In shader code, C#-like attribute syntax can be used in front of shader properties to add drawers to them. Unity has several built-in drawers, and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d580c03076b5_doc_2
github
scripting
What does `GetOutputSizes` do in this Unity script? Explain its purpose and signature.
Provides a list of resolutions supported by the passthrough camera. Developers should use one of thosewhen initializing the camera.The passthrough camera Signature: ```csharp public static List<Vector2Int> GetOutputSizes(PassthroughCameraEye cameraEye) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_9706ea559273
unity_docs
scripting
What is `HumanDescription.skeleton` in Unity? Explain its purpose and usage.
HumanDescription.skeleton public SkeletonBone[] skeleton ; Description List of bone Transforms to include in the model. This list defines which transforms to include in the final avatar skeleton. All parents from the human transform must be included in the list. Additional resources: SkeletonBone .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af252ec9466d
unity_docs
animation
What is `EditorGUIUtility.DrawRegionSwatch` in Unity? Explain its purpose and usage.
EditorGUIUtility.DrawRegionSwatch Declaration public static void DrawRegionSwatch ( Rect position , SerializedProperty property , SerializedProperty property2 , Color color , Color bgColor , Rect curveRanges ); Description Draw swatch with a filled region between two SerializedProperty curves. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f847ecfe66ce
unity_docs
ui
In Unity's 'ToolbarPopupSearchField', what is 'Create a ToolbarPopupSearchField' and how does it work?
You can create a ToolbarPopupSearchField with UI Builder, UXML, or C#. The following C# example creates a ToolbarPopupSearchField with a menu, a placeholder text, and a value changed callback: ```csharp using UnityEditor.UIElements; ... var toolbarPopupSearchField = new ToolbarPopupSearchField(); toolbarPopupSearchFiel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c592a716cc15
unity_docs
scripting
Show me a Unity C# example demonstrating `RenderMode`.
RenderMode enumeration Description RenderMode for the Canvas. ```csharp //Attach this script to your Canvas GameObjectusing UnityEngine;public class Example : MonoBehaviour { enum RenderModeStates { camera, overlay, world }; RenderModeStates m_RenderModeStates; Canvas m_Canvas; // Use this for initialization vo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1fa92810593
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh.isReadable`.
to readable when assigned through the inspector Notes: When Unity creates a Mesh from script, this value is initially set to true. Meshes not marked readable will throw an error on accessing any data arrays from script at runtime. Access is always allowed in the Unity Editor outside of the game and rendering loop, rega...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a936da98ba96
unity_docs
math
What is `Tilemaps.TileBase.RefreshTile` in Unity? Explain its purpose and usage.
TileBase.RefreshTile Declaration public void RefreshTile ( Vector3Int position , Tilemaps.ITilemap tilemap ); Parameters Parameter Description position Position of the Tile on the Tilemap . tilemap The Tilemap the tile is present on. Description This method is called when the tile is refreshed. I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_05d8ca4bc521
unity_docs
scripting
Explain 'Install a UPM package from the Asset Store' in Unity.
Use this procedure to install UPM packages that come from the Asset Store . For information about installing UPM packages from a registry, refer to Install a UPM package from a registry . For information about adding asset packages (.unitypackage format) that come from the Asset Store, refer to Download and import an a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b469c004fad4
unity_docs
editor
Explain 'Editor script determinism' in Unity.
Scripts that modify assets during import or post-processing can unintentionally break build determinism. Before building, ensure that all generated assets are version-controlled and stable. To prevent Unity Editor scripts from causing non-deterministic builds, follow these guidelines: Sort collected assets deterministi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39ea7452bf48
unity_docs
animation
What is `Animations.AnimationHumanStream.GetGoalWeightRotation` in Unity? Explain its purpose and usage.
AnimationHumanStream.GetGoalWeightRotation Declaration public float GetGoalWeightRotation ( AvatarIKGoal index ); Parameters Parameter Description index The AvatarIKGoal that is queried. Returns float The rotation weight of the IK goal. Description Returns the rotation weight of the IK goal.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ebcf6a3167b
unity_docs
scripting
What is `Experimental.GraphView.StickyNote` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StickyNote class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.GraphElement Implements interfaces: IResizable Description Instantiates a [GraphElement] used for comment text. Static Propertie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6944c064005b
unity_docs
scripting
What is `RectInt.Overlaps` in Unity? Explain its purpose and usage.
RectInt.Overlaps Declaration public bool Overlaps ( RectInt other ); Parameters Parameter Description other Other rectangle to test overlapping with. Returns bool True if the other rectangle overlaps this one. Description RectInts overlap if each RectInt Contains a shared point.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62a339a3d751
unity_docs
rendering
Explain 'Self-Illuminated Normal mapped Diffuse' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Self-Illuminated Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a0c9e6fc40c
unity_docs
scripting
What is `UIElements.BackgroundSizeType` in Unity? Explain its purpose and usage.
BackgroundSizeType enumeration Description Defines the size of the background. Properties Property Description Length Determines if the size of the background image comes from the BackgroundSize.x and BackgroundSize.y length values. Cover Resize the background image to cover the entire container, ev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e0cac3292ea
unity_docs
rendering
Give me an overview of the `ParticleSystemRenderer` class in Unity.
ParticleSystemRenderer class in UnityEngine / Inherits from: Renderer / Implemented in: UnityEngine.ParticleSystemModule Description Use this class to render particles on to the screen. Properties Property Description activeTrailVertexStreamsCount The number of currently active custom trail vertex streams....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bb20effe24a
unity_docs
rendering
What is `Renderer.OnBecameInvisible` in Unity? Explain its purpose and usage.
Renderer.OnBecameInvisible() Description OnBecameInvisible is called when the object is no longer visible by any camera. This message is sent to all scripts attached to the renderer. OnBecameVisible and OnBecameInvisible are useful to avoid computations that are only necessary when the object is visible. ```c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31a2da7b47d8
unity_docs
scripting
What is `ParticleSystem.main` in Unity? Explain its purpose and usage.
ParticleSystem.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 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb935b7536a0
unity_docs
scripting
What is `Cloth` in Unity? Explain its purpose and usage.
Cloth class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.ClothModule Description The Cloth class provides an interface to cloth simulation physics. Properties Property Description bendingStiffness Bending stiffness of the cloth. capsuleColliders An array of CapsuleColliders whi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7da934ede6b7
unity_docs
scripting
What is `Events.UnityEvent_3` in Unity? Explain its purpose and usage.
UnityEvent<T0,T1,T2> class in UnityEngine.Events / Inherits from: Events.UnityEventBase / Implemented in: UnityEngine.CoreModule Description Three argument version of UnityEvent . Generics are supported, specify type parameters on initialization as shown in the example. Refer to Configure callbacks in the I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c66123fc3845
unity_docs
audio
What is `AudioSource.spatialBlend` in Unity? Explain its purpose and usage.
AudioSource.spatialBlend public float spatialBlend ; Description Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D. Aside from determining if this AudioSource is heard as a 2D or 3D source, this property is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc9257940cd7
unity_docs
ui
What is `Editor.SaveChanges` in Unity? Explain its purpose and usage.
Editor.SaveChanges Declaration public void SaveChanges (); Description Performs a save action on the contents of the editor. Override SaveChanges() when using the Editor.hasUnsavedChanges property so that a user will not lose unsaved work when a window is closed. The Editor also calls this method internally ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a4ba42e7c0c
unity_docs
rendering
What is `Lightmapping.TryGetLightingSettings` in Unity? Explain its purpose and usage.
Lightmapping.TryGetLightingSettings Declaration public static bool TryGetLightingSettings (out LightingSettings settings ); Parameters Parameter Description settings See Lightmapping.lightingSettings . Returns bool Returns true if there is an object, and false if it isn't. Description Fetches the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33fe840d9011
unity_docs
physics
What is `MonoBehaviour.OnMouseExit` in Unity? Explain its purpose and usage.
MonoBehaviour.OnMouseExit() Description Called when the mouse is not any longer over the Collider . A call to OnMouseExit follows the corresponding calls to OnMouseEnter and OnMouseOver . This event is sent to all scripts attached to the Collider . This function is not called on objects that belong to Ignore ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d68e57ad53c
unity_docs
scripting
Show me a Unity C# example demonstrating `Color32.operator_Color`.
Color32.Color32 Description Color32 can be implicitly converted to and from Color . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color32 color = new Color(0.5f, 1f, 0.5f, 1f); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f88fd5f5c635
unity_docs
math
What is `Ray.ctor` in Unity? Explain its purpose and usage.
Ray Constructor Declaration public Ray ( Vector3 origin , Vector3 direction ); Description Creates a ray starting at origin along direction . ```csharp using UnityEngine;public class ExampleClass : MonoBehaviour { void Start() { // Create a ray from the transform position along the transform's z-axis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f2827fb034f
unity_docs
scripting
Show me a Unity C# example demonstrating `ScriptableWizard.OnWizardCreate`.
ScriptableWizard.OnWizardCreate() Description This is called when the user clicks on the Create button. Here you perform any final creation/modification actions. After OnCreateWizard is called, the wizard is automatically closed. Additional resources: ScriptableWizard.DisplayWizard ScriptableWizard window for sel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7e6f05b1891d
unity_docs
editor
Show me a Unity code example for 'Search logs'.
The Logs search provider searches the Unity Editor logs. ## Query syntax Provider token: log: Query example: Searches the logs for the text adpative . ``` log: adaptive ``` ## Provider filters The Logs provider has no additional filters. ## Results Search window tab: Logs .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc8aba298ea1
unity_docs
rendering
Explain 'SubShader in ShaderLab reference' in Unity.
Explore the SubShader block in ShaderLab to create a subshader, and add LOD values, tags, or a UsePass or GrabPass directive. Page Description SubShader block reference Reference for the SubShader block in ShaderLab. LOD directive reference Reference for the LOD directive in ShaderLab. SubShader tags reference Referenc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ad60732371b3
unity_docs
scripting
In Unity's 'TwoPaneSplitView', what is 'Create a TwoPaneSplitView' and how does it work?
You can create a TwoPaneSplitView with UXML and C#. To create a TwoPaneSplitView with C#, create a new instance of a TwoPaneSplitView object. For example: ``` TwoPaneSplitView myElement = new TwoPaneSplitView(); // Add two child elements to the TwoPaneSplitView VisualElement child1 = new VisualElement(); VisualElement...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0177c91a97ab
unity_docs
rendering
What is `SceneView.CameraSettings.fieldOfView` in Unity? Explain its purpose and usage.
SceneView.CameraSettings.fieldOfView public float fieldOfView ; Description The height of the view angle for the SceneView Camera. Measured in degrees vertically, or along the local Y axis. This property is an aspect neutral field of view (FOV). Use with SceneView.size to calculate the actual FOV.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df1bb302e3a6
unity_docs
editor
What are the parameters of `Search.QueryEngine_1.AddOperator` in Unity?
Description Adds a custom filter operator. ```csharp using System; using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_QueryEngine_AddOperator { static List<MyObjectType> s_Data; [MenuItem("Examples/QueryEngine/AddOperator")...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bf35baf67859
unity_docs
physics
Explain 'Profiler window reference' in Unity.
The Profiler window has the following areas: Profiler modules : Add and remove modules to the window which collect different types of data related to your application. Each module has its own chart in the top half of the window. Profiler controls : At the top of the window there are controls which you can use to stop, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_265ed9faafc1
unity_docs
rendering
Explain 'Create your first project' in Unity.
If you’re new to Unity, this page guides your through the steps to create your first project. ## Install the Unity Editor Check that your computer meets the system requirements for Unity. Download and install the Unity Editor . This process includes the following tasks: Install the Unity Hub , which manages your Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f4244bc07af
unity_docs
editor
What is `SceneManagement.ObjectOverride` in Unity? Explain its purpose and usage.
ObjectOverride class in UnityEditor.SceneManagement / Inherits from: SceneManagement.PrefabOverride Description Class with information about an object on a Prefab instance with overridden properties. Properties Property Description coupledOverride Access the coupled component modifications of the object bein...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_adcea8ca855d
unity_docs
scripting
Explain 'Color and High Dynamic Range (HDR)' in Unity.
Resources for working with and configuring color in Unity. Page Description Color spaces Resources for working with linear and gamma color spaces in Unity. High Dynamic Range (HDR) Resources for working with HDR in Unity.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1508d8be65e1_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The prefab to spawn when a teleport destination is chosen. The instance will spawn next to the destinationand point its forward vector at the destination and its up vector at the camera. Signature: ```csharp public GameObject pointerPrefab ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.