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_f96de9abbcec
unity_docs
ui
What is `Input.backButtonLeavesApp` in Unity? Explain its purpose and usage.
Input.backButtonLeavesApp public static bool backButtonLeavesApp ; Description Should Back button quit the application? Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63aafc998a5b
unity_docs
rendering
What is `ParticleSystem.ShapeModule.donutRadius` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.donutRadius public float donutRadius ; Description The thickness of the Donut shape to emit particles from. Controls the secondary radius of the Donut shape. Additional resources: ParticleSystem.ShapeModule.shapeType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7e8455d4cfa8
unity_docs
scripting
Explain 'Bind ListView to a list with runtime binding' in Unity.
Version : 6000.0+ The ListView control is the most efficient way to create lists. This example demonstrates how to use runtime binding to bind a ListView to a list without C# code. ## Example overview This example creates a GameSwitchListAsset ScriptableObject that contains a list of GameSwitch objects. Each GameSwit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11936833c98c
unity_docs
rendering
What is `MaterialEditor.ColorProperty` in Unity? Explain its purpose and usage.
MaterialEditor.ColorProperty Declaration public Color ColorProperty ( Rect position , MaterialProperty prop , string label ); Declaration public Color ColorProperty ( MaterialProperty prop , string label ); Parameters Parameter Description label Label for the property. Description Draw a pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4289beea8349
unity_docs
physics
What are the parameters of `Rigidbody.AddRelativeForce` in Unity?
Description Adds a force to the rigidbody relative to its coordinate system. Force can be applied only to an active rigidbody. If a GameObject is inactive, AddRelativeForce has no effect. Wakes up the Rigidbody by default. If the force size is zero then the Rigidbody will not be woken up. For more information on how Fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fc8c4fea08a
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnCollisionExit`.
the objects involved in the collision is destroyed before they separate, OnCollisionExit is not called. If your logic depends on OnCollisionExit being called whenever contact ends, including when an object is destroyed, you need to implement additional logic, such as handling cleanup in MonoBehaviour.OnDestroy or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8550bb096377
unity_docs
audio
What is `AudioCurveRendering.AudioMinMaxCurveAndColorEvaluator` in Unity? Explain its purpose and usage.
AudioCurveRendering.AudioMinMaxCurveAndColorEvaluator Declaration public delegate void AudioMinMaxCurveAndColorEvaluator (float x , out Color col , out float minValue , out float maxValue ); Parameters Parameter Description x Normalized x-position in the range [0; 1] at which the min- and max-curves sho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24f72064f639
unity_docs
editor
What is `SceneManagement.NewSceneMode` in Unity? Explain its purpose and usage.
NewSceneMode enumeration Description Used when creating a new Scene in the Editor. Additional resources: EditorSceneManager.NewScene . Properties Property Description Single All current open Scenes are closed and the newly created Scene are opened. Additive The newly created Scene is added to the current ope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9558f77bb800
unity_docs
networking
What is `Networking.PlayerConnection.ConnectedPlayer` in Unity? Explain its purpose and usage.
ConnectedPlayer class in UnityEditor.Networking.PlayerConnection Description Information of the connected player. Properties Property Description name The name of the connected player. playerId The ID of the player connected.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4c8910044d86
unity_docs
ui
Show me a Unity code example for 'Use Toggle to create a conditional UI'.
to do the following: Show or hide a label Activate or deactivate a button You can find the completed files that this example creates in this GitHub repository . ## Create the example To create the example: Create a Unity project with any template. In the Project window , create a folder named Editor . In the Editor f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2329a7941cc1_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The buttons on the controller that will trigger a transition to the Teleport Controller. Signature: ```csharp public List<InputHelpers.Button> deactivationButtons ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_7277df055da4
unity_docs
editor
What is `GizmoUtility` in Unity? Explain its purpose and usage.
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_a15f645b0104
unity_docs
xr
In Unity's 'Request runtime permissions', what is 'Check whether to display the rationale for permission request' and how does it work?
Use Permission.ShouldShowRequestPermissionRationale to check whether you need to display the rationale for a specific permission request. If the rationale is necessary, display a message with reason why your application requires access to specific device features. After you display the message, send a request for permi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_98ad524647c0
unity_docs
rendering
In Unity's 'Scene view Draw Modes and View Options overlays', what is 'The View Options overlay' and how does it work?
Change what the Scene view displays. View option Description 2D View the scene in 2D or 3D. In 2D mode, the camera looks towards positive z, with the x-axis pointing right and the y-axis pointing up. Audio Enable or disable audio. Effects Enable or disable rendering effects. Use the dropdown to select individual effect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_907899e28547
unity_docs
scripting
In Unity's 'Enable optional features for QNX', what is 'Example output' and how does it work?
``` [TIMING::STARTUP] Initial probing done: Real: 19 ms | User: 11 ms [TIMING::STARTUP] SDL Initialized: Real: 64 ms | User: 54 ms [TIMING::STARTUP] Scripting runtime loaded: Real: 97 ms | User: 86 ms [TIMING::STARTUP] Plugins loaded: Real: 97 ms | User: 87 ms [TIMING::STARTUP] Engine initialized (nogfx): Real: 104 ms ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_aaff02a82f0b
github
scripting
Write a Unity C# UI script for Exposed Mono Behaviour Editor
```csharp using UnityEditor; using UnityEngine; using UnityPropertyInspector.Scripts; namespace UnityPropertyInspector.Editor { /// <summary> /// Editor Script for ExposedMonoBehaviourEditor /// </summary> [CustomEditor(typeof(ExposedMonoBehaviour),true), DisallowMultipleComponent] public class Ex...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_af74fae003b6
unity_docs
ui
Show me a Unity C# example demonstrating `UIElements.GenericDropdownMenu`.
fault textual options or any VisualElement . The GenericDropdownMenu is a generic implementation of a dropdown menu that you can use in both Editor UI and runtime UI. The following example creates a dropdown menu with three items. It displays the menu when the user clicks the button. The example also demonstra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ae2cce98580
unity_docs
scripting
What is `AudioLowPassFilter` in Unity? Explain its purpose and usage.
AudioLowPassFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Low Pass Filter passes low frequencies of an AudioSource or all sounds reaching an AudioListener , while removing frequencies higher than the Cutoff Frequency. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d08a3f462d1
unity_docs
xr
Explain 'How Unity works with packages' in Unity.
When Unity opens a Project, the Unity Package Manager reads the Project manifest ( 1 ) to figure out what packages to load in the Project. Then it sends a request ( 2 ) to the package registry server ( 3 ) for each package that appears as a dependency in the manifest. The package registry then sends the requested infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4488ec0fa953
unity_docs
scripting
Show me a Unity C# example demonstrating `Application.CanStreamedLevelBeLoaded`.
Application.CanStreamedLevelBeLoaded Declaration public static bool CanStreamedLevelBeLoaded (int levelIndex ); Description Checks if the built scene can be loaded. Test if a scene with the provided index exists in the Player build. Returns true if the index value is greater than or equal to zero, and less tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09463dd2afc8
unity_docs
rendering
What is `ShaderUtil.GetPropertyDescription` in Unity? Explain its purpose and usage.
ShaderUtil.GetPropertyDescription Declaration public static string GetPropertyDescription ( Shader s , int propertyIdx ); Parameters Parameter Description s The shader to check against. propertyIdx The property index to use. Returns string Returns the description of the given shader property. Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b28251235ec7
unity_docs
scripting
Explain 'Move, rotate, and scale in increments' in Unity.
Use discrete values when you move, rotate, or scale GameObjects . To move, rotate, or scale by increment snap values when auto-snapping is disabled , hold down the Control (macOS: Command ) key while you use one of the transform gizmos . To change the default increment snap values: In the Grid and Snap overlay toolbar ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac4475661729_doc_5
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can be initialized using five arguments.-derived classes that implement this interface can be instantiated with arguments using the function.-derived classes that implement this interface can be added to a with arguments using the GameObject.AddComponent function.These functions can automatic...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_23060c676bce
unity_docs
physics
What is `Joint2D.breakAction` in Unity? Explain its purpose and usage.
Joint2D.breakAction public JointBreakAction2D breakAction ; Description The action to take when the joint breaks the breakForce or breakTorque . A joint breaks when the force a joint exerts exceeds breakForce or when the torque a joint exerts exceeds breakTorque . The joint action happens after the call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_267f8c6bf4e4
unity_docs
scripting
What is `Event.delta` in Unity? Explain its purpose and usage.
Event.delta public Vector2 delta ; Description The relative movement of the mouse compared to last event. Used in EventType.MouseMove , EventType.MouseDrag , EventType.ScrollWheel events. Additional resources: Event.mousePosition . ```csharp using UnityEngine;public class Example : MonoBehaviour { // M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f82cb51563a0_doc_1
github
scripting
What does `AddItem` do in this Unity script? Explain its purpose and signature.
Adds an item to the locator. Signature: ```csharp public void AddItem(TBase item, string key = "") ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3ba3fb84e4f
unity_docs
rendering
What is `Rendering.LightEvent.AfterShadowMapPass` in Unity? Explain its purpose and usage.
LightEvent.AfterShadowMapPass Description After shadowmap pass is rendered. When this event is triggered, all shadow casters in pass have already been rendered, and current render target is still the shadowmap. This event differs from LightEvent.AfterShadowMap in that for light types that render shadows using mul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_581573a74512
unity_docs
editor
What are the parameters of `Search.ParsedQuery_1.Test` in Unity?
Returns bool True if the object passes the query, returns false otherwise. Description Tests the query on a single object. Returns true if the test passes. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_ParsedQuery_Test { static List...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_58a01630392a
unity_docs
editor
What is `Editor.DrawPreview` in Unity? Explain its purpose and usage.
Editor.DrawPreview Declaration public void DrawPreview ( Rect previewArea ); Parameters Parameter Description previewArea The available area to draw the preview. Description The first entry point for Preview Drawing. Draws a grid of previews if there are multiple targets available. Override this method i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f86ab54a09d
unity_docs
math
What is `Gizmos.DrawLineStrip` in Unity? Explain its purpose and usage.
Gizmos.DrawLineStrip Declaration public static void DrawLineStrip (ReadOnlySpan<Vector3> points , bool looped ); Parameters Parameter Description points The points that define the sequence of lines to draw. The function draws a line between each point and the one that follows it. looped Whether to draw an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43195af016d6
unity_docs
ui
What is `EditorGUI.PropertyScope.ctor` in Unity? Explain its purpose and usage.
EditorGUI.PropertyScope Constructor Declaration public EditorGUI.PropertyScope ( Rect totalPosition , GUIContent label , SerializedProperty property ); Parameters Parameter Description totalPosition Rectangle on the screen to use for the control, including label if applicable. label Label in front o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f42bc4a5e08a
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.RectField`.
Rect RectField ( Rect position , GUIContent label , Rect value ); Parameters Parameter Description position Rectangle on the screen to use for the field. label Optional label to display above the field. value The value to edit. Returns Rect The value entered by the user. Description Makes a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_086144f10e9f
unity_docs
ui
What is `UIElements.UsageHints.MaskContainer` in Unity? Explain its purpose and usage.
UsageHints.MaskContainer Description Optimizes rendering of a VisualElement that has multiple descendants with nested masks. This option reduces stencil state changes and capitalizes on consecutive mask push/pop operations for efficiency. Apply this option to a VisualElement with multiple nested masks amon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73b8c09ecf21
unity_docs
rendering
Show me a Unity C# example demonstrating `Camera.rect`.
Camera.rect public Rect rect ; Description Where on the screen is the camera rendered in normalized coordinates. In rect , the bottom-left of the screen is (0,0) and the top-right of the screen is (1,1). ```csharp using UnityEngine;// Change the width of the viewport each time space key is pressedpublic cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1dee55da9d4
unity_docs
scripting
What is `GraphicsBuffer.SetCounterValue` in Unity? Explain its purpose and usage.
GraphicsBuffer.SetCounterValue Declaration public void SetCounterValue (uint counterValue ); Parameters Parameter Description counterValue Value of the append/consume counter. Description Sets counter value of append/consume buffer. Append/consume and counter buffers (see GraphicsBuffer.Target.Append , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_acaaef45487a
unity_docs
scripting
What is `Build.Content.ContentBuildInterface.GetPlayerDependenciesForObjects` in Unity? Explain its purpose and usage.
ContentBuildInterface.GetPlayerDependenciesForObjects Declaration public static ObjectIdentifier[] GetPlayerDependenciesForObjects (ObjectIdentifier[] objectIDs , BuildTarget target , Build.Player.TypeDB typeDB ); Description Returns a list of objects referenced by a set of objects. Internal use only. Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c9e2e32f791
unity_docs
scripting
What is `WSA.Application.InvokeOnUIThread` in Unity? Explain its purpose and usage.
Application.InvokeOnUIThread Declaration public static void InvokeOnUIThread ( WSA.AppCallbackItem item , bool waitUntilDone ); Parameters Parameter Description item Item to execute. waitUntilDone Wait until item is executed. Description Executes callback item on UI thread. More information on UI and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c367223cd2bd
unity_docs
rendering
What is `RenderTexture.ApplyDynamicScale` in Unity? Explain its purpose and usage.
RenderTexture.ApplyDynamicScale Declaration public void ApplyDynamicScale (); Description Applies the Dynamic Resolution system scale. If a render texture has the useDynamicScaleExplicit flag set, then the dynamic resolution scale is applied. Otherwise, the call is ignored.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ff111e6144d
unity_docs
input
Show me a Unity C# example demonstrating `Input.GetMouseButton`.
is API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, refer to Input . The button values are: 0 for the left button, 1 for the right button, 2 for the middle button. The retu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a16baba71fd
unity_docs
scripting
What is `Device.Application.version` in Unity? Explain its purpose and usage.
Application.version public static string version ; Description This has the same functionality as Application.version . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9ff5290d74a
unity_docs
editor
What is `Search.SearchExpressionEvaluationHints` in Unity? Explain its purpose and usage.
SearchExpressionEvaluationHints enumeration Description Hints provided to the SearchExpression runtime to specify how a certain SearchExpressionEvaluatorAttribute should be executed. Here is an example of an evaluator not supporting thread evaluation: ```csharp [Description("Returns asset paths corresponding ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8d5da5e13b3
unity_docs
scripting
What is `Color.r` in Unity? Explain its purpose and usage.
Color.r public float r ; Description Red component of the color. The value ranges from 0 to 1. ```csharp //Attach this script to a GameObject with a Renderer attached to it //Use the sliders in Play Mode to change the Color of the GameObject's Materialusing UnityEngine;public class Example : MonoBehaviour { R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_178cc5626136
unity_docs
ui
In Unity's 'Introduction to IL2CPP', what is 'Optimizing IL2CPP build times' and how does it work?
Project build times with IL2CPP can be significantly longer than with Mono. However, you can do several things to reduce build time: Exclude your Unity project and target build folders from anti-malware software scans before you build your project. Store your project and target build folder on the fastest disk drive yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c53cfe5461de
unity_docs
scripting
What is `Networking.PlayerConnection.EditorConnection` in Unity? Explain its purpose and usage.
EditorConnection class in UnityEditor.Networking.PlayerConnection / Inherits from: ScriptableSingleton_1 Implements interfaces: IEditorPlayerConnection Description Handles the connection from the Editor to the Player. Sets up events for connecting to and sending data to the Player. This is a singleton class an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8498b1fc138
unity_docs
rendering
What are the parameters of `ImageConversion.EncodeNativeArrayToEXR` in Unity?
Description Encodes this native array into the EXR format. This function returns a NativeArray<byte> which is the EXR data. You can store the encoded data as a file or send it over the network without further processing. This function does not work on any compressed format. Although it is best to us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aeb867ece7d7
unity_docs
scripting
What is `Compilation.Assembly.assemblyReferences` in Unity? Explain its purpose and usage.
Assembly.assemblyReferences public Assembly[] assemblyReferences ; Description Assembly references used to build this assembly. The references are also assemblies built as part of the Unity project. Additional resources: Assembly.compiledAssemblyReferences and Assembly.allReferences .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_913f88fb9a06
unity_docs
rendering
Explain 'Transparent Parallax Diffuse' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Transparent Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce381c27f4ce
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.AverageReadSizeInBytes` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.AverageReadSizeInBytes public float AverageReadSizeInBytes ; Description The mean size of data read, in bytes, for read request metrics included in the summary calculation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e0fa8907724f
github
scripting
Write a Unity C# script called Game Settings
```csharp using UnityEngine; namespace yaSingleton.Examples { [CreateAssetMenuAttribute(fileName = "Game Settings", menuName = "Singletons/Game Settings")] public class GameSettings : LazySingleton<GameSettings> { [SerializeField] private int _gameVersion = 0; [SerializeField] private string _welcomeLabel...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_957fe8346be8
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.GetPosition` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.GetPosition Declaration public Rect GetPosition (); Returns Rect Returns the position and size rect. Description Get the GraphElement position.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ef75d920ea8c
github
scripting
Write a Unity C# physics script for Player Walk
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(PlayerReferences))] public class PlayerWalk : MonoBehaviour { public float moveSpeed = 2f; Rigidbody m_Rigidbody; PlayerInput m_PlayerInput; PlayerClimb m_PlayerClimb; PlayerReference...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_f75137a1dc3d
unity_docs
ui
What is `UIElements.SearchFieldBase_2.cancelButtonOffVariantUssClassName` in Unity? Explain its purpose and usage.
SearchFieldBase<T0,T1>.cancelButtonOffVariantUssClassName public static string cancelButtonOffVariantUssClassName ; Description USS class name of cancel buttons in elements of this type, when they are off.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5081daed5543
unity_docs
rendering
What is `Rendering.VertexAttribute.TexCoord4` in Unity? Explain its purpose and usage.
VertexAttribute.TexCoord4 Description Additional texture coordinate. UVs usually use Vector2 format. Vector2 uses two 32-bit floats; 8 bytes in total. This vertex attribute maps to the TEXCOORD4 semantic in HLSL. This UV channel is also commonly called "UV4". It corresponds to Mesh.uv5 . Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_79dbda1d6492
unity_docs
scripting
In Unity's 'Managed plug-ins', what is 'Creating a managed plug-in' and how does it work?
To create a managed plug-in, you need to create a DLL. To do this, you need a suitable compiler, such as: Visual Studio MsBuild.NET SDK Not all compilers that produce .NET code are compatible with Unity, so you should test the compiler with some available code before doing significant work with it. For information on t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a3e2846c729a
unity_docs
physics
What is `UnityEngine.TilemapModule` in Unity? Explain its purpose and usage.
UnityEngine.TilemapModule Description The Tilemap module implements the Tilemap class. Classes Class Description CustomGridBrushAttribute Attribute to define the class as a grid brush and to make it available in the palette window. GridBrushBase Base class for authoring data on a grid with grid painting tools l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_89d822ba055b
github
scripting
Write a Unity Editor script for GPU Voxel Terrain Editor
```csharp /* * GPUVoxelTerrainEditor.cs * Created by Arian - GameDevBox * YouTube Channel: https://www.youtube.com/@GameDevBox * * 📌 Description: * Custom inspector for GPUVoxelTerrain. * Adds editor buttons for generating, clearing, and exporting voxel terrain. */ using UnityEditor; using UnityEn...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_79769513ca9b
unity_docs
scripting
What is `UIElements.MultiColumnTreeView.SetViewController` in Unity? Explain its purpose and usage.
MultiColumnTreeView.SetViewController Declaration public void SetViewController ( UIElements.CollectionViewController controller ); Parameters Parameter Description controller The controller to use with this view. Description Assigns the view controller for this view and registers all events required for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d7005bf89008
unity_docs
networking
In Unity's 'Web networking', what is 'Use the Unity Netcode networking package' and how does it work?
Due to security restrictions, web browsers do not allow direct access to TCP or UDP sockets. Instead, you can use the Unity Netcode networking package, which supports Web platform. For more information, refer to the documentation About Netcode for GameObjects (Unity Multiplayer Networking). For more information on web ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_02e8dd62f2b3_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Gets a for the key property of the new entry. Signature: ```csharp public static SerializedProperty NewEntryKeyProperty ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f61278e3153
unity_docs
rendering
What is `SparseTexture.UpdateTileRaw` in Unity? Explain its purpose and usage.
SparseTexture.UpdateTileRaw Declaration public void UpdateTileRaw (int tileX , int tileY , int miplevel , byte[] data ); Parameters Parameter Description tileX Tile X coordinate. tileY Tile Y coordinate. miplevel Mipmap level of the texture. data Tile raw pixel data. Description Update sparse text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_69c714f32cef
unity_docs
scripting
Show me a Unity code example for 'LayerMaskField'.
ct one or more layers from a list of available layers . Note : To align a LayerMaskField 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 LayerMaskField You can create a LayerMaskField with UI Builder, UXML, an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_23fc46d41dc0
unity_docs
rendering
Explain 'Optimize distribution size' in Unity.
Some digital distribution services have a limit on the initial install size of your application. Unity includes the following methods to help you to optimize the install size: Split APKs by target architecture . Split the application binary . Compression Minification . ## Split APKs by target architecture If your out...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c1bff10bdb5
unity_docs
math
What are the parameters of `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.SizeOf` in Unity?
Returns int The total size in bytes of the specified type, including any alignment padding required for efficient memory access. Description Determines the size, in bytes, of a specified type, including padding for alignment. The SizeOf method calculates the number of bytes needed to store a single instance of a provid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_81924679e5c0
github
scripting
Write a Unity C# XR/VR script for Timeline Play Controller
```csharp using System; using System.Collections; using System.Linq; using System.Threading.Tasks; using UnityEngine; using UnityEngine.Assertions; using UnityEngine.Events; using UnityEngine.Playables; namespace Phantom.XRMOD.UIFramework.Runtime { public class TimelinePlayController : MonoBehaviour { ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_375fec4d34ee
unity_docs
input
What is `WindowsGamepadBackendHint` in Unity? Explain its purpose and usage.
WindowsGamepadBackendHint enumeration Description Specifies the desired Windows API to be used for input. Properties Property Description WindowsGamepadBackendHintDefault Select a Windows Input API automatically based on platform support. WindowsGamepadBackendHintXInput Windows XInput API. WindowsGamepadBacke...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a9121ae3554
unity_docs
animation
What is `Animations.AnimationHumanStream.SetLookAtClampWeight` in Unity? Explain its purpose and usage.
AnimationHumanStream.SetLookAtClampWeight Declaration public void SetLookAtClampWeight (float weight ); Parameters Parameter Description weight The LookAt clamp weight. Description Sets the LookAt clamp weight. 0.0 means the character is unrestrained in motion. 1.0 means the character is clamped (look at ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_caf7af29cd6b
unity_docs
animation
What is `Animations.AnimationStream.isHumanStream` in Unity? Explain its purpose and usage.
AnimationStream.isHumanStream public bool isHumanStream ; Description Returns true if the stream is from a humanoid avatar; false otherwise. (Read Only) Additional resources: AnimationStream.humanStream.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_590aa838f449
unity_docs
xr
Explain 'Store credentials for automatic proxy configuration (Windows)' in Unity.
If your organization’s web proxy requires user authentication and is configured to accept basic authentication (username and password), you must store your credentials before using Unity applications. If you use Unity on Windows, use the following procedure. For macOS, refer to Store credentials for automatic proxy con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66cac095f944
unity_docs
xr
What is `Rendering.AsyncGPUReadbackRequest.done` in Unity? Explain its purpose and usage.
AsyncGPUReadbackRequest.done public bool done ; Description Checks whether the request has been processed. If an error has occurred during processing, then calling AsyncGPUReadbackRequest.hasError on this request will return true.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b23bcc60207e
unity_docs
scripting
What is `SerializedPropertyType.ExposedReference` in Unity? Explain its purpose and usage.
SerializedPropertyType.ExposedReference Description Provides a reference to another Object in the Scene. This is done via an ExposedReference<T0> type and resolves to a reference to an Object that exists in the context of the SerializedObject containing the SerializedProperty. Additional resources: SerializedP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_24fabb2a0cb1
unity_docs
scripting
Explain 'Light components' in Unity.
Resources for adding lights to specific points in a scene , and how Unity calculates the shading of GameObjects based on the intensity, direction, and color of lights. Page Description Types of Light component Compare the differences between Point Lights, Spot Lights, Directional Lights and Area Lights. Per-pixel and p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f936942418aa
unity_docs
scripting
What is `UIElements.ChangeEvent_1` in Unity? Explain its purpose and usage.
ChangeEvent<T0> class in UnityEngine.UIElements / Inherits from: UIElements.EventBase_1 / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IChangeEvent Description Sends an event when a value in a field changes. Properties Property Description newValue The new value. previousVal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8916ba6a0197
unity_docs
rendering
In Unity's 'Mesh vertex data', what is 'Tangent' and how does it work?
The vertex tangent represents the direction that points along the “u” (horizontal texture) axis of the surface at the position of the vertex. Unity stores the vertex tangent with an additional piece of data, in a four-component vector. The x,y,z components of the vector describe the tangent, and the w component of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3fc624fbd05c
unity_docs
editor
Show me a Unity code example for 'Additional files for Roslyn analyzers and source generators'.
Unity doesn’t pass either one to the compilation pipeline. ## Retrieving available additional files from code Analyzers can retrieve the full list of additional files included in the compiled assembly from the analyzer context. This list comprises all additional files included in the assembly, not just the ones match...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e9d8731ef71
unity_docs
scripting
What is `SerializedObject.FindProperty` in Unity? Explain its purpose and usage.
SerializedObject.FindProperty Declaration public SerializedProperty FindProperty (string propertyPath ); Description Find serialized property by name. You can use this to find a specific property in the target object. Additional resources: GetIterator , SerializedProperty . ```csharp using UnityEngine; us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d96ba863c8e
unity_docs
editor
What is `EditorUserBuildSettings.wsaBuildAndRunDeployTarget` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.wsaBuildAndRunDeployTarget public static WSABuildAndRunDeployTarget wsaBuildAndRunDeployTarget ; Description Sets and gets the Windows device to launch the UWP app when using Build and Run.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3610ced96642
unity_docs
scripting
Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemSwap`.
d exchanges the data between two memory buffers. Each buffer must have the same size for the swap to be valid. This method is efficient for reorganizing data or implementing custom shuffle operations. When the memory regions overlap, the data from the first buffer is copied to the second, ensuring no data corruption. B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8102654ea1d4
unity_docs
rendering
What is `MaterialProperty.rangeLimits` in Unity? Explain its purpose and usage.
MaterialProperty.rangeLimits public Vector2 rangeLimits ; Description Min/max limits of a ranged float property (Read Only). This is only relevant for MaterialProperty.PropType.Range properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48c50bbaeee4
unity_docs
editor
What is `SearchService.ISearchContext` in Unity? Explain its purpose and usage.
ISearchContext interface in UnityEditor.SearchService Description The base interface for search contexts. Properties Property Description engineScope An enum that identifies the current search scope. guid A unique identifier for this search context. requiredTypeNames An IEnumerable of strings that contains t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54c7f1527d11
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddRemotePackageReferenceAtVersion` in Unity? Explain its purpose and usage.
PBXProject.AddRemotePackageReferenceAtVersion Declaration public string AddRemotePackageReferenceAtVersion (string url , string version ); Parameters Parameter Description url The URL of the repository. version The version to use. Returns string Returns the GUID of the remote package reference. Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea48a33aa678
unity_docs
scripting
What is `MonoBehaviour.OnDisable` in Unity? Explain its purpose and usage.
MonoBehaviour.OnDisable() Description Called when a component itself is disabled or its parent GameObject is deactivated. OnDisable is called in the following scenarios: When a component of an active GameObject is disabled via code or the Inspector. When an enabled component's parent GameObject is deactivated. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a69739e3bcd9
unity_docs
math
What is `RectInt.Contains` in Unity? Explain its purpose and usage.
RectInt.Contains Declaration public bool Contains ( Vector2Int position ); Parameters Parameter Description position Position to check. Returns bool Whether the position is within the RectInt . Description Returns true if the given position is within the RectInt . A point is considered to lie wit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f82b82d33ac1
unity_docs
rendering
Explain 'Surface Shader input structure reference for the Built-In Render Pipeline' in Unity.
The input structure Input generally has any texture coordinates needed by the shader . Texture coordinates must be named “ uv ” followed by texture name (or start it with “ uv2 ” to use second texture coordinate set). Additional values that can be put into Input structure: float3 viewDir - contains view direction, for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_335c93ba7904
unity_docs
scripting
What is `GameObject.layer` in Unity? Explain its purpose and usage.
GameObject.layer public int layer ; Description Integer identifying the layer the GameObject is assigned to. This is the standard integer value which identifies the layer, not the LayerMask . You can use layers for selective rendering from cameras or to ignore Raycasts. Unity generates 32 layers, identified b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_763d8f301e93
unity_docs
editor
Explain 'Install the platform package for QNX' in Unity.
Install the platform package for QNX on Linux, macOS, and Windows. Note: The Unity Editor for QNX is available under separate terms. For licensing and download information, contact your Account Manager or the Unity Sales team. ## Requirements and compatibility Your system must meet the System requirements for the Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eddc24fbeb7b
unity_docs
scripting
What are the parameters of `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemSet` in Unity?
Description Sets a block of memory to a specified byte value for a defined size. The MemSet method fills a specified block of memory with a given byte value. This operation is useful for initializing memory to a known state, such as setting a buffer to zero or another specific value. Properly initializing memory can pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bae4c5868cff
unity_docs
scripting
What is `AndroidJNI.SetBooleanField` in Unity? Explain its purpose and usage.
AndroidJNI.SetBooleanField Declaration public static void SetBooleanField (IntPtr obj , IntPtr fieldID , bool val ); Description Sets the value of an instance field of the specified object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e0c717b303d
unity_docs
math
What is `Mathf.LerpAngle` in Unity? Explain its purpose and usage.
Mathf.LerpAngle Declaration public static float LerpAngle (float a , float b , float t ); Parameters Parameter Description a The start angle. A float expressed in degrees. b The end angle. A float expressed in degrees. t The interpolation value between the start and end angles. This value is clamped t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_16086dc93027
unity_docs
scripting
In Unity's 'Managed memory introduction', what is 'Automatic memory management' and how does it work?
Unity’s managed memory system uses a garbage collector and a managed heap to automatically free memory allocations when your scripts no longer hold any references to those allocations. This helps protect against memory leaks, which happen when allocated memory is never freed because the reference required to free it ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_147a8d14e9b9
unity_docs
math
What is `Display.Activate` in Unity? Explain its purpose and usage.
Display.Activate Declaration public void Activate (); Description Activates an external display. For example, a secondary monitor connected to the system. Creates a window with screen width and screen height, and with the default refresh rate. Displays have the following indices in the Display.displays array:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c0773990f76
unity_docs
physics
What is `ContactPoint` in Unity? Explain its purpose and usage.
ContactPoint struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Describes a contact point where the collision occurs. Contact points are stored in Collision structure. Additional resources: Collision , Collider.OnCollisionEnter , Collider.OnCollisionStay , Collider.OnCollisionEx...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4077aff2e74
unity_docs
editor
What is `PluginImporter.SetExcludeFromAnyPlatform` in Unity? Explain its purpose and usage.
PluginImporter.SetExcludeFromAnyPlatform Declaration public void SetExcludeFromAnyPlatform (string platformName , bool excludedFromAny ); Declaration public void SetExcludeFromAnyPlatform ( BuildTarget platform , bool excludedFromAny ); Parameters Parameter Description platformName Target platform. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06c4ca8723a0
unity_docs
rendering
What is `Rendering.CommandBuffer.SetRenderTarget` in Unity? Explain its purpose and usage.
CommandBuffer.SetRenderTarget Declaration public void SetRenderTarget ( Rendering.RenderTargetIdentifier rt ); Declaration public void SetRenderTarget ( Rendering.RenderTargetIdentifier rt , Rendering.RenderBufferLoadAction loadAction , Rendering.RenderBufferStoreAction storeAction ); Declaration pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecc6b20b14e0
unity_docs
networking
What is `XR.XRMirrorViewBlitMode.MotionVectors` in Unity? Explain its purpose and usage.
XRMirrorViewBlitMode.MotionVectors public static int MotionVectors ; Description Mirror view pass should blit left eye image and right eye image in a side-by-side fashion to the mirror target, displaying motion vectors.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cde92c1389c
unity_docs
math
What is `Quaternion.ToString` in Unity? Explain its purpose and usage.
Quaternion.ToString Declaration public string ToString (); Declaration public string ToString (string format ); Declaration public string ToString (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that spe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ea8fc5039ca
unity_docs
rendering
In Unity's 'Stencil command in ShaderLab reference', what is 'Syntax' and how does it work?
Signature Example syntax Function Stencil { Ref <ref> ReadMask <readMask> WriteMask <writeMask> Comp <comparisonOperation> Pass <passOperation> Fail <failOperation> ZFail <zFailOperation> CompBack <comparisonOperationBack> PassBack <passOperationBack> FailBack <failOperationBack> ZFailBack <zFailOperationBack> CompFron...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2da98353314e
unity_docs
physics
What is `PhysicsMaterialCombine2D.Multiply` in Unity? Explain its purpose and usage.
PhysicsMaterialCombine2D.Multiply Description Uses a Multiply algorithm when combining friction or bounciness i.e. the product of the two values is used. Given two friction or bounciness values, the Multiply algorithm used is: valueA * valueB .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c37613eb8324
unity_docs
scripting
What is `UIElements.IPointerEvent.altitudeAngle` in Unity? Explain its purpose and usage.
IPointerEvent.altitudeAngle public float altitudeAngle ; Description Gets the angle of the stylus relative to the surface, in radians A value of 0 indicates that the stylus is parallel to the surface. A value of pi/2 indicates that it is perpendicular to the surface.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f4fc2f9e202
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCpy` in Unity? Explain its purpose and usage.
UnsafeUtility.MemCpy Declaration public static void MemCpy (void* destination , void* source , long size ); Parameters Parameter Description destination A pointer to the destination memory block. Ensure this block is large enough to store the data being copied. source A pointer to the source memory block...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e44bb48ea696
unity_docs
scripting
In Unity's 'Cameras overlay', what is 'Edit Camera component settings' and how does it work?
In the Cameras overlay, select Open camera properties to configure the component settings of the camera selected in the Cameras overlay dropdown list. To learn more about camera component parameters, refer to Camera component and Setting Cinemachine Camera properties .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.