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_d8317d7b8fc8
unity_docs
scripting
Show me a Unity code example for 'Box'.
The Box element is a VisualElement with the following styling properties: ```.unity-box { background-color: env(--theme-box-background-color); border-color: env(--theme-box-border-color); border-width: 1px; } ``` ## Create a Box You can create a Box with UXML or C#. The following C# example creates a Box with a label...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f709097fa6a
unity_docs
editor
Show me a Unity C# example demonstrating `GizmoUtility`.
GizmoUtility class in UnityEditor Description A static class for interacting with the Scene View icons and gizmos for types. ```csharp using System; using UnityEditor; using UnityEngine; // An Editor Window that lets you edit the gizmo and icon properties for each selected component. public class GizmoUtilityExa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b5361dac723f
unity_docs
scripting
In Unity's 'Transforms', what is 'The Transform Component' and how does it work?
The Transform component determines the Position , Rotation , and Scale of each GameObject in the scene . Every GameObject has a Transform. Tip : You can change the colors of the Transform axes (and other UI elements) ( Menu: Unity > Preferences and then select the Colors & keys panel).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cd9188866d6
unity_docs
scripting
What is `Unity.Content.ContentNamespace` in Unity? Explain its purpose and usage.
ContentNamespace struct in Unity.Content / Implemented in: UnityEngine.CoreModule Description Provides functionality for grouping loaded Archive files into separate namespaces. You can use the ContentNamespace.Default namespace, or create your own custom namespace with ContentNamespace.GetOrCreateNamespace ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f1321d93abb6
unity_docs
ui
Show me a Unity code example for 'SliderInt'.
alue directly. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a SliderInt You can create a SliderInt with UI Builder, UXML, or C#. The following C# example creates a SliderInt with a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d4ccd66ab18e
unity_docs
rendering
Explain 'Disable writing to the depth buffer in a shader' in Unity.
ZWrite sets whether the depth buffer contents are updated during rendering. Normally, ZWrite is enabled for opaque objects and disabled for semi-transparent ones. Disabling ZWrite can lead to incorrect depth ordering. In this case, you need to sort geometry on the CPU. ## Examples This example code demonstrates the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_377d4ecefb26
unity_docs
scripting
What is `StaticOcclusionCulling.Compute` in Unity? Explain its purpose and usage.
StaticOcclusionCulling.Compute Declaration public static bool Compute (); Description Used to generate static occlusion culling data. This function will run asynchronously until the data is generated but you can check the status of the computation using the isRunning property. The memory limit (specified in b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8c153018279
unity_docs
input
What is `XR.InputTrackingState` in Unity? Explain its purpose and usage.
InputTrackingState enumeration Description Represents the values being tracked for this device. Properties Property Description None Represents no values being tracked for this device. Position Represents position being tracked for this device. Rotation Represents rotation being tracked for this device. Velo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e716fb241b5
unity_docs
scripting
Show me a Unity C# example demonstrating `Component.SendMessageUpwards`.
f the behaviour. The receiving method can choose to ignore the argument by having zero arguments. If the options parameter is set to SendMessageOptions.RequireReceiver an error is printed when the message is not picked up by any component. Note that messages will not be sent to inactive objects (ie, those that hav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bfa1a96f1059
github
scripting
Write a Unity C# script called Playfield
```csharp using System; using UnityEngine; using TetrisEngine.TetriminosPiece; namespace TetrisEngine { //This class is a representation of the field in the engine //Stores the field spots as a bidimensional array of 0s and 1s //Where 0 means empty slot and 1 means filled spot public class Playfield ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_e73acfc97a7c
unity_docs
editor
Explain 'Dedicated Server' in Unity.
com.unity.dedicated-server ## Description The Dedicated Server package contains optimizations and workflow improvements for developing Dedicated Server platform ## Released for Unity Package version 1.6.3 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24ca612e55dc
unity_docs
rendering
What is `ParticleSystem.MainModule.startRotationXMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startRotationXMultiplier public float startRotationXMultiplier ; Description The initial rotation multiplier of particles around the x-axis when the Particle System first spawns them. Changing this property is more efficient than accessing the entire curve, if you only want to change ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a58fcf6a5f8
unity_docs
scripting
What is `Progress.Item.timeDisplayMode` in Unity? Explain its purpose and usage.
Progress.Item.timeDisplayMode public Progress.TimeDisplayMode timeDisplayMode ; Description Returns the progress indicator's time display mode. Additional resources: Progress.GetTimeDisplayMode , Progress.Item.SetTimeDisplayMode , TimeDisplayMode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df812916a474
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.borderUssClassName` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.borderUssClassName public static string borderUssClassName ; Description The USS class name for BaseVerticalCollectionView elements with a border. Unity adds this USS class to an instance of the BaseVerticalCollectionView element if the instance's BaseVerticalCollectionView.show...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f77d26291bd5
unity_docs
math
What is `Mesh.MeshData.GetVertices` in Unity? Explain its purpose and usage.
Mesh.MeshData.GetVertices Declaration public void GetVertices (NativeArray<Vector3> outVertices ); Parameters Parameter Description outVertices The destination vertex positions array. Description Populates an array with the vertex positions from the MeshData . The destination array must have at least v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_925683af1d68
unity_docs
scripting
What is `SceneManagement.SceneManagerAPI.UnloadSceneAsyncByNameOrIndex` in Unity? Explain its purpose and usage.
SceneManagerAPI.UnloadSceneAsyncByNameOrIndex Declaration protected AsyncOperation UnloadSceneAsyncByNameOrIndex (string sceneName , int sceneBuildIndex , bool immediately , SceneManagement.UnloadSceneOptions options , out bool outSuccess ); Description Override for customizing the behavior of the Scen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bf246d539488_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This class is a type of a reactive system.Reactive systems are executed when something within world's context has changedand this update passes system's filter Signature: ```csharp public class SpawnSystem : BaseReactiveSystem ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_68c3e8cd6040
unity_docs
networking
Explain 'Netcode for GameObjects' in Unity.
com.unity.netcode.gameobjects ## Description Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer. ## Released for Unity Package version 2.11.0 is released for Unity Editor version 6...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b021c6843a6
unity_docs
math
What is `Progress.GetCountPerStatus` in Unity? Explain its purpose and usage.
Progress.GetCountPerStatus Declaration public static int[] GetCountPerStatus (); Returns int[] An array that contains the count of progress indicators per status. Each index maps a single status from the Status enum. Description For each available status, gets the number of progress indicators with that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9938480d9d7
unity_docs
input
What is `Input.GetAxisRaw` in Unity? Explain its purpose and usage.
Input.GetAxisRaw Declaration public static float GetAxisRaw (string axisName ); Description Returns the value of the virtual axis identified by axisName with no smoothing filtering applied. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_057f7876d92e
unity_docs
scripting
What is `Video.VideoPlayer.isPlaying` in Unity? Explain its purpose and usage.
VideoPlayer.isPlaying public bool isPlaying ; Description Returns whether the VideoPlayer is currently playing the content. This variable returns false if the video is paused. If you call VideoPlayer.Play , it might not always set isPlaying to true . The VideoPlayer must successfully prepare the content...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a0330ab9c79a
github
scripting
Write a Unity C# script called Share Camera
```csharp using com.rayneo.xr.extensions; using System; using System.Collections; using UnityEngine; namespace RayNeo.API { public class ShareCamera { public static int CameraWidth = 640; public static int CameraHeight = 480; private static int CameraFrames = 25; private static...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_312edc0b6968
github
scripting
Write a Unity Editor script for FB Composition Layer Depth Test
```csharp // SPDX-FileCopyrightText: 2024 Michael Nisbet <me@mikesky.dev> // SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; using UnityEngine.XR.OpenXR.Features; using UnityEngine.XR.OpenXR; #if UNITY_EDITOR using UnityEditor; using UnityEditor.XR.OpenXR.Features; #endif namespace ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_92b0ed6b4237
unity_docs
editor
What is `Windows.WebCam.VideoCapture.Dispose` in Unity? Explain its purpose and usage.
VideoCapture.Dispose Declaration public void Dispose (); Description You must call Dispose to shutdown the VideoCapture instance and release the native WinRT objects. If your VideoCapture instance successfully called VideoCapture.StartVideoModeAsync , you must make sure that you call VideoCapture.StopVideoMod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0735d4624f35
unity_docs
physics
Show me a Unity C# example demonstrating `Scripting.AlwaysLinkAssemblyAttribute`.
bute only instructs UnityLinker to process the assembly. If no code elements match the root marking rules for the assembly, UnityLinker still removes the assembly from the build. The [AlwaysLinkAssembly] attribute can only be defined on the assembly. Declare the attribute in any C# file compiled into the assembly, ou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd39ffa00301
unity_docs
animation
In Unity's 'Legacy Animation component', what is 'Properties' and how does it work?
Property Function Animation The default animation to play when Play Automatically is enabled. Animations A list of animations that you can access from scripts . Play Automatically Enable this option to play animation automatically when the game starts. Animate Physics Enable this option to have the animation interact w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c0074b4841b0
unity_docs
scripting
In Unity's 'Call C/C++/C# functions from Unity C# scripts', what is 'Example C++ code that you can use in Unity' and how does it work?
If you use C++ (.cpp) to implement the plug-in, you must declare the functions with C linkage ( extern “C” ) to avoid name mangling issues. The following code is an example C++ plug-in with simple functions that you can call in your Unity project. ```csharp #include <stdio.h> extern "C" void Hello () { printf("Hello,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bab5b8db56eb
unity_docs
rendering
What is `MaterialProperty` in Unity? Explain its purpose and usage.
MaterialProperty class in UnityEditor Description Describes information and value of a single shader property. MaterialProperty is used with the MaterialEditor when writing custom material editors, or implementing custom MaterialPropertyDrawer classes. Additional resources: MaterialEditor , MaterialProperty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c9079b2d28b
unity_docs
rendering
Show me a Unity code example for 'Text effects'.
-shadow-offset-y : Vertical shadow displacement. Positive values move the shadow down, while negative values move it up. text-shadow-blur-radius : The blur intensity of the shadow. Higher values result in more blur shadows, while 0 creates a sharp shadow. text-shadow-color : The color of the shadow, either as a hex cod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_74f83eac7be5
unity_docs
physics
In Unity's 'Introduction to 2D', what is '2D graphics' and how does it work?
Graphic objects in 2D are known as Sprites . Sprites are standard textures, with special techniques for combining and managing sprite textures for efficiency and convenience during development. Unity provides a built-in Sprite Editor to let you extract sprite graphics from a larger image. This enables you to edit many ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_645435100317
unity_docs
math
What is `Rendering.RayTracingMeshInstanceConfig.enableTriangleCulling` in Unity? Explain its purpose and usage.
RayTracingMeshInstanceConfig.enableTriangleCulling public bool enableTriangleCulling ; Description Whether front/back face culling for this ray tracing instance is enabled. The culling takes place when the GPU performs a ray-triangle intersection test.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe6068a0f9d7
unity_docs
rendering
In Unity's 'Pass information to shader compilers in HLSL', what is 'Limitations' and how does it work?
Unity recognizes #pragma directives only in the following contexts: Unity-specific directives: In.shader files, or files you include with the #include_with_pragmas directive. Standard HLSL directives: In files you include with the #include directive. Unity ignores #pragma directives outside these contexts. Note: If a s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3d4bf492c1ac
unity_docs
ui
In Unity's 'Find visual elements with UQuery', what is 'Query by name' and how does it work?
To find elements by their name , use Query(name: "element-name") or Q(name: "element-name") . You can omit the name as it’s the first argument. For example: The following example finds a list of elements named OK : ``` List<VisualElement> result = root.Query("OK").ToList(); ``` The following example uses Query to find ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b353aeda3487
unity_docs
rendering
In Unity's 'Use video sources', what is 'Reference your file as a URL' and how does it work?
Reference your file as a URL to play files that aren’t bundled with your application. This can be helpful for user-generated content, if your content isn’t under Unity’s direct control, or if you want to avoid storing large video files locally. URLs can point to files on a local file system, a web server, or your Strea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f18f71ac0f8
unity_docs
scripting
What is `UIElements.BaseBoolField.InitLabel` in Unity? Explain its purpose and usage.
BaseBoolField.InitLabel Declaration protected void InitLabel (); Description Initializes the Label element whenever the BaseBoolField.text property changes. Override this method to modify the Label after its creation. You must call the base implementation of this method before trying to access to m_Label...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54c944eeb806
unity_docs
animation
What is `Animations.AnimationHumanStream.SetLookAtBodyWeight` in Unity? Explain its purpose and usage.
AnimationHumanStream.SetLookAtBodyWeight Declaration public void SetLookAtBodyWeight (float weight ); Parameters Parameter Description weight The LookAt body weight. Description Sets the LookAt body weight. Determines how much the body is involved in the LookAt. Rotates the body transform so the forward v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_527b5fe55658
unity_docs
rendering
What is `TextureImporter.swizzleR` in Unity? Explain its purpose and usage.
TextureImporter.swizzleR public TextureImporterSwizzle swizzleR ; Description Specifies the source for the texture's red color channel data. By default, values for the imported texture's red channel come from the source image's red channel. To reorder or invert color channels at import time, change this to a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e35ea6028420
unity_docs
scripting
What is `ParticleSystem.LimitVelocityOverLifetimeModule.limit` in Unity? Explain its purpose and usage.
ParticleSystem.LimitVelocityOverLifetimeModule.limit public ParticleSystem.MinMaxCurve limit ; Description Maximum velocity curve, when not using one curve per axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0cdf21712e0
unity_docs
input
Show me a Unity C# example demonstrating `TouchPhase.Ended`.
TouchPhase.Ended Description A finger was lifted from the screen. This is the final phase of a touch. ```csharp //Attach this script to an empty GameObject //Create some UI Text by going to Create>UI>Text. //Drag this GameObject into the Text field of your GameObject’s Inspector window.using UnityEngine; using Syst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b2d8b53c6cab
unity_docs
audio
In Unity's 'Audio Clip Import Settings reference', what is 'Properties' and how does it work?
The following properties are available in the Inspector for your imported audio files: Property Function Force To Mono Enable to mix multi-channel audio down to a mono track before packing occurs. Normalize Enable to normalize audio during the Force To Mono mixing down process. Load In Background Enable to ensure Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5c5f4b81288c
unity_docs
rendering
Explain '6 Sided Skybox Shader Material Inspector Window reference' in Unity.
For information on how to create a Material that uses this skybox Shader , as well as details on how to render the skybox in your Scene , see Using skyboxes . ## Render pipeline compatibility Feature Built-in Render Pipeline Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) 6 Sided skybox Yes Yes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a04be43cb04d
unity_docs
editor
Explain 'Unity Editor settings reference' in Unity.
Use the Unity Editor Preferences and Project Settings to configure how the Editor and your project behaves. Preferences are personal settings stored on your local machine. Project Settings are shared settings that define how your project builds and runs, and are typically stored in version control for your entire team....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_33b1715f41cf
unity_docs
rendering
In Unity's 'Create a shader variant collection', what is 'View and edit a shader variant collection' and how does it work?
When you select a shader variant collection asset in your project, you can view and edit it in the Inspector . Use the controls to build a list of Pass types and shader keyword combinations to load in advance. You can also configure a shader variant collection asset using the ShaderVariantCollection API.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_021cbe06295a
unity_docs
physics
Show me a Unity C# example demonstrating `ParticleSystem.CollisionModule.colliderForce`.
public float colliderForce ; Description How much force is applied to a Collider when hit by particles from this Particle System. Additional resources: ParticleSystem.CollisionModule.multiplyColliderForceByParticleSize , ParticleSystem.CollisionModule.multiplyColliderForceByParticleSpeed , ParticleSystem.Colli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_409e093870e2
unity_docs
animation
What is `Animations.BoundProperty.operator_ne` in Unity? Explain its purpose and usage.
BoundProperty.operator != public static bool operator != ( Animations.BoundProperty lhs , Animations.BoundProperty rhs ); Parameters Parameter Description lhs A BoundProperty object. rhs Another BoundProperty object. Description BoundProperty objects are not equal if they refer to different propertie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_73a7080f4a5a
unity_docs
rendering
In Unity's 'Introduction to render pipelines', what is 'How a render pipeline works' and how does it work?
A render pipeline follows these steps: Culling, where the pipeline decides which objects from the scene to display. This usually means it removes objects that are outside the camera view ( frustum culling ) or hidden behind other objects ( occlusion culling ). Rendering, where the pipeline draws the objects with their ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_518fa50e6808
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingMaterialTest.deniedShaderPasses` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingMaterialTest.deniedShaderPasses public string[] deniedShaderPasses ; Description An array of Shader Pass names used by RayTracingAccelerationStructure.CullInstances to ignore Renderers or individual sub-meshes. If a Shader contains a Shader Pass from the list then the acceleration str...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6cd0f1d0d80
unity_docs
scripting
What is `Video.VideoClip.pixelAspectRatioDenominator` in Unity? Explain its purpose and usage.
VideoClip.pixelAspectRatioDenominator public uint pixelAspectRatioDenominator ; Description Returns the denominator of the pixel aspect ratio (numerator:denominator). (Read Only). The pixel aspect ratio (for example, 10:11) determines the shape of each pixel. The first number (10) is the numerator and is the wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d59b973b347b
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchExpressionType.Iterable`.
SearchExpressionType.Iterable Description Denote an expression that can iterated to yield SearchItem . Set: [1, 2, 3], Query String: t:shader and evaluator: count{} are all example of iterables. ```csharp [SearchExpressionEvaluator(SearchExpressionType.Iterable | SearchExpressionType.Variadic)] [SearchExpressionEv...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d55f7a26941f
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyPropertyUnmanaged_1` in Unity? Explain its purpose and usage.
HierarchyPropertyUnmanaged<T0> struct in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Implements interfaces: IHierarchyProperty<T0> Description Provides strongly typed access to unmanaged property data. Properties Property Description IsCreated Returns true if the native property i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_177909f8069b
unity_docs
math
What is `UIElements.BaseListView.arraySizeFieldWithHeaderUssClassName` in Unity? Explain its purpose and usage.
BaseListView.arraySizeFieldWithHeaderUssClassName public static string arraySizeFieldWithHeaderUssClassName ; Description The USS class name for the size field of the ListView when foldout header is enabled. Unity adds this USS class to the size field element in the ListView when showBoundCollectionSize is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06a8f567c519
unity_docs
scripting
Give me an overview of the `ParticleSystem` class in Unity.
ParticleSystem class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the Built-in Particle System. Unity's powerful and versatile particle system implementation. General parameters The Particle System's general parameters are kept...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_653198c85dba
unity_docs
physics
What is `Physics.defaultSolverIterations` in Unity? Explain its purpose and usage.
Physics.defaultSolverIterations public static int defaultSolverIterations ; Description The defaultSolverIterations determines how accurately Rigidbody joints and collision contacts are resolved. (default 6). Must be positive. If you are having trouble with connected Rigidbodies oscillating and behaving erratic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82e88c8499c4
unity_docs
scripting
What is `Unity.Hierarchy.IHierarchyProperty_1` in Unity? Explain its purpose and usage.
IHierarchyProperty<T0> interface in Unity.Hierarchy Description An interface that is used to access strongly typed node data. Properties Property Description IsCreated Returns true if the native property is valid. Public Methods Method Description ClearValue Removes the property value for a Hierar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_66e075a98751
unity_docs
scripting
Show me a Unity code example for 'EnumFlagsField'.
Field lets users select multiple values from an enumeration that are marked with the Flags attribute. Note : To align an EnumFlagsField with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create an EnumFlagsField You can c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0462c9efca0
unity_docs
editor
What is `VersionControl.VersionControlUtils` in Unity? Explain its purpose and usage.
VersionControlUtils class in UnityEditor.VersionControl Description Contains version control system specific utility methods. Static Methods Method Description IsPathVersioned Allows you to check whether the specified file is tracked by version control.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb9cdc4e7c25
unity_docs
rendering
What is `GL.LoadPixelMatrix` in Unity? Explain its purpose and usage.
GL.LoadPixelMatrix Declaration public static void LoadPixelMatrix (); Description Setup a matrix for pixel-correct rendering. Loads an orthographic projection into the projection matrix and loads an identity into the model and view matrices. The projection matrix is such that the X and Y coordinates map directl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a351298de233
unity_docs
math
Show me a Unity C# example demonstrating `Vector4.ToString`.
tring (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifies culture-specific formatting. Description Returns a formatted string for this vector. Defaults to two digits displayed (format="F2"). For more in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_266d858ae072
unity_docs
rendering
What is `Camera.RemoveAllCommandBuffers` in Unity? Explain its purpose and usage.
Camera.RemoveAllCommandBuffers Declaration public void RemoveAllCommandBuffers (); Description Remove all command buffers set on this camera. This API is only available with the Built-in renderer. Additional resources: CommandBuffer , RemoveCommandBuffer , RemoveCommandBuffers .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7986338c311
unity_docs
math
What is `Vector3.sqrMagnitude` in Unity? Explain its purpose and usage.
Vector3.sqrMagnitude public float sqrMagnitude ; Description Returns the squared length of this vector (Read Only). The magnitude of a vector v is calculated as Mathf.Sqrt(Vector3.Dot(v, v)). However, the Sqrt calculation is quite complicated and takes longer to execute than the normal arithmetic operations. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ccc1342bbd0
unity_docs
ui
Show me a Unity C# example demonstrating `Input.GetKeyDown`.
w projects, use the Input System package. To learn more about input, refer to Input . Call this function from the Update function, since the state gets reset each frame. It will not return true until the user has released the key and pressed it again. When dealing with input it is recommended to use Input.GetAxis ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_660b30329190
unity_docs
scripting
What is `WSA.SecondaryTileData.displayName` in Unity? Explain its purpose and usage.
SecondaryTileData.displayName public string displayName ; Description Display name for secondary tile. Required when creating secondary tile, not used when updating. On Windows 8 this is also used as short name.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3af5454c52ef
unity_docs
ui
In Unity's 'Multiple selectors', what is 'Syntax' and how does it work?
A multiple selector consists of multiple simple selector without anything to separate them: ``` selector1selector2 {...} ``` The USS parser can’t parse a multiple selector if it can’t distinguish each selector in the combination. For example, the following USS rule combines two type selectors: ListView , and Button . `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7802f41afd9e
unity_docs
editor
What is `EditorGUI.MultiPropertyField` in Unity? Explain its purpose and usage.
EditorGUI.MultiPropertyField Declaration public static void MultiPropertyField ( Rect position , GUIContent[] subLabels , SerializedProperty valuesIterator , GUIContent label ); Declaration public static void MultiPropertyField ( Rect position , GUIContent[] subLabels , SerializedProperty valuesIt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6deaed23f23
unity_docs
scripting
What is `UIElements.UxmlEnumeration.Equals` in Unity? Explain its purpose and usage.
UxmlEnumeration.Equals Declaration public bool Equals ( UIElements.UxmlTypeRestriction other ); Parameters Parameter Description other The object to compare with. Returns bool True if the otheer object is equal to this one. Description Indicates whether the current UxmlEnumeration object is equal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9cc01781bef2
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.A2R10G10B10_XRSRGBPack32` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.A2R10G10B10_XRSRGBPack32 Description A four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70d42698dc8c
unity_docs
rendering
What are the parameters of `LightTransport.RadeonRaysContext.DestroyBuffer` in Unity?
Description Destroy the buffer with the given ID. ```csharp using UnityEngine.LightTransport;IDeviceContext ctx = new RadeonRaysContext(); ctx.Initialize(); const int sizeInBytes = 4; var bufferID = ctx.CreateBuffer(sizeInBytes); ctx.DestroyBuffer(bufferID); ctx.Dispose(); ``` How to destroy a buffer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3485ec8cce6f
unity_docs
rendering
Show me a Unity code example for 'Toggle shader keywords in the Editor'.
e to use the new name. Make sure you or Unity declare state for when the keyword is off. For more information, refer to Branch when all keywords in a set are disabled . For example, if you use shader_feature to declare only one keyword, Unity creates the ‘off’ state automatically. Add an integer material property with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c602ea11a50
unity_docs
animation
What is `Animator.SetTrigger` in Unity? Explain its purpose and usage.
Animator.SetTrigger Declaration public void SetTrigger (string name ); Declaration public void SetTrigger (int id ); Parameters Parameter Description name The parameter name. id The parameter ID. Description Sets the value of the given trigger parameter. This method allows you to set (i.e. activat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95c2fe0d69ff
unity_docs
animation
What is `Animations.AnimatorControllerPlayable.GetNextAnimatorClipInfo` in Unity? Explain its purpose and usage.
AnimatorControllerPlayable.GetNextAnimatorClipInfo Declaration public AnimatorClipInfo[] GetNextAnimatorClipInfo (int layerIndex ); Parameters Parameter Description layerIndex The layer index. Returns AnimatorClipInfo[] An array of all the AnimatorClipInfo in the next state. Description Returns an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34dd486395f2
unity_docs
scripting
Show me a Unity C# example demonstrating `Actions.ContextMenuUtility`.
ContextMenuUtility class in UnityEditor.Actions Description Provides methods to add menu items to the Scene view context menu. ```csharp using UnityEditor; using UnityEditor.Actions; using UnityEngine; // Add a menu item to the Scene View context menu that creates a cube where-ever the mouse clicks. public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_427d9febf7a6
unity_docs
rendering
Explain 'Analyze mipmap streaming' in Unity.
The Scene view has a Debug Draw Mode that helps you visualize and debug mipmap streaming in your scene. To enable it, follow these steps: Select Debug Draw Mode in the Scene view Draw Modes and View Options overlays . Select Texture Mipmap Streaming . The Debug Draw Mode tints GameObjects the following colours: Green i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f87c6f5c86b
unity_docs
scripting
What is `Search.SearchUtils.FindQuery` in Unity? Explain its purpose and usage.
SearchUtils.FindQuery Declaration public static Search.ISearchQuery FindQuery (string guid ); Parameters Parameter Description guid GUID of the search query. Returns ISearchQuery Search query. Null if the system found no match. Description Find a given search query given its GUID.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59ecb803f810
unity_docs
ui
What is `EditorTools.ToolAttribute.variantGroup` in Unity? Explain its purpose and usage.
ToolAttribute.variantGroup public Type variantGroup ; Description Tool variants are used to group logically similar tools into a single button in the Tools Overlay. The variantGroup type acts a key to specify groups of tools that should be considered a group in the UI. ```csharp using System; using UnityEditor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_828043bc26ad
unity_docs
scripting
What are the parameters of `EditorGUI.InspectorTitlebar` in Unity?
Returns bool The foldout state selected by the user. Description Makes an inspector-window-like titlebar. The titlebar has a foldout arrow, a help icon, and a settings menu that depends on the type of the object supplied. Inspector titlebar in an Editor Window. ```csharp using System.Collections; using System.Collectio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cfaec68b304
unity_docs
scripting
Give me an overview of the `AudioDistortionFilter` class in Unity.
AudioDistortionFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Distortion Filter distorts the sound from an AudioSource or sounds reaching the AudioListener . Additional resources: Audio Distortion Filter information. Properties Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c71d715674f9
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Afrikaans`.
SystemLanguage.Afrikaans Description Afrikaans. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Afrikaans language if (Application.systemLanguage == SystemLanguage.Afrikaans) { //Outputs into console that the system ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26380769e7b2
unity_docs
physics
What is `JointMotor2D.motorSpeed` in Unity? Explain its purpose and usage.
JointMotor2D.motorSpeed public float motorSpeed ; Description The desired speed for the Rigidbody2D to reach as it moves with the joint. Additional resources: Rigidbody2D class, maxMotorTorque .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b736b61f24c9
github
scripting
Write a Unity C# UI script for Dropdown Handler
```csharp // "Wave SDK // © 2020 HTC Corporation. All Rights Reserved. // // Unless otherwise required by copyright law and practice, // upon the execution of HTC SDK license agreement, // HTC grants you access to and use of the Wave SDK(s). // You shall fully comply with all of HTC’s SDK license agreement terms and /...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_e1008577d8fe
unity_docs
ui
What is `TextAlignment` in Unity? Explain its purpose and usage.
TextAlignment enumeration Description How multiline text should be aligned. This is used by the TextMesh.alignment property. Properties Property Description Left Text lines are aligned on the left side. Center Text lines are centered. Right Text lines are aligned on the right side.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b825457afec2
unity_docs
xr
Show me a Unity C# example demonstrating `Networking.UnityWebRequest.UnEscapeURL`.
use. Description Converts URL-friendly escape sequences back to normal text. Certain text characters have special meanings when present in URLs. If you need to include those characters in URL parameters then you must represent them with escape sequences. This function takes a string containing these escape sequences...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9fbc2e0f6ef
unity_docs
ui
What is `UIElements.VisualElement.layout` in Unity? Explain its purpose and usage.
VisualElement.layout public Rect layout ; Description The position and size of the VisualElement relative to its parent, as computed by the layout system. (Read Only) Before reading from this property, add it to a panel and wait for one frame to ensure that the element layout is computed. After the layou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54a0171c3577
unity_docs
rendering
What is `ParticleSystemRenderer` in Unity? Explain its purpose and usage.
ParticleSystemRenderer class in UnityEngine / Inherits from: Renderer / Implemented in: UnityEngine.ParticleSystemModule Description Use this class to render particles on to the screen. Properties Property Description activeTrailVertexStreamsCount The number of currently active custom trail vertex streams....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4923783cb76e
github
scripting
Write a Unity C# MonoBehaviour script called Base Behaviour
```csharp using System; using UnityEngine; namespace CoreLibrary { /// <summary> /// Author: Cameron Reuschel /// <br/><br/> /// Base class for all behaviours that depend on CoreLibrary utilities. /// Adds no additional overhead compared to extending from MonoBehaviour directly. /// </summary> publi...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_6bf5c9dd0e45
unity_docs
scripting
Show me a Unity C# example demonstrating `Pool.ObjectPool_1.ctor`.
axSize The maximum number of object instances that the pool can hold. The pool can expand from its starting defaultCapacity up to maxSize and no further. When the pool reaches the maxSize then any further instances returned to the pool are ignored and can be garbage collected. Use this to prevent the pool growin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6e49caef4d6f
unity_docs
rendering
Show me a Unity code example for 'Create a surface shader in the Built-In Render Pipeline'.
he SubShader block in your shader code, not the Pass block. Unity automatically creates multiple passes when it compiles the surface shader . Add a #pragma surface [surfaceFunction] [lightModel] directive. Surface shaders aren’t compatible with HLSLPROGRAM blocks, but you can use HLSL inside a CGPROGRAM block. For more...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a503686d9375
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchProvider.onDisable`.
SearchProvider.onDisable public Unity.Android.Gradle.Manifest.Action onDisable ; Description Called when the SearchWindow is closed. Allows the search provider to release cached resources. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dabae8405cb7
github
scripting
Write a Unity C# script called State Switcher
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UIStateSwitcher { public class StateSwitcher : SwitchableElement { [SerializeField] private List<string> states = new List<string>(); [SerializeField] private List<SwitchableElement> ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_4e802bf0428e
unity_docs
scripting
In Unity's 'Serialization best practices', what is 'Organizing your data' and how does it work?
You can organize your data as follows to ensure optimal use of Unity’s serialization: Aim to have Unity serialize the smallest possible set of data. The purpose of this isn’t to save space on your computer’s hard drive, but to make sure that you can maintain backwards compatibility with previous versions of the project...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e4560661c52
unity_docs
rendering
What is `MaterialPropertyBlock.HasFloat` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.HasFloat Declaration public bool HasFloat (string name ); Declaration public bool HasFloat (int nameID ); Parameters Parameter Description name The name of the property. nameID The name ID of the property. Use Shader.PropertyToID to get this ID. Returns bool Returns true if...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9508c12a50d1
unity_docs
rendering
What is `Rendering.CommandBuffer.SetBufferData` in Unity? Explain its purpose and usage.
CommandBuffer.SetBufferData Declaration public void SetBufferData ( ComputeBuffer buffer , Array data ); Declaration public void SetBufferData ( ComputeBuffer buffer , List<T> data ); Declaration public void SetBufferData ( ComputeBuffer buffer , NativeArray<T> data ); Declaration public void Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fb7ba39a2ae
unity_docs
networking
What is `Networking.DownloadHandlerFile.ctor` in Unity? Explain its purpose and usage.
DownloadHandlerFile Constructor Declaration public DownloadHandlerFile (string path ); Declaration public DownloadHandlerFile (string path , bool append ); Parameters Parameter Description path Path to file to be written. append When true, appends data to the given file instead of overwriting. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2a7546c6a584
unity_docs
audio
In Unity's 'Supported codecs for transparent videos (per-pixel alpha)', what is 'WebM with VP8' and how does it work?
A WebM file that uses the VP8 video codec stores alpha information natively. Most Unity-supported platforms can read transparent videos in this format. Unity usually only supports the VP8 video codec and Vorbis audio codec for WebM videos. If your VP8 video has another audio codec, the audio might not be audible, and U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb515362d13b
unity_docs
scripting
What is `UIElements.TransitionEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
TransitionEventBase<T0>.GetPooled Declaration public static T GetPooled ( UIElements.StylePropertyName stylePropertyName , double elapsedTime ); Parameters Parameter Description stylePropertyName The name of the style property. elapsedTime The elapsed time. Returns T An initialized transition event. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_11
github
scripting
What does `ClearSceneDirtiness` do in this Unity script? Explain its purpose and signature.
Call to Unity internal method that clears unsaved changes from the scene Signature: ```csharp private static void ClearSceneDirtiness(Scene scene) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_966dc2efd37c
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.B8G8R8A8_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.B8G8R8A8_UNorm Description A four-component, 32-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in by...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_36b8b9ff13ba_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Loads .ply, .spz, .sog, and .spx Gaussian Splat files at runtime,creating a GaussianSplatAsset in memory and assigning it to a GaussianSplatRenderer.Uses Float32 quality (no chunking) for maximum simplicity. Signature: ```csharp public class RuntimeSplatLoader : MonoBehaviour ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_2dae4b21cded
unity_docs
physics
What is `LowLevelPhysics.GeometryHolder.Create` in Unity? Explain its purpose and usage.
GeometryHolder.Create Declaration public static LowLevelPhysics.GeometryHolder Create (T geometry ); Parameters Parameter Description geometry The geometry to store in this GeometryHolder. Returns GeometryHolder Returns the GeometryHolder object with the geometric shape stored inside. Description C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82550b16ffa4
unity_docs
editor
What is `SceneManagement.EditorSceneManager.ClosePreviewScene` in Unity? Explain its purpose and usage.
EditorSceneManager.ClosePreviewScene Declaration public static bool ClosePreviewScene ( SceneManagement.Scene scene ); Parameters Parameter Description scene The preview Scene to close. Returns bool True if the Scene was successfully closed. Description Closes a preview Scene created by NewPreviewS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a645a8938c70
unity_docs
scripting
What is `AI.NavMesh.GetSettingsByIndex` in Unity? Explain its purpose and usage.
NavMesh.GetSettingsByIndex Declaration public static AI.NavMeshBuildSettings GetSettingsByIndex (int index ); Parameters Parameter Description index The index to retrieve from. Returns NavMeshBuildSettings The found settings. Description Returns an existing entry of NavMesh build settings by its or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.