id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_032c1a0973a3
unity_docs
physics
Show me a Unity C# example demonstrating `Collider.OnTriggerEnter`.
a child of a GameObject with a Rigidbody component can create OnTrigger events. To use the following code sample, create a primitive GameObject , and attach a Collider and Rigidbody component to it. Enable Collider.isTrigger and Rigidbody.isKinematic. This GameObject will travel forward, until it collides with an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da4d96bb6754
unity_docs
animation
What is `Animations.ParentConstraint.translationAxis` in Unity? Explain its purpose and usage.
ParentConstraint.translationAxis public Animations.Axis translationAxis ; Description The translation axes affected by the ParentConstraint. Use this property to restrict the translation of the constrained object on a particular axis. ```csharp using UnityEngine.Animations;public class ConstraintAxis { publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1de8b6bb8505
github
scripting
Write a Unity C# script called Custom Sampler Scope
```csharp using System; using UnityEngine.Profiling; namespace UniCustomSamplerScope { /// <summary> /// CustomSampler を using で使用できるようにするクラス /// </summary> public sealed class CustomSamplerScope : IDisposable { //================================================================================ // 変数(readonly...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_06e8969b4ecb
unity_docs
input
What is `XR.CommonUsages` in Unity? Explain its purpose and usage.
CommonUsages class in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description Defines static variables that are used to retrieve input features from XR.InputDevice.TryGetFeatureValue. Use these static variables to retrieve common feature values by usage for an XR.InputDevice. Static Properties Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_048d06748637
unity_docs
physics
What is `QueryParameters` in Unity? Explain its purpose and usage.
QueryParameters struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Creates a struct to set up parameters for batch queries: RaycastCommand , BoxcastCommand , CapsulecastCommand , SpherecastCommand . Use this struct to configure hit flags and layer mask. This supports hit triggers,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f02d46637f57
unity_docs
rendering
Explain 'Control material variant properties' in Unity.
By default, when you create a material variant, it inherits all the properties of its parent material. When you update a property of the parent material, Unity propagates the change down to all its child materials. It takes a short while for Unity to update material variants. In the Project window, material variants di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_00f92c79f9d9
github
scripting
Write a Unity C# MonoBehaviour script called Exposed Mono Behaviour
```csharp using UnityEngine; namespace UnityPropertyInspector.Scripts { /// <summary> /// Monobehaviour wrapper /// </summary> public abstract class ExposedMonoBehaviour : MonoBehaviour { } } ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_62f74cc3461e
unity_docs
input
Give me an overview of the `EditorGUIUtility` class in Unity.
EditorGUIUtility class in UnityEditor / Inherits from: GUIUtility Description Miscellaneous helper stuff for EditorGUI . Static Properties Property Description currentViewWidth The width of the GUI area for the current EditorWindow or other view. This Property should only be accessed within an OnGUI call. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4947efa813f
unity_docs
editor
What are the parameters of `EditorGUILayout.Slider` in Unity?
Returns float The value that has been set by the user. Description Make a slider the user can drag to change a value between a min and a max. Scale the selected object between a range. ```csharp // Editor script that lets you scale the selected GameObject between 1 and 100using UnityEditor; using UnityEngine;public cla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45b28aeb8920
unity_docs
editor
What is `IDataModeController.TryChangeDataMode` in Unity? Explain its purpose and usage.
IDataModeController.TryChangeDataMode Declaration public bool TryChangeDataMode ( DataMode newDataMode ); Parameters Parameter Description newDataMode The DataMode to which the Editor window should change. Returns bool Whether current Editor window has changed to the requested DataMode. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24e003ee018a
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.LayerField`.
ed in here will override settings defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns int The layer selected by the user. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1724f442d80c_doc_13
github
scripting
What does `ChangeBasis` do in this Unity script? Explain its purpose and signature.
Given a transform, returns that transform in another basis.The new basis is specified by outputFromInput. Signature: ```csharp public static Matrix4x4 ChangeBasis( Matrix4x4 xfInput, Matrix4x4 outputFromInput, Matrix4x4 inputFromOutput) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4219ce4f38d5
unity_docs
rendering
What is `Shader.GetPassCountInSubshader` in Unity? Explain its purpose and usage.
Shader.GetPassCountInSubshader Declaration public int GetPassCountInSubshader (int subshaderIndex ); Parameters Parameter Description subshaderIndex The index of the SubShader. Description Returns the number of passes in the given SubShader.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ea9cc9cc943
unity_docs
scripting
What is `Unity.Properties.CreatePropertyAttribute.ReadOnly` in Unity? Explain its purpose and usage.
CreatePropertyAttribute.ReadOnly public bool ReadOnly ; Description Indicates if the property should generate a setter. Setting this to false will not generate a setter for a readonly field or a get only property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e666fc3f12d7
github
scripting
Write a Unity C# UI script for Text Console Simulator
```csharp using UnityEngine; using System.Collections; namespace TMPro.Examples { public class TextConsoleSimulator : MonoBehaviour { private TMP_Text m_TextComponent; private bool hasTextChanged; void Awake() { m_TextComponent = gameObject.GetComponent<TMP_Text>()...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_c293a58b645e
unity_docs
rendering
In Unity's 'Introduction to camera output', what is 'Under the hood' and how does it work?
Depth textures can come directly from the actual depth buffer , or be rendered in a separate pass, depending on the rendering path used and the hardware. Typically when using the Deferred Shading rendering path in the Built-In Render Pipeline , the depth textures come “for free” since they are a product of the G-buffer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f656ced2f1cd
unity_docs
editor
What is `Rendering.RenderPipelineEditorUtility.TryAddRenderingLayerName` in Unity? Explain its purpose and usage.
RenderPipelineEditorUtility.TryAddRenderingLayerName Declaration public static bool TryAddRenderingLayerName (string name ); Parameters Parameter Description name New name for the Rendering Layer. Returns bool Returns true if the change was successful. Description Add a new Layer to Rendering Layer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b59ebec420f7
unity_docs
performance
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility` in Unity? Explain its purpose and usage.
UnsafeUtility class in Unity.Collections.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Provides a collection of low-level, unsafe utility methods for memory operations in Unity. The UnsafeUtility class provides functions for direct memory manipulation. These functions are unsafe because...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43b29f45a4a6
unity_docs
rendering
What is `TextureFormat.BC7` in Unity? Explain its purpose and usage.
TextureFormat.BC7 Description High quality compressed color texture format. BC7 format compresses textures to 8 bits per pixel, and is supported on DX11-class PC hardware. Generally it produces better quality than the more widely available DXT5 format, however it requires a modern GPU, and texture compression dur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d2dd0270fb0
unity_docs
audio
What is `Audio.AudioPlayableOutput.GetEvaluateOnSeek` in Unity? Explain its purpose and usage.
AudioPlayableOutput.GetEvaluateOnSeek Declaration public bool GetEvaluateOnSeek (); Returns bool Returns true if the output plays when seeking. Returns false otherwise. Description Gets the state of output playback when seeking. Additional resources: AudioPlayableOutput.SetEvaluateOnSeek .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3b3b1d3091d
unity_docs
animation
Show me a Unity C# example demonstrating `AnimationState.blendMode`.
AnimationState.blendMode public AnimationBlendMode blendMode ; Description Which blend mode should be used? ```csharp using UnityEngine; using System.Collections;public class ExampleScript : MonoBehaviour { public Animation anim; void Start() { // Set the leanLeft animation to blend additively anim["leanL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7b356cd1547
unity_docs
rendering
What is `SystemInfo.supportsComputeShaders` in Unity? Explain its purpose and usage.
SystemInfo.supportsComputeShaders public static bool supportsComputeShaders ; Description Are compute shaders supported? (Read Only) Additional resources: ComputeShader , ComputeBuffer classes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b94a1aeedbd8
unity_docs
performance
What are the parameters of `Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray` in Unity?
Returns NativeArray<T> A new NativeArray, allocated with the given allocator strategy and wrapping the provided data. Description Converts a buffer to a NativeArray. You can use this method to turn an existing buffer into a NativeArray. Ownership of the data is controlled via the allocation strategy that the allocator...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7f3ade7a871
unity_docs
rendering
What are the parameters of `LightProbes.CalculateInterpolatedLightAndOcclusionProbes` in Unity?
Description Calculate light probes and occlusion probes at the given world space positions. If there are no probes baked in the Scene, the ambient probe will be written to the lightProbes array and Vector4 (1,1,1,1) will be written to the occlusionProbes array. ArgumentNullException is thrown if positions is null . You...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8945754de2f6
unity_docs
physics
What is `Collider` in Unity? Explain its purpose and usage.
Collider class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.PhysicsModule Description A base class of all colliders. Additional resources: BoxCollider , SphereCollider , CapsuleCollider , MeshCollider , PhysicsMaterial , Rigidbody . If the object with the Collider needs to be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6d7663558f2
unity_docs
rendering
What is `ShaderUtil.HasProceduralInstancing` in Unity? Explain its purpose and usage.
ShaderUtil.HasProceduralInstancing Declaration public static bool HasProceduralInstancing ( Shader s ); Parameters Parameter Description s The Shader to check. Returns bool Returns true if the Shader has a valid Procedural Instancing variant. Returns false otherwise. Description Determines whether t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a7166173da3
unity_docs
scripting
What is `Unity.Properties.PropertyVisitor.VisitSet` in Unity? Explain its purpose and usage.
PropertyVisitor.VisitSet Declaration protected void VisitSet (Property<TContainer,TSet> property , ref TContainer container , ref TSet value ); Parameters Parameter Description property The property providing access to the list. container The container being visited. value The list being visited. Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7352459a270c
unity_docs
scripting
What is `IMGUI.Controls.TreeView.FrameItem` in Unity? Explain its purpose and usage.
TreeView.FrameItem Declaration public void FrameItem (int id ); Parameters Parameter Description id TreeViewItem ID. Description This will reveal the item with ID id (by expanding the ancestors of that item) and will make sure it is visible in the ScrollView.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eba448f8ade0
unity_docs
xr
What is `Rendering.RenderPipeline.IsRenderRequestSupported` in Unity? Explain its purpose and usage.
RenderPipeline.IsRenderRequestSupported Declaration protected bool IsRenderRequestSupported ( Camera camera , RequestData data ); Description Returns true when the active render pipeline supports the RenderRequest type. RenderPipeline.SupportsRenderRequest calls this method. In a custom Scriptable Render ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_936ec9114be2
unity_docs
rendering
What is `Rendering.ScriptableRenderContext` in Unity? Explain its purpose and usage.
ScriptableRenderContext struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Defines state and drawing commands that custom render pipelines use. When you define a custom RenderPipeline , you use a ScriptableRenderContext to schedule and submit state updates and drawing commands...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ceca202692e
unity_docs
scripting
What is `UIElements.UxmlUnsignedLongAttributeDescription.GetValueFromBag` in Unity? Explain its purpose and usage.
UxmlUnsignedLongAttributeDescription.GetValueFromBag Declaration public ulong GetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc ); Parameters Parameter Description bag The bag of attributes. cc The context in which the values are retrieved. Returns ulong The value of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d523a3318586
unity_docs
editor
What is `Rendering.ResourceFormattedPathsAttribute` in Unity? Explain its purpose and usage.
ResourceFormattedPathsAttribute class in UnityEngine.Rendering / Inherits from: Rendering.ResourcePathsBaseAttribute / Implemented in: UnityEngine.CoreModule Description Attribute specifying information about the paths where these resources are located. This is only used in the editor and doesn't have any eff...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73f81df9ddab
unity_docs
scripting
Show me a Unity C# example demonstrating `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetrics.GetMetrics`.
agerRequestMetric[] Array of read request metrics currently stored in the AsyncReadManager, which can be filtered by passing AsyncReadManagerMetricsFilters . Description Returns the current AsyncReadManager metrics. This function can filter the metrics collected by passing AsyncReadManagerMetricsFilters . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e30199d605b2
unity_docs
networking
In Unity's 'Set up your Node.js server configuration for Web builds', what is 'Set up your package.json file' and how does it work?
To create a package.json file that’s ready for use with Unity Web: Create a file in a text editor or IDE. Name the file package.json . Save your file in your Node.js project directory. Paste the following code into the file: ``` { "name": "node_server_example", "version": "1.0.0", "description": "An example for serv...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e4373cb936b
unity_docs
ui
Show me a Unity C# example demonstrating `GUILayout.Width`.
GUILayout.Width Declaration public static GUILayoutOption Width (float width ); Description Option passed to a control to give it an absolute width. Fixed width for a GUI Control. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a button with a fixed width void OnGUI() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fc00bc10c92
unity_docs
rendering
What is `Rendering.AmbientMode.Trilight` in Unity? Explain its purpose and usage.
AmbientMode.Trilight Description Trilight ambient lighting. Ambient is defined by three colors: "sky", "equator" and "ground". Additional resources: RenderSettings.ambientSkyColor , RenderSettings.ambientEquatorColor , RenderSettings.ambientGroundColor , RenderSettings.ambientMode , Lighting Window .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82effea0be89
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeaderState.Column.sortedAscending` in Unity? Explain its purpose and usage.
MultiColumnHeaderState.Column.sortedAscending public bool sortedAscending ; Description Value that controls if this column is sorted ascending or descending. Note this state is stored for each column and should only be used if the column is currently the active sorted column which is controlled by MultiColumnH...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4c9e24ce129
unity_docs
scripting
What is `Application.focusChanged` in Unity? Explain its purpose and usage.
Application.focusChanged Description Defines the delegate to use to register for events in which the focus gained or lost. This delegate allows you to receive focus change events when implementing code that does not use the MonoBehviour namespace. Note : When using this delegate to register for focus changed events...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f9a2be96f76
unity_docs
input
What is `UIElements.ScrollView.touchScrollBehavior` in Unity? Explain its purpose and usage.
ScrollView.touchScrollBehavior public UIElements.ScrollView.TouchScrollBehavior touchScrollBehavior ; Description The behavior to use when a user tries to scroll past the boundaries of the ScrollView content using a touch interaction.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5fe19188c901
unity_docs
editor
Explain 'Web development and publishing process' in Unity.
Build and deploy a Web application in mobile and desktop environments. Before you get started, check the browser compatibility and technical limitations for Web. Make sure you’re aware of any limitations for developing a project for this platform. For a guided tutorial of the Web platform, refer to Getting started with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fa102f5f82f
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Recorder.Get`.
Recorder.Get Declaration public static Profiling.Recorder Get (string samplerName ); Parameters Parameter Description samplerName Sampler name. Returns Recorder Recorder object for the specified Sampler. Description Use this function to get a Recorder for the specific Profiler label. ```csharp usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f1cb245a5cbd
unity_docs
input
Explain 'Unity Player command line arguments reference' in Unity.
You can launch Unity Players from the command line and pass in arguments to change how the Player executes. These arguments work on all standalone platforms except for the Web platform . The following table specifies any additional platform requirements. For more information on launching Unity from the command line, re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d24b2e2f2e45
unity_docs
performance
What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.ScheduleParallelForTransformReadOnly` in Unity? Explain its purpose and usage.
JobsUtility.ScheduleParallelForTransformReadOnly Declaration public static Unity.Jobs.JobHandle ScheduleParallelForTransformReadOnly (ref Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobScheduleParameters parameters , IntPtr transfromAccesssArray , int innerloopBatchCount ); Returns JobHandle A JobHandle to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6db27d115993
unity_docs
editor
What is `EditorAnalyticsSessionInfo.playbackElapsedTime` in Unity? Explain its purpose and usage.
EditorAnalyticsSessionInfo.playbackElapsedTime public static long playbackElapsedTime ; Description The total time, in milliseconds, that the Editor has been in playmode during the current session.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_737895a2a2ad
unity_docs
animation
What is `AnimationUtility.SetObjectReferenceCurve` in Unity? Explain its purpose and usage.
AnimationUtility.SetObjectReferenceCurve Declaration public static void SetObjectReferenceCurve ( AnimationClip clip , EditorCurveBinding binding , ObjectReferenceKeyframe[] keyframes ); Parameters Parameter Description clip The animation clip to modify. binding The bindings that define the paths and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f88c38650d25
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector2.Max`.
Vector2.Max Declaration public static Vector2 Max ( Vector2 lhs , Vector2 rhs ); Description Returns a vector that is made from the largest components of two vectors. Additional resources: Min function. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector2 a = ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e27ba80f00d1
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.Exp`.
Mathf.Exp Declaration public static float Exp (float power ); Description Returns e raised to the specified power. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { print(Mathf.Exp(6)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8e2bd7ea54c9
unity_docs
rendering
In Unity's 'Shader Import Settings window reference', what is 'Imported object' and how does it work?
Property Description Surface Shader Opens your text editor with the shader Unity generates, if the shader is a surface shader . Fixed Function Opens your text editor with the shader Unity generates, if the shader is a fixed function shader. Preprocess only Sets Compile and show code to generate only the preprocessed co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5e06e9a3faa
unity_docs
ui
What is `UIElements.VisualElementFocusChangeDirection` in Unity? Explain its purpose and usage.
VisualElementFocusChangeDirection class in UnityEngine.UIElements / Inherits from: UIElements.FocusChangeDirection / Implemented in: UnityEngine.UIElementsModule Description Define focus change directions for the VisualElementFocusRing. Static Properties Property Description lastValue Last value for t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44bf28e44874
github
scripting
Write a Unity C# script called Lynx Slider
```csharp // ============================================================================== // | Lynx Interfaces (2023) | // |====================================== | // | LynxSlider Script ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_954dfc980dcf
unity_docs
scripting
What is `Awaitable.BackgroundThreadAsync` in Unity? Explain its purpose and usage.
Awaitable.BackgroundThreadAsync Declaration public static BackgroundThreadAwaitable BackgroundThreadAsync (); Returns BackgroundThreadAwaitable Awaitable object that completes when switching to a background thread. Description Resumes execution on a ThreadPool background thread. Completes immediately when ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c2852abd5b91_doc_8
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A collection to process the passthrough logic on. Signature: ```csharp public BasePassthroughManager[] PassthroughManagers ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_375558984f29
unity_docs
ui
What is `AssetImporters.AssetImporterEditor.needsApplyRevert` in Unity? Explain its purpose and usage.
AssetImporterEditor.needsApplyRevert protected bool needsApplyRevert ; Description Whether the ApplyRevertGUI method is required to draw in the Inspector. Most Importers expose settings that are changed by users and require the Apply/Revert button to be pressed to update settings changes. Some Importers, such a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_690a8acc87e1
unity_docs
editor
What is `TerrainTools.DetailBrushBounds` in Unity? Explain its purpose and usage.
DetailBrushBounds struct in UnityEditor.TerrainTools Description Represents a container for brush bound data. Properties Property Description bounds The bounds of the brush. max The maximum bounds of the brush. min The minimum bound of the brush. Public Methods Method Description GetBrushOffset Gets the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_35c64e33f2ef
unity_docs
scripting
In Unity's 'Creating scene templates', what is 'Creating a template from an existing scene asset' and how does it work?
You can turn any existing scene into a scene template. After you create a template from an existing scene, you might want to edit its properties to specify which of its dependencies Unity clones when you create a new scene from it. To create a template from an existing scene asset, open the Project window, and do one o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f97b0944f9d2
unity_docs
editor
What is `Device.SystemInfo.processorType` in Unity? Explain its purpose and usage.
SystemInfo.processorType public static string processorType ; Description This has the same functionality as SystemInfo.processorType and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1146d7c1272
unity_docs
scripting
What is `SystemInfo.operatingSystem` in Unity? Explain its purpose and usage.
SystemInfo.operatingSystem public static string operatingSystem ; Description Operating system name with version (Read Only). Returns detailed information about the operating system of the device, including the version. For a simple platform detection, properties like Application.platform or deviceType migh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bdaa0d289e26
unity_docs
rendering
In Unity's 'Validate and correct materials in the Built-In Render Pipeline', what is 'Validate specular' and how does it work?
Unity’s Material charts define two separate specular color ranges: Non-metallic materials : 40–75 sRGB Metallic materials : 155 - 255 sRGB In Unity, all non-metallic Materials have a constant specular color that always falls within the correct range. However, it is common for metallic Materials to have specular values ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85a02f70d0a3
unity_docs
scripting
What is `AndroidBuildType` in Unity? Explain its purpose and usage.
AndroidBuildType enumeration Description Build configurations for the generated project. Properties Property Description Debug Build configuration set to Debug for the generated project. Development Build configuration set to Development for the generated project. Release Build configuration set to Release fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5f816addb53
unity_docs
animation
What is `Animations.AnimatorStateMachine.AddAnyStateTransition` in Unity? Explain its purpose and usage.
AnimatorStateMachine.AddAnyStateTransition Declaration public Animations.AnimatorStateTransition AddAnyStateTransition ( Animations.AnimatorState destinationState ); Declaration public Animations.AnimatorStateTransition AddAnyStateTransition ( Animations.AnimatorStateMachine destinationStateMachine ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f41e3b005eb
unity_docs
scripting
What is `Animation.PlayQueued` in Unity? Explain its purpose and usage.
Animation.PlayQueued Declaration public AnimationState PlayQueued (string animation , QueueMode queue = QueueMode.CompleteOthers, PlayMode mode = PlayMode.StopSameLayer); Description Plays an animation after previous animations has finished playing. For example you might play a specific sequence of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e171ff77df5
unity_docs
rendering
What is `TextureImporter.textureCompression` in Unity? Explain its purpose and usage.
TextureImporter.textureCompression public TextureImporterCompression textureCompression ; Description Compression of imported texture. Additional resources: TextureImporterCompression . This will only affect the default platfrom setting. Additional resources: TextureImporterPlatformSettings , TextureImpor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38e87abaec34
unity_docs
ui
What is `UIElements.VisualElement.dataSource` in Unity? Explain its purpose and usage.
VisualElement.dataSource public object dataSource ; Description Assigns a data source to this VisualElement which overrides any inherited data source. This data source is inherited by all children.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9fc1892d419
unity_docs
scripting
What is `Undo.PerformRedo` in Unity? Explain its purpose and usage.
Undo.PerformRedo Declaration public static void PerformRedo (); Description Perform an Redo operation. This performs a redo operation. It is the same as clicking on the Edit->Redo menu. Additional resources: PerformUndo .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b80b58096470
unity_docs
ui
In Unity's 'Configuring how Unity enters Play mode', what is 'Configure Play mode settings' and how does it work?
You can configure what processes start when you enter Play mode in Enter Play Mode Settings in the Editor section of the Project Settings window. To disable domain reload and/or scene reload on enter Play mode: Open the Project Settings window ( Edit > Project Settings ). Click on the Editor tab. In the Enter Play Mode...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_113afb6ec954
unity_docs
editor
What is `Device.SystemInfo.hasMipMaxLevel` in Unity? Explain its purpose and usage.
SystemInfo.hasMipMaxLevel public static bool hasMipMaxLevel ; Description This has the same functionality as SystemInfo.hasMipMaxLevel and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f6837937588
unity_docs
scripting
What is `AndroidDeviceFilterData.deviceName` in Unity? Explain its purpose and usage.
AndroidDeviceFilterData.deviceName public string deviceName ; Description The name of the GPU model used in the Android device. Filter based on GPU model. For example, Adreno (TM) 740. Note : This property only accepts a valid regular expression.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3fa5765b79cb
unity_docs
performance
What is `Unity.Profiling.ProfilerFlowEventType.Next` in Unity? Explain its purpose and usage.
ProfilerFlowEventType.Next Description Use for the flow continuation point. An example of a flow start point is job scheduling. For instance, IJobExtensions.Schedule generates an implicit Begin Profiler flow event and IJob.Execute generates an implicit Next event. ```csharp using System; using System.Threa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b52b788f9f7
unity_docs
scripting
What is `Transform.InverseTransformDirection` in Unity? Explain its purpose and usage.
Transform.InverseTransformDirection Declaration public Vector3 InverseTransformDirection ( Vector3 direction ); Description Transforms a direction from world space to local space. The opposite of Transform.TransformDirection . This operation is not affected by scale or position of the transform. The tra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1e4639b71c0
unity_docs
rendering
What is `LightBakingOutput.isBaked` in Unity? Explain its purpose and usage.
LightBakingOutput.isBaked public bool isBaked ; Description Is the light contribution already stored in lightmaps and/or lightprobes? Additional resources: Light.bakingOutput , LightBakingOutput .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32caee676a8a
unity_docs
math
What is `ParticleSystem.GetCustomParticleData` in Unity? Explain its purpose and usage.
ParticleSystem.GetCustomParticleData Declaration public int GetCustomParticleData (List<Vector4> customData , ParticleSystemCustomData streamIndex ); Parameters Parameter Description customData The array of per-particle data. streamIndex Which stream to retrieve the data from. Returns int The amoun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1551d94dd8d
unity_docs
rendering
What is `AssetImporters.ScriptedImporter.SupportsRemappedAssetType` in Unity? Explain its purpose and usage.
ScriptedImporter.SupportsRemappedAssetType Declaration public bool SupportsRemappedAssetType (Type type ); Parameters Parameter Description type The type of asset to check. Returns bool Returns true if the importer supports remapping the given type. Otherwise, returns false. Description Override this...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea2fdf865e3a
unity_docs
input
What is `GUIStyle` in Unity? Explain its purpose and usage.
GUIStyle class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Styling information for GUI elements. Most GUI functions accept an optional GUIStyle parameter to override the default style. This allows coloring, fonts and other details to be changed and switched for different states (eg, wh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fed1bdf34679
unity_docs
scripting
In Unity's 'Editor', what is 'Unity Remote' and how does it work?
Unity Remote is deprecated. For most use cases, Device Simulator package replaces Unity Remote. Property Description Device Choose the device type you want to use for Unity Remote testing. Unity Remote is a downloadable app designed to help with Android, iOS and tvOS development. Compression Choose the type of image co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0e7d371a695
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.LongestWaitAssetType` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.LongestWaitAssetType public ulong LongestWaitAssetType ; Description The asset type ID for the longest wait time included in the summary calculation. Note: A value of zero denotes a read where the asset type ID was never set.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b12c4fef7b2b
unity_docs
scripting
What is `EditorTools.EditorToolContext.PopulateMenu` in Unity? Explain its purpose and usage.
EditorToolContext.PopulateMenu Declaration public void PopulateMenu ( UIElements.DropdownMenu menu ); Parameters Parameter Description menu The Scene view context menu to add menu items to. Description Adds menu items to the Scene view context menu. Refer to MenuUtility for utility functions that add men...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_100b8a2f8c39
unity_docs
scripting
What is `Video.VideoSource` in Unity? Explain its purpose and usage.
VideoSource enumeration Description Source of the video content for a VideoPlayer. A VideoPlayer can contain valid references to both a VideoClip and a URL at the same time. This enum expresses which of the two should be used for playback. Properties Property Description VideoClip Use the current clip as the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3d13c89661d4_doc_10
github
scripting
What does `ContainsKey` do in this Unity script? Explain its purpose and signature.
Determines whether the dictionary contains the untyped key.Key to lookup.A value of true if dictionary contains an entry with the specified key.Always returns a value of false if the specified key is not of the type.If is null. Signature: ```csharp public abstract bool ContainsKey(object key); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_1013694573f9
unity_docs
editor
What is `Search.QueryError` in Unity? Explain its purpose and usage.
QueryError class in UnityEditor.Search Description A QueryError holds the definition of a query parsing error. QueryErrors are obtained when parsing a query through the function QueryEngine.Parse . See QueryEngine for an example where we recover parsing errors when a query is invalid. Properties Property De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fc0f63a1d96
unity_docs
xr
What is `QualitySettings.streamingMipmapsMaxFileIORequests` in Unity? Explain its purpose and usage.
QualitySettings.streamingMipmapsMaxFileIORequests public static int streamingMipmapsMaxFileIORequests ; Description The maximum number of active texture file IO requests from the texture streaming system. This value limits the maximum number of texture file IO requests, from the texture streaming system, that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8d4aa9eabfaa
github
scripting
Write a Unity C# MonoBehaviour script called Event Benchmark
```csharp using System; using System.Collections; using System.Diagnostics; using UnityEngine; using BehaviourInject; using Debug = UnityEngine.Debug; public class EventBenchmark : MonoBehaviour { [SerializeField] private GameObject _prefab; [SerializeField] private int _recievers = 1000; [Inject] public IEve...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_d585d54188c4_doc_2
github
scripting
What does `LoginWithCredentialsAsync` do in this Unity script? Explain its purpose and signature.
A login API call that uses the email and password credentialsNote: this method only returns a response from the server and does not set the itself Signature: ```csharp public static async Task<APIResult> LoginWithCredentialsAsync(string email, string password) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_be19bf2f2434
unity_docs
scripting
What is `ParticleSystem.MainModule.scalingMode` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.scalingMode public ParticleSystemScalingMode scalingMode ; Description Control how the Particle System applies its Transform component to the particles it emits. Hierarchy: Scale according to its Transform and all its parents. Local: Scale using only its own Transform, ignoring all ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b0c8a9dd389
unity_docs
rendering
What is `TextureFormat.ARGB32` in Unity? Explain its purpose and usage.
TextureFormat.ARGB32 Description Color with alpha texture format, 8-bits per channel. Each of RGBA color channels is stored as an 8-bit value in [0..1] range. In memory, the channel data is ordered this way: A, R, G, B bytes one after another. Note that RGBA32 format might be slightly more efficient as the data l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93358982e6ae
unity_docs
rendering
What is `LightmapParameters.maxLightmapCount` in Unity? Explain its purpose and usage.
LightmapParameters.maxLightmapCount public int maxLightmapCount ; Description The maximum number of lightmaps created for objects sharing the same lightmap parameters. This property is ignored if LightmapParameters.limitLightmapCount is false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_330da7e9c5d3
unity_docs
scripting
What is `Unity.Properties.IDictionaryPropertyBagVisitor` in Unity? Explain its purpose and usage.
IDictionaryPropertyBagVisitor interface in Unity.Properties Description Interface for visiting property bags. Public Methods Method Description Visit Implement this method to accept visitation for a collection of properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8376c2a60193
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.font`.
GUIStyle.font public Font font ; Description The font to use for rendering. If null, the default font for the current GUISkin is used instead. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints name of the font that button is using. void OnGUI() { Debug.Log("Font name: " + GUI....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f753a53bbb6
unity_docs
rendering
What is `Rendering.RenderStateBlock` in Unity? Explain its purpose and usage.
RenderStateBlock struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description A set of values that Unity uses to override the GPU's render state. When you call ScriptableRenderContext.DrawRenderers, you can use this to override the render state for some or all of the geometry. Note: You...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5729b3b5db5
unity_docs
scripting
Give me an overview of the `ProfilerWindow` class in Unity.
ProfilerWindow class in UnityEditor / Inherits from: EditorWindow Implements interfaces: IHasCustomMenu Description Use the ProfilerWindow class for interactions with the Profiler Window such as checking which frame it currently shows and controlling the selected Profiler sample in the CPU or GPU Usage ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4fc65f7c590
unity_docs
scripting
What is `ContactFilter2D.ClearLayerMask` in Unity? Explain its purpose and usage.
ContactFilter2D.ClearLayerMask Declaration public void ClearLayerMask (); Description Turns off layer mask filtering by setting useLayerMask to false. The associated value of layerMask is not changed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_177778e82b95_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
class WorldContextsManagerThe class represents a manager that provides references to existing worlds contexts.NOTE: For now we support the only world context Signature: ```csharp public class WorldContextsManager: MonoBehaviour, IEventListener<TNewEntityCreatedEvent>, IEventListener<TEntityDestroyedEvent> ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_98a3599c6fed
unity_docs
physics
Show me a Unity C# example demonstrating `Physics.SphereCast`.
t does not always represent the surface normal. It is often the direction from the contact point to the center of the sphere. This can be misleading if you're using it for sliding, bouncing, or aligning objects. Consider using a Physics.Raycast if you need the true surface normal. Additional resources: Physics.Sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38a1071e82e8_doc_10
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Whether to spawn each object as a child of this object. Signature: ```csharp public bool spawnAsChildren ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_49985b9bdd0b
unity_docs
rendering
Explain 'Android' in Unity.
Access information on developing Unity applications on the Android platform. The following sections cover the key concepts, tools, and workflows to help you develop and publish Android applications. Topic Description Introducing Android Introduces key concepts and workflows that are useful to understand before you begi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94713bc6c3b8
unity_docs
scripting
Show me a Unity C# example demonstrating `EditorTools.EditorTool`.
nt. See EditorToolAttribute for information on how to designate a tool as Global or Component. Global tools are like the built-in Move, Rotate, Scale tools. They are always available, and work with whatever is in the current Selection . Component tools, similar to CustomEditor , are specific to a Component . These...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6e58c899036b
unity_docs
scripting
In Unity's 'RectField', what is 'Example' and how does it work?
The following UXML example creates a RectField: ``` <UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements"> <RectField label="UXML Field" name="the-uxml-field" /> </UXML> ``` The following C# example illustrates some of the customizable functionalities of the RectField: ``` /// <sample> // Get a refer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b8b8c1ed7f4
unity_docs
scripting
What is `Networking.DownloadHandlerAssetBundle` in Unity? Explain its purpose and usage.
DownloadHandlerAssetBundle class in UnityEngine.Networking / Inherits from: Networking.DownloadHandler / Implemented in: UnityEngine.UnityWebRequestAssetBundleModule Description A DownloadHandler subclass specialized for downloading AssetBundle s. This subclass streams downloaded data into Unity's AssetBun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90e2ab309343
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector4.operator_subtract`.
Vector4.operator - public static Vector4 operator - ( Vector4 a , Vector4 b ); Description Subtracts one vector from another. Subtracts each component of b from a . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // prints (-5.0,-3.0,-1.0,1.0) print(new Vector4(1...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6587451e40d6
unity_docs
scripting
What are the parameters of `Component.GetComponentInParent` in Unity?
Returns T A Component of the matching type T , otherwise null if no Component is found. Description Gets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject. The typical usage for this method is to call it from a MonoBehaviour script (which itself is a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a7c6657eac22
unity_docs
rendering
In Unity's 'Surface Shaders and rendering paths in the Built-In Render Pipeline', what is 'Render pipeline compatibility' and how does it work?
Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Custom SRP Built-in Render Pipeline Surface Shaders No For a streamlined way of creating Shader objects in URP, see Shader Graph . No For a streamlined way of creating Shader objects in HDRP, see Shader Graph .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.