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_f0c2c2cc31f5
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.columnGcMemory` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.columnGcMemory public static int columnGcMemory ; Description The amount of managed allocations within a sample. The amount of managed allocations within a sample. In inverted mode this represents the total allocations this sample stack contributes to the root function allocations. Manage...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_be531eb23a43
unity_docs
ui
In Unity's 'Receive callbacks when a bound property changes', what is 'Create the binding to receive a callback' and how does it work?
Create a C# script that: Calls the CheckName() method whenever the value of a serialized property changes Registers the method with the TrackPropertyValue() extension method Calls Unbind() before calling the TrackPropertyValue() again on another property. A VisualElement can only track one property at any given time. C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecb0053fb5d0
unity_docs
scripting
What is `Screen.autorotateToPortraitUpsideDown` in Unity? Explain its purpose and usage.
Screen.autorotateToPortraitUpsideDown public static bool autorotateToPortraitUpsideDown ; Description Enables auto-rotation to portrait, upside down. This property is used when orientation is set to AutoRotation .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76a7b52e8da1
unity_docs
editor
Show me a Unity C# example demonstrating `Callbacks.RunBeforePackageAttribute`.
s a dependency graph and uses topological sorting to ensure that all dependencies are run in sequence based on their dependencies. If callbacks dependencies are not present in the project then the instruction will be ignored during the generation of the dependency graph. Note: Defining callback dependencies is current...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bee749fa7974
unity_docs
rendering
What is `Rendering.CommandBuffer.WaitOnAsyncGraphicsFence` in Unity? Explain its purpose and usage.
CommandBuffer.WaitOnAsyncGraphicsFence Declaration public void WaitOnAsyncGraphicsFence ( Rendering.GraphicsFence fence ); Declaration public void WaitOnAsyncGraphicsFence ( Rendering.GraphicsFence fence , Rendering.SynchronisationStage stage ); Declaration public void WaitOnAsyncGraphicsFence ( Rende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0b3b0bb9e3e
unity_docs
rendering
What is `TextureImporter.spriteImportMode` in Unity? Explain its purpose and usage.
TextureImporter.spriteImportMode public SpriteImportMode spriteImportMode ; Description Selects Single or Manual import mode for Sprite textures. Additional resources: SpriteImportMode enum.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_639c115e679b
unity_docs
rendering
What is `PlayerSettings.Android.applicationEntry` in Unity? Explain its purpose and usage.
PlayerSettings.Android.applicationEntry public static AndroidApplicationEntry applicationEntry ; Description Application entry classes to include. Note: You can specify multiple application entries for development purposes, this will cause two application icons to appear on Android device. You should always ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_177f22bb506e
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseElement.GetAllAttributes` in Unity? Explain its purpose and usage.
BaseElement.GetAllAttributes Declaration public List<BaseAttribute> GetAllAttributes (); Returns List<BaseAttribute> The list of attributes on the element Description Gets all attributes on this element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf066a0a740e
unity_docs
editor
Show me a Unity C# example demonstrating `EditorUtility.OpenPropertyEditor`.
EditorUtility.OpenPropertyEditor Declaration public static void OpenPropertyEditor ( Object obj ); Parameters Parameter Description obj The object to open in the properties editor. Description Open properties editor for an Object. Opens an Inspector-like window to show and edit the properties of an Objec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18a6810c7542
unity_docs
animation
What is `ParticleSystem.MinMaxCurve.curveMin` in Unity? Explain its purpose and usage.
ParticleSystem.MinMaxCurve.curveMin public AnimationCurve curveMin ; Description Set a curve for the lower bound. You should set the values between 0 and 1. Use the curve multiplier to define the overall range of the curve. Useful when ParticleSystem.MinMaxCurve.mode is set to ParticleSystemCurveMode.TwoC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4700d5c12b6a
unity_docs
physics
Show me a Unity C# example demonstrating `CollisionDetectionMode.Discrete`.
CollisionDetectionMode.Discrete Description Continuous collision detection is off for this Rigidbody. This is the default collision detection mode, and it is the fastest mode. Collisions for this collider will only be checked at the content's Time.fixedDeltaTime . ```csharp //This script allows you to switch coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cda3ff070f5
unity_docs
math
What is `Search.QueryEngine_1.AddFiltersFromAttribute` in Unity? Explain its purpose and usage.
QueryEngine<T0>.AddFiltersFromAttribute Declaration public void AddFiltersFromAttribute (); Description Adds all custom filters that are identified with the method attribute TFilterAttribute. Allows you to register a filter with a specific type. <TFilterAttribute>: The type of the attribute defined for your cus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff3e12d7f810
unity_docs
scripting
What is `ManagedReferenceMissingType.serializedData` in Unity? Explain its purpose and usage.
ManagedReferenceMissingType.serializedData public string serializedData ; Description String summarizing the content of the serialized data of the missing object. (Read Only) For text format assets this is a string in UnityYAML format. For binary format it describe the data using the same format as the binary2t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8d1364cfc57
unity_docs
scripting
What is `UIElements.BaseField_1.labelDraggerVariantUssClassName` in Unity? Explain its purpose and usage.
BaseField<T0>.labelDraggerVariantUssClassName public static string labelDraggerVariantUssClassName ; Description USS class name of labels in elements of this type, when there is a dragger attached on them.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a186984e6e34
unity_docs
xr
What is `Rendering.AsyncGPUReadbackRequest.height` in Unity? Explain its purpose and usage.
AsyncGPUReadbackRequest.height public int height ; Description When reading data from a ComputeBuffer , height is 1, otherwise, the property takes the value of the requested height from the texture.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd6321e34502
unity_docs
math
What is `Transform.SetPositionAndRotation` in Unity? Explain its purpose and usage.
Transform.SetPositionAndRotation Declaration public void SetPositionAndRotation ( Vector3 position , Quaternion rotation ); Description Sets the world space position and rotation of the Transform component. When setting both the position and rotation of a transform, calling this method is more efficient t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02d7d6e6c92e
unity_docs
scripting
Show me a Unity C# example demonstrating `Input.accelerationEventCount`.
Input.accelerationEventCount public static int accelerationEventCount ; Description Number of acceleration measurements which occurred during last frame. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23eeed5dce45
unity_docs
math
What is `Mathf.Deg2Rad` in Unity? Explain its purpose and usage.
Mathf.Deg2Rad public static float Deg2Rad ; Description Degrees-to-radians conversion constant (Read Only). This is equal to (PI * 2) / 360 . Additional resources: Rad2Deg constant. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public float deg = 30.0F; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12242cdaa77f
unity_docs
ui
What is `UIElements.VisualElementExtensions.StretchToParentSize` in Unity? Explain its purpose and usage.
VisualElementExtensions.StretchToParentSize Declaration public static void StretchToParentSize ( UIElements.VisualElement elem ); Parameters Parameter Description elem The element to be aligned with its parent Description Aligns a VisualElement's left, top, right and bottom edges with the corresponding e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1446eb48df03
unity_docs
physics
What is `Physics.defaultMaxAngularSpeed` in Unity? Explain its purpose and usage.
Physics.defaultMaxAngularSpeed public static float defaultMaxAngularSpeed ; Description Default maximum angular speed of the dynamic Rigidbody, in radians (default 50). Controls the maximum angualr speed of the dynamic Rigidbody, measured in radians. The angular speed limit can also be modified with Rigidbody....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4f0ed2a0558
unity_docs
ui
Give me an overview of the `DeviceOrientation` class in Unity.
DeviceOrientation enumeration Description Describes physical orientation of the device as determined by the OS. If device is physically situated between discrete positions, as when (for example) rotated diagonally, system will report Unknown orientation. Properties Property Description Unknown The orientation ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd9ccfa0b649
unity_docs
physics
In Unity's 'Profiler markers reference', what is 'Script update markers' and how does it work?
Unless you’re using the job system , most of your scripting code is nested underneath the following markers. For information on job system samples, refer to the Multi threading markers section of this page. For further details on Unity’s Update Loop, refer to the documentation on Order of execution of event functions ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_167fb6721dab
unity_docs
audio
What is `AudioReverbFilter.reflectionsLevel` in Unity? Explain its purpose and usage.
AudioReverbFilter.reflectionsLevel public float reflectionsLevel ; Description Early reflections level relative to room effect in millibels (mB). Ranges from -10000.0 to 1000.0. Default is -10000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c25852ff5173
unity_docs
scripting
What is `Build.Content.ContentBuildInterface.WriteSerializedFile` in Unity? Explain its purpose and usage.
ContentBuildInterface.WriteSerializedFile Declaration public static Build.Content.WriteResult WriteSerializedFile (string outputFolder , Build.Content.WriteParameters parameters ); Description Writes objects to a serialized file on disk. Internal use only. See note on ContentBuildInterface .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_be88295062db
unity_docs
physics
In Unity's 'Troubleshoot D3D12 GPU crashes on Windows', what is 'Rule out system-level issues' and how does it work?
Before troubleshooting the driver directly, it’s important to rule out other system-level issues. Perform the following checks: Disable overlays : Applications that display overlays such as Discord, Steam, or MSI Afterburner can interfere with Unity’s rendering process. Disable or close this software before running the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ffcb9c8d0c65
unity_docs
math
What is `AndroidJNI.CallStaticVoidMethod` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticVoidMethod Declaration public static void CallStaticVoidMethod (IntPtr clazz , IntPtr methodID , jvalue[] args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Java Native Interfac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ed5ba94d678
unity_docs
editor
What is `UIElements.DropdownMenu.AppendAction` in Unity? Explain its purpose and usage.
DropdownMenu.AppendAction(string,Action<DropdownMenuAction>,Func<DropdownMenuAction,DropdownMenuAction.Status>,object) Parameters Parameter Description actionName The name of the item. This name is displayed in the dropdown menu. action The callback to execute when the user selects this item in the menu. actio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a7f0959139a
unity_docs
scripting
What are the parameters of `Rect.ToString` in Unity?
Description Returns a formatted string for this Rect . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Rect rect = new Rect(0, 0, 10, 10); print(rect); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b1db6a2fa3f1
unity_docs
scripting
In Unity's 'ObjectField', what is 'Create an ObjectField' and how does it work?
You can create an ObjectField with UI Builder, UXML, or C#. To create an ObjectField in UI Builder, you must first enable Editor Extension Authoring for UI Documents (UXML) so that the ObjectField element is available in the Library panel. To restrict the type of objects that can be selected, use the type property. In ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_22c48f0f93d7_doc_7
github
scripting
What does `SynchronizeJobDataOnce` do in this Unity script? Explain its purpose and signature.
Schedules to synchronize its own job data only once, in the next processed frame.If is not registered for updates, does not implement or is already registered for data synchronization, this method is a no-op. Signature: ```csharp public void SynchronizeJobDataOnce(TDataProvider provider) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d580c03076b5_doc_7
github
scripting
What does `ScreenPointToRayInCamera` do in this Unity script? Explain its purpose and signature.
Returns a 3D ray in the camera space which starts from the passthrough camera origin - which is always(0, 0, 0) - and passes through the 2D camera pixel.The passthrough cameraA 2D point on the camera texture. The point is positioned relative to themaximum available camera resolution. This resolution can be obtained usi...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_36008cf98589
unity_docs
physics
What is `HingeJoint2D.GetMotorTorque` in Unity? Explain its purpose and usage.
HingeJoint2D.GetMotorTorque Declaration public float GetMotorTorque (float timeStep ); Parameters Parameter Description timeStep The time to calculate the motor torque for. Description Gets the motor torque of the joint given the specified timestep .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46585ea6eb02
unity_docs
rendering
What is `ParticleSystem.LightsModule.useParticleColor` in Unity? Explain its purpose and usage.
ParticleSystem.LightsModule.useParticleColor public bool useParticleColor ; Description Toggle whether the particle lights multiply their color by the particle color. Remember to also set your light color to white, if you want the lights to have the exact same color as the particles. ```csharp using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_047159fec53f
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingConfig.lodParameters` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingConfig.lodParameters public Rendering.LODParameters lodParameters ; Description Parameters used for LOD culling. LOD culling is enabled by using RayTracingInstanceCullingFlags.EnableLODCulling flag in RayTracingInstanceCullingConfig.flags . If the flag is not used then all the Rend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83c7f44d6ae5
unity_docs
editor
What is `Device.Screen.SetResolution` in Unity? Explain its purpose and usage.
Screen.SetResolution Declaration public static void SetResolution (int width , int height , FullScreenMode fullscreenMode , RefreshRate preferredRefreshRate ); Declaration public static void SetResolution (int width , int height , FullScreenMode fullscreenMode ); Declaration public static void S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27152ee10b05
unity_docs
rendering
What is `Camera.opaqueSortMode` in Unity? Explain its purpose and usage.
Camera.opaqueSortMode public Rendering.OpaqueSortMode opaqueSortMode ; Description Opaque object sorting mode. Opaque objects are sorted by various criteria (sorting layers, shader queues, materials, distance, lightmaps etc.) to maximize both the CPU efficiency (reduce number of state changes and improve dra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6d4e3b25eea
unity_docs
editor
Show me a Unity C# example demonstrating `AssetImporters.AssetImporterEditor.Apply`.
AssetImporterEditor.Apply Declaration protected void Apply (); Description Saves any changes from the Editor's control into the asset's import settings object. Can be overridden as required. Gets called when changes to settings are being applied. ```csharp using UnityEngine; using UnityEditor; using UnityEdito...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8ebf263ead22
unity_docs
physics
In Unity's 'Analyzing Profiler traces', what is 'Dissecting a script method' and how does it work?
When scripts are invoked on platforms cross-compiled with IL2CPP , look for trace lines that contain a ScriptingInvocation object. This is the point where Unity’s internal native code transitions into the script runtime to execute script code. Note: Technically, after Unity runs your C# code through IL2CPP, it also bec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4bf28c67454
unity_docs
scripting
Give me an overview of the `AudioReverbFilter` class in Unity.
AudioReverbFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Reverb Filter takes an Audio Clip and distorts it to create a custom reverb effect. Additional resources: Audio Reverb Filter information. Properties Property Description de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c99486fbf6cb
unity_docs
math
Show me a Unity C# example demonstrating `Bounds.ToString`.
String (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifies culture-specific formatting. Description Returns a formatted string for the bounds. Defaults to two digits displayed (format="F2"). For more in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88fda2980580
unity_docs
rendering
What is `Experimental.Rendering.GraphicsStateCollection.WarmUpProgressively` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsStateCollection.WarmUpProgressively Declaration public Unity.Jobs.JobHandle WarmUpProgressively (int count , Unity.Jobs.JobHandle dependency ); Parameters Parameter Description count The maximum number of var...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9142d16caa03
unity_docs
scripting
What is `Compilation.AssemblyDefinitionException.ctor` in Unity? Explain its purpose and usage.
AssemblyDefinitionException Constructor Declaration public AssemblyDefinitionException (string message , params string[] filePaths ); Parameters Parameter Description message Exception message. filePaths File paths for assembly definition files. Description Constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_29ae68bd70c2
unity_docs
rendering
Explain 'Lighting configuration workflow' in Unity.
To set up lighting in Unity, follow these steps: Choose a render pipeline Configure lighting Fine-tune your scene lighting ## Choose a render pipeline Unity provides render pipelines that differ in customization and lighting features: Built-in Render Pipeline (not scriptable) Universal Render Pipeline (URP) High-Defi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b549335b7839
unity_docs
editor
What is `EditorApplication.UnlockReloadAssemblies` in Unity? Explain its purpose and usage.
EditorApplication.UnlockReloadAssemblies Declaration public static void UnlockReloadAssemblies (); Description Must be called after LockReloadAssemblies, to reenable loading of assemblies. Additional resources: EditorApplication.LockReloadAssemblies .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b96b4d27ea0
unity_docs
rendering
What is `CustomRenderTexture.initializationMode` in Unity? Explain its purpose and usage.
CustomRenderTexture.initializationMode public CustomRenderTextureUpdateMode initializationMode ; Description Determine how Unity initializes a texture. Additional resources: CustomRenderTextureUpdateMode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f613e0e42e42
unity_docs
editor
What is `AssetImporters.AssetImportContext.DependsOnArtifact` in Unity? Explain its purpose and usage.
AssetImportContext.DependsOnArtifact Declaration public void DependsOnArtifact (string path ); Declaration public void DependsOnArtifact (GUID guid ); Declaration public void DependsOnArtifact ( Experimental.ArtifactKey key ); Parameters Parameter Description path The path of the Asset whose artif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfb91a00be93
unity_docs
scripting
What is `Rendering.FormatSwizzle.FormatSwizzleR` in Unity? Explain its purpose and usage.
FormatSwizzle.FormatSwizzleR Description The channel specified contains red. When querying a specific channel for a graphics format, returns this enum when the channel contains red. Additional resources: GraphicsFormatUtility.GetSwizzleR .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e2ae9bb3066d
unity_docs
xr
Explain 'Purchase or download an Asset Store package' in Unity.
You must create a Unity account to download packages from the Asset Store . If you already have a Unity ID for the Unity Hub or the Unity Editor, use the same ID for your Unity Asset Store account. After you get a package from the Asset Store, sign in to the Hub or the Unity Editor with the same Unity ID you used on th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_982ad1948ff7
unity_docs
animation
What is `AnimationCurve.Evaluate` in Unity? Explain its purpose and usage.
AnimationCurve.Evaluate Declaration public float Evaluate (float time ); Parameters Parameter Description time The time within the curve you want to evaluate (the horizontal axis in the curve graph). Returns float The value of the curve, at the point in time specified. Description Evaluate the curve ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52695bf10028
unity_docs
ui
What is `UIElements.UQueryExtensions.Q` in Unity? Explain its purpose and usage.
UQueryExtensions.Q Declaration public static T Q ( UIElements.VisualElement e , string name , params string[] classes ); Parameters Parameter Description e Root VisualElement on which the selector will be applied. name If specified, will select elements with this name. classes If provided, it selects ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f699aa3bd172
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchProvider.priority`.
SearchProvider.priority public int priority ; Description Hint to sort the search provider. Affects the order of search results and the order in which search providers are shown in the FilterWindow. The lowest priority is first. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f97789f3bb61
unity_docs
rendering
Explain 'Configure graphics tiers in the Built-In Render Pipeline' in Unity.
## Using graphics tiers with C# scripts Unity stores the value of the current graphics tier in Graphics.activeTier , represented by a GraphicsTier enum. To add custom behavior based on the current graphics tier, you can test against this value. To override the value of Graphics.activeTier , set it directly. Note that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e9b0647742d
unity_docs
scripting
What is `Experimental.Rendering.IScriptableBakedReflectionSystem.stageCount` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableBakedReflectionSystem.stageCount public int stageCount ; Description Number of stages of the baking process. When ticking the ScriptableBakedReflectionSystem (see IScriptableBakedReflectionSystem.Tick , the curre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a6c962322e2
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.UseSecondaryVersion` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.UseSecondaryVersion Declaration public static void UseSecondaryVersion (ref Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle ); Parameters Parameter Description handle The AtomicSafetyHandle to switch. Description Switches the AtomicSafetyHandle to the secondary version numb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35e66aa97a73
unity_docs
rendering
What is `Cubemap.requestedMipmapLevel` in Unity? Explain its purpose and usage.
Cubemap.requestedMipmapLevel public int requestedMipmapLevel ; Description The mipmap level to load. Normally, the mipmap streaming system selects which mipmap to load based on the position of all Cameras. Setting this field forces a specific mipmap to be loaded and overrides the mipmap streaming system. The mi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54e5b82d8ff8
unity_docs
rendering
What is `LightmapSettings.lightProbes` in Unity? Explain its purpose and usage.
LightmapSettings.lightProbes public static LightProbes lightProbes ; Description Baked Light Probe data. The data includes: probe positions, Spherical Harmonics (SH) coefficients and the tetrahedral tessellation. The data is a merged representation of the light probe data from all loaded scenes. For more info...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7622d92f07e
unity_docs
rendering
What is `Light.shadowBias` in Unity? Explain its purpose and usage.
Light.shadowBias public float shadowBias ; Description Shadow mapping constant bias. Shadow caster surfaces are pushed by this world-space amount away from the light, to help prevent self-shadowing ("shadow acne") artifacts. Additional resources: shadows , shadowNormalBias properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7cce1becdf51
unity_docs
scripting
What is `PrefabUtility.GetPrefabInstanceStatus` in Unity? Explain its purpose and usage.
PrefabUtility.GetPrefabInstanceStatus Declaration public static PrefabInstanceStatus GetPrefabInstanceStatus ( Object componentOrGameObject ); Parameters Parameter Description componentOrGameObject An object that is part of a Prefab instance. Returns PrefabInstanceStatus The status of the Prefab insta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d16f2ed62334
unity_docs
math
What is `XR.CommonUsages.rightEyeAngularVelocity` in Unity? Explain its purpose and usage.
CommonUsages.rightEyeAngularVelocity public static InputFeatureUsage<Vector3> rightEyeAngularVelocity ; Description The angular velocity of the right eye on this device, formatted as euler angles.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d7336abf9a2
unity_docs
scripting
What is `UIElements.Columns.resizable` in Unity? Explain its purpose and usage.
Columns.resizable public bool resizable ; Description Indicates whether the columns can be resized interactively by user. The resize behaviour of a specific column in the column collection can be specified by setting Column.resizable . A column is effectively resizable if both Column.resizable and Colu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5861d6a748b
unity_docs
scripting
What is `MonoBehaviour.OnCollisionEnter2D` in Unity? Explain its purpose and usage.
MonoBehaviour.OnCollisionEnter2D(Collision2D) Parameters Parameter Description other The Collision2D data associated with this collision. Description Sent when an incoming collider makes contact with this object's collider (2D physics only). Further information about the collision is reported in the Collision...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fac15256cc52
unity_docs
scripting
What is `EditorApplication.HierarchyWindowItemCallback` in Unity? Explain its purpose and usage.
EditorApplication.HierarchyWindowItemCallback Declaration public delegate void HierarchyWindowItemCallback (int instanceID , Rect selectionRect ); Description Delegate to be called for every visible list item in the HierarchyWindow on every OnGUI event. Additional resources: EditorApplication.hierarchyWind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_35fe66b1bfad
unity_docs
rendering
In Unity's 'Procedural Skybox Shader Material Inspector Window reference', what is 'Properties' and how does it work?
Property Description Sun The method Unity uses the generate a sun disk in the skybox. The options are: • None: Disables the sun disk in the skybox. • Simple: Draws a simplified sun disk into the skybox • High Quality: Draws a sun disk into the skybox. This is similar to the Simple sun disk, but with this mode, you can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce3c8a025f6b
unity_docs
editor
What is `VersionControl.Provider.DiffHead` in Unity? Explain its purpose and usage.
Provider.DiffHead Declaration public static VersionControl.Task DiffHead ( VersionControl.AssetList assets , bool includingMetaFiles ); Parameters Parameter Description assets List of assets to diff. includingMetaFiles Whether or not to include the .meta file. Description Starts a task for showing a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_122068298a41
github
scripting
Write a Unity C# script called Color Switcher
```csharp using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace UIStateSwitcher { public class ColorSwitcher : SwitchableElement { [SerializeField] protected Graphic targetGraphic; [SerializeField] protected List<SwitchableColor> switchableColors; ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_6ea79a52d784
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture2DArray.SetPixelData`.
rmat data into a texture. The size of the data array must be the width × height of the mipmap level, and the data layout must match the texture format, otherwise SetPixelData fails. You can use byte for T if you don't want to define a custom struct to match the texture format. Unity throws an exception when Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a90d97ea1168
unity_docs
rendering
What is `PlayerSettings.GetIcons` in Unity? Explain its purpose and usage.
PlayerSettings.GetIcons Declaration public static Texture2D[] GetIcons ( Build.NamedBuildTarget buildTarget , IconKind kind ); Parameters Parameter Description buildTarget The NamedBuildTarget . kind The IconKind . Description Returns the list of assigned icons for the specified build target. Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce5eaf366043
unity_docs
editor
What is `Search.SearchExpression.TryConvertToDouble` in Unity? Explain its purpose and usage.
SearchExpression.TryConvertToDouble Declaration public static bool TryConvertToDouble ( Search.SearchItem item , out double value , string selector ); Parameters Parameter Description item SearchItem to extract the value from. value Resulting value. selector Selector use to access an item value. If nu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_951f00388fae
unity_docs
scripting
Explain 'Native plug-ins for iOS' in Unity.
Build and use native code plug-ins for the iOS platform. Topic Description Create a native plug-in for iOS Create a native plug-in for your iOS project, and import into Unity. Use your native plug-in for iOS Configure your project to use your native plug-in in your iOS project.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_316ce3a08e03
unity_docs
scripting
What is `UIElements.UxmlStringAttributeDescription` in Unity? Explain its purpose and usage.
UxmlStringAttributeDescription class in UnityEngine.UIElements / Inherits from: UIElements.TypedUxmlAttributeDescription_1 / Implemented in: UnityEngine.UIElementsModule Description Describes a UXML string attribute. Properties Property Description defaultValueAsString The default value for the attr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b5e0fa6d408
unity_docs
performance
What is `PickingIncludeExcludeList.IncludeEntities` in Unity? Explain its purpose and usage.
PickingIncludeExcludeList.IncludeEntities public NativeArray<int> IncludeEntities ; Description An array of DOTS Entity IDs that the picking algorithm exclusively considers when it selects the nearest object. If this is null, Unity considers all DOTS Entities in open scenes for selection.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b2ceb4a0965
unity_docs
scripting
What is `Search.QueryError.ctor` in Unity? Explain its purpose and usage.
QueryError Constructor Declaration public QueryError (); Declaration public QueryError (int index , string reason ); Declaration public QueryError (int index , int length , string reason ); Parameters Parameter Description index Index where the error happened. reason Reason why the parsing fail...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ab5de86493c
unity_docs
scripting
What is `Search.QueryEngineFilterAttribute.useParamTransformer` in Unity? Explain its purpose and usage.
QueryEngineFilterAttribute.useParamTransformer public bool useParamTransformer ; Description Flag indicating if this filter uses a parameter transformer function. Set to true when paramTransformerFunction is used.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1083b3a51f42
unity_docs
editor
What is `SceneView.beforeSceneGui` in Unity? Explain its purpose and usage.
SceneView.beforeSceneGui Parameters Parameter Description value The [[SceneView] that invokes this callback. Description The event issued when the OnGUI method is called. Use this callback to queue meshes for rendering in the Scene view. To implement handles, tools, and UI, use duringSceneGui .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ee14eb30397
unity_docs
scripting
What is `Experimental.GraphView.GraphViewBlackboardWindow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewBlackboardWindow class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.GraphViewToolWindow Description The base class for a floating window that contains a Blackboard. Properties Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1d0a69d1e63
unity_docs
scripting
What is `Progress.GetCurrentStep` in Unity? Explain its purpose and usage.
Progress.GetCurrentStep Declaration public static int GetCurrentStep (int id ); Parameters Parameter Description id The progress indicator's unique ID. Returns int The current step. Description Gets the current step for a progress indicator. Returns -1 if the indicator is not set to report progress ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c51e69e21b6
unity_docs
scripting
What are the parameters of `Animator.SetBool` in Unity?
Description Sets the value of the given boolean parameter. Use Animator.SetBool to pass Boolean values to an Animator Controller via script. Use this to trigger transitions between Animator states. For example, triggering a death animation by setting an “alive” boolean to false. See documentation on Animation for more ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a470b8a607d5
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsDXTCFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsDXTCFormat Declaration public static bool IsDXTCFormat ( Experimental.Rendering.GraphicsFormat format ); Declaration public static bool IsDXTCFormat ( TextureFormat format ); Description Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_84b35345c60d_doc_4
github
scripting
What does `GetCharacterFromFontAsset_Internal` do in this Unity script? Explain its purpose and signature.
Internal function returning the text element character for the given unicode value taking into consideration the font style and weight.Function searches the source font asset, list of font assets assigned as alternative typefaces and list of fallback font assets. Signature: ```csharp private static TMP_Character GetCh...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_f8fbcc8e26e9_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Adapter contract for exposing minimap-ready read-only grid arrays.Implementations must return stable references without per-frame allocations. Signature: ```csharp public abstract class GridMinimapSourceBase : MonoBehaviour ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_8f5f5a6f0a20
unity_docs
rendering
Show me a Unity C# example demonstrating `LightProbes.CalculateInterpolatedLightAndOcclusionProbes`.
or the overload which takes lists as arguments, the output lists will be resized to fit the size of the positions array if there is not enough space in the given lists. The returned probes may be further used for instanced rendering by copying them to a MaterialPropertyBlock object via MaterialPropertyBlock.CopySHC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b0d2e6db50d
unity_docs
editor
Show me a Unity C# example demonstrating `SearchService.AdvancedObjectSelectorValidatorAttribute`.
l over the UI, so you can create your own search window if you wish to. There are two methods that need to be registered: the object selector handler and the validator. The handler opens the object selector, and the validator validates that the object selector can be opened for the current selection context . Here is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d925fab8cc55
unity_docs
rendering
Give me an overview of the `MeshPreview` class in Unity.
MeshPreview class in UnityEditor Description Use this class to render an interactive preview of a mesh. Use this class from an ObjectPreview or Editor.OnPreviewGUI to render an interactive mesh preview. Properties Property Description mesh The Mesh to display in the preview space. Constructors Construct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_30af86c1884b
unity_docs
math
In Unity's 'Bindable data types and fields', what is 'Data type conversions' and how does it work?
Most built-in controls in UI Toolkit implement the INotifyValueChanged interface for a specific data type. For example, DoubleField implements INotifyValueChanged<Double> , which means you can bind the DoubleField control to a property of type double . You can bind more data types with the binding system. For example, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1da95a0e3eaa
unity_docs
rendering
What is `ParticleSystem.MinMaxGradient.gradientMin` in Unity? Explain its purpose and usage.
ParticleSystem.MinMaxGradient.gradientMin public Gradient gradientMin ; Description Set a gradient for the lower bound. Useful when ParticleSystem.MinMaxGradient.mode is set to ParticleSystemGradientMode.TwoGradients .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b6ba88d11c4
unity_docs
scripting
What is `ShortcutManagement.IShortcutManager.IsProfileIdValid` in Unity? Explain its purpose and usage.
IShortcutManager.IsProfileIdValid Declaration public bool IsProfileIdValid (string profileId ); Parameters Parameter Description profileId The profile ID to be checked. If a null string is specified, the method throws an ArgumentNullException error. Returns bool Returns true if the profile ID is valid....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f4774fd42b95
unity_docs
rendering
In Unity's 'Transparent Parallax Diffuse', what is 'Parallax Normal mapped Properties' and how does it work?
Parallax Normal mapped is the same as regular Normal mapped , but with a better simulation of “depth”. The extra depth effect is achieved through the use of a Height Map . The Height Map is contained in the alpha channel of the Normal map . In the alpha, black is zero depth and white is full depth. This is most often u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e3a1fe2d01c9
unity_docs
scripting
In Unity's 'Object', what is 'Unity C# and Unity C++ share UnityEngine Objects' and how does it work?
When you use a method such as Object.Destroy or Object.DestroyImmediate to destroy an object derived from UnityEngine.Object , Unity destroys (unloads) the C++ counterpart object. You can’t destroy the C# object with an explicit call, because the garbage collector manages the memory. Once there are no longer any refere...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e82cddd855b
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.forceOverLifetime`.
erLifetime public ParticleSystem.ForceOverLifetimeModule forceOverLifetime ; Description Script interface for the ForceOverLifetimeModule of a Particle System. Apply forces to particles using this module. Forces are applied to the particle velocities on each frame. Particle System modules do not need to be r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dce6417c9d29
unity_docs
math
What is `Tilemaps.Tilemap.SetTile` in Unity? Explain its purpose and usage.
Tilemap.SetTile Declaration public void SetTile ( Vector3Int position , Tilemaps.TileBase tile ); Parameters Parameter Description position Position of the Tile on the Tilemap . tile The Tile to be placed in the cell. Description Sets a Tile at the given XYZ coordinates of a cell in the Tilemap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d35333d1dcce
github
scripting
Write a Unity C# MonoBehaviour script called Subscription Helper Mono Behaviour
```csharp using System; using System.Collections.Generic; using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables { /// <summary> /// MonoBehaviour extension with helper features for subcribing to and unsubscribing from ScriptableObject-based GameEvent and GameProperty objects. /// </summary> ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_c24ffea30041_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents a reference or an that has been destroyed. Signature: ```csharp public sealed class NullComparer ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_37b7e36bc99f
unity_docs
editor
Show me a Unity C# example demonstrating `EditorPrefs.GetString`.
claration public static string GetString (string key , string defaultValue = ""); Description Returns the value corresponding to key in the preference file if it exists. If the value doesn't exist, it will return defaultValue . Note that EditorPrefs does not support null strings, so if defaultValue is nul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3021ba1f1f2
unity_docs
scripting
What is `Compilation.CompilationPipeline.assemblyCompilationNotRequired` in Unity? Explain its purpose and usage.
CompilationPipeline.assemblyCompilationNotRequired Parameters Parameter Description value Parameter is the output assembly path. Description An event that is invoked on the main thread when an assembly does not require compilation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad111aaaf4f0
unity_docs
scripting
What is `ColorPrimaries` in Unity? Explain its purpose and usage.
ColorPrimaries enumeration Description Represents a color space based on its set of red, green, and blue color primaries. Properties Property Description Rec709 Rec. 709 color space. Rec2020 Rec. 2020 color space. P3 P3 color space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05963de66dd6
unity_docs
editor
What is `SceneManagement.EditorSceneManager.activeSceneChangedInEditMode` in Unity? Explain its purpose and usage.
EditorSceneManager.activeSceneChangedInEditMode Parameters Parameter Description value Previous active Scene and the new active Scene. Description Subscribe to this event to get notified when the active Scene has changed in Edit mode in the Editor. This event is only sent in Edit mode. If the event is only nee...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e7523d111a6
unity_docs
editor
Explain 'Develop for Windows' in Unity.
Work with Visual Studio for project generation and debug your Windows application. When you’re developing applications for Windows, you might want to know how to use Visual Studio for project generation or debug your Windows application. This section provides information on how to do these tasks. Page Description Visua...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48e5310fe72b
unity_docs
rendering
What is `Search.SearchViewFlags.EnableSearchQuery` in Unity? Explain its purpose and usage.
SearchViewFlags.EnableSearchQuery Description This flag enables the use of the Saved Searches workflow in the Search Picker window. This flag is not set by default. When it is not set, the Search Picker window will not show any panel or button related to the Saved Searches workflow. The flag OpenLeftSidePanel wil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f87b80a76129
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.ProjectOnPlane`.
which defines the plane to project on. Returns Vector3 The vector that results from projection of vector on the plane. Description Projects a vector onto a plane. This method resolves the input vector onto the plane and returns the resulting vector. The new vector is orthogonal to planeNormal and para...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bb105f9d7ebb
unity_docs
math
Explain 'Using common math functions' in Unity.
Unity’s Mathf class provides a collection of common math functions, including trigonometric, logarithmic, and other functions commonly required in games and app development. This page provides an overview of the Mathf class and its common uses when scripting with it. For an exhaustive reference of every member of the M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.