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_055ba8117215
unity_docs
rendering
In Unity's 'Troubleshooting Light Probes', what is 'Ringing' and how does it work?
Under certain circumstances, Light Probes exhibit an unwanted behaviour called “ringing”. This often happens when there are significant differences in the light surrounding a Light Probe . For example, if you have bright light on one side of a Light Probe, and no light on the other side, the light intensity can “oversh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f12b10ab07f1
unity_docs
physics
What is `ArticulationJacobian.columns` in Unity? Explain its purpose and usage.
ArticulationJacobian.columns public int columns ; Description Number of columns of the matrix is equal to the total number of all joint degrees of freedom(DOF), plus 6 if ArticulationBody.immovable is false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a91e9f503478
unity_docs
rendering
What is `RenderPickingArgs.pickingIndex` in Unity? Explain its purpose and usage.
RenderPickingArgs.pickingIndex public int pickingIndex ; Description Specifies the picking index value that the first pickable object uses to write to the picking render texture. The picking index must be encoded to a Vector4 selectionId value that uses HandleUtility.EncodeSelectionId , and output from the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f7acab578261
unity_docs
scripting
Show me a Unity code example for 'Create a binding with the Inspector'.
xample creates in this GitHub repository . ## Define the custom Inspector component Define a custom Inspector UI class called TankScript , style it with USS, and set the visual elements and the binding path in UXML. In your Project window , create a folder named create-a-binding-inspector to store all your files. Cre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce7c1ebfc8c6
unity_docs
editor
What is `Callbacks.RunAfterClassAttribute` in Unity? Explain its purpose and usage.
RunAfterClassAttribute class in UnityEditor.Callbacks Description Add this attribute to a callback method to mark that this callback must be run after any callbacks that are part of the specified class. To define dependencies for a callback, use the following attributes: RunAfterClassAttribute , RunBeforeClassA...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f9f05b035a7
unity_docs
scripting
Explain 'Troubleshooting on iOS devices' in Unity.
Use the following information to help find solutions to common crashes and other problems when running your Unity application on iOS devices. Note : If your issue persists after troubleshooting, refer to Report crash bugs for iOS . Application stops responding and Xcode displays interrupted in the status bar Xcode cons...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65b13f0ba8be
unity_docs
rendering
What is `ReflectionProbe.BlendCubemap` in Unity? Explain its purpose and usage.
ReflectionProbe.BlendCubemap Declaration public static bool BlendCubemap ( Texture src , Texture dst , float blend , RenderTexture target ); Parameters Parameter Description src Cubemap to blend from. dst Cubemap to blend to. blend Blend weight. target RenderTexture which will hold the result ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64e7072e33cc
unity_docs
performance
What are the parameters of `Profiling.Profiler.BeginThreadProfiling` in Unity?
Description Enables profiling on the thread from which you call this method. Makes the thread show up with its registered name in the Profiler Timeline View, showing the duration of each sample on the thread. Samples which cross frame boundaries are sliced and might contribute time to multiple frames. Note: Calling thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_872b9056ea6a
unity_docs
physics
Explain 'Advanced Text Generator' in Unity.
Advanced Text Generator is a text rendering module that employs Harfbuzz , ICU , and FreeType to deliver comprehensive Unicode support and text shaping capabilities. With Advanced Text Generator, you can use a wide array of languages and scripts , such as right-to-left (RTL) languages like Arabic and Hebrew. ## Enable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f15300306e14
github
scripting
Write a Unity C# XR/VR script for Exception Render Script
```csharp // Copyright 2020 The Tilt Brush Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f55186f72d15
unity_docs
physics
What is `JointBreakAction2D.Ignore` in Unity? Explain its purpose and usage.
JointBreakAction2D.Ignore Description When the Joint2D breaks, no action will be taken and Joint2D.OnJointBreak2D will not be called. This option effectively disables any joint breaking and will ignore any Joint2D.breakForce or Joint2D.breakTorque .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55fcd37c2a57
unity_docs
performance
What is `Mesh.MeshData.GetIndices` in Unity? Explain its purpose and usage.
Mesh.MeshData.GetIndices Declaration public void GetIndices (NativeArray<ushort> outIndices , int submesh , bool applyBaseVertex = true); Declaration public void GetIndices (NativeArray<int> outIndices , int submesh , bool applyBaseVertex = true); Parameters Parameter Description outIndices The d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_847959da4028
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.imagePosition`.
GUIStyle.imagePosition public ImagePosition imagePosition ; Description How image and text of the GUIContent is combined. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Prints how image and text is placed. void OnGUI() { Debug.Log(GUI.skin.button.imagePosition); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea7563dbe031
unity_docs
editor
What are the parameters of `Android.IPostGenerateGradleAndroidProject.OnPostGenerateGradleAndroidProject` in Unity?
Description Implement this function to receive a callback after the Android Gradle project is generated and before the build process begins. Use this function to modify the generated Gradle files before the build process begins. Note : To compile the script for this function as an Editor script and prevent any compilat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78a356eb3a93
unity_docs
editor
What are the parameters of `Profiling.HierarchyFrameDataView.GetItemMergedSamplesMetadataCount` in Unity?
Returns int Returns metadata count. Description Returns metadata count associated with hierarchy item. ```csharp using System.Text; using UnityEditor.Profiling;public class Example { public static string GetFormattedMetadata(HierarchyFrameDataView frameDataView, int itemId, int mergedSampleIndex) { int ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c341f28c5ce1
unity_docs
editor
What is `EditorUserBuildSettings.windowsDevicePortalAddress` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.windowsDevicePortalAddress public static string windowsDevicePortalAddress ; Description Specifies the Windows DevicePortal connection address of the device to deploy and launch the UWP app on when using Build and Run. The WDP connection address typically can be found next to the DeviceP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_aac12b3c87d3
github
scripting
Write a Unity C# script called Teleport Area With Fade
```csharp using System.Collections; using UnityEngine.Events; using UnityEngine.XR.Interaction.Toolkit; public class TeleportAreaWithFade : TeleportationArea { private FadeCanvas fadeCanvas = null; protected override void Awake() { base.Awake(); fadeCanvas = FindObjectOfType<FadeCanvas>()...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_02cd0850d68c
unity_docs
scripting
Explain 'Content Size Fitter' in Unity.
## Properties Property: Function: Horizontal Fit How the width is controlled. Unconstrained Do not drive the width based on the layout element. Min Size Drive the width based on the minimum width of the layout element. Preferred Size Drive the width based on the preferred width of the layout element. Vertical Fit How ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00ecb25e5d7f
unity_docs
physics
Give me an overview of the `RaycastHit2D` class in Unity.
RaycastHit2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Returns information about 2D Colliders detected by a 2D physics query in the scene. The RaycastHit2D struct is used to return results from many 2D physics queries. It contains many pieces of information about a detectio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96dae00e6ffe
unity_docs
rendering
Show me a Unity C# example demonstrating `Display`.
Linux QNX Some features in the Display class only work on some of the supported platforms. For more information about platform compatibility, refer to the individual properties and methods. Use the Display class to operate on the displays and Camera.targetDisplay to set up cameras for rendering to individual di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca0969f07cb2
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchMonitor.GetView`.
in PropertyDatabases . Multiple nested calls to GetView are supported. If those calls are on the same thread, it will return the same instance to avoid opening and closing new views. If the calls are on different threads, new views will be opened. Here is an example of a custom Scene SearchProvider using GetView...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d05367e6967
unity_docs
rendering
Give me an overview of the `SparseTexture` class in Unity.
SparseTexture class in UnityEngine / Inherits from: Texture / Implemented in: UnityEngine.CoreModule Description Class for handling Sparse Textures. Sparse textures are textures where not the whole texture data can be present in memory at once. They are also commonly called "tiled textures" or "mega textures"...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3df4a5636e32
unity_docs
editor
In Unity's 'File Access Profiler module reference', what is 'Chart categories' and how does it work?
The upper half of the Profiler window displays a File Access chart with the following categories: Chart Description Files Opened The total number of files successfully opened in the local file system this frame. Files Closed The total number of files successfully closed in the local file system this frame. File Seeks T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef5feadfaa7c
unity_docs
ui
Show me a Unity C# example demonstrating `Overlays.DockPosition`.
DockPosition enumeration Description DockPosition describes the alignment of an Overlay within a DockZone . Use DockPosition in an OverlayAttribute to set the default location for an Overlay. ```csharp using UnityEditor; using UnityEditor.Overlays; using UnityEngine; using UnityEngine.UIElements;// Use Ove...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d810bcd236a1
unity_docs
editor
What are the parameters of `EditorGUILayout.Vector3Field` in Unity?
Returns Vector3 The value entered by the user. Description Make an X, Y & Z field for entering a Vector3 . Measure the distance between 2 GameObjects or 2 positions in 3D space. ```csharp using UnityEditor; using UnityEngine;public class EditorGUILayoutVector3Field : UnityEditor.EditorWindow { float distance = 0f; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82c30f82981a
unity_docs
editor
In Unity's 'The Simulator view', what is 'Control Panel' and how does it work?
To open the Control Panel, click Control Panel in the top-right corner of the Toolbar . By default, the Control Panel contains settings for the Application simulated class . Property Description System Language Specifies the value to receive from Device.Application.systemLanguage . Internet Reachability Specifies the v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_617f85eaca49
unity_docs
rendering
What is `RenderTextureCreationFlags.EnableRandomWrite` in Unity? Explain its purpose and usage.
RenderTextureCreationFlags.EnableRandomWrite Description Set this flag to enable random access writes to the RenderTexture from shaders. Normally, pixel shaders only operate on pixels they are given. Compute shaders cannot write to textures without this flag. Random write enables shaders to write to arbitrary locati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e612548ded6
unity_docs
scripting
What is `DragAndDrop.PrepareStartDrag` in Unity? Explain its purpose and usage.
DragAndDrop.PrepareStartDrag Declaration public static void PrepareStartDrag (); Description Clears drag & drop data. Clears everything stored in the drag & drop object and prepares it so you can write into it for initiating a drag operation. Additional resources: StartDrag , paths , objectReferences . ```c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e4fefb83935
unity_docs
editor
What is `Overlays.ICreateToolbar` in Unity? Explain its purpose and usage.
ICreateToolbar interface in UnityEditor.Overlays Description Implement ICreateToolbar to draw Overlay content in horizontal and vertical toolbars from a set of EditorToolbarElementAttribute . Properties Property Description toolbarElements List of toolbarElements IDs to show when the Overlay is in a toolbar l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7b2e238efa9
unity_docs
scripting
What is `LogType` in Unity? Explain its purpose and usage.
LogType enumeration Description The type of the log message in Debug.unityLogger.Log or delegate registered with Application.RegisterLogCallback. Additional resources: Logger , ILogger , Debug.unityLogger , Application.RegisterLogCallback. Properties Property Description Error LogType used for Errors. Ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ae2b26a3226
unity_docs
ui
Show me a Unity C# example demonstrating `EditorTools.ToolAttribute.variantGroup`.
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_674d6e0acdad
unity_docs
input
What is `HDROutputSettings.maxToneMapLuminance` in Unity? Explain its purpose and usage.
HDROutputSettings.maxToneMapLuminance public int maxToneMapLuminance ; Description Maximum input luminance at which gradation is preserved when 10% of the screen is bright. Measured in nits. This value is -1 if Unity cannot obtain a value from the HDR display. Accessing this member results in an exception if HD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92cd4838b35d
unity_docs
scripting
What is `BuildCompression.LZ4` in Unity? Explain its purpose and usage.
BuildCompression.LZ4 public static BuildCompression LZ4 ; Description LZ4HC "Chunk Based" Compression. LZ4HC (LZ4 High Compression) compression results in smaller compressed file sizes than LZ4 and larger compressed file sizes than LZMA, but does not require the entire bundle to be decompressed before use lik...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b213b8a82247
unity_docs
animation
In Unity's 'Avatar Mask window reference', what is 'Humanoid body selection' and how does it work?
If your animation uses a Humanoid Avatar , you can select or deselect portions of the simplified humanoid body diagram to indicate where to mask the animation: The body diagram groups body parts into these portions: Head Left Arm Right Arm Left Hand Right Hand Left Leg Right Leg Root (denoted by the “shadow” under the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc477ad08a9c
unity_docs
rendering
What is `Light.cookie` in Unity? Explain its purpose and usage.
Light.cookie public Texture cookie ; Description The cookie texture projected by the light. Point lights require a cube map texture. If the cookie is a cube map, the light will become a Point light. Note that cookies are displayed for pixel ("important") and baked/mixed lights, but not for vertex/SH ("n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b87067b12a8
unity_docs
scripting
What is `Rendering.ReflectionProbeClearFlags` in Unity? Explain its purpose and usage.
ReflectionProbeClearFlags enumeration Description Values for ReflectionProbe.clearFlags, determining what to clear when rendering a ReflectionProbe . Additional resources: reflection probe component . Properties Property Description Skybox Clear with the skybox. SolidColor Clear with a background color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7007f48d9ce
unity_docs
physics
What is `Texture.streamingTextureDiscardUnusedMips` in Unity? Explain its purpose and usage.
Texture.streamingTextureDiscardUnusedMips public static bool streamingTextureDiscardUnusedMips ; Description This property forces the streaming Texture system to discard all unused mipmaps instead of caching them until the Texture memory budget is exceeded. This is useful when you profile or write tests to kee...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b900a52a0a8
unity_docs
rendering
Show me a Unity C# example demonstrating `TextureFormat`.
TextureFormat enumeration Description Format used when creating textures from scripts. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Create a new alpha-only texture and assign it // to the renderer's material Texture2D texture = new Texture2D(128, 128, TextureFormat.Alph...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f385e10d11f5
unity_docs
scripting
In Unity's 'Script Execution Order reference', what is 'Configuring execution order' and how does it work?
To configure script execution order, go to: Edit > Project Settings , and then select the Script Execution Order category. Use the plus (+) button to add scripts to the list. Use the minus (-) button on a list item to remove it from the list. To specify the execution order, drag items in the list into the desired posit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_19f5c2849fb0
unity_docs
rendering
Explain 'Single color shader example in the Built-In Render Pipeline' in Unity.
``` Shader "Unlit/SingleColor" { Properties { // Color property for material inspector, default to white _Color ("Main Color", Color) = (1,1,1,1) } SubShader { Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" // vertex shader // this time instead of using "appdata" ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68e86f57c8c3
unity_docs
physics
Show me a Unity C# example demonstrating `RaycastCommand`.
e hits per Mesh. You should adjust maxHits and result array size accordingly to store all hits. For solid objects (Sphere, Capsule, Box, Convex), this returns a maximum of one result. Use QueryParameters to control hit flags. Note: Only BatchQuery.ExecuteRaycastJob is logged into the profiler. Query count information...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ee360cbd06d
unity_docs
physics
What is `SimulationOption` in Unity? Explain its purpose and usage.
SimulationOption enumeration Description An enumerator that specifies physics simulation options. Properties Property Description None Shorthand for no SimulationOption flags. SyncTransforms Define whether or not to sync modified Transform poses to the physics system. IgnoreEmptyScenes Define whether or not t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85f5fe4a3b27
unity_docs
physics
What is `Physics.Raycast` in Unity? Explain its purpose and usage.
Physics.Raycast Declaration public static bool Raycast ( Vector3 origin , Vector3 direction , float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters Parameter Description origin The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a465090e69aa
unity_docs
scripting
Explain 'Particle collisions' in Unity.
The Collisions module controls how particles collide with GameObjects in the Scene . When other objects surround a Particle System , the effect is often more convincing when the particles interact with those objects. For example, water or debris should be obstructed by a solid wall rather than simply passing through it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60c8bec6be89
unity_docs
physics
Give me an overview of the `ParticleSystemSubEmitterType` class in Unity.
ParticleSystemSubEmitterType enumeration Description The events that cause new particles to be spawned. Properties Property Description Birth Spawns new particles when particles from the parent system are born. Collision Spawns new particles when particles from the parent system collide with something. Death ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c5c4f3b1f99
unity_docs
editor
What is `Compilation.ScriptCompilerOptions.AnalyzerConfigPath` in Unity? Explain its purpose and usage.
ScriptCompilerOptions.AnalyzerConfigPath public string AnalyzerConfigPath ; Description Stores the path to the Roslyn global config file. You can define a project-wide analyzer configuration in a file with the .globalconfig file extension. Use key-value pairs to configure the default behavior of all files in yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc60e61f75ec
unity_docs
editor
Show me a Unity C# example demonstrating `MeshUtility.SetMeshCompression`.
compression ); Parameters Parameter Description mesh The mesh to set the compression mode for. compression The compression mode to set. Description Change the mesh compression setting for a mesh. This allows you to enable mesh compression for meshes created from scripting, which have not been generated by t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc1e9300ec7e
unity_docs
input
What is `Subsystem` in Unity? Explain its purpose and usage.
Method group is Obsolete Subsystem class in UnityEngine / Implemented in: UnityEngine.SubsystemsModule Implements interfaces: ISubsystem Obsolete Use SubsystemWithProvider instead. Description A Subsystem is initialized from a SubsystemDescriptorWithProvider for a given Subsystem (Example, Input, Display,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fbed02d5b850
unity_docs
performance
What is `Jobs.TransformAccessArray.Allocate` in Unity? Explain its purpose and usage.
TransformAccessArray.Allocate Declaration public static void Allocate (int capacity , int desiredJobCount , out Jobs.TransformAccessArray array ); Parameters Parameter Description capacity Capacity. desiredJobCount Desired job count. array TransformAccessArray. Description Allocate.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ee8759bbb84
unity_docs
scripting
What is `Color.operator_multiply` in Unity? Explain its purpose and usage.
Color.operator * public static Color operator * ( Color a , Color b ); Description Multiplies two colors together. Each component is multiplied separately. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color grayColor = Color.gray * Color.white; } } ``` public sta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_739c7ca8867f
github
scripting
Write a Unity C# UI script for Installer
```csharp using System.IO; using UnityEngine; using UnityEngine.EventSystems; #if ENABLE_INPUT_SYSTEM using UnityEngine.InputSystem.UI; #endif using UnityEngine.SceneManagement; namespace DebugMenu { public class Installer : MonoBehaviour { private const string EnableFileName = ".enable_debug_menu"; ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_7c1f56e468b6
unity_docs
scripting
What is `Animations.AnimatorJobExtensions.AddJobDependency` in Unity? Explain its purpose and usage.
AnimatorJobExtensions.AddJobDependency Declaration public static void AddJobDependency ( Animator animator , Unity.Jobs.JobHandle jobHandle ); Parameters Parameter Description animator The Animator instance that calls this method. jobHandle The JobHandle of the job that needs to run before animator...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c998dde4f1e
unity_docs
scripting
Show me a Unity C# example demonstrating `Handles.SphereHandleCap`.
iption Draw a sphere handle. Pass this into handle functions. On EventType.Layout event, calculates handle distance to mouse and calls HandleUtility.AddControl accordingly. On EventType.Repaint event, draws the handle shape. Sphere Handle Cap in the Scene View. Add the following script to your Assets folder as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5c08c926170
unity_docs
scripting
What is `ParticleSystem.ExternalForcesModule.AddInfluence` in Unity? Explain its purpose and usage.
ParticleSystem.ExternalForcesModule.AddInfluence Declaration public void AddInfluence ( ParticleSystemForceField field ); Parameters Parameter Description field The Force Field to add to the influencers list. Description Adds a ParticleSystemForceField to the influencers list. When influenceFilter i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c854f72ef5ae
unity_docs
math
What is `UIElements.StyleScale.ctor` in Unity? Explain its purpose and usage.
StyleScale Constructor Declaration public StyleScale ( UIElements.Scale v ); Description Creates a new StyleScale from a Scale . Declaration public StyleScale ( UIElements.StyleKeyword keyword ); Description Creates a new StyleScale from a StyleKeyword . Declaration public StyleScale ( Vector...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa32d6c319fb
unity_docs
ui
In Unity's 'Apply masking effects in UI Toolkit', what is 'Masking with arbitrary shapes' and how does it work?
To make a masking effect with an arbitrary shape, set an SVG as the background image of the masking element as shown in the following example: For information on how to use an SVG image as a background image, refer to Set background images The UXML looks like this: ``` <UXML> <VisualElement name="MaskSVG" > <VisualEl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa6884533689
unity_docs
xr
What is `Highlighter.Highlight` in Unity? Explain its purpose and usage.
Highlighter.Highlight Declaration public static bool Highlight (string windowTitle , string text ); Declaration public static bool Highlight (string windowTitle , string text , HighlightSearchMode mode ); Parameters Parameter Description windowTitle The title of the window the element is inside. t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cabd016123f2
unity_docs
editor
What is `ScriptableWizard.errorString` in Unity? Explain its purpose and usage.
ScriptableWizard.errorString public string errorString ; Description Allows you to set the error text of the wizard. Additional resources: ScriptableWizard.OnWizardUpdate Error String on a ScriptableWizard window. ```csharp // Creates a simple Wizard window and prints an error // string until you set the num...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c18a1ceb7695
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.SizeBySpeedModule.sizeMultiplier`.
ParticleSystem.SizeBySpeedModule.sizeMultiplier public float sizeMultiplier ; Description A multiplier for ParticleSystem.SizeBySpeedModule.size . Changing this property is more efficient than accessing the entire curve, if you only want to change the overall size multiplier. ```csharp using UnityEngine; usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d67345a265c9
unity_docs
performance
What is `Profiling.IProfilerFrameTimeViewSampleSelectionController.selectionChanged` in Unity? Explain its purpose and usage.
IProfilerFrameTimeViewSampleSelectionController.selectionChanged Parameters Parameter Description value The first parameter contains the Profiler module the selection change occurred in, the second parameter is the new selection. Description Calls the methods in its invocation list when the selection in this P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c912187f1255
unity_docs
rendering
What is `MaterialPropertyBlock.SetInt` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.SetInt Declaration public void SetInt (int nameID , int value ); Declaration public void SetInt (string name , int value ); Parameters Parameter Description name The name of the property. nameID The name ID of the property retrieved by Shader.PropertyToID . value The int val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_379d73752587
unity_docs
scripting
What is `XR.XRMeshSubsystem` in Unity? Explain its purpose and usage.
XRMeshSubsystem class in UnityEngine.XR / Inherits from: IntegratedSubsystem / Implemented in: UnityEngine.XRModule Description Allows external systems to provide dynamic meshes to Unity. The XRMeshSubsystem enables external systems to provide dynamic meshes to Unity. The meshes are processed on background t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b7bb739031a
unity_docs
rendering
What is `UIElements.PanelRenderMode.WorldSpace` in Unity? Explain its purpose and usage.
PanelRenderMode.WorldSpace Description Renders the panel as an object within the 3D world. The panel is rendered by one or more cameras at a specified world-space position and can be occluded by other objects in the scene. This mode is suitable for in-world UI such as interactive screens, billboards, or diege...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8f6e26b866c
unity_docs
rendering
What is `GUI.RepeatButton` in Unity? Explain its purpose and usage.
GUI.RepeatButton Declaration public static bool RepeatButton ( Rect position , string text ); Declaration public static bool RepeatButton ( Rect position , Texture image ); Declaration public static bool RepeatButton ( Rect position , GUIContent content ); Declaration public static bool Repe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ee56972b8dc
unity_docs
scripting
What is `Quaternion.Angle` in Unity? Explain its purpose and usage.
Quaternion.Angle Declaration public static float Angle ( Quaternion a , Quaternion b ); Description Returns the angle in degrees between two rotations a and b . The resulting angle ranges from 0 to 180. Example: Think of two GameObjects (A and B) moving around a third GameObject (C). Lines from C to A ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5349188d572a
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startSpeedMultiplier`.
ParticleSystem.MainModule.startSpeedMultiplier public float startSpeedMultiplier ; Description A multiplier for ParticleSystem.MainModule.startSpeed . Changing this property is more efficient than accessing the entire curve, if you only want to change the overall speed multiplier. ```csharp using UnityEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fcc735ce97f
unity_docs
rendering
What is `LightTransport.RadeonRaysProbeIntegrator.IntegrateOcclusion` in Unity? Explain its purpose and usage.
RadeonRaysProbeIntegrator.IntegrateOcclusion Declaration public LightTransport.IProbeIntegrator.Result IntegrateOcclusion ( LightTransport.IDeviceContext context , int positionOffset , int positionCount , int sampleCount , int maxLightsPerProbe , BufferSlice<int> perProbeLightIndices , BufferSlice<float> p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e18c8a6a6eca
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.IntField`.
UIStyle style = EditorStyles.numberField); Parameters Parameter Description position Rectangle on the screen to use for the int field. label Optional label to display in front of the int field. value The value to edit. style Optional GUIStyle . Returns int The value entered by the user. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
These are parameters required during initialization and construction of the map.They are only used for startup. Please use the [API endpoints]({{ site.baseurl }}/docs/api) to interact with the map. Signature: ```csharp public struct ConfigParams ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_a9c05feed228
unity_docs
xr
In Unity's 'Store credentials for automatic proxy configuration (macOS)', what is 'Alternatives for other platforms and environments' and how does it work?
Unity’s automatic proxy configuration feature doesn’t fully support some platforms and environments. Some examples are: Linux, which isn’t supported by Unity’s automatic proxy configuration feature. A continuous integration (CI) or continuous delivery (CD) environment, where a pipeline (rather than a user) interacts wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c5613148b81e
unity_docs
physics
In Unity's 'Use components', what is 'Add components' and how does it work?
You can add components to the selected GameObject through the Component menu. To add a Rigidbody component, select the GameObject and select Component > Physics > Rigidbody from the menu. The Inspector displays the Rigidbody’s properties. If you press Play while you have the empty GameObject selected, the Y position of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_694cc3d21e9c
github
scripting
Write a Unity C# script called Game Event
```csharp using Hudossay.AttributeEvents.Assets.Runtime.EventLinks; using System.Collections.Generic; using UnityEngine; namespace Hudossay.AttributeEvents.Assets.Runtime.GameEvents { public class GameEvent<T1> : GameEventBase { public List<EventLink<T1>> Links = new List<EventLink<T1>>(); pu...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_f21988dfcb19
unity_docs
editor
What is `EditorApplication.RepaintHierarchyWindow` in Unity? Explain its purpose and usage.
EditorApplication.RepaintHierarchyWindow Declaration public static void RepaintHierarchyWindow (); Description Can be used to ensure repaint of the HierarchyWindow. Additional resources: HierarchyWindowItemCallback , EditorApplication.hierarchyWindowItemOnGUI .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa17bc76d33d
unity_docs
ui
What is `Experimental.GraphView.GraphElement.IsSelected` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.IsSelected Declaration public bool IsSelected ( UIElements.VisualElement selectionContainer ); Parameters Parameter Description selectionContainer The container. Returns bool Returns true if the GraphEle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12d5a1911397
unity_docs
scripting
What is `UIElements.TimeValue.ctor` in Unity? Explain its purpose and usage.
TimeValue Constructor Declaration public TimeValue (float value ); Description Creates from a float and an optional TimeUnit . TimeUnit.Second is the default unit. Declaration public TimeValue (float value , UIElements.TimeUnit unit ); Description Creates from a float and an optional TimeUni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fe43c3f9840
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyFlattenedNodeChildren` in Unity? Explain its purpose and usage.
HierarchyFlattenedNodeChildren struct in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Description Represents an enumerable over the children of an HierarchyNode . Properties Property Description Count Gets the number of children. this[int] Gets the child at the specified index...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ecf4c0cb8b5
unity_docs
xr
What is `XR.InputDeviceCharacteristics` in Unity? Explain its purpose and usage.
InputDeviceCharacteristics enumeration Description A set of bit flags describing InputDevice characteristics. The XR system combines the InputDeviceFlags members into the InputDevice.characteristics bitmask to describe the characteristics and capabilities of an input device. You can also pass a bitwise combi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bca558e3514f
unity_docs
editor
Show me a Unity code example for 'Enable automatic proxy configuration'.
the client computer, and create it if it’s missing: Windows: C:\ProgramData\Unity\config macOS: /Library/Application\ Support/Unity/config Check if the directory in the previous step has a services-config.json file, and create it if it’s missing. Add the "enableProxyAutoconfig" key to the file and assign a value of tru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_924e0600a8ce
github
scripting
Write a Unity C# XR/VR script for Set Physics Step By Headset Refresh Rate
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR; public class SetPhysicsStepByHeadsetRefreshRate : MonoBehaviour { void OnEnable() { XRDevice.deviceLoaded += OnDeviceLoaded; } void OnDisable() { XRDevice.deviceLoaded +...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_369606bc91cf
unity_docs
rendering
Explain 'ChoosingYourParticleSystem' in Unity.
## Choosing your particle system solution To provide flexibility when you author a particle system, Unity offers two solutions to choose from. If your Project targets platforms that support Compute Shaders , Unity allows you to use both at the same time. The two particle system solutions are: The Built-in Particle Sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82325b973306
unity_docs
animation
What is `Animations.AnimationHumanStream.GetHintPosition` in Unity? Explain its purpose and usage.
AnimationHumanStream.GetHintPosition Declaration public Vector3 GetHintPosition ( AvatarIKHint index ); Parameters Parameter Description index The AvatarIKHint that is queried. Returns Vector3 The position of this IK Hint. Description Returns the position of this IK Hint in world space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37b35b45250e
unity_docs
ui
What is `UIElements.CollectionViewController` in Unity? Explain its purpose and usage.
CollectionViewController class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Base collection view controller. View controllers are meant to take care of data virtualized by any BaseVerticalCollectionView inheritor. Properties Property Description itemsSource The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_302f747bab3d
unity_docs
xr
In Unity's 'Purchase or download an Asset Store package', what is 'Buy a paid Asset Store package' and how does it work?
To buy an Asset Store package: From the package’s main information page, select Buy Now , or select the Add to Cart icon. A message confirms that the package is in your shopping cart. When you’re ready to pay for your item(s), select Proceed to Checkout , or access your cart and select Checkout . The Checkout page appe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f5838e594be5
github
scripting
Write a Unity Editor script for Unity Open XR Feature
```csharp /* * Copyright (c) 2019-2024, Lenovo. * MIT license. * Author: Wentao Sun */ using System.Collections.Generic; using UnityEngine.XR.OpenXR; using UnityEngine.XR.OpenXR.Features; using Object = System.Object; using UnityEngine.XR.OpenXR.Features.Interactions; using System; using UnityEngine; using System...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_fc5f40fb2902
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.dragHoverMarkerUssClassName` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.dragHoverMarkerUssClassName public static string dragHoverMarkerUssClassName ; Description The USS class name of the drag hover circular marker used to indicate depth. Unity adds this USS class to the bar that appears when the user drags an item in the list. Any styling applied to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_979597b55d84
unity_docs
scripting
What is `VideoClipImporter.keepAlpha` in Unity? Explain its purpose and usage.
VideoClipImporter.keepAlpha public bool keepAlpha ; Description Whether to keep the alpha from the source into the transcoded clip. When set to true and source has no alpha, the resulting clip will have an opaque alpha stored.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa516eb43a25
unity_docs
math
What is `Gizmos.DrawLineList` in Unity? Explain its purpose and usage.
Gizmos.DrawLineList Declaration public static void DrawLineList (ReadOnlySpan<Vector3> points ); Parameters Parameter Description points Pairs of points to use as the beginning and end of each line to draw. Unity throws an exception if points contains an odd number of elements. Description Draws multiple...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a00be16793a6
unity_docs
scripting
What is `Experimental.GraphView.GraphView.supportsWindowedBlackboard` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.supportsWindowedBlackboard public bool supportsWindowedBlackboard ; Description Set to true when this GraphView supports windowed Blackboards. Set to false otherwise.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dabbd5da32f5
unity_docs
rendering
Explain 'Playing video in Movie Textures' in Unity.
Resources for importing a video file into Unity as an animated texture, and playing it back. Note: MovieTexture is due to be deprecated in a future version of Unity. You should use VideoPlayer for video download and movie playback. Page Description Create a movie texture Convert a video file to a Movie Texture asset, a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_461a95289f0a
unity_docs
xr
Show me a Unity code example for 'Submit a license request from a command line and browser (Windows)'.
d Prompt as an administrator. If you lack administrator privilege, make sure you run this procedure’s command from within your user profile folder. Make sure you’re aware which directory you’re in. The directory you run the command from is the same directory where the.alf file is output. Enter the following command, re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b64ec26b5b38
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Profiler.EmitSessionMetaData`.
. data Binary data. Description Write metadata associated with the whole Profiler session capture. Use EmitSessionMetaData to write arbitrary binary data that should be available for all frames of this session. Data must contain only blittable types. If the information you want to store in the Profiler meta data...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a7d76bd017a
unity_docs
scripting
What is `Search.SearchExpression.GetBooleanValue` in Unity? Explain its purpose and usage.
SearchExpression.GetBooleanValue Declaration public bool GetBooleanValue (bool defaultValue ); Parameters Parameter Description defaultValue Initial value if we cannot convert the innerText. Returns bool Returns the boolean representation of the expression. Description Try to parse the innerText and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38eed3048d78
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.operator_Object`.
Object.bool Description Does the object exist? The three examples below give the same result. ```csharp using UnityEngine;public class Example : MonoBehaviour { // check if there is a rigidbody attached to this transform void Start() { if (GetComponent<Rigidbody>() == true) { Debug.Log("Rigidbody attached t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cf1502ebdcb
unity_docs
scripting
What is `UIElements.ICustomStyle` in Unity? Explain its purpose and usage.
ICustomStyle interface in UnityEngine.UIElements Description This interface exposes methods to read custom style properties applied from USS files to visual elements. Public Methods Method Description TryGetValue Gets the value associated with the specified CustomStyleProperty_1.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b78e33fbdbf0
unity_docs
editor
In Unity's 'Remote Config', what is 'Keywords' and how does it work?
remote , config , configuration , settings , remote settings , remote config , firebase , staged rollouts , feature flagging , roll-out , adapt , tune , tailor , test , experiment , experimentation , app update , target , targeting , segment , segmentation , segmenting , override , rules , variants , variation , parame...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca260b4e9506
unity_docs
physics
What is `AsyncInstantiateOperation.IsWaitingForSceneActivation` in Unity? Explain its purpose and usage.
AsyncInstantiateOperation.IsWaitingForSceneActivation Declaration public bool IsWaitingForSceneActivation (); Returns bool True if the operation is waits for user to allow the scene activation. Description This property can be true only if allowSceneActivation is set to false, and if the operation has alre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_731360b514ad
unity_docs
rendering
Show me a Unity code example for 'Set shader variables with material property values'.
## Using material properties to set variables in ShaderLab code To set the value of a variable in your ShaderLab code from a material property, put the material property name in square brackets in your ShaderLab code. This example code demonstrates the syntax for using a material property to set the units value of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52c8d990f722
unity_docs
rendering
What is `Lightmapping.BakeReflectionProbe` in Unity? Explain its purpose and usage.
Lightmapping.BakeReflectionProbe Declaration public static bool BakeReflectionProbe ( ReflectionProbe probe , string path ); Parameters Parameter Description probe Target probe. path The location where cubemap will be saved. Returns bool Returns true if baking was succesful. Description Starts a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f7578a9d273
unity_docs
scripting
Give me an overview of the `IntegrityCheckLevel` class in Unity.
IntegrityCheckLevel enumeration Description Enumeration specifying a integrity check level. Additional resources: Debug.CheckIntegrity Properties Property Description Low Fast checks. Medium Moderate checks. High Thorough but slow checks.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Event emitted when the locale changes.The parameters are: locale_idx, locale_name, locale_code Signature: ```csharp public UnityEvent<int, string, string> OnLocaleChanged; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.