id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_9d29a98285ad
unity_docs
rendering
In Unity's 'Create a cubemap', what is 'Other Techniques' and how does it work?
Another useful technique is to generate the cubemap from the contents of a Unity scene using a script. The Camera.RenderToCubemap function can record the six face images from any desired position in the scene; the code example on the function’s script reference page adds a menu command to make this task easy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_74db549d1598
unity_docs
editor
In Unity's 'Assign icons to inspected items', what is 'Manage icons in theInspectorwindow' and how does it work?
To add icons, in the Inspector window, select Select icon . Then: To assign an icon to a GameObject or a script, do one of the following: To assign a label or image icon, click any icon from the list. To assign a custom icon, select Other… and select a texture. To assign an icon to a prefab, open the prefab in prefab e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_208214bd0cc7
github
scripting
Write a Unity C# XR/VR script for Pinch Point Follow
```csharp #if XR_HANDS_1_2_OR_NEWER using Unity.XR.CoreUtils; using Unity.XR.CoreUtils.Bindings; using UnityEngine.XR.Hands; using UnityEngine.XR.Interaction.Toolkit.Utilities.Tweenables.Primitives; #endif namespace UnityEngine.XR.Interaction.Toolkit.Samples.Hands { /// <summary> /// A class that follows the p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cffd6ab244d
unity_docs
animation
Show me a Unity C# example demonstrating `Keyframe.value`.
Keyframe.value public float value ; Description The value of the curve at keyframe. In a 2D graph you could think of this as the y-value. Additional resources: time . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { AnimationCurve curve = AnimationCurve.Linear(0, 0, 5, 5); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cf03757239c
unity_docs
rendering
Show me a Unity C# example demonstrating `ShaderGUI`.
e the 'CustomEditor' property in the shader. Note that CustomEditor can also be used for classes deriving from MaterialEditor (search for: Custom Material Editors). Note: Only the ShaderGUI approach works with Substance materials this is therefore the recommended approach to custom gui for shaders. See ShaderGUI.OnGUI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2672c9a53603
unity_docs
rendering
What is `Rendering.RenderQueueRange.lowerBound` in Unity? Explain its purpose and usage.
RenderQueueRange.lowerBound public int lowerBound ; Description Inclusive lower bound for the range. Objects that have material render queue larger or equal to this are included in the range. Additional resources: upperBound , FilteringSettings.renderQueueRange .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2f71f804b45
unity_docs
physics
What is `Rigidbody.SetDensity` in Unity? Explain its purpose and usage.
Rigidbody.SetDensity Declaration public void SetDensity (float density ); Description Sets the mass based on the attached colliders assuming a constant density. This is useful to set the mass to a value which scales with the size of the colliders.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4fc2cef6bd0b
unity_docs
editor
Show me a Unity C# example demonstrating `EditorBuildSettings.scenes`.
errides the global scenes, it reflects the scenes specified in the build profile; otherwise, it reflects the global scenes. Note: When calling BuildPipeline.BuildPlayer directly, BuildPlayerOptions.scenes can be used instead of this property. Additional resources: Introduction to build profiles , EditorBuildSetti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51dbf73582e3
unity_docs
editor
What are the parameters of `PrefabUtility.RemoveUnusedOverrides` in Unity?
Description This method identifies and removes all unused overrides from a list of Prefab Instance roots. See the manual Unused Overides for more detail. ```csharp using System.IO; using UnityEngine; using UnityEditor;public class RemoveUnusedOverridesExample { // Creates a new menu item 'Examples > Remove Unused O...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f044d0a4fa9
unity_docs
scripting
What is `ParticleSystemStopAction` in Unity? Explain its purpose and usage.
ParticleSystemStopAction enumeration Description The action to perform when the Particle System stops. Properties Property Description None Do nothing. Disable Disable the GameObject containing the Particle System. Destroy Destroy the GameObject containing the Particle System. Callback Call MonoBehaviour.OnP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_54ae662db244
unity_docs
rendering
Explain 'Reflective Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . One consideration for this shader is that the Base texture’s alpha channel will double as both the Reflection Map and the Specular Map. ## Reflective Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This shade...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2adbeaf12a2
unity_docs
scripting
What is `UIElements.BindingStatus` in Unity? Explain its purpose and usage.
BindingStatus enumeration Description Status to report the result of a binding update. Properties Property Description Success Indicates that the binding has successfully processed the update. Failure Indicates that the binding has failed to process the update. Pending Indicates that the binding ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e8bdb88f09c
unity_docs
physics
Give me an overview of the `SphereCollider` class in Unity.
SphereCollider class in UnityEngine / Inherits from: Collider / Implemented in: UnityEngine.PhysicsModule Description A sphere-shaped primitive collider. Additional resources: BoxCollider , CapsuleCollider , PhysicsMaterial , Rigidbody . Properties Property Description center The center of the sphere...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3bc4567c330a
unity_docs
ui
In Unity's 'Scroller', what is 'Example' and how does it work?
The following UXML example creates a Scroller: ``` <UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements"> <Scroller name="the-uxml-scroller" direction="Horizontal" low-value="0" high-value="100" /> </UXML> ``` The following C# example illustrates some of the customizable functionalities of the Sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62a190cac22f
unity_docs
rendering
What is `Material.GetTag` in Unity? Explain its purpose and usage.
Material.GetTag Declaration public string GetTag (string tag , bool searchFallbacks ); Declaration public string GetTag (string tag , bool searchFallbacks , string defaultValue ); Description Get the value of material's shader tag. If the material's shader does not define the tag, defaultValue is re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52ed3ad4315e
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.ToggleLeft`.
is similar to GUILayout.Toggle but respects the EditorGUI.showMixedValue property and handles keyboard focus consistent with other Editor controls. EditorGUILayout.ToggleLeft has the label close and to the left of the toggle. (The EditorGUILayout.Toggle has the opposite with the label at a distance from the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_806886f74e49
unity_docs
rendering
What is `LightmapParameters.SetLightmapParametersForLightingSettings` in Unity? Explain its purpose and usage.
LightmapParameters.SetLightmapParametersForLightingSettings Declaration public static void SetLightmapParametersForLightingSettings ( LightmapParameters parameters , LightingSettings lightingSettings ); Description Sets the LightmapParameters for the specified LightingSettings . Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87fc2da3c2ce
unity_docs
editor
What is `SemanticMergeMode` in Unity? Explain its purpose and usage.
SemanticMergeMode enumeration Description Behavior of semantic merge. How the semantic merge of Scene and Prefab assets should behave. Properties Property Description Off Disable use of semantic merging.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1ff0aef4f94
unity_docs
rendering
What is `SparseTexture.ctor` in Unity? Explain its purpose and usage.
SparseTexture Constructor Declaration public SparseTexture (int width , int height , TextureFormat textureFormat , int mipCount , bool linear = false); Parameters Parameter Description width Texture width in pixels. height Texture height in pixels. mipCount Mipmap count. Pass -1 to create full mip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5398713f66ee
unity_docs
animation
Show me a Unity C# example demonstrating `AnimationState.weight`.
all weights. instead it will take up 80% of the 50%. Example: a upper body which is affected by wave, walk and idle a lower body which is affected by only walk and idle. - Blend weights can change per animated value because of mixing. Even without mixing, sometimes a curve is just not defined. Still you want the blend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0e431c524756
unity_docs
scripting
Explain 'Submit a UPM package for approval' in Unity.
The Asset Store team reviews each package draft to make sure it meets the Submission Guidelines before you can publish it to the Asset Store. ## Submit a UPM package to the Publisher Portal Open the Publisher Portal and select Products . In the Package tab, choose your package configuration and set a namespace. To le...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_edbf7b83fa46
unity_docs
physics
In Unity's 'Garbage collection modes', what is 'Incremental garbage collection example' and how does it work?
The following screenshots from the Profiler illustrate how incremental garbage collection reduces frame rate problems: In the top profiling session, the Incremental GC setting is enabled. The application has a consistent 60 fps frame rate, because the garbage collector distributes the garbage collection operation over ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_917301a37153
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.Distance`.
Vector3.Distance Declaration public static float Distance ( Vector3 a , Vector3 b ); Description Returns the distance between a and b . Vector3.Distance(a,b) is the same as (a-b).magnitude . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public Tran...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46ab0af23b9f
unity_docs
scripting
What is `UIElements.FocusOutEvent.ctor` in Unity? Explain its purpose and usage.
FocusOutEvent Constructor Declaration public FocusOutEvent (); Description Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c25ec11d1ff5
unity_docs
animation
What is `Animations.AnimatorController.CreateAnimatorControllerAtPathWithClip` in Unity? Explain its purpose and usage.
AnimatorController.CreateAnimatorControllerAtPathWithClip Declaration public static Animations.AnimatorController CreateAnimatorControllerAtPathWithClip (string path , AnimationClip clip ); Parameters Parameter Description path The path where the AnimatorController will be created. clip The default cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5debe2d66f9
unity_docs
physics
Give me an overview of the `PhysicsShape2D` class in Unity.
PhysicsShape2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Represents an efficient low-level physics shape used by the physics engine. A Collider2D is a high-level representation of physics geometry that produces low-level PhysicsShape2D geometry that the physics engine u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_95bbcc0a681c
unity_docs
editor
Explain 'Code Coverage' in Unity.
com.unity.testtools.codecoverage ## Description Use this package to export code coverage data and reports from your automated tests. Additionally, the Code Coverage package offers a Coverage Recording feature which allows capturing coverage data on demand, for manual testing or when there are no automated tests in th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f5be093120f
unity_docs
scripting
What is `ModelImporter.sortHierarchyByName` in Unity? Explain its purpose and usage.
ModelImporter.sortHierarchyByName public bool sortHierarchyByName ; Description Sorts the gameObject hierarchy by name. When enabled, gameObjects are sorted by alphabetical order within the hierarchy. Disable this property to preserve the hierarchy order defined in the imported file.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa01532b511c
unity_docs
networking
In Unity's 'Netcode for Entities', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.netcode@1.13 released 1.13.0 com.unity.netcode@1.12 released 1.12.0 com.unity.netcode@1.11 released 1.11.0
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9bc40c46e9ff
github
scripting
Write a Unity C# script called Character
```csharp using UnityEngine; using System.Collections.Generic; [DisallowMultipleComponent] [RequireComponent(typeof(CharacterBody))] [RequireComponent(typeof(CharacterInventory))] [RequireComponent(typeof(CharacterMovement))] [RequireComponent(typeof(CharacterInteraction))] [RequireComponent(typeof(CharacterView))] [...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65ca760d2cd0
unity_docs
rendering
What is `VersionControl.VersionControlObject.GetExtension` in Unity? Explain its purpose and usage.
VersionControlObject.GetExtension Declaration public T GetExtension (); Returns T Extension object if it's supported by VersionControlObject . null otherwise. Description Gets optional extension object. You can implement optional extensions in your VersionControlObject to improve user experience. For...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91f93db57627
unity_docs
rendering
What is `TerrainLayerUtility.ValidateDiffuseTextureUI` in Unity? Explain its purpose and usage.
TerrainLayerUtility.ValidateDiffuseTextureUI Declaration public static void ValidateDiffuseTextureUI ( Texture2D texture ); Parameters Parameter Description texture The texture to validate. Description Checks whether the texture is a valid TerrainLayer diffuse texture. If it detects that the texture is no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7bd1daf5a55
unity_docs
scripting
What is `Media.MediaRational.ctor` in Unity? Explain its purpose and usage.
MediaRational Constructor Declaration public MediaRational (int numerator ); Declaration public MediaRational (int numerator , int denominator ); Parameters Parameter Description numerator Numerator of the rational number. denominator Denominator of the rational number. Description Constructs a rat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b20ec038596
unity_docs
scripting
What is `UIElements.LongField.ctor` in Unity? Explain its purpose and usage.
LongField Constructor Declaration public LongField (); Description Constructor. Declaration public LongField (int maxLength ); Parameters Parameter Description maxLength Maximum number of characters the field can take. Description Constructor. Declaration public LongField (string label , int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c0288178f923
unity_docs
rendering
In Unity's 'Particle size', what is 'Changing particle size based on the particle’s speed' and how does it work?
The Size By Speed Module can create particles that change size based on their speed in distance units per second. Some situations will require particles which vary in size depending on their speed. For example, you would expect small pieces of debris to be accelerated more by an explosion than larger pieces. You can ac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f8127905b50
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture2D.activeMipmapLimit`.
pLimit also reflects any downscale fallbacks applied by EditorUserBuildSettings.androidETC2Fallback or AndroidETC2FallbackOverride . The following code example demonstrates how you can use activeMipmapLimit to perform a Graphics.CopyTexture operation on the GPU to copy the highest resolution mipmap level of a tex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc65f0602df5
unity_docs
performance
Explain 'Parallel jobs' in Unity.
When you schedule a job , its Execute method runs a single time. However, there might be times when you need to perform the same operation on a lot of objects. To do this, use a ParallelFor job type, which inherits from IJobParallelFor . A ParallelFor job uses a NativeArray of data to act on as its data source. Paralle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_867a31253390
unity_docs
physics
Give me an overview of the `JointMotor` class in Unity.
JointMotor struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description The JointMotor is used to motorize a joint. For example the HingeJoint can be told to rotate at a given speed and force. The joint will then attempt to reach the velocity with the given maximum force. Additional resource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b0201509dca
unity_docs
rendering
Explain 'LOD Group component reference' in Unity.
The LOD Group component manages level of detail (LOD) for GameObjects . Controls for transitioning between LOD levels LOD Group selection bar for switching between LOD levels and previewing LOD rendering Information about the Lod Bias Quality setting. This message appears if the Lod Bias property is set to anything oth...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_664acb6039dc
unity_docs
scripting
What is `Progress.GetStatus` in Unity? Explain its purpose and usage.
Progress.GetStatus Declaration public static Progress.Status GetStatus (int id ); Parameters Parameter Description id The progress indicator's unique ID. Returns Status The progress indicator's current status. Description Gets the progress indicator's status.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_11
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Obtain information about features on indoor maps. Signature: ```csharp public IndoorMapEntityInformationApi IndoorMapEntityInformationApi ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_dbbb106bc978
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.SetMetaInfo`.
SearchIndexer.SetMetaInfo Declaration public void SetMetaInfo (string documentId , string metadata ); Parameters Parameter Description documentId Id of a document. metadata Metadata to bind to that document. Description Set arbiraty metadata on a specific document. ```csharp using System.IO; using Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9068af7b6c11
unity_docs
math
What is `AI.NavMesh.AddNavMeshData` in Unity? Explain its purpose and usage.
NavMesh.AddNavMeshData Declaration public static AI.NavMeshDataInstance AddNavMeshData ( AI.NavMeshData navMeshData ); Parameters Parameter Description navMeshData Contains the data for the navmesh. Returns NavMeshDataInstance Representing the added navmesh. Description Adds the specified NavMeshD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a944ff0716ea
unity_docs
scripting
What is `Vector2.Min` in Unity? Explain its purpose and usage.
Vector2.Min Declaration public static Vector2 Min ( Vector2 lhs , Vector2 rhs ); Description Returns a vector that is made from the smallest components of two vectors. Additional resources: Max function. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector2 a = n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b91b6e8826cd
unity_docs
scripting
What is `Object.name` in Unity? Explain its purpose and usage.
Object.name public string name ; Description The name of the object. Components share the same name with the game object and all attached components. If a class derives from MonoBehaviour it inherits the "name" field from MonoBehaviour . If this class is also attached to GameObject, then "name" field is set t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbfdd6b499fc
unity_docs
physics
Show me a Unity C# example demonstrating `Physics.defaultMaxDepenetrationVelocity`.
sitive. This value is usually changed in Edit->Project Settings->Physics->Settings->Game Object inspector instead of from scripts. Note: Very large values can introduce instability during collision detection; too small values might cause the collider depenetration to fail. You can also set a maximum depenetration v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f336abff88e9
unity_docs
scripting
What is `Vector2.Max` in Unity? Explain its purpose and usage.
Vector2.Max Declaration public static Vector2 Max ( Vector2 lhs , Vector2 rhs ); Description Returns a vector that is made from the largest components of two vectors. Additional resources: Min function. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector2 a = ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f40ab2d6307
unity_docs
scripting
Give me an overview of the `AudioEchoFilter` class in Unity.
AudioEchoFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Echo Filter repeats a sound after a given Delay, attenuating the repetitions based on the Decay Ratio. Additional resources: Audio Echo Filter information. Properties Property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1e7cd68f2f5c
unity_docs
physics
In Unity's 'Physics Profiler module', what is 'Chart categories' and how does it work?
The Physics Profiler module’s chart tracks the time your application spends on physics. The timings are divided into different chart categories: Chart Function Physics Used Memory The total amount of memory that the physics module has used Active Dynamic Bodies The number of Rigidbody components and ArticulationBody co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_614ed1a3f956
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.Finish`.
ments , bool saveBytes ); Parameters Parameter Description threadCompletedCallback Callback invoked when the index is ready to be used. removedDocuments Documents to be removed from current index (if any). saveBytes Indicates if the system should return the binary stream of the index as a byte array. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4fcef757a45
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Instrumentation` in Unity? Explain its purpose and usage.
Instrumentation class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <instrumentation> Android Manifest element. For more information about the element, see Android's documentation: Instrumentation element Properties Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6054fd9df65d
unity_docs
scripting
What is `Quaternion.Dot` in Unity? Explain its purpose and usage.
Quaternion.Dot Declaration public static float Dot ( Quaternion a , Quaternion b ); Description The dot product between two rotations. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { print(Quaternion.Dot(transform.rotation, Quaternion.identity)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fc85d32f1e7f
github
scripting
Write a Unity Editor script for Item Audio Set List Updater
```csharp using System.Linq; using ClusterVR.CreatorKit.Item; using ClusterVR.CreatorKit.Item.Implements; using UnityEditor; using UnityEngine; namespace Baxter.ClusterScriptExtensions.Editor.ComponentUpdater { /// <summary> /// <see cref="ScriptableItemExtension"/> の内容から、アイテムにアタッチすべきItemAudioSetListを更新するクラス。 ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_88fba4e5f4db
unity_docs
animation
What is `Animator.GetInteger` in Unity? Explain its purpose and usage.
Animator.GetInteger Declaration public int GetInteger (string name ); Declaration public int GetInteger (int id ); Parameters Parameter Description name The parameter name. id The parameter ID. Returns int The value of the parameter. Description Returns the value of the given integer paramete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b73034ff44cc
unity_docs
math
What is `AI.NavMeshAgent.Warp` in Unity? Explain its purpose and usage.
NavMeshAgent.Warp Declaration public bool Warp ( Vector3 newPosition ); Parameters Parameter Description newPosition New position to warp the agent to. Returns bool True if agent is successfully warped, otherwise false. Description Warps agent to the provided position. Returns true if successful, o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f449c69610f2
github
scripting
Write a Unity C# MonoBehaviour script called Separating Streaming And Rendering
```csharp using UnityEngine; using Wrld; public class SeparatingStreamingAndRendering: MonoBehaviour { public Camera renderingCamera; void OnEnable() { Api.Instance.CameraApi.SetControlledCamera(renderingCamera); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d5cee8e2881
unity_docs
math
What is `ArticulationJacobian.ctor` in Unity? Explain its purpose and usage.
ArticulationJacobian.ctor(int rows, int cols) Parameters Parameter Description rows Number of matrix rows. cols Number of matrix columns. Description Initializes nRows X nCols Jacobian matrix to zeroes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_956499f50dec
unity_docs
rendering
Show me a Unity code example for 'Asset import determinism'.
Before you build assets, confirm whether the imported assets are deterministic. You can use the following tools to verify this: Use the consistency check argument : Open the Unity Editor with the following launch argument, which enables the ConsistencyChecker to record results in the Editor log: ``` -consistencyCheck `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa48fb0a4f05
unity_docs
rendering
What is `Renderer.motionVectorGenerationMode` in Unity? Explain its purpose and usage.
Renderer.motionVectorGenerationMode public MotionVectorGenerationMode motionVectorGenerationMode ; Description Specifies the mode for motion vector rendering. Motion vectors track the per-pixel object velocity from one frame to the next. Using this information you can apply specific Image Effects such as moti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16782189674e
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryValidationOptions.skipUnknownFilters`.
QueryValidationOptions.skipUnknownFilters public bool skipUnknownFilters ; Description Boolean indicating if unknown filters should be skipped. If true, unknown filters are skipped. If false and validateFilters is true, unknown filters will generate errors if no default handler is provided with QueryEngine.S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a384e0975d4
unity_docs
physics
What is `PhysicsShapeType2D.Circle` in Unity? Explain its purpose and usage.
PhysicsShapeType2D.Circle Description Use a circle shape to interpret the PhysicsShape2D geometry. A circle geometry type is comprised of a single vertex in the PhysicsShape2D and a PhysicsShape2D.radius . The single vertex represents the center of the circle with the radius defining the radius of the circle.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_299059d0e2fc
unity_docs
rendering
Show me a Unity C# example demonstrating `Font.RequestCharactersInTexture`.
exture, or using Unity's text rendering functions during the last frame. So it is advisable to always call RequestCharactersInTexture for any text on the screen you wish to render using custom font rendering functions, even if the characters are currently present in the texture, to make sure they don't get purged durin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b3a684cad92
unity_docs
rendering
Give me an overview of the `RenderTextureFormat` class in Unity.
RenderTextureFormat enumeration Description Format of a RenderTexture . Note that a particular render texture format might not be supported by the current platform or GPU. Use SystemInfo.SupportsRenderTextureFormat to check before using. Additional resources: RenderTexture class. Properties Property Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_61f9b3233bf5
unity_docs
ui
In Unity's 'Dispatch events', what is 'Event target' and how does it work?
As an event travels along the propagation path, Event.currentTarget updates to the element handling the event. Within an event callback function, there are two properties that log the dispatch behavior: EventBase.currentTarget is the visual element on which the callback was registered. EventBase.target is the element w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5e81529aec67
github
scripting
Write a Unity C# UI script for Wrld Map
```csharp using UnityEngine; using Wrld; using Wrld.Scripts.Utilities; #if UNITY_EDITOR using UnityEditor; #endif public class WrldMap : MonoBehaviour { [Header("Camera/View Settings")] [Tooltip("Camera used to request streamed resources")] [SerializeField] private Camera m_streamingCamera ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_4f5b23503cac
unity_docs
audio
What is `AudioSettings.driverCapabilities` in Unity? Explain its purpose and usage.
AudioSettings.driverCapabilities public static AudioSpeakerMode driverCapabilities ; Description Returns the speaker mode capability of the current audio driver. (Read Only) ```csharp using UnityEngine;public class Example : MonoBehaviour { // Set the speaker mode to that of the system settings. void Start(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06f0b6c26f8b
unity_docs
math
What is `Mesh.SetNormals` in Unity? Explain its purpose and usage.
Mesh.SetNormals Declaration public void SetNormals (Vector3[] inNormals ); Declaration public void SetNormals (List<Vector3> inNormals ); Declaration public void SetNormals (NativeArray<T> inNormals ); Parameters Parameter Description inNormals Per-vertex normals. Description Set the normals of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8762ebd3a6d3
unity_docs
scripting
What is `ParticleSystem.NoiseModule.strengthXMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.NoiseModule.strengthXMultiplier public float strengthXMultiplier ; Description x-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.
gh_c8d02c8c4381
github
scripting
Write a Unity C# script called Abstract Ghost Character View
```csharp using System; using System.Collections; using PacEngine.characters; using PacEngine.characters.ghosts; using PacEngine.utils; using UnityEngine; public abstract class AbstractGhostCharacterView : AbstractCharacterView { private const string ANIMATOR_FRIGHTENED = "Frightened"; private const string AN...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_aeed79fdcab2
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsRGTCFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsRGTCFormat Declaration public static bool IsRGTCFormat ( Experimental.Rendering.GraphicsFormat format ); Declaration public static bool IsRGTCFormat ( TextureFormat format ); Description Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a0e9a5e60ee
unity_docs
math
What is `Rendering.RayTracingAABBsInstanceConfig.accelerationStructureBuildFlagsOverride` in Unity? Explain its purpose and usage.
RayTracingAABBsInstanceConfig.accelerationStructureBuildFlagsOverride public bool accelerationStructureBuildFlagsOverride ; Description Whether to override the build flags specified when creating a RayTracingAccelerationStructure . If you set this value to true , Unity uses RayTracingAABBsInstanceConfig.acce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d55cb27b622e
unity_docs
scripting
What is `Networking.UnityWebRequest.Send` in Unity? Explain its purpose and usage.
Method group is Obsolete UnityWebRequest.Send Obsolete Use SendWebRequest. It returns a UnityWebRequestAsyncOperation which contains a reference to the WebRequest object. Declaration public AsyncOperation Send (); Returns AsyncOperation An AsyncOperation indicating the progress/completion state of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b052d1c772c
unity_docs
rendering
In Unity's 'ColorMask command in ShaderLab reference', what is 'Parameters' and how does it work?
Parameter Value Function render target Integer, 0 through 7. The render target index. channels 0 Disables color writes to the R, G, B, and A channels. R Enables color writes to the red channel. G Enables color writes to the green channel. B Enables color writes to the blue channel. A Enables color writes to the alpha c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2d60fdb79783
unity_docs
ui
Explain 'Example native audio plug-ins included in the SDK' in Unity.
The audio plug-in SDK contains a variety of different audio plug-in types. The plug-in code in the SDK is available in the public domain so you can use this code as a template. The project contains examples of native DSP plug-ins with and without a customized GUI. If you want to use an IDE to edit and compile the examp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ba7dfbb94775
unity_docs
networking
Explain 'Relay' in Unity.
com.unity.services.relay ## Description Connect the players of your peer-hosted games with Relay. Your games will also benefit from improved reliability, privacy and the ability to communicate across platforms. To get started, enable listen-server UDP networking for your project on the Unity Dashboard. Features inclu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9fa07eee429
unity_docs
ui
Explain 'Replace deprecated browser interaction code' in Unity.
Some code involved with web browser script interactions is deprecated and has been replaced with alternative code. If your code contains any of the deprecated code, you need to update the code with the replacement code to prevent unexpected behavior or broken code. ## Deprecated code quick reference The following cod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_255663ca9dd6
github
scripting
Write a Unity C# UI script for Line
```csharp using System; using UnityEngine; using UnityEngine.UI; public class Line : MonoBehaviour { [SerializeField] TMPro.TextMeshProUGUI MessageText; [SerializeField] Image[] MsgColorImages; public void SetText(string str, Color color) { MessageText.text = $"<color=white> [{DateT...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_8c21f425961f_doc_1
github
scripting
What does `bool` do in this Unity script? Explain its purpose and signature.
Convert a to based on the value of . Signature: ```csharp public static implicit operator bool(TimedFlag flag) => flag.Active; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac54f894bd76
unity_docs
rendering
What is `Rendering.BatchRendererGroupCreateInfo.finishedCullingCallback` in Unity? Explain its purpose and usage.
BatchRendererGroupCreateInfo.finishedCullingCallback public Rendering.BatchRendererGroup.OnFinishedCulling finishedCullingCallback ; Description Unity calls this callback when this BatchRendererGroup finishes culling.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3593853bfd9e
unity_docs
editor
What is `ObjectChangeKind.ChangeScene` in Unity? Explain its purpose and usage.
ObjectChangeKind.ChangeScene Description A change of this type indicates that an open scene has been changed ("dirtied") without any more specific information available. This happens for example when EditorSceneManager.MarkSceneDirty is used.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_966f7c6bf12e
unity_docs
math
What are the parameters of `Handles.ScaleSlider` in Unity?
Returns float The new value modified by the user's interaction with the handle. If the user has not moved the handle, it will return the same value as you passed into the function. Description Make a directional scale slider. This method will draw a 3D-draggable handle on the screen that looks like one axis on Unity's ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64c8a39180db
unity_docs
editor
What is `AssetImporters.AssetImportContext` in Unity? Explain its purpose and usage.
AssetImportContext class in UnityEditor.AssetImporters Description Defines the import context for scripted importers during an import event. This class carries both input and output information for the OnImportAsset() task. Properties Property Description assetPath The path of the source asset file to be impo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b54f79182920
github
scripting
Write a Unity C# script called Load Completed Event
```csharp using RMC.Core.Architectures.Umvcs.Controller.Events; using UnityEngine.Events; namespace RMC.Core.Architectures.Umvcs.Samples.MyBouncyBallExample.Umvcs.Controller.Events { /// <summary> /// TODO: Add comment /// </summary> public class LoadCompletedEvent : UnityEvent<string>, IEvent { } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0f5f60e52f31
unity_docs
rendering
In Unity's 'Introduction to optimizing draw calls', what is 'Types of draw call optimization' and how does it work?
Draw call optimization methods in Unity work in one of the following ways: Drawing multiple copies of a mesh in one draw call, using the hardware capabilities of the GPU. This is GPU instancing. Using another technique to reduce render state updates, such as large GPU buffers. This is how the Scriptable Render Pipeline...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_418ae587df34
unity_docs
rendering
Explain 'Organizing assets into AssetBundles' in Unity.
When you create an AssetBundle, there are some limitations and organizational strategies to be aware of. There are some limitations to what assets you can put in an AssetBundle, and how you set them up. The following table contains limitations of AssetBundles: Limitation Description File types You can’t combine scenes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ccbcc8855edc
unity_docs
scripting
What is `Experimental.GraphView.Edge.OnCustomStyleResolved` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Edge.OnCustomStyleResolved Declaration protected void OnCustomStyleResolved ( UIElements.ICustomStyle styles ); Description Called when the custom style properties are resolved.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d35333d1dcce_doc_5
github
scripting
What does `OnEnable` do in this Unity script? Explain its purpose and signature.
If you override this Unity Magic™ method, BE SURE TO CALL base.OnEnable() from your method Signature: ```csharp protected virtual void OnEnable() => ResumeSubscriptions(); ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_a1f83c103539
unity_docs
scripting
What is `SystemInfo.graphicsDeviceVendor` in Unity? Explain its purpose and usage.
SystemInfo.graphicsDeviceVendor public static string graphicsDeviceVendor ; Description The vendor of the graphics device (Read Only). This is the vendor of user's graphics card, as reported by the graphics driver. Additional resources: SystemInfo.graphicsDeviceName , SystemInfo.graphicsDeviceVersion . ```cs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66b5c6f1e4f2
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.NextVisible`.
SerializedProperty.NextVisible Declaration public bool NextVisible (bool enterChildren ); Description Move to next visible property. Additional resources: Next , hasVisibleChildren , isExpanded , Reset , HideInInspector . ```csharp using System; using System.Text; using UnityEngine; using UnityEditor;pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3844b8d8e8eb
unity_docs
scripting
In Unity's 'Enter Play mode with domain reload disabled', what is 'Resetting state from code' and how does it work?
When domain reloading is disabled, the values of static fields and the handlers assigned to static events persist between Play mode runs. The following code example has a static counter that increments on a press of any keyboard key. The code also registers a method to handle the static event EditorApplication.playMode...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0a212619fc54_doc_4
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Releases the specified MonoBehaviour object back to its pool.The type of the MonoBehaviour object to release.The object to release. Signature: ```csharp public static void ReleaseMono<T>(T obj) where T : MonoBehaviour, IPoolable => _poolService.ReleaseMono(obj); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_cdf3ad42adae
unity_docs
rendering
In Unity's 'Create a quad mesh via script', what is 'Triangles' and how does it work?
Next, you need to set up the triangles. A quad consists of two triangles, each made up of three points in the vertex array you created earlier. To specify the points, you define each triangle as three indices of the the vertex array. For example, the lower left triangle for this quad uses index 0, 2, and 1 which corres...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8fc5390cff5
unity_docs
editor
Show me a Unity C# example demonstrating `EditorApplication.ExecuteMenuItem`.
EditorApplication.ExecuteMenuItem Declaration public static bool ExecuteMenuItem (string menuItemPath ); Description Invokes the menu item in the specified path. This function also works with Editor Scripts. ```csharp // Simple script that lets you create a new // Scene, create a cube and an empty game object...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d50f6ecba8ea
unity_docs
rendering
What is `Material.GetConstantBuffer` in Unity? Explain its purpose and usage.
Material.GetConstantBuffer Declaration public GraphicsBufferHandle GetConstantBuffer (string name ); Parameters Parameter Description name The name of the constant buffer property to return. Returns GraphicsBufferHandle Returns the handle of the constant buffer graphics resource. Description Get a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92d0efb754c8
unity_docs
physics
What is `Collider.attachedArticulationBody` in Unity? Explain its purpose and usage.
Collider.attachedArticulationBody public ArticulationBody attachedArticulationBody ; Description The articulation body the collider is attached to. Returns null if the collider is attached to no articulation body. Colliders are automatically connected to the articulation body attached to the same game objec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a24b1cd7c65
unity_docs
rendering
What is `Shader.maximumChunksOverride` in Unity? Explain its purpose and usage.
Shader.maximumChunksOverride public static int maximumChunksOverride ; Description Sets the limit on the number of shader variant chunks Unity loads and keeps in memory. You can use maximumChunksOverride to limit the amount of memory Unity uses for shader variants . You can use the following values: A posi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90542e1a5f30
unity_docs
scripting
What is `UIElements.BaseTreeViewController.ExpandItem` in Unity? Explain its purpose and usage.
BaseTreeViewController.ExpandItem Declaration public void ExpandItem (int id , bool expandAllChildren , bool refresh ); Parameters Parameter Description id The item ID. expandAllChildren Whether the whole hierarchy under that item will be expanded. refresh Whether to refresh items or not. Set to false ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e3d3dd23bbc
unity_docs
performance
What is `Profiling.RawFrameDataView.GetSampleFlags` in Unity? Explain its purpose and usage.
RawFrameDataView.GetSampleFlags Declaration public Unity.Profiling.LowLevel.MarkerFlags GetSampleFlags (int sampleIndex ); Parameters Parameter Description sampleIndex Index of the Profiler sample. Returns MarkerFlags Returns Profiler marker flags. Description Gets Profiler marker flags for the spe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1149ee0857d
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.WorldToScreenPoint`.
ms position from world space into screen space. Screen space is defined in pixels. The lower left pixel of the screen is (0,0). The upper right pixel of the screen is (screen width in pixels - 1, screen height in pixels - 1). The z coordinate is the distance from the camera in world units. If position is outside t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2955aa40b125
unity_docs
scripting
What is `TestTools.CoveredMethodStats` in Unity? Explain its purpose and usage.
CoveredMethodStats struct in UnityEngine.TestTools / Implemented in: UnityEngine.CoreModule Description Describes the summary of the code coverage for the specified method used by Coverage . For an example of typical usage, see Coverage.GetStatsFor . Properties Property Description method The covered metho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.