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
gh_6910d9d9a9ea_doc_3
github
scripting
What does `OnCollisionExit2DAsObservable` do in this Unity script? Explain its purpose and signature.
Sent when a collider on another object stops touching this object's collider (2D physics only). Signature: ```csharp public static IObservable<Collision2D> OnCollisionExit2DAsObservable(this Component component) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_142bd676ecae_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Object list with sorted addition, for O(log N) removal Signature: ```csharp public class SortedObjectList<T> : IComparer<T>, IReadOnlyCollection<T> where T : Object ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_a04e5d544787
github
scripting
Write a Unity C# MonoBehaviour script called Timed Object Destroy
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class TimedObjectDestroy : MonoBehaviour { //Input field for how long you want this object to last. [SerializeField] [Tooltip("Set the time counter for how long you want this object to last (seconds).")] pub...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_fe37f74cb67f
unity_docs
math
What is `ModifiableContactPair.SetTargetVelocity` in Unity? Explain its purpose and usage.
ModifiableContactPair.SetTargetVelocity Declaration public void SetTargetVelocity (int i , Vector3 velocity ); Parameters Parameter Description i Index of the contact point. velocity The target velocity at a contact point. Description Set the target velocity the solver should aim reaching at a particu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_787f55ac65b8
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.ValidateNonDefaultHandle` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.ValidateNonDefaultHandle Declaration public static void ValidateNonDefaultHandle (ref Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle ); Parameters Parameter Description handle The AtomicSafetyHandle to check. Description Checks that the handle has been initialized, and if ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e02d4861dec
unity_docs
scripting
What is `Search.SearchUtils.GetTransformPath` in Unity? Explain its purpose and usage.
SearchUtils.GetTransformPath Declaration public static string GetTransformPath ( Transform tform ); Parameters Parameter Description tform Transform to extract name from. Returns string Returns a transform name using "/" as hierarchy separator. Description Format the pretty name of a Transform compo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c85f03cf3d80
unity_docs
editor
What is `PlayerSettings.SetEditorAssembliesCompatibilityLevel` in Unity? Explain its purpose and usage.
PlayerSettings.SetEditorAssembliesCompatibilityLevel Declaration public static void SetEditorAssembliesCompatibilityLevel ( EditorAssembliesCompatibilityLevel value ); Parameters Parameter Description value The EditorAssembliesCompatibilityLevel . Description Sets .NET API compatibility level for Editor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_241f240bc084
unity_docs
audio
In Unity's 'Audio Mixer', what is 'Properties' and how does it work?
Property: Function: S Button Soloing the group. M Button Muting the group. B Button Bypassing all the effects in the group. When you select Add you can select from a list of effects that can be applied to the group.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_035d70d8e1bd
unity_docs
xr
What is `XR.GameViewRenderMode` in Unity? Explain its purpose and usage.
GameViewRenderMode enumeration Description Enumeration of available modes for XR rendering in the Game view or in the main window on a host PC. XR rendering only occurs when the Unity Editor is in Play Mode. Properties Property Description None Disables rendering of any new frames from the eyes in the Game view...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b0d1617d589
unity_docs
rendering
Show me a Unity C# example demonstrating `LazyLoadReference_1`.
ts because they may not be imported and are not yet accessible. - For reducing the time it takes to open a scene by loading only the assets needed for the initial set up, or display, in Edit Mode. Notes: A lazy reference has a slight performance overhead compared to a direct reference. In a standalone player, all ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_488f7c364b90
unity_docs
editor
In Unity's 'Install the platform package for QNX', what is 'Installation' and how does it work?
To install the Unity Editor for QNX on your system, follow these steps: On the Unity QNX releases page , open QNX builds . Note: If you’re unable to access the QNX releases page, contact your Account Manager or the Unity Sales team. Select the folder for the specific Unity version you want to work with. Download the se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1971660b6a28
unity_docs
physics
What is `PhysicsScene.Raycast` in Unity? Explain its purpose and usage.
PhysicsScene.Raycast Declaration public bool Raycast ( Vector3 origin , Vector3 direction , float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters Parameter Description origi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f3a71b11525f
unity_docs
physics
Show me a Unity code example for 'Create a custom build script'.
sembly asset . ## Create a basic build script with menu item This example demonstrates a simple custom build script that builds a Windows player, copies a README file to the build folder, and automatically launches the built Player. It uses the MenuItem attribute to add a Build > Build Windows Player With Readme menu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21863837e1f0
unity_docs
scripting
What is `SpriteMeshType` in Unity? Explain its purpose and usage.
SpriteMeshType enumeration Description Defines the type of mesh generated for a sprite. Properties Property Description FullRect Rectangle mesh equal to the user specified sprite size. Tight Tight mesh based on pixel alpha values. As many excess pixels are cropped as possible.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9b3929255a19
unity_docs
rendering
Explain 'Universal Render Pipeline compatibility in XR' in Unity.
Support for XR features in the Universal Render Pipeline (URP) varies by URP package version. This page details compatibility between XR features in Unity 6 and the latest compatible URP version. To determine which version of URP is compatible with your current Unity version, refer to the Requirements and compatibility...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e6af83cd6df3
github
scripting
Write a Unity C# MonoBehaviour script called Coroutine Runner
```csharp using UnityEngine; using System.Collections; using System.Collections.Generic; namespace Core.Runtime.Coroutines { public static class CoroutineRunner { public enum IDs { Global = 0 } [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.B...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_70767284d394_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Service handles external data Signature: ```csharp public class CloudSaveService : BaseService // Extending 'base' is optional ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a294899c3ee4
unity_docs
editor
In Unity's 'Gradle templates', what is 'Gradle template files' and how does it work?
A Gradle template consists of the following files: File Location Contains baseProjectTemplate.gradle In the exported project, root/build.gradle folder Configuration information that affects all modules in the final Gradle project. It specifies which Android Gradle Plugin version to use and locations of java plugins. Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93c36cd531ac
unity_docs
math
What is `CullingGroupEvent.currentDistance` in Unity? Explain its purpose and usage.
CullingGroupEvent.currentDistance public int currentDistance ; Description The current distance band index of the sphere, after the most recent culling pass. Note that this value will range from 0 to the length of the distance array passed to CullingGroup.SetBoundingDistances inclusive , as each bounding dis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7939ce29efd
unity_docs
math
What are the parameters of `Mathf.SmoothDampAngle` in Unity?
Description Gradually changes an angle given in degrees towards a desired goal angle over time. This method smoothes the value with a spring-damper like algorithm that never overshoots the target value. This algorithm is based on Game Programming Gems 4, Chapter 1.10. Note: This method attempts to avoid overshooting th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3befc155a501
unity_docs
rendering
What is `TrueTypeFontImporter.GenerateEditableFont` in Unity? Explain its purpose and usage.
TrueTypeFontImporter.GenerateEditableFont Declaration public Font GenerateEditableFont (string path ); Description Create an editable copy of the font asset at path . Use this function if you want to modify the font generated by the TrueTypeFontImporter, with a custom texture or otherwise. It will create a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a593bcbf3334
unity_docs
scripting
Show me a Unity C# example demonstrating `Caching.GetAllCachePaths`.
Caching.GetAllCachePaths Declaration public static void GetAllCachePaths (List<string> cachePaths ); Parameters Parameter Description cachePaths List of all the cache paths. Description Returns all paths of the cache in the cache list. ```csharp using System.IO; using System.Collections.Generic; using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46c2a6a94bba
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.ForceOverLifetimeModule.x`.
ParticleSystem.ForceOverLifetimeModule.x public ParticleSystem.MinMaxCurve x ; Description The curve that defines particle forces in the x-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0a03d5d024b
unity_docs
scripting
What is `Search.SearchSettings.searchItemFavorites` in Unity? Explain its purpose and usage.
SearchSettings.searchItemFavorites public static HashSet<string> searchItemFavorites ; Description Returns a list of all item IDs that are marked as favorite by the user for in the current project.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c2257541336
unity_docs
rendering
What is `GL.MultiTexCoord` in Unity? Explain its purpose and usage.
GL.MultiTexCoord Declaration public static void MultiTexCoord (int unit , Vector3 v ); Description Sets current texture coordinate (v.x,v.y,v.z) to the actual texture unit . In OpenGL this matches glMultiTexCoord for the given texture unit if multi-texturing is available. On other graphics APIs the same ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c65ced1bf3f4
unity_docs
scripting
What is `UIElements.BaseField_1.label` in Unity? Explain its purpose and usage.
BaseField<T0>.label public string label ; Description The string representing the label that will appear beside the field. If the string is empty, the label element is removed from the hierarchy. If the string is not empty, the label element is added to the hierarchy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c2f2d73ff4e5
unity_docs
editor
Explain 'System Metrics Mali' in Unity.
com.unity.profiling.systemmetrics.mali ## Description The System Metrics package provides access to low-level system or hardware performance metrics on ARM Mali devices. It enables applications to make performance-relevant measurements in development and runtime using ProfilerRecorder API. By installing this package,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13ee2803f7bb
unity_docs
ui
What is `DetailScatterMode.CoverageMode` in Unity? Explain its purpose and usage.
DetailScatterMode.CoverageMode Description The detail map holds values that represent how much area to cover at each sample, based on the detail's density. When you use this mode, detail prototypes have a Density slider enabled. The detail map holds values between 0 and 255. The values represent how much area this...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_da201ccf55ba
unity_docs
ui
In Unity's 'Use Toggle to create a conditional UI', what is 'Create the example' and how does it work?
To create the example: Create a Unity project with any template. In the Project window , create a folder named Editor . In the Editor folder, create a C# script file named ToggleExample with the following content: ```csharp using UnityEngine; using UnityEditor; using UnityEngine.UIElements; namespace Samples.Editor.Con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f8285c058dbf
unity_docs
rendering
In Unity's 'Highlights Profiler module reference', what is 'Details pane' and how does it work?
When you select a frame in the Highlights chart, the module’s Details view displays more detailed information about the frame. The CPU Active Time and GPU Time are displayed as bar charts relative to the target frame time. To achieve your target frame rate, you must keep the CPU Active Time and the GPU Time below the t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9d419295479
unity_docs
scripting
What is `UIElements.MouseEnterEvent` in Unity? Explain its purpose and usage.
MouseEnterEvent class in UnityEngine.UIElements / Inherits from: UIElements.MouseEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent when the mouse pointer enters an element or one of its descendent elements. The event trickles down but does not bubble up. Constructors Const...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d67d013717e
unity_docs
math
What is `Rendering.CommandBuffer.SetComputeIntParam` in Unity? Explain its purpose and usage.
CommandBuffer.SetComputeIntParam Declaration public void SetComputeIntParam ( ComputeShader computeShader , string name , int val ); Declaration public void SetComputeIntParam ( ComputeShader computeShader , int nameID , int val ); Parameters Parameter Description computeShader ComputeShader to s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_96d2fb320b96
unity_docs
scripting
Explain 'TreeView' in Unity.
Use TreeView to display hierarchical data in a tree-like structure. It’s a powerful and flexible control that’s commonly used to present data with parent-child relationships or nested structures. If you need a simple list of items (not a hierarchical tree), consider using the ListView control. ## Create a TreeView Yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1de10c62892b
unity_docs
scripting
What is `Behaviour.enabled` in Unity? Explain its purpose and usage.
Behaviour.enabled public bool enabled ; Description Enabled Behaviours are Updated, disabled Behaviours are not. This is shown as the small checkbox in the inspector of the behaviour. ```csharp using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.public class Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7f013dcdb04
unity_docs
rendering
What are the parameters of `Material.SetPass` in Unity?
Returns bool If false is returned, no rendering should be done. Description Activate the given pass for rendering. Pass indices start from zero and go up to (but not including) passCount . This is mostly used in direct drawing code. For example, drawing 3D primitives with GL.Begin , GL.End , and also drawing meshes usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ccb4d3db400e
unity_docs
scripting
What is `QualitySettings.globalTextureMipmapLimit` in Unity? Explain its purpose and usage.
QualitySettings.globalTextureMipmapLimit public static int globalTextureMipmapLimit ; Description Indicates how many of the highest-resolution mips of each texture Unity does not upload at the given quality level. To set more specific mipmap limits, you can flag textures to ignore mipmap limits or assign them t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad16213c3cc9
unity_docs
physics
What is `JointBreakAction2D` in Unity? Explain its purpose and usage.
JointBreakAction2D enumeration Description Options for selecting which action to take when a Joint2D breaks. Additional resources: Joint2D.breakAction , Joint2D.breakForce or Joint2D.breakTorque . Properties Property Description Ignore When the Joint2D breaks, no action will be taken and Joint2D.OnJointB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b14e7932f8e6
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.LoadAllAssetsAtPath`.
hod returns the main Asset and all sub Assets at a given path, including those hidden in the Project view. Note : The main asset is not guaranteed to be at index 0 in the array Additional resources: AssetDatabase.LoadMainAssetAtPath , AssetDatabase.LoadAllAssetRepresentationsAtPath , AssetDatabase.AddObjectToAss...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4815badf43fb
unity_docs
scripting
What is `PlayModeWindow.GetViewType` in Unity? Explain its purpose and usage.
PlayModeWindow.GetViewType Declaration public static PlayModeWindow.PlayModeViewTypes GetViewType (); Returns PlayModeViewTypes The type of the PlayModeView. Description Gets the type of the selected PlayModeView window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1113854ed8de
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystemRenderer.flip`.
ParticleSystemRenderer.flip public Vector3 flip ; Description Flip a percentage of the particles, along each axis. Set between 0 and 1, where higher values cause a higher proportion of the particles to flip, and 1 causes all particles to flip. ```csharp using UnityEngine; using UnityEditor; using System.Coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4c36db3ddae
unity_docs
rendering
What is `UIElements.Background.GetSelectedImage` in Unity? Explain its purpose and usage.
Background.GetSelectedImage Declaration public Object GetSelectedImage (); Returns Object An asset as an object. Description Retrieves the selected asset which can be of a type of Texture, Sprite, RenderTexture or VectorImage.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8693203b2edf
unity_docs
math
What is `Material.SetFloatArray` in Unity? Explain its purpose and usage.
Material.SetFloatArray Declaration public void SetFloatArray (string name , float[] values ); Declaration public void SetFloatArray (int nameID , float[] values ); Declaration public void SetFloatArray (string name , List<float> values ); Declaration public void SetFloatArray (int nameID , List<f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_daafb650d48d
unity_docs
math
What is `IMGUI.Controls.MultiColumnHeaderState.widthOfAllVisibleColumns` in Unity? Explain its purpose and usage.
MultiColumnHeaderState.widthOfAllVisibleColumns public float widthOfAllVisibleColumns ; Description Returns the sum of all the widths of the visible columns in the visibleColumns array. The user can toggle visibility on columns using the context menu of the MultiColumnHeader. Additional resources: MultiColum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ab95a7cbdbd7
unity_docs
ui
In Unity's 'Introduction to UXML', what is 'Document root' and how does it work?
The next line defines the document root, <engine:UXML> . The <engine:UXML> element includes attributes for the namespace prefix definitions and the location of schema definition files. You can specify these attributes in any order.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b933d5b8a8a
unity_docs
performance
What is `Resources.InstanceIDsToValidArray` in Unity? Explain its purpose and usage.
Resources.InstanceIDsToValidArray Declaration public static void InstanceIDsToValidArray (NativeArray<int> instanceIDs , NativeArray<bool> validArray ); Declaration public static void InstanceIDsToValidArray (ReadOnlySpan<int> instanceIDs , Span<bool> validArray ); Parameters Parameter Description inst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48a58f5c4b6d
unity_docs
animation
What is `Animations.AnimatorState.mirrorParameterActive` in Unity? Explain its purpose and usage.
AnimatorState.mirrorParameterActive public bool mirrorParameterActive ; Description Define if the mirror value is driven by an Animator controller parameter or by the value set in the editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de5c691ab40d
unity_docs
audio
What is `SystemInfo.supportsAudio` in Unity? Explain its purpose and usage.
SystemInfo.supportsAudio public static bool supportsAudio ; Description Is there an Audio device available for playback? (Read Only) If Unity Audio is disabled, this function will return false . WebGL : This function is not supported and will always return true .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0952201fd2db
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.CheckoutIsValid`.
oth. Description Given an asset or a list of assets this function returns true if Provider.Checkout is a valid task to perform on at least one of the given assets. The CheckoutMode option can be used to narrow down the asset list to a specific type. For example: to only check whether meta files can be checked ou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4c5850f88b78
unity_docs
scripting
Explain 'Build your application for tvOS' in Unity.
To build your Unity application for tvOS, use the following steps: Open the Build Profiles window (menu: File > Build Profiles ). From the list of platforms in the Platforms panel, select tvOS or create a build profile for the tvOS platform. In the Platform Settings section, set Architecture to the architecture type yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f5ca150e131
unity_docs
physics
Show me a Unity C# example demonstrating `ControllerColliderHit.point`.
ControllerColliderHit.point public Vector3 point ; Description The impact point in world space. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { // print the impact point Debug.Log("I impacted at: " + hit.point); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c7f04fd67ec
unity_docs
scripting
What is `Animator.Play` in Unity? Explain its purpose and usage.
Animator.Play Declaration public void Play (string stateName , int layer = -1, float normalizedTime = float.NegativeInfinity); Declaration public void Play (int stateNameHash , int layer = -1, float normalizedTime = float.NegativeInfinity); Parameters Parameter Description stateName The state n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_deaacd34395e
unity_docs
xr
Explain 'Add keys to a keystore' in Unity.
This page explains how to use the Keystore Manager window to add a new key to an existing keystore. Unity requests the same information as Android Studio does when you generate a key or keystore through that. Unity doesn’t validate this information. If you leave a field blank, Unity uses an empty value. This might affe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6306fe40090
unity_docs
rendering
What is `EditorUtility` in Unity? Explain its purpose and usage.
EditorUtility class in UnityEditor Description Editor utility functions. Static Properties Property Description activePlayModeTint The tint color that is currently applied the editor UI. scriptCompilationFailed True if there are any compilation error messages in the log. Static Methods Method Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dfabed27ee2
unity_docs
physics
What is `Collider2D.CompositeOperation` in Unity? Explain its purpose and usage.
CompositeOperation enumeration Description Specifies the composite operation to be used by a Collider2D . Properties Property Description None Indicates that a CompositeCollider2D will not be used i.e. no composite operation will take place. Merge Indicates a composite operation that composes geometry using a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_501dc8e0dafe
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTimeTimeExtensions.Select` in Unity? Explain its purpose and usage.
DiscreteTimeTimeExtensions.Select Declaration public static Unity.IntegerTime.DiscreteTime Select ( Unity.IntegerTime.DiscreteTime a , Unity.IntegerTime.DiscreteTime b , bool c ); Parameters Parameter Description a The return value for the true path. b The return value for the false path. c The re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5820fff275ac
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.RemoveFile` in Unity?
Description Removes the given file from project. The file is removed from the list of files to build for each native target and also removed from the list of known files. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_RemoveFile { [PostPr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a01ccda5ec14
unity_docs
input
Explain 'Deploy an Embedded Linux project' in Unity.
On the Embedded Linux player, Unity uses SDL2 to handle keyboard, mouse, and controller input to interact with the Player window. Depending on the graphics API used, it requires SDL to dynamically load libEGL and libGLESv2 for OpenGL ES, or libvulkan for Vulkan from the user space. ## Setup forWayland Although this s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ca9a84faf15
unity_docs
scripting
Show me a Unity C# example demonstrating `Handles.DrawWireArc`.
ircle in world space units. thickness Line thickness in UI points (zero thickness draws single-pixel line). Description Draws a circular arc in 3D space. The Handles.color and Handles.matrix properties colorize and additionally transform the arc position. Unity ignores DrawWireArc (that is, nothing happens) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e59c72d3946b
unity_docs
rendering
Show me a Unity C# example demonstrating `Application.RequestUserAuthorization`.
uest authorization to use the webcam or microphone on iOS, and the webcam only on WebGL. Application.RequestUserAuthorization is called to request permission for microphone and camera. The application shows a dialog box to the user and waits for the operation to complete before being able to use these features. Note:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7064042e5e06
unity_docs
physics
What is `Collider2D.OnTriggerEnter2D` in Unity? Explain its purpose and usage.
Collider2D.OnTriggerEnter2D(Collider2D) Parameters Parameter Description other The other Collider2D involved in this collision. Description Sent when another object enters a trigger collider attached to this object (2D physics only). Further information about the other collider is reported in the Collider2D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba58b3a7e031
unity_docs
rendering
What is `TextureImporter.spritesheet` in Unity? Explain its purpose and usage.
Method group is Obsolete TextureImporter.spritesheet Obsolete Support for accessing sprite meta data through spritesheet has been removed. Please use the UnityEditor.U2D.Sprites.ISpriteEditorDataProvider interface instead. public SpriteMetaData[] spritesheet ; Description Array representing the sections of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc84b538e458
unity_docs
ui
What is `UIElements.VisualElement.SendToBack` in Unity? Explain its purpose and usage.
VisualElement.SendToBack Declaration public void SendToBack (); Description Sends this element to the beginning of its parent children list. The element will be visually behind any overlapping sibling elements.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fee6775111d7
unity_docs
scripting
In Unity's 'Move Light Probes at runtime', what is 'Example' and how does it work?
The following code moves the Light Probes in the current scene to a new position each frame. Attach the script to any object in a scene. When you run the project, select any object that uses Light Probes so you can see the probes move. The Light Probe Group object doesn’t move. ```csharp using UnityEngine; using UnityE...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d7afbff1fa2
unity_docs
scripting
What is `Rendering.ComputeQueueType` in Unity? Explain its purpose and usage.
ComputeQueueType enumeration Description Describes the desired characteristics with respect to prioritisation and load balancing of the queue that a command buffer being submitted via Graphics.ExecuteCommandBufferAsync or [[ScriptableRenderContext.ExecuteCommandBufferAsync] should be sent to. Properties Propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e5b4b000bf0
unity_docs
scripting
Show me a Unity C# example demonstrating `ForceMode`.
allowing you to define your own force vector, as well as choosing how to apply this force to the GameObject (this GameObject must have a Rigidbody component attached). ForceMode allows you to choose from four different ways to affect the GameObject using this Force: Acceleration, Force, Impulse, and VelocityChange. For...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2738daa40ca1
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.timeSamples`.
AudioSource.timeSamples public int timeSamples ; Description The current playback position of the AudioSource in PCM samples. Use this to read current playback time or to seek to a new playback time in samples, if you want more precise timing than what time variable allows. ```csharp using UnityEngine; usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06aa440fb776
unity_docs
animation
What is `StateMachineBehaviour.OnStateEnter` in Unity? Explain its purpose and usage.
StateMachineBehaviour.OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) Parameters Parameter Description animator The Animator evaluating this state machine. animatorStateInfo Information about the entered state. layerIndex The current layer being evaluated. Description In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_12d973e03ed2
unity_docs
rendering
In Unity's 'Create a lens flare', what is 'Apply a Flare asset' and how does it work?
Assign the Flare asset to a Light component or a Lens flare component . If you assign it to the Flare property of a Light component , Unity automatically tracks the position and direction of the Light and uses those values to configure the appearance of the lens flare. If you assign it to the Flare property of a Lens f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c79b6d0a4f0
unity_docs
rendering
What is `Shader` in Unity? Explain its purpose and usage.
Shader class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Shader scripts used for all rendering. Most of the advanced rendering is controlled via Material class. Shader class is mostly used just to check whether a shader can run on the user's hardware ( isSupp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc7a319bedc3
unity_docs
rendering
What is `ColorUtility.TryParseHtmlString` in Unity? Explain its purpose and usage.
ColorUtility.TryParseHtmlString Declaration public static bool TryParseHtmlString (string htmlString , out Color color ); Parameters Parameter Description htmlString Case insensitive html string to be converted into a color. color The converted color. Returns bool True if the string was successfully...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0e93b6de676
unity_docs
scripting
What is `XR.MeshGenerationOptions.ConsumeTransform` in Unity? Explain its purpose and usage.
MeshGenerationOptions.ConsumeTransform Description Indicates you plan to consume the resulting mesh's transform. Used by XRMeshSubsystem.GenerateMeshAsync when the mesh provider supplies a transform. If MeshGenerationOptions has this value, Unity does not apply the supplied transform to the vertices. Otherwise...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbb809818ce0
unity_docs
math
What is `Experimental.GraphView.Edge.candidatePosition` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Edge.candidatePosition public Vector2 candidatePosition ; Description The edge's end position while it's being created.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bd89385142d
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.operator_ne`.
Vector3.operator != public static bool operator != ( Vector3 lhs , Vector3 rhs ); Description Returns true if vectors are different. Very close vectors are treated as being equal. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public Transform other; voi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2bfb7231b4f
unity_docs
editor
What is `PlayerSettings.Android.minimumWindowWidth` in Unity? Explain its purpose and usage.
PlayerSettings.Android.minimumWindowWidth public static int minimumWindowWidth ; Description The minimum horizontal size of the Android Player window in pixels. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class MinimumWindowWidthSample : MonoBehaviour { [MenuItem("Build/Mini...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d50fa27f726e
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.Delete`.
e. asset Asset to delete. Description Starts a task to delete an Asset or a list of Assets from the disk and from the version control system. Once the task has completed the resultCode of the task will tell if the assets were successfully deleted. Note that after this operation is completed, Asset Database is not ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0fa0363fdbec
unity_docs
rendering
What is `Search.SearchContextAttribute.instantiableProviders` in Unity? Explain its purpose and usage.
SearchContextAttribute.instantiableProviders public Type[] instantiableProviders ; Description Search provider concrete types that will be instantiated and assigned to the Object Picker search context. ```csharp [SearchContext("my search", new[] { typeof(MyTextureProvider) })] public Texture2D mySpecialTexture2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6d8bf77779d2
unity_docs
audio
Explain 'Audio file format compatibility' in Unity.
Unity supports various audio file formats and you can import and use these files as Audio Clips . This page gives an overview about the audio file formats Unity supports. For instructions on how to import an audio file, refer to Import audio files into Unity . For information about how Unity encodes your files once the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3b59b95004dd
github
scripting
Write a Unity C# UI script for Vertex Jitter
```csharp using UnityEngine; using System.Collections; namespace TMPro.Examples { public class VertexJitter : MonoBehaviour { public float AngleMultiplier = 1.0f; public float SpeedMultiplier = 1.0f; public float CurveScale = 1.0f; private TMP_Text m_TextComponent; ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_5712195278b4
unity_docs
rendering
What is `ParticleSystem.TextureSheetAnimationModule` in Unity? Explain its purpose and usage.
TextureSheetAnimationModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the TextureSheetAnimationModule. This module allows you to add animations to your particle textures. To author an animation, you must use a flipbook Texture. A flipbook texture...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14999e089d98
unity_docs
editor
What are the parameters of `AssetDatabase.MoveAsset` in Unity?
Returns string An empty string if the asset has been successfully moved, otherwise an error message. Description Move an asset file (or folder) from one folder to another. All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png". ```csharp using UnityEngine; using UnityEditor;public clas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bdea5076326
unity_docs
rendering
What is `LineRenderer` in Unity? Explain its purpose and usage.
LineRenderer class in UnityEngine / Inherits from: Renderer / Implemented in: UnityEngine.CoreModule Description The line renderer is used to draw free-floating lines in 3D space. This class is a script interface for a line renderer component. Properties Property Description alignment Select whether th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67db2559494a
unity_docs
scripting
What is `PlayerSettings.GetApplicationIdentifier` in Unity? Explain its purpose and usage.
PlayerSettings.GetApplicationIdentifier Declaration public static string GetApplicationIdentifier ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description buildTarget The NamedBuildTarget . Returns string Returns the application identifier associated with a NamedBuildTarget . Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eb838c0cd2c6
unity_docs
rendering
Explain 'GPU Usage Profiler module' in Unity.
The GPU Usage Profiler module displays where your application spends time in the GPU. You can only use the GPU Profiler in Play mode , or for builds of your application. You can’t use it to profile the Unity Editor. By default, the GPU Usage Profiler module isn’t enabled. To enable it, refer to Activating Profiler modu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be7840ec0274
unity_docs
audio
What is `AudioSource.SetAmbisonicDecoderFloat` in Unity? Explain its purpose and usage.
AudioSource.SetAmbisonicDecoderFloat Declaration public bool SetAmbisonicDecoderFloat (int index , float value ); Parameters Parameter Description index Zero-based index of user-defined parameter to be set. value New value of the user-defined parameter. Returns bool True, if the parameter could be se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc7f82d3f652
unity_docs
scripting
What is `ParticleSystem.ColorBySpeedModule.color` in Unity? Explain its purpose and usage.
ParticleSystem.ColorBySpeedModule.color public ParticleSystem.MinMaxGradient color ; Description The gradient that controls the particle colors. Additional resources: MinMaxGradient . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7e30de3d554a
unity_docs
rendering
Explain 'Build assets into AssetBundles' in Unity.
To build assets into an AssetBundle, you must assign assets to an AssetBundle , either in the Unity Editor or through a script. You can then create and use a script to build the AssetBundles. For information on the best approaches for organizing assets into AssetBundles, refer to Preparing assets for AssetBundles . Not...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1900503347ec
unity_docs
scripting
What are the parameters of `Component.SendMessage` in Unity?
Description Calls the method named methodName on every MonoBehaviour in this game object. The receiving method can choose to ignore the argument by having zero arguments. If options is set to SendMessageOptions.RequireReceiver an error is printed when the message is not picked up by any component. Note that messages wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6bd3672937d
unity_docs
rendering
What are the parameters of `Material.SetOverrideTag` in Unity?
Description Sets an override tag/value on the material. Will set a tag/value on the material that overrides the value of said tag from the shader. This can be used to make sure replacement shaders (such as rendering DepthNormals) work even if the original shader only supports a certain render type. For example if a sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f0efb5cf371c
unity_docs
rendering
Explain 'Dedicated Server optimizations' in Unity.
Dedicated Server build target performs optimizations for networked applications. The build target applies some optimizations automatically by default, while others are optional because their impact depends on the game’s implementation. ## Automatic optimizations By default, the Dedicated Server build target performs ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_485baeebc657
unity_docs
scripting
What is `Search.SearchDocument.CompareTo` in Unity? Explain its purpose and usage.
SearchDocument.CompareTo Declaration public int CompareTo ( Search.SearchDocument other ); Parameters Parameter Description other Another document to compare to. Returns int If 0, both documents are equals. Description Compare this document against another document.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a78afe49666
unity_docs
xr
What is `Networking.UnityWebRequest.GetResponseHeader` in Unity? Explain its purpose and usage.
UnityWebRequest.GetResponseHeader Declaration public string GetResponseHeader (string name ); Parameters Parameter Description name The name of the HTTP header to retrieve. Case-insensitive. Returns string The value of the HTTP header from the latest HTTP response. If no header with a matching name has b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecdfc8407d06
unity_docs
rendering
What is `AssetImporters.TextureGenerationOutput` in Unity? Explain its purpose and usage.
TextureGenerationOutput struct in UnityEditor.AssetImporters Description Structure that represents the result from calling TextureGenerator.GenerateTexture . Properties Property Description importInspectorWarnings Warnings that should be shown in Inspector after generating a Texture. importWarnings Texture...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3757a24b6bc1
unity_docs
scripting
What is `Build.Reporting.CommonRoles.dependentManagedLibrary` in Unity? Explain its purpose and usage.
CommonRoles.dependentManagedLibrary public static string dependentManagedLibrary ; Description The BuildFile.role value of a managed library that is present in the build due to being a dependency of a CommonRoles.managedLibrary .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_317cf8e2bfee
unity_docs
scripting
Give me an overview of the `MinAttribute` class in Unity.
MinAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Attribute used to make a float or int variable in a script be restricted to a specific minimum value. Properties Property Description min The minimum allowed value. Constructors Const...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_083485b202d0
unity_docs
rendering
What is `LightTransport.PostProcessing.RadeonRaysProbePostProcessor.ConvolveRadianceToIrradiance` in Unity? Explain its purpose and usage.
RadeonRaysProbePostProcessor.ConvolveRadianceToIrradiance Declaration public bool ConvolveRadianceToIrradiance ( LightTransport.IDeviceContext context , BufferSlice<SphericalHarmonicsL2> radianceIn , BufferSlice<SphericalHarmonicsL2> irradianceOut , int probeCount ); Parameters Parameter Description conte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_71cb5d227952_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Provides thread safe alternatives to some of Unity's static properties. Signature: ```csharp public static class ThreadSafe ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_aea0f00511ae
unity_docs
rendering
In Unity's 'ShaderLab: legacy fog', what is 'Valid parameter values' and how does it work?
Parameter Value Function Mode Off Do not apply built-in fog to this Pass. Global Apply built-in fog to this Pass, based on the project settings. Note that if fog is disabled in the project settings, Unity will not apply it to this Pass.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30f9e0cb9d0a
unity_docs
editor
What are the parameters of `AssetDatabase.GetImporterTypes` in Unity?
Returns Type[] Returns the importer type for each asset in the array. Description Returns the types of importers associated with the specified array of assets, without loading those assets. This method is a batch version of AssetDatabase.GetImporterType . Use this method if you need to check a large number of asset imp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73a33218ec8e
unity_docs
scripting
What is `ClipboardUtility` in Unity? Explain its purpose and usage.
ClipboardUtility class in UnityEditor Description A class containing methods to assist with clipboard operations. Static Properties Property Description canCopyGameObject Optional filtering functions invoked to determine if a GameObject can be copied before any action is taken. canCutGameObject Optional filte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba2f57ab63fe
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.minWordIndexationLength`.
SearchIndexer.minWordIndexationLength public int minWordIndexationLength ; Description Minimal indexed word size. Default is 2. ```csharp using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; /// <summary> /// The property minWordIndexationLength is used to prevent indexing too man...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.