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_c5e55504ed94
unity_docs
physics
What is `ContactPoint.point` in Unity? Explain its purpose and usage.
ContactPoint.point public Vector3 point ; Description The point of contact. The point of contact in world space where the collision contact occurred. This represents the point on the surface of the collider where the contact was detected. The value is expressed in world space, meaning it is relative to the g...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_977fe31f4f56
unity_docs
scripting
What is `PenStatus.Contact` in Unity? Explain its purpose and usage.
PenStatus.Contact Description The pen is in contact with the screen or tablet. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event m_Event = Event.current; if (m_Event.type == EventType.MouseDown) { if (m_Event.pointerType == PointerType.Pen) //Check if it's a pen event. { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a81fd9141c7a
unity_docs
scripting
What is `LightTransport.IDeviceContext.CreateEvent` in Unity? Explain its purpose and usage.
IDeviceContext.CreateEvent Declaration public LightTransport.EventID CreateEvent (); Returns EventID Unique identifier for the newly created event. Description Creates a synchronization event for tracking asynchronous operations. Events provide a mechanism to track the completion status of asynchronous ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f816bb23a11
unity_docs
editor
What is `IMGUI.Controls.JointAngularLimitHandle.DrawHandle` in Unity? Explain its purpose and usage.
JointAngularLimitHandle.DrawHandle Declaration public void DrawHandle (); Description A function to display this instance in the current handle camera using its current configuration. Always write properties to the handle before calling this function. Place the calls to this function inside EditorGUI.BeginChan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4eedd9d002d6
unity_docs
editor
What is `VersionControl.VersionControlManager.SetVersionControl` in Unity? Explain its purpose and usage.
VersionControlManager.SetVersionControl Declaration public static bool SetVersionControl (string name ); Parameters Parameter Description name Unique version control system name. Returns bool Returns true if VCS has been activated. false otherwise. Description Sets the active version control syst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0a44a371427
unity_docs
scripting
Show me a Unity C# example demonstrating `AI.NavMeshAgent.nextPosition`.
ill be immediately move to match nextPosition. By setting nextPosition you can directly control where the internal agent position should be. The agent will be moved towards the position, but is constrained by the navmesh connectivity and boundaries. As such it will be useful only if the positions are continuously updat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5892d7b36998
unity_docs
scripting
What is `AsyncOperation.isDone` in Unity? Explain its purpose and usage.
AsyncOperation.isDone public bool isDone ; Description Has the operation finished? (Read Only) Flipping to true can be delayed. See allowSceneActivation for more details. Additional resources: progress .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b854c3ac974
unity_docs
scripting
Show me a Unity C# example demonstrating `AssetDatabase.IsMainAsset`.
yId The EntityID of the asset. instanceID The instanceID of the asset. Returns bool True if the asset is a main asset, false otherwise. Description Checks whether the asset is a main asset in the Project window. For example, an imported model has a GameObject as its root and several meshes and child GameObj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_993ec2d2b912
github
scripting
Write a Unity C# UI script for Debug Menu Button
```csharp // // Copyright (c) Sandro Figo // using UnityEngine; using UnityEngine.UI; namespace DebugMenu { public class DebugMenuButton : MonoBehaviour { [HideInInspector] public bool panelOpen; [HideInInspector] public Node node; public Image image; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_0c46747a7c76
unity_docs
editor
In Unity's 'Introduction to building', what is 'Incremental build pipeline' and how does it work?
Unity uses an incremental build pipeline that only rebuilds the parts of your application that have changed since the last build, which helps speed up development iteration time. This build process includes build steps such as content building, code compilation, data compression , and signing. By default, Unity uses th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9381807bf3c8
unity_docs
scripting
What is `CustomPropertyDrawer.ctor` in Unity? Explain its purpose and usage.
CustomPropertyDrawer Constructor Declaration public CustomPropertyDrawer (Type type ); Declaration public CustomPropertyDrawer (Type type , bool useForChildren ); Parameters Parameter Description type If the drawer is for a custom Serializable class, the type should be that class. If the drawer is for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cbaaa1f579a
unity_docs
scripting
What is `Experimental.GraphView.GraphView.serializeGraphElements` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.serializeGraphElements public Experimental.GraphView.GraphView.SerializeGraphElementsDelegate serializeGraphElements ; Description Callback for serializing graph elements for copy/paste and other actions.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_41808792beec
unity_docs
rendering
Explain 'Standard Particle Shaders Material Inspector window reference for the Built-In Render Pipeline' in Unity.
The Standard Particle Shaders have the same set of properties as the Standard Shader (or a subset of those properties, depending on the Shader). This page describes the properties and options that are additional to the Standard Shader properties. For information on the Standard Shader properties, see documentation on M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49f07bdfce67
unity_docs
ui
What is `AssetImporters.ScriptedImporter.Reset` in Unity? Explain its purpose and usage.
AssetImporters.ScriptedImporter.Reset() Description Reset to default values. Reset is called when the user hits the Reset button in the Inspector's context menu or on first import of the asset file. Reset is most commonly used to give good default values in the Inspector.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2d9c604258d
unity_docs
networking
What is `Networking.PlayerConnection.EditorConnection.Send` in Unity? Explain its purpose and usage.
EditorConnection.Send Declaration public void Send (Guid messageId , byte[] data , int playerId ); Declaration public void Send (Guid messageId , byte[] data ); Parameters Parameter Description messageId The type ID of the message to send to the connected Players. playerId The ID of the Player that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37daa9ff6d20
unity_docs
scripting
Show me a Unity C# example demonstrating `HideFlags`.
HideFlags enumeration Description Bit mask that controls object destruction, saving and visibility in inspectors. Additional resources: Object.hideFlags . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { // Creates a material that is explicitly created & destroye...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_701621b96ddc
unity_docs
scripting
What is `CreateAssetMenuAttribute.fileName` in Unity? Explain its purpose and usage.
CreateAssetMenuAttribute.fileName public string fileName ; Description The default file name used by newly created instances of this type. Note that any custom file names must end in '.asset' to be correctly processed by Unity.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_523d53046c0d
unity_docs
math
What is `NVIDIA.GraphicsDeviceDebugView` in Unity? Explain its purpose and usage.
GraphicsDeviceDebugView class in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description Represents a memory snapshot of the current feature states. The memory of the arrays/buffers in this struct are tied to the lifetime of the debug view. Additional resources: GraphicsDevice.CreateDebugView ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec45c1c52660
unity_docs
scripting
What is `QualitySettings.terrainBillboardStart` in Unity? Explain its purpose and usage.
QualitySettings.terrainBillboardStart public static float terrainBillboardStart ; Description Value set to Terrain.treeBillboardDistance if TerrainQualityOverrides.BillboardStart is set in terrainQualityOverrides .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d71364608750
unity_docs
scripting
In Unity's 'Handle Game Controller input', what is 'Example: Set up joystick button A for the Jump action' and how does it work?
Go to Edit > Project Settings . Select the Input Manager category. Open the Jump action. Set Positive Button to joystick button 14 . This code example demonstrates the corresponding input handling: ```csharp using UnityEngine; public class Jumping : MonoBehaviour { Rigidbody2D rb; float jumpForce = 100f; void Star...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_148abbedd9f7
unity_docs
rendering
What is `LightTransport.PostProcessing.IProbePostProcessor.AddSphericalHarmonicsL2` in Unity? Explain its purpose and usage.
IProbePostProcessor.AddSphericalHarmonicsL2 Declaration public bool AddSphericalHarmonicsL2 ( LightTransport.IDeviceContext context , BufferSlice<SphericalHarmonicsL2> A , BufferSlice<SphericalHarmonicsL2> B , BufferSlice<SphericalHarmonicsL2> sum , int probeCount ); Parameters Parameter Description cont...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1be0493fe77f
unity_docs
scripting
What is `Color32.Index_operator` in Unity? Explain its purpose and usage.
Color32.this[int] public byte this[int] ; Description Access the red (r), green (g), blue (b), and alpha (a) color components using [0], [1], [2], [3] respectively. ```csharp using UnityEngine;public class Example : MonoBehaviour { Color32 color = new Color32(0, 0, 0, 0); void Start() { //The same as color....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_958f0e5b0b93
unity_docs
rendering
In Unity's 'Transparent Cutout Bumped Diffuse', what is 'Creating Normal maps' and how does it work?
You can import normal maps created outside of Unity, or you can import a regular grayscale image and convert it to a Normal Map from within Unity. (This page refers to a legacy shader which has been superseded by the Standard Shader , but you can learn more about how to use Normal Maps in the Standard Shader )
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b513b791fa17
unity_docs
rendering
In Unity's 'Built-in shader variables reference', what is 'Transformations' and how does it work?
All these matrices are float4x4 type, and are column major. Name Value UNITY_MATRIX_MVP Current model * view * projection matrix. UNITY_MATRIX_MV Current model * view matrix. UNITY_MATRIX_V Current view matrix. UNITY_MATRIX_P Current projection matrix. UNITY_MATRIX_VP Current view * projection matrix. UNITY_MATRIX_T_MV...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f55f978421a
unity_docs
scripting
What are the parameters of `Vector3.MoveTowards` in Unity?
Returns Vector3 The new position. Description Moves vector incrementally towards a target point. This method moves a vector from current to target points, moving no farther each call than the distance specified by maxDistanceDelta . By updating an object's position each frame using the position calculated by this funct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_abed99f41df2
unity_docs
scripting
What is `Transform.rotation` in Unity? Explain its purpose and usage.
Transform.rotation public Quaternion rotation ; Description A Quaternion that stores the rotation of the Transform in world space. Transform.rotation stores a Quaternion . You can use rotation to rotate a GameObject or provide the current rotation. Do not attempt to edit/modify rotation . Transform.r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bdf4ffe0e5e1
unity_docs
math
What is `Mathf.Tan` in Unity? Explain its purpose and usage.
Mathf.Tan Declaration public static float Tan (float f ); Description Returns the tangent of angle f in radians. Additional resources: Cos , Sin . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { print(Mathf.Tan(0.5F)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5107a98a22ae
unity_docs
scripting
What is `ScriptableSingleton_1.instance` in Unity? Explain its purpose and usage.
ScriptableSingleton<T0>.instance public static T instance ; Description Gets the instance of the Singleton. Unity creates the Singleton instance when this property is accessed for the first time. If you use the FilePathAttribute , then Unity loads the data on the first access as well.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98259ed5a69d
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.FPS`.
MouseCursor.FPS Description Cursor with an eye and stylized arrow keys for FPS navigation. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0f4cd0b021e9_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores information about application state Signature: ```csharp internal static class ApplicationInfo // TODO: Remove this from singletons ASAP ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_4ed943c09532
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.ValidateMoveAsset`.
wPath The path which the asset should be moved to. Returns string An empty string if the asset can be moved, otherwise an error message. Description Checks if an asset file can be moved from one folder to another. (Without actually moving the file). All paths are relative to the project folder, for example: "...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_379f0de51296
unity_docs
physics
In Unity's 'Articulation Body component reference', what is 'Physical body properties' and how does it work?
Define the way the Articulation Body responds to the physics environment. Property Description Mass The mass of the Articulation Body (in kilograms by default). Immovable Use this property to define whether this articulation body is movable or not. You can set this property only for the root Articulation Body. This pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a706d0db5edd
unity_docs
audio
What is `Media.AudioTrackAttributes` in Unity? Explain its purpose and usage.
AudioTrackAttributes struct in UnityEditor.Media Description Descriptor for audio track format. Properties Property Description channelCount Number of channels. language Dialogue language, if applicable. Can be empty. sampleRate Audio sampling rate.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b8d89493a71
unity_docs
rendering
What is `CameraProjectionCache.WorldToScreenPoint` in Unity? Explain its purpose and usage.
CameraProjectionCache.WorldToScreenPoint Declaration public Vector2 WorldToScreenPoint ( Vector3 worldPoint ); Parameters Parameter Description worldPoint A point in world space. Returns Vector2 The converted point in screen space. Description Transforms position from world space into screen space...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20e3a6942a87
unity_docs
math
What is `Vector2.operator_Vector3` in Unity? Explain its purpose and usage.
Vector2.Vector2 Description Converts a Vector3 to a Vector2 . A Vector3 can be implicitly converted into a Vector2 . (The z is discarded). ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void Start() { Vector2 v2 = new Vector2(1, 2); Debug.Log("Vector2 is: " + v2); // convert v2 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_024df8d81102_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Creates a child GameObject with the given TComponent component.TComponent will be initialized with the given arguments.The TArgs object to be passed in on initialization.The type of Component to be added to the new child GameObject.The type of arguments to be given on initialization.The new TComponent Signature: ```cs...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_e88644eede2a
unity_docs
scripting
Give me an overview of the `LineUtility` class in Unity.
LineUtility class in UnityEngine / Implemented in: UnityEngine.CoreModule Description A collection of common line functions. Static Methods Method Description Simplify Generates a simplified version of the original line by removing points that fall within the specified tolerance.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70efaa317b02
unity_docs
rendering
Give me an overview of the `TextureCompressionFormat` class in Unity.
TextureCompressionFormat enumeration Description Options for the compressed texture formats that are available on the target build platform. Additional resources: PlayerSettings.Android.textureCompressionFormats . Properties Property Description Unknown Use an undefined texture compression format. ETC Use ET...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3443e7fe1a24
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Jobs.IJob`.
n parallel to other jobs and the main thread. After a job is scheduled, the job's Execute method is invoked on a worker thread. You can use the returned JobHandle to make sure that the job has completed. You can also pass the JobHandle to other jobs as a dependency, which ensures that jobs are executed one after an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_af831aca7b7d
unity_docs
editor
In Unity's 'Check the consistency of the import process', what is 'Editor log output' and how does it work?
When Unity detects importer inconsistencies, you can find more information about the issue in the Editor log. This includes information such as: Which asset caused the failed consistency check and its GUID. The content hash for the asset import result. A comparison of the previous revision of the asset. The following i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79ea49c338b6
unity_docs
scripting
Show me a Unity C# example demonstrating `DragAndDrop.PrepareStartDrag`.
DragAndDrop.PrepareStartDrag Declaration public static void PrepareStartDrag (); Description Clears drag & drop data. Clears everything stored in the drag & drop object and prepares it so you can write into it for initiating a drag operation. Additional resources: StartDrag , paths , objectReferences . ```c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c3a19b23de65
unity_docs
scripting
In Unity's 'The GameObject class', what is 'Static status' and how does it work?
Some of Unity’s systems, such as Global Illumination , Occlusion, Batching, Navigation, and Reflection Probes , rely on the static status of a GameObject. You can control which of Unity’s systems consider the GameObject to be static by using GameObjectUtility.SetStaticEditorFlags . For more information, refer to Static...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fb548f068b5b
unity_docs
scripting
In Unity's 'Inspector-configurable custom events', what is 'Configure callbacks in the Inspector window:' and how does it work?
Select the GameObject with the script component that contains your declared UnityEvent field(s). Click the + button under the name of an event to add a slot for a callback. Select the UnityEngine.Object you want to receive the callback. You can use the object selector or drag and drop an object into the field. Select t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64594d85c6f1
unity_docs
scripting
Give me an overview of the `ManagedStrippingLevel` class in Unity.
ManagedStrippingLevel enumeration Description Defines how aggressively Unity strips unused managed (C#) code. When Unity builds your game or application it can strip unused code from the managed dynamically linked libraries used in the project. Stripping code can make the resulting executable significantly smaller...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_470c6b8a763d
unity_docs
math
What is `Mesh.MeshDataArray.Dispose` in Unity? Explain its purpose and usage.
Mesh.MeshDataArray.Dispose Declaration public void Dispose (); Description Use this method to dispose of the MeshDataArray struct. It is important to dispose of a MeshDataArray struct once you have finished working with it. Modifying a Mesh while a MeshDataArray struct for that Mesh exists results in mem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c06b84c1f7d
unity_docs
scripting
What is `AndroidJNI.ToReflectedMethod` in Unity? Explain its purpose and usage.
AndroidJNI.ToReflectedMethod Declaration public static IntPtr ToReflectedMethod (IntPtr clazz , IntPtr methodID , bool isStatic ); Description Converts a method ID derived from clazz to a java.lang.reflect.Method or java.lang.reflect.Constructor object. Additional resources: Java Native Interface Specif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38a1071e82e8_doc_6
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Whether to only spawn an object if the spawn point is within view of the . Signature: ```csharp public bool onlySpawnInView ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_36613cb6b8aa
unity_docs
rendering
What is `Rendering.RayTracingGeometryInstanceConfig.lightProbeUsage` in Unity? Explain its purpose and usage.
RayTracingGeometryInstanceConfig.lightProbeUsage public Rendering.LightProbeUsage lightProbeUsage ; Description The Light probe interpolation type for this instance. Additional resources: LightProbeUsage .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39439d0207b1
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.QueryEngineFilterAttribute.ctor`.
String comparison options. paramTransformerFunction Name of the parameter transformer function to use with this filter. Tag the parameter transformer function with the appropriate ParameterTransformer attribute. Description Create a filter with the corresponding token and supported operators. This constructor allo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f19fb14fa1f
unity_docs
scripting
Show me a Unity C# example demonstrating `RuntimePlatform.WindowsPlayer`.
RuntimePlatform.WindowsPlayer Description In the player on Windows. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.WindowsPlayer) { Debug.Log("Do something ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de5f770acebf
unity_docs
rendering
What is `TextureFormat.RGB24_SIGNED` in Unity? Explain its purpose and usage.
TextureFormat.RGB24_SIGNED Description Three channel (RGB) texture format, 8-bits signed integer per channel. Import textures of this format in .DDS files. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check. Additional resources: Texture2D.format , textur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39ca745536dc
unity_docs
physics
What are the parameters of `Physics.BakeMesh` in Unity?
Description Prepares the mesh for use with a MeshCollider and uses default cooking options. Declaration public static void BakeMesh (int meshID , bool convex , MeshColliderCookingOptions cookingOptions ); Parameters Parameter Description meshID The instance ID of the mesh to bake collision data from. convex A flag to i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7ba2fe4cf81
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseAttribute` in Unity? Explain its purpose and usage.
BaseAttribute class in Unity.Android.Gradle.Manifest / Implemented in: Unity.Android.Gradle Description Abstract base class for all existing Androuid manifest attributes. Properties Property Description Name Attribute name. Public Methods Method Description Remove Removes this attribute from the element....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_11
github
scripting
What does `LoadAsyncUniTask` do in this Unity script? Explain its purpose and signature.
Load the asset asynchronously with UniTask. Signature: ```csharp public UniTask<T> LoadAsyncUniTask() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_c46f3ad2f3f3
unity_docs
scripting
What is `DecoratorDrawer` in Unity? Explain its purpose and usage.
DecoratorDrawer class in UnityEditor / Inherits from: GUIDrawer Description Base class to derive custom decorator drawers from. A DecoratorDrawer is similar to a PropertyDrawer , except that it doesn't draw a property but rather draws decorative elements based purely on the data it gets from its corresponding ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_213a85f70c54
unity_docs
rendering
What is `LightingSettings.filteringMode` in Unity? Explain its purpose and usage.
LightingSettings.filteringMode public FilterMode filteringMode ; Description Specifies the filter type that the Progressive Lightmapper uses for ambient occlusion. (Editor only). When this is set to None, the Progressive Lightmapper does not filter ambient occlusion. When this is set to any other value, the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_545baa2096df
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsETCFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsETCFormat Declaration public static bool IsETCFormat ( Experimental.Rendering.GraphicsFormat format ); Declaration public static bool IsETCFormat ( TextureFormat format ); Description Returns t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4a1e04725075_doc_4
github
scripting
What does `UpdateData` do in this Unity script? Explain its purpose and signature.
Update current search data Signature: ```csharp public void UpdateData(string searchText, SearchFilter searchFilters) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_07b88cf582eb
unity_docs
animation
What is `Animations.AnimationStream.CopyAnimationStreamMotion` in Unity? Explain its purpose and usage.
AnimationStream.CopyAnimationStreamMotion Declaration public void CopyAnimationStreamMotion ( Animations.AnimationStream animationStream ); Parameters Parameter Description animationStream The source animation stream with the motion to deep copy. Description Deep copies motion from a source animation stre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfcaf88bb7f7
unity_docs
editor
What is `iOS.Xcode.PBXProject.WriteToString` in Unity? Explain its purpose and usage.
PBXProject.WriteToString Declaration public string WriteToString (); Returns string The project contents converted to string. Description Writes the contents of the project to string. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9296c0e57a74
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.AddProperty`.
e value. minVariations Minimum number of variations to compute for the value. Cannot be higher than the length of the word. maxVariations Maximum number of variations to compute for the value. Cannot be higher than the length of the word. Description Adds a property value to the index. A property is specified wit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_66f1c5c196a4
unity_docs
xr
In Unity's 'Install a UPM package by name', what is 'Before you begin' and how does it work?
Make sure you know the package’s name. The package name is a unique identifier, not the display name used on user interfaces and documentation. For packages in the Unity registry, the name’s unique identifier uses reverse domain name notation. Examples include com.unity.example and com.meta.example . For packages in a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c76782314d2c
unity_docs
rendering
In Unity's 'Building plug-ins for desktop platforms', what is 'macOS plug-ins' and how does it work?
You can deploy macOS plug-ins as bundles or, if you are using the IL2CPP scripting backend , loose C++ files, which you can invoke with [DllImport("__Internal")] syntax. For further information on loose C++ plug-ins refer to C++ source code plugins for IL2CPP . To create the bundle project with Xcode: Open Xcode. Selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bf2fe8e88c06
github
scripting
Write a Unity C# MonoBehaviour script called Root Object Test2
```csharp using UnityEngine; public class RootObjectTest2 : MonoBehaviourExtended, ITest { [Root(2)] private GameObject go; private void Start() { if (!Test()) { Debug.LogError("Test failed: " + this); } } public bool Test() { if (go != null) ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_89211301da65
github
scripting
Write a Unity C# script called Scene System Controller
```csharp using RMC.Mini.Controller; using RMC.Mini.Service; using UnityEngine.SceneManagement; namespace RMC.Mini.Features.SceneSystem { /// <summary> /// The Controller coordinates everything between /// the <see cref="IConcern"/>s and contains the core app logic /// </summary> public class Scen...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_9ff177ea77b1
unity_docs
scripting
What is `Experimental.GraphView.RectangleSelector.UnregisterCallbacksFromTarget` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RectangleSelector.UnregisterCallbacksFromTarget Declaration protected void UnregisterCallbacksFromTarget (); Description Called to unregister event callbacks from the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_195ff08abc95
unity_docs
physics
What is `Rigidbody2D.WakeUp` in Unity? Explain its purpose and usage.
Rigidbody2D.WakeUp Declaration public void WakeUp (); Description Disables the "sleeping" state of a rigidbody. Sleeping is an optimisation that is used to temporarily remove an object from physics simulation when it is at rest. This function wakes up a rigidbody that is currently sleeping. Additional resource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a896ae96dcc3
unity_docs
xr
What is `LightTransport.BakeProgressState` in Unity? Explain its purpose and usage.
BakeProgressState class in UnityEngine.LightTransport Description Provides progress reporting and cancellation support for asynchronous light baking operations. This class reports progress for ongoing asynchronous bake operations and provides a method to request the cancellation of the operation. It supports work...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c0bc5a381b1
unity_docs
networking
Explain 'Package manifest file' in Unity.
Unity uses a package manifest file ( package.json ) to manage information about a specific version of a specific package. The package manifest is always at the root of the package and has crucial information about the package, such as its registered name and version number. The package manifest also defines useful info...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af8eedfbf48a
unity_docs
rendering
What is `RenderTexture.ConvertToEquirect` in Unity? Explain its purpose and usage.
RenderTexture.ConvertToEquirect Declaration public void ConvertToEquirect ( RenderTexture equirect , Camera.MonoOrStereoscopicEye eye ); Parameters Parameter Description equirect RenderTexture to render the equirect format to. eye A Camera eye corresponding to the left or right eye for stereoscopic re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f49d76e69f15
unity_docs
editor
What is `Device.SystemInfo.supportsVibration` in Unity? Explain its purpose and usage.
SystemInfo.supportsVibration public static bool supportsVibration ; Description This has the same functionality as SystemInfo.supportsVibration and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_81a550344c4d
unity_docs
rendering
Explain 'Materials and shaders' in Unity.
The following topics give an overview on how to use textures, shaders , materials, and graphics APIs in Unity. Page Description Materials Resources for using materials to define the appearance of a scene . Prebuilt materials and shaders Resources for using the shaders Unity provides to control the appearance of GameObj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c90b13de8458
unity_docs
input
In Unity's 'Enable optional features for Embedded Linux', what is 'Pipeline cache persistence for Vulkan' and how does it work?
Embedded Linux supports binary Vulkan pipeline caching on the device where the Unity Player is installed for better startup timings. The binary Vulkan pipeline cache is created at runtime when you use Vulkan pipelines. As this cache is written to the temporary [TEMP]/[COMPANY_NAME]/[PROJECT_NAME]/vulkan_pso_cache.bin f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e786d7c19bad
unity_docs
physics
Explain 'Specify Android Player command-line arguments' in Unity.
You can extend the custom Unity activity to pass command-line arguments when you launch the Android Player. For information on the available command-line arguments, refer to Command-line arguments . To specify startup command-line arguments in custom activity: Create a custom activity and set it as the application entr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_174334273bc6
unity_docs
animation
What is `Animations.TransformStreamHandle.IsValid` in Unity? Explain its purpose and usage.
TransformStreamHandle.IsValid Declaration public bool IsValid ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns bool Whether this is a valid handle. Description Returns whether this is a valid handle. A Trans...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98a8e5e8e1e7
unity_docs
editor
Show me a Unity C# example demonstrating `TypeCache.GetFieldsWithAttribute`.
ields defined in this assembly. Description Retrieves an unordered collection of fields marked with the T attribute. This method provides fast access to all class fields loaded from a given assembly or all Unity domain assemblies and marked with a specific attribute. Fields marked with ancestors of the specified...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c94c3ede0a4c
unity_docs
physics
Give me an overview of the `RotationDriveMode` class in Unity.
RotationDriveMode enumeration Description Control ConfigurableJoint 's rotation with either X & YZ or Slerp Drive. Properties Property Description XYAndZ Use XY & Z Drive. Slerp Use Slerp drive.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f43c9e7fcd0f
unity_docs
rendering
What is `ParticleSystemRenderer.SetActiveVertexStreams` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.SetActiveVertexStreams Declaration public void SetActiveVertexStreams (List<ParticleSystemVertexStream> streams ); Parameters Parameter Description streams The new array of enabled vertex streams. Description Enables a set of Vertex Shader streams on the ParticleSystemRenderer . Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_12bf7ff5ef21
unity_docs
editor
Explain 'In-App Purchasing' in Unity.
com.unity.purchasing ## Description Unity In-App Purchasing (IAP) allows you to sell digital content within your application. This package provides a unified API for handling in-app purchases across multiple platforms, including the Apple App Store and Google Play Store. Unity IAP simplifies implementing and managing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_adfaedbe442e
unity_docs
physics
Give me an overview of the `TreeMotionVectorModeOverride` class in Unity.
TreeMotionVectorModeOverride enumeration Description Options for motion vector rendering on the terrain. Properties Property Description CameraMotionOnly Use only camera movement to track motion for all SpeedTree models painted on the terrain. PerObjectMotion Use a specific pass to track motion for all SpeedTr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b49bcccc0b3
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.English`.
SystemLanguage.English Description English. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the English language if (Application.systemLanguage == SystemLanguage.English) { //Outputs into console that the system is Engli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c906edff72ef
unity_docs
editor
What is `Search.IPropertyDatabaseRecord` in Unity? Explain its purpose and usage.
IPropertyDatabaseRecord interface in UnityEditor.Search Description Interface of a record that is stored in the PropertyDatabase . A record is the actual block of data that is stored in the PropertyDatabase . A record is composed of a key, which describes what is stored and is used to sort the records for faste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86dee1bb220e
unity_docs
rendering
What is `Experimental.Rendering.IScriptableRuntimeReflectionSystem` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableRuntimeReflectionSystem interface in UnityEngine.Experimental.Rendering Description Defines the required members for a Runtime Reflection Systems. You can use the empty implementation as base class, see ScriptableR...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_532228280cd5
unity_docs
math
What is `IMGUI.Controls.TreeView.RowGUIArgs.GetColumn` in Unity? Explain its purpose and usage.
TreeView.RowGUIArgs.GetColumn Declaration public int GetColumn (int visibleColumnIndex ); Parameters Parameter Description visibleColumnIndex This index is the index into the current visible columns. Returns int Column index into the columns array in MultiColumnHeaderState . Description If using a M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe654e6b65f0
unity_docs
scripting
What is `AssetImporters.ScriptedImporterAttribute.AllowCaching` in Unity? Explain its purpose and usage.
ScriptedImporterAttribute.AllowCaching public bool AllowCaching ; Description Enable cache server uploads and downloads. When set to true the assets created by this importer can be uploaded to and downloaded from the cache server. The default value is false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7a85dee8f7a
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLight.sphereRadius` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLight.sphereRadius public float sphereRadius ; Description The light's sphere radius, influencing soft shadows.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86740d8ffad8
unity_docs
scripting
What is `Snapping` in Unity? Explain its purpose and usage.
Snapping class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Snap values to rounded increments. Static Methods Method Description Snap Rounds value to the closest multiple of snap.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_601b260199b5
unity_docs
math
What is `AI.NavMeshBuilder.UpdateNavMeshData` in Unity? Explain its purpose and usage.
NavMeshBuilder.UpdateNavMeshData Declaration public static bool UpdateNavMeshData ( AI.NavMeshData data , AI.NavMeshBuildSettings buildSettings , List<NavMeshBuildSource> sources , Bounds localBounds ); Parameters Parameter Description data The NavMeshData to update. buildSettings The build setting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_193b6bef8713
github
scripting
Write a Unity C# MonoBehaviour script called Slam Demo Ctrl
```csharp using RayNeo.API; using UnityEngine; public class SlamDemoCtrl : MonoBehaviour { public GameObject m_Cube; public int m_LineCount = 10; public float m_CubeSpace = 0.3f; // Start is called before the first frame update void Start() { Algorithm.EnableSlamHeadTracker(); C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f850aa0dc8fd
unity_docs
ui
Show me a Unity C# example demonstrating `UIElements.Painter2D`.
Object to draw 2D vector graphics. The example below demonstrates how to use the Painter2D class to draw content in a VisualElement with the VisualElement.generateVisualContent callback. You can also create a standalone Painter2D.Painter2D object to draw content offscreen, and use the Painter2D.SaveTo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_22
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Allows configuration of the timeout for obtaining response for map tile resource web requests. Signature: ```csharp public int ResourceWebRequestTimeoutSeconds ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fa6586e97cb
unity_docs
scripting
Give me an overview of the `MonoBehaviour` class in Unity.
MonoBehaviour class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.CoreModule Description MonoBehaviour is a base class that many Unity scripts derive from. MonoBehaviour offers life cycle functions that make it easier to develop with Unity. MonoBehaviours always exist as a Componen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a39882871a13
unity_docs
scripting
What is `UIElements.PointerLeaveEvent.ctor` in Unity? Explain its purpose and usage.
PointerLeaveEvent Constructor Declaration public PointerLeaveEvent (); 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_a470d112cba8
unity_docs
rendering
What is `HandleUtility.RegisterRenderPickingCallback` in Unity? Explain its purpose and usage.
HandleUtility.RegisterRenderPickingCallback Declaration public static bool RegisterRenderPickingCallback ( HandleUtility.RenderPickingCallback renderPickingCallback ); Parameters Parameter Description renderPickingCallback The delegate object to register to the callback. Returns bool True if the registr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3c22c6d0f00
unity_docs
input
What is `UIElements.PointerEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
PointerEventBase<T0>.GetPooled Declaration public static T GetPooled ( Event systemEvent ); Parameters Parameter Description systemEvent An IMGUI mouse event. Returns T An initialized event. Description Gets an event from the event pool and initializes it with the given values. Use this function in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05cc390ef4b1
unity_docs
performance
What is `AndroidJNI.NewDirectByteBuffer` in Unity? Explain its purpose and usage.
AndroidJNI.NewDirectByteBuffer Declaration public static IntPtr NewDirectByteBuffer (byte* buffer , long capacity ); Description Allocates and returns a direct java.nio.ByteBuffer referring to the block of memory starting at the memory address address and extending capacity bytes. Additional resources: Java ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fb052fdaeec5_doc_6
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Convert single column data by header index. Signature: ```csharp public static IEnumerable<T> ConvertColumnEnumerator<T>(string csvContent, int headerIndex = 0, char cellSeparator = CSVDataHelper.CommaCharacter, bool supportCellMultiline = true) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2609e4a08b30
github
scripting
Write a Unity C# UI script for Set Active Switcher
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UIStateSwitcher { public class SetActiveSwitcher : SwitchableElement { [SerializeField] private List<MonoBehaviour> targetElements; [SerializeField] private List<SwitchableEnabled> switch...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_70190355f3ab
unity_docs
rendering
In Unity's 'DirectX', what is 'Set your default graphics API to DirectX' and how does it work?
You can choose to set DirectX 11 (DX11) or DirectX 12 (DX12) as your default Graphics API in the Editor or Standalone Player: Open the Player settings (menu: Edit > Project Settings > Player ). In the Other Settings > Rendering section, disable the Auto Graphics API for a platform (Windows/Mac/Linux) option. Select the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e49a8a16c107
unity_docs
scripting
What is `ParticleSystem.CollisionModule.dampen` in Unity? Explain its purpose and usage.
ParticleSystem.CollisionModule.dampen public ParticleSystem.MinMaxCurve dampen ; Description How much speed does each particle lose after a collision. Additional resources: ParticleSystem.collision , MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSyste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.