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_587b5e600dcb
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.EnumFlagsField`.
Note: This method only supports enums whose underlying types are supported by Unity's serialization system (sbyte, short, int, byte, ushort, or uint). For enums backed by an unsigned type, the "Everything" option should have the value corresponding to all bits set (i.e. ~0 in an unchecked context or the MaxValue c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2d7a1e74745
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.InheritVelocityModule.curveMultiplier`.
ParticleSystem.InheritVelocityModule.curveMultiplier public float curveMultiplier ; Description Change the curve multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall curve multiplier. ```csharp using UnityEngine; using System.Collections;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1089cea580f0
unity_docs
scripting
What is `Rigidbody.constraints` in Unity? Explain its purpose and usage.
Rigidbody.constraints public RigidbodyConstraints constraints ; Description Controls which degrees of freedom are allowed for the simulation of this Rigidbody. By default this is set to RigidbodyConstraints.None , allowing rotation and movement along all axes. In some cases, you may want to constrain a Rig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd5969767f34
unity_docs
animation
What is `AnimatorTransitionInfo.duration` in Unity? Explain its purpose and usage.
AnimatorTransitionInfo.duration public float duration ; Description Duration of the transition. Depending on AnimatorTransitionInfo.durationUnit the duration can either be expressed in seconds (i.e. DurationUnit.Fixed ) or in percentage (i.e. DurationUnit.Normalized ). A normalized duration is based on the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae09cca9475f
unity_docs
input
What is `Playables.PlayableExtensions.GetInputWeight` in Unity? Explain its purpose and usage.
PlayableExtensions.GetInputWeight Declaration public static float GetInputWeight (U playable , int inputIndex ); Parameters Parameter Description playable The Playable used by this operation. inputIndex The port index. Returns float The current weight of the connected Playable . Description Ret...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dba438279587
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.gravityModifier`.
ParticleSystem.MainModule.gravityModifier public ParticleSystem.MinMaxCurve gravityModifier ; Description A scale that this Particle System applies to gravity, defined either by Physics.gravity or [Physics2D.gravity]]. Additional resources: MinMaxCurve , ParticleSystem.MainModule.gravitySource . ```csha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9165395e9ea
unity_docs
rendering
What is `Search.FetchPreviewOptions` in Unity? Explain its purpose and usage.
FetchPreviewOptions enumeration Description Options for the search provider on how the preview should be fetched. These options are used by the SearchProvider.fetchPreview functor. ``` static Texture2D FetchPreview(SearchItem item, SearchContext context, Vector2 size, FetchPreviewOptions options) { var obj = O...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6dc43600409
unity_docs
scripting
What is `EventModifiers` in Unity? Explain its purpose and usage.
EventModifiers enumeration Description Types of modifier key that can be active during a keystroke event. Additional resources: Event , GUI Scripting Guide . Properties Property Description None No modifier key pressed during a keystroke event. Shift Shift key. Control Control key. Alt Alt key. Command C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c4e7d65941e0
unity_docs
rendering
Explain 'Upgrade to Unity 2023.2' in Unity.
This page lists changes in Unity 2023.2 which might affect existing projects when you upgrade them from a 2023.1 version to 2023.2. ## Page outline Environment lighting: Ambient probe and skybox Reflection Probe are no longer baked by default Auto-generated lighting has been removed DepthAuto, ShadowAuto and VideoAut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be40f9eb31a0
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Recorder.enabled`.
Recorder.enabled public bool enabled ; Description Enables recording. When enabled Recorder collects data regardless of Profiler being enabled or not. Note: Set to false to make measurements available immediately for synchronous testing scenarious. ```csharp using UnityEngine; using UnityEngine.Profiling;pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4229010c7b3
unity_docs
physics
What is `RaycastHit.distance` in Unity? Explain its purpose and usage.
RaycastHit.distance public float distance ; Description The distance from the ray's origin to the impact point. In the case of a ray, the distance represents the magnitude of the vector from the ray's origin to the impact point. In the case of a swept volume or sphere cast, the distance represents the magnitude...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e04e3c0aa954
unity_docs
physics
Give me an overview of the `RaycastCommand` class in Unity.
RaycastCommand struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Struct used to set up a raycast command to be performed asynchronously during a job. When you use this struct to schedule a batch of raycasts, they will be performed asynchronously and in parallel to each other. The res...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f8317922e53
unity_docs
physics
What is `PhysicsMaterial2D.frictionCombine` in Unity? Explain its purpose and usage.
PhysicsMaterial2D.frictionCombine public PhysicsMaterialCombine2D frictionCombine ; Description Determines how the effective friction is calculated when two Collider2D come into contact. Default to PhysicsMaterialCombine2D.Mean which allows either Collider2D to reduce friction to zero. For example, anyt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5b59934c8863_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This is the main entry point to one of the scenes Signature: ```csharp public class Scene03_CustomizeEnvironment : MonoBehaviour ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_609496ad1e82
unity_docs
physics
Show me a Unity C# example demonstrating `UIElements.EventDispatcherGate`.
to store the events it receives in a queue. At the end of the using block, Dispose is called, which triggers opening the gate. When all gates on a dispatcher open, the events stored in the queue are processed. Closing a gate while the event queue is processed does not stop it from being processed. Instead, a new queu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aba1651c4b35
unity_docs
editor
What are the parameters of `UIElements.DropdownMenu.InsertAction` in Unity?
Description Adds an item that executes an action in the dropdown menu. The item is added to the end of the specified index in the list. ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements;public class ContextMenuWindow : EditorWindow { [MenuItem("My/Context Menu Window")] static void Sh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_def20f129e54
unity_docs
scripting
What is `Pool.LinkedPool_1.Get` in Unity? Explain its purpose and usage.
LinkedPool<T0>.Get Declaration public T Get (); Returns T A pooled object or a new instance if the pool is empty. Description Get an instance from the pool. If the pool is empty then a new instance will be created. ```csharp using System.Text; using UnityEngine; using UnityEngine.Pool;// This component re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a15ae6116ce0
unity_docs
scripting
What is `AnimationState.AddMixingTransform` in Unity? Explain its purpose and usage.
AnimationState.AddMixingTransform Declaration public void AddMixingTransform ( Transform mix , bool recursive = true); Parameters Parameter Description mix The transform to animate. recursive Whether to also animate all children of the specified transform. Description Adds a transform which should be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de63c56f5a17
unity_docs
rendering
What is `Rendering.SphericalHarmonicsL2` in Unity? Explain its purpose and usage.
SphericalHarmonicsL2 struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Spherical harmonics up to the second order (3 bands, 9 coefficients). Spherical harmonics (SH) represent a function or signal over directions, and are commonly used in computer graphics to efficiently evalu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f92dbb6d210
unity_docs
scripting
What is `GUISkin.verticalScrollbarThumb` in Unity? Explain its purpose and usage.
GUISkin.verticalScrollbarThumb public GUIStyle verticalScrollbarThumb ; Description Style used by default for the thumb that is dragged in GUI.VerticalScrollbar controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the vertical scrollbar thumb of the current GUISkin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_af777016e251
unity_docs
rendering
Explain 'OpenGL Core' in Unity.
OpenGL Core is a back end capable of supporting the latest OpenGL features on Windows, macOS, and Linux. This scales from OpenGL 3.2 to OpenGL 4.5, depending on the OpenGL driver support. For information about how to enable OpenGL Core as your default Graphics API in the Editor or Standalone Player, refer to Override d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99d6398e46c7
unity_docs
scripting
Give me an overview of the `SerializeField` class in Unity.
SerializeField class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Force Unity to serialize a private field. Unity only serializes public fields by default. To serialize private fields, add the [SerializeField] attribute to them. Unity serializes all your script components, reloads the n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_24576090fa8c
unity_docs
scripting
In Unity's 'Scene picking controls', what is 'Toggle the pickability of a GameObject' and how does it work?
Control scene picking status for individual GameObjects from the Hierarchy window . To toggle the scene picking status of a GameObject: Select a GameObject’s pickability icon in the Hierarchy window to toggle between enabling and disabling picking the GameObject and its children. Toggling pickability for a GameObject a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91b464cb9c8e
unity_docs
editor
What is `PlayerSettings.allowUnsafeCode` in Unity? Explain its purpose and usage.
PlayerSettings.allowUnsafeCode public static bool allowUnsafeCode ; Description Allow unsafe C# code to be compiled for predefined assemblies. Enable to pass /unsafe to the C# compiler when compiling predefined assemblies, such as Assembly-CSharp.dll . This setting only affects code that isn't compiled into...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2183ee1db711
unity_docs
scripting
What is `ShortcutManagement.IShortcutManager.GetShortcutBinding` in Unity? Explain its purpose and usage.
IShortcutManager.GetShortcutBinding Declaration public ShortcutManagement.ShortcutBinding GetShortcutBinding (string shortcutId ); Parameters Parameter Description shortcutId ID of shortcut to retrieve binding for. Returns ShortcutBinding Active binding for shortcut. Description Returns the active ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e1bec998611
unity_docs
rendering
What is `LightBakingOutput.mixedLightingMode` in Unity? Explain its purpose and usage.
LightBakingOutput.mixedLightingMode public MixedLightingMode mixedLightingMode ; Description In case of a LightmapBakeType.Mixed light, describes what Mixed mode was used to bake the light, irrelevant otherwise.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_908050311f25_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
RectTransform プロパティをキャッシュする MonoBehaviour Signature: ```csharp public abstract class CacheableUIBehaviour : CacheableMonoBehaviour ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_b28e4091d371
unity_docs
scripting
What is `Vector3.operator_multiply` in Unity? Explain its purpose and usage.
Vector3.operator * public static Vector3 operator * ( Vector3 a , float d ); Description Multiplies a vector by a number. Multiplies each component of a by a number d . ```csharp // make the vector twice longer: prints (2.0,4.0,6.0) using UnityEngine; using System.Collections;public class ExampleClass ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0792cbcc62ec
unity_docs
rendering
What is `RaycastHit.barycentricCoordinate` in Unity? Explain its purpose and usage.
RaycastHit.barycentricCoordinate public Vector3 barycentricCoordinate ; Description The barycentric coordinate of the triangle we hit. This lets you interpolate any of the vertex data along the 3 axes. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Attach this script to a camera and i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5eaad079415a
unity_docs
physics
What is `ConfigurableJoint.angularYMotion` in Unity? Explain its purpose and usage.
ConfigurableJoint.angularYMotion public ConfigurableJointMotion angularYMotion ; Description Allow rotation around the Y axis to be Free, completely Locked, or Limited according to Angular YLimit.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8566ff695b17
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.Orbit`.
MouseCursor.Orbit Description Cursor with an eye for orbit. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a small window that has a colo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b4b537b4a4a6
unity_docs
ui
In Unity's 'ToolbarPopupSearchField', what is 'Inherited UXML attributes' and how does it work?
This element inherits the following attributes from its base class: Name Type Description focusable boolean If false, this prevents the element from being focused. The element can only be focused if its canGrabFocus property is true. placeholder-text string A short hint to help users understand what to enter in the fie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82cb0fdd695b
unity_docs
animation
What is `Animator.GetCurrentAnimatorClipInfoCount` in Unity? Explain its purpose and usage.
Animator.GetCurrentAnimatorClipInfoCount Declaration public int GetCurrentAnimatorClipInfoCount (int layerIndex ); Parameters Parameter Description layerIndex The layer index. Returns int The number of AnimatorClipInfo in the current state. Description Returns the number of AnimatorClipInfo in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25c7af29d1f1
unity_docs
rendering
What is `Handles.DrawGizmos` in Unity? Explain its purpose and usage.
Handles.DrawGizmos Declaration public static void DrawGizmos ( Camera camera ); Parameters Parameter Description camera The camera of the current view. Description Draw the Gizmos for the specified camera. Additional resources: ScriptableRenderContext.DrawGizmos .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c405e3c01c95
github
scripting
Write a Unity C# ScriptableObject for Pool Config
```csharp using UnityEngine; namespace Pool.Runtime { /// <summary> /// PoolConfig is a ScriptableObject that holds configuration data for object pools. /// It contains an array of PoolDatum, each of which defines the settings for a specific pool. /// </summary> [CreateAssetMenu(fileName = "PoolCo...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_69e852738ad8
unity_docs
math
What is `Color.linear` in Unity? Explain its purpose and usage.
Color.linear public Color linear ; Description A linear value of an sRGB color. Colors are typically expressed in sRGB color space. This property returns "linearized" color value, i.e. with inverse of sRGB gamma curve applied. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5958814edfa
unity_docs
ui
What is `Connect.CoppaDrawer.GetVisualElement` in Unity? Explain its purpose and usage.
CoppaDrawer.GetVisualElement Declaration public UIElements.VisualElement GetVisualElement (); Returns VisualElement Returns the visual element containing the Coppa UI. Description A method that retrieves the Coppa compliance UI.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4aac4a52a6f5
unity_docs
scripting
What is `PlayerSettings.iOS.iOSManualProvisioningProfileType` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.iOSManualProvisioningProfileType public static ProvisioningProfileType iOSManualProvisioningProfileType ; Description A ProvisioningProfileType that will be set when building an iOS Xcode project. The type will be set automatically if the used provisioning profile is installed on the bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_81e45d08c672
github
scripting
Write a Unity C# script called Random Integer
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace MBT { [AddComponentMenu("")] [MBTNode(name = "Tasks/Random Integer")] public class RandomInteger : Leaf { public IntReference min = new IntReference(0); public IntReference max = new IntR...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d99c7effbd8f
unity_docs
scripting
Show me a Unity C# example demonstrating `AI.NavMeshAgent.destination`.
to the valid navmesh position that's closest to the requested destination. • The path result may not become available until after a few frames. Use pathPending to query for outstanding results. • If it's not possible to find a valid nearby navmesh position (e.g. Scene has no navmesh) no path is requested. Use SetDe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0183debc2a01
unity_docs
rendering
What is `ParticleSystem.Trails` in Unity? Explain its purpose and usage.
Trails struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for storing the particle trail data. Additional resources: ParticleSystem , ParticleSystem.GetTrails , ParticleSystem.SetTrails . Properties Property Description capacity Reserve memory for the p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68f65c1e98d0
unity_docs
scripting
What is `SearchService.SceneSearch.EngineScope` in Unity? Explain its purpose and usage.
SceneSearch.EngineScope public static SearchService.SearchEngineScope EngineScope ; Description A enum that indicates the search scope for SceneSearch engines. It is used by SceneSearchContext . Additional resources: ISearchContext.engineScope .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa5543d814fe
unity_docs
ui
What is `GUILayout.AreaScope` in Unity? Explain its purpose and usage.
AreaScope class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Disposable helper class for managing BeginArea / EndArea . BeginArea is called at construction, and EndArea is called when the instance is disposed. By default, any GUI controls made using GUILayout are placed in the top-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46540dfd62f9
unity_docs
rendering
What is `Unity.Profiling.Editor.ProfilerModuleMetadataAttribute.IconPath` in Unity? Explain its purpose and usage.
ProfilerModuleMetadataAttribute.IconPath public string IconPath ; Description The path to the attributed Profiler module’s icon. Unity displays a Profiler module’s icon next to its name in the Profiler window. The recommended icon size at the specified path is 16x16 pixels. To provide a retina icon use the “@2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_283c90b7d164
unity_docs
scripting
What are the parameters of `QualitySettings.IncreaseLevel` in Unity?
Description Increase the current quality level. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { QualitySettings.IncreaseLevel(false); } } ``` IncreaseLevel and DecreaseLevel functions only apply anti-aliasing if applyExpensiveChanges is true. Additional resources: D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5887ce366c3e
unity_docs
scripting
What is `ArticulationDriveType.Target` in Unity? Explain its purpose and usage.
ArticulationDriveType.Target Description Drives in this mode have a very high stiffness and track the ArticulationDrive.target almost kinematically. The stiffness value that's used in this mode is not serialized, so switching back to a different ArticulationDriveType will use the serialized values.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_47a9a29f489e
unity_docs
physics
Show me a Unity code example for 'Use a scoped registry in your project'.
ion type assumes that packages follow the Reverse domain name notation . This ensures that com.unity is equivalent to any package name that matches the com.unity namespace, such as com.unity.timeline or com.unity.2d.animation . Warning: Unity doesn’t support npm’s @scope notation. ## Project manifest example In the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33ab5c6b95fa
unity_docs
rendering
What is `Rendering.TierSettings.detailNormalMap` in Unity? Explain its purpose and usage.
TierSettings.detailNormalMap public bool detailNormalMap ; Description Whether to sample a Detail Normal Map, if assigned. Enabling or disabling this setting will add or remove the UNITY_ENABLE_DETAIL_NORMALMAP shader compiler define. If disabled detail normal nap will be never sampled disregarding texture assi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8dd8c8a8f74
unity_docs
input
What is `KeyCode.LeftShift` in Unity? Explain its purpose and usage.
KeyCode.LeftShift Description Left shift key. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Update() { if (Input.GetKeyDown(KeyCode.LeftShift)) { Debug.Log("Left Shift key was pressed"); } if (Input.GetKeyUp(KeyCode.LeftShift)) { Debug.Log("Left Shift key was released"); } if (Inp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_95a1b253adf9
unity_docs
rendering
Explain 'Configuring lights with the Light Explorer' in Unity.
Resources for using the Light Explorer window to check and configure the light components in a scene . Page Description Light Explorer window Open the Light Explorer window and use it to select and edit light sources. Customize the Light Explorer Create your own version of the Light Explorer window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f5e99780533
unity_docs
input
What is `IMGUI.Controls.TreeView.SetupDepthsFromParentsAndChildren` in Unity? Explain its purpose and usage.
TreeView.SetupDepthsFromParentsAndChildren Declaration protected static void SetupDepthsFromParentsAndChildren ( IMGUI.Controls.TreeViewItem root ); Parameters Parameter Description root TreeViewItem from which the descendentans should have their depth updated. Description Utility method using the depth o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_901fdaf69fa9
unity_docs
rendering
What is `ParticleSystem.LifetimeByEmitterSpeedModule` in Unity? Explain its purpose and usage.
LifetimeByEmitterSpeedModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description The Lifetime By Emitter Speed Module controls the initial lifetime of each particle based on the speed of the emitter when the particle was spawned. This module multiplies the start lifetime of par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16789be983b2
unity_docs
scripting
What is `Windows.Speech.GrammarRecognizer` in Unity? Explain its purpose and usage.
GrammarRecognizer class in UnityEngine.Windows.Speech / Inherits from: Windows.Speech.PhraseRecognizer / Implemented in: UnityEngine.CoreModule Description The GrammarRecognizer is a complement to the KeywordRecognizer. In many cases developers will find the KeywordRecognizer fills all their development needs....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fbb42817c7d1
unity_docs
rendering
Explain 'Direct and indirect lighting' in Unity.
Resources on choosing whether Unity calculates global illumination in real time, or stores baked lighting in a build. Page Description Lighting data Resources for how Unity stores lighting data and visibility data for lightmapping, Light Probes , and Reflection Probes . Precalculating surface lighting with lightmaps Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e055973772c
unity_docs
editor
What are the parameters of `Search.SearchService.ShowWindow` in Unity?
Returns ISearchView Returns the search view window instance. Description Creates a new search window. ```csharp using UnityEditor; using UnityEditor.Search; static class Example_SearchService_ShowWindow { [MenuItem("Examples/SearchService/ShowWindowEmpty")] public static void Run1() { SearchService...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_046089cb65e1
unity_docs
scripting
What is `Video.VideoPlayer.source` in Unity? Explain its purpose and usage.
VideoPlayer.source public Video.VideoSource source ; Description The source that the VideoPlayer uses for playback. It is valid to set both a VideoClip and a URL in the VideoPlayer . This property controls which one will get used for playback. When setting a new clip or URL, the source will automatically...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_854013b94803
unity_docs
scripting
What is `PrefabUtility.IsPartOfPrefabInstance` in Unity? Explain its purpose and usage.
PrefabUtility.IsPartOfPrefabInstance Declaration public static bool IsPartOfPrefabInstance ( Object componentOrGameObject ); Parameters Parameter Description componentOrGameObject The object to check. Must be a component or GameObject. Returns bool True if the object is part of a Prefab instance. Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e081df6cc55
unity_docs
ui
What is `Experimental.GraphView.Edge.edgeControl` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Edge.edgeControl public Experimental.GraphView.EdgeControl edgeControl ; Description The VisualElement child of Edge that draws the lines and does the hit detection.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35eea7d98e12
unity_docs
editor
What is `AssetDatabase.DisallowAutoRefresh` in Unity? Explain its purpose and usage.
AssetDatabase.DisallowAutoRefresh Declaration public static void DisallowAutoRefresh (); Description Increments an internal counter which Unity uses to determine whether to allow automatic AssetDatabase refreshing behavior. Unity uses this method and the corresponding AssetDatabase.AllowAutoRefresh together int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b375912ff6c6
unity_docs
physics
Show me a Unity C# example demonstrating `CollisionDetectionMode.ContinuousSpeculative`.
ionMode.ContinuousSpeculative Description Speculative continuous collision detection is on for static and dynamic geometries This is a collision detection mode that can be used on both dynamic and kinematic objects. It is generally cheaper than other CCD mode. It also handles angular motion much better. However, in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ff8c5c84ff8
unity_docs
rendering
What is `ShaderKeywordFilter.ApplyRulesIfTagsEqualAttribute.ctor` in Unity? Explain its purpose and usage.
ApplyRulesIfTagsEqualAttribute Constructor Declaration public ApplyRulesIfTagsEqualAttribute (params string[] tags ); Parameters Parameter Description tags An array of strings with tag names and values. Use the first element in the array for the tag name, then the second element for the tag value, and so on....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_576da2e6ba38
unity_docs
scripting
What is `Rendering.RenderStateBlock.stencilReference` in Unity? Explain its purpose and usage.
RenderStateBlock.stencilReference public int stencilReference ; Description The value to be compared against and/or the value to be written to the buffer, based on the stencil state. Unity applies these values to the GPU's render state if RenderStateBlock.mask includes a value of RenderStateMask.Stencil . Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2d5759d6721d
unity_docs
rendering
In Unity's 'Set shadow distance in a scene', what is 'Shadow Distance and Shadowmask Lighting Mode' and how does it work?
If your Scene uses the Shadowmask Lighting Mode , Unity renders shadows from Mixed Lights beyond the Shadow Distance, using either Light Probes or a shadow mask Texture. You can configure how Unity renders shadows beyond the Shadow Distance.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34b8be41238c
unity_docs
scripting
What is `UIElements.UxmlDoubleAttributeDescription.GetValueFromBag` in Unity? Explain its purpose and usage.
UxmlDoubleAttributeDescription.GetValueFromBag Declaration public double 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 double The value of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_272486ca89ee
unity_docs
rendering
Explain 'Editing scene templates' in Unity.
To edit a scene template, select it in the Project window , then open it in an Inspector window . Note : When you first create an empty scene template , you must edit its properties to associate it with a scene before you can use it. Templates that you create from the active scene, or an existing scene asset, have some...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83e90593b2d5
unity_docs
math
What are the parameters of `Mesh.SetVertexBufferData` in Unity?
Description Sets the data of the vertex buffer of the Mesh. Simple usage of Mesh scripting API involves using functions like vertices , normals to setup vertex data. For advanced use cases that require maximum performance, you can use the advanced API, which has functions like SetSubMesh , SetIndexBufferParams , SetInd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d261f1f076c3
unity_docs
physics
What is `Search.PropertyDatabase` in Unity? Explain its purpose and usage.
PropertyDatabase class in UnityEditor.Search Description The PropertyDatabase is a system that can store, in a thread-safe manner, properties of different kinds into a single file that we call a property database. The idea of the PropertyDatabase is that most of the time, fetching a property value can be cost...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a971ffe48a7
unity_docs
scripting
Show me a Unity C# example demonstrating `LowLevel.PlayerLoop.GetDefaultPlayerLoop`.
systems in Unity. The default update order is the order in which systems update unless you change it with SetPlayerLoop . The PlayerLoopSystem returned by this method can be modified to create a custom update order which you can set using SetPlayerLoop . If a custom Player loop has been previously set, then use G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_461abc2da13c
unity_docs
physics
What is `Rigidbody2D.Overlap` in Unity? Explain its purpose and usage.
Rigidbody2D.Overlap Declaration public int Overlap ( Vector2 position , float angle , List<Collider2D> results ); Parameters Parameter Description position The position to overlap the Rigidbody at. angle The angle to overlap the Rigidbody at. results The list to receive results. Returns int Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b10abae35456
unity_docs
math
Show me a Unity C# example demonstrating `GUIUtility.GUIToScreenPoint`.
reenPoint Declaration public static Vector2 GUIToScreenPoint ( Vector2 guiPoint ); Description Convert a point from GUI position to screen space. Note: In Unity the screen space y coordinate varies from zero at the top edge of the window to a maximum at the bottom edge of the window. This is different fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_609ae28d8797
unity_docs
rendering
What is `CreateAssetObjectEventArgs` in Unity? Explain its purpose and usage.
CreateAssetObjectEventArgs struct in UnityEditor Description A change of this type indicates that an asset object has been created. This happens for example when Undo.RegisterCreatedObjectUndo is used with an instance of an asset (e.g. Texture ). Note that this only covers creation of asset objects in memory an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf849f812caf
unity_docs
rendering
What is `LightTransport.PostProcessing.IProbePostProcessor` in Unity? Explain its purpose and usage.
IProbePostProcessor interface in UnityEngine.LightTransport.PostProcessing Description Interface for light probe post processing. The interface provides common operations for light probes encoded as SphericalHarmonicsL2 . Operations include radiance to irradiance conversion, conversion to the format expected by ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b22f10d8128
unity_docs
scripting
What are the parameters of `Debug.DrawRay` in Unity?
Description Draws a line from start to start + dir in world coordinates. The duration parameter determines how long the line will be visible after the frame it is drawn. If duration is 0 (the default) then the line is rendered 1 frame. If depthTest is set to true then the line will be obscured by other objects in the S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_053fc2b3833b
unity_docs
rendering
What is `Cubemap.streamingMipmapsPriority` in Unity? Explain its purpose and usage.
Cubemap.streamingMipmapsPriority public int streamingMipmapsPriority ; Description Sets the relative priority for this Texture when reducing memory size to fit within the memory budget. When mipmap streaming is enabled, Unity automatically reduces the size of Textures until they fit into the Texture streaming m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b7cfc526d0ed_doc_1
github
scripting
What does `HasRegisteredObjects` do in this Unity script? Explain its purpose and signature.
Returns whether there are any objects registered for managed updates. Signature: ```csharp public bool HasRegisteredObjects => _updatableObjects.Count > 0 || _lateUpdatableObjects.Count > 0 || _fixedUpdatableObjects.Count > 0; ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_afc060c41fcc
unity_docs
rendering
Give me an overview of the `ScalableBufferManager` class in Unity.
ScalableBufferManager class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Scales render textures to support dynamic resolution if the target platform/graphics API supports it. The ScalableBufferManager class handles the scaling of any render textures that you have marked as DynamicallyS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2a23b92cc2e5
unity_docs
scripting
In Unity's 'MultiColumnListView', what is 'Bind the MultiColumnListView to data' and how does it work?
You can bind the MultiColumnListView to a data source, and automatically populate the rows and columns based on the provided data. The following example demonstrates how to bind a MultiColumnListView to a SerializedObject. For an example of runtime binding, refer to Bind ListView to a list with runtime binding . If you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c17ac340fab0
unity_docs
editor
What is `GameObjectUtility` in Unity? Explain its purpose and usage.
GameObjectUtility class in UnityEditor Description GameObject utility functions. Static Methods Method Description AreStaticEditorFlagsSet Returns true if the passed in StaticEditorFlags are set on the GameObject specified. DuplicateGameObject Duplicates a single GameObject and returns the new GameObject. Du...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc2ecf1439e7
unity_docs
rendering
Explain 'Checkerboard pattern shader example in the Built-In Render Pipeline' in Unity.
Here’s a shader that outputs a checkerboard pattern based on texture coordinates of a mesh : ``` Shader "Unlit/Checkerboard" { Properties { _Density ("Density", Range(2,50)) = 30 } SubShader { Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct v2f { float2 uv : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13dda77a66a1
unity_docs
scripting
What is `QualitySettings.names` in Unity? Explain its purpose and usage.
QualitySettings.names public static string[] names ; Description The indexed list of available Quality Settings. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { string[] names; names = QualitySettings.names; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2093ec8a59a8
unity_docs
rendering
Explain 'Marking textures as “Virtual Texturing Only”' in Unity.
In the Unity Editor, you can mark textures that only Virtual Texturing uses. This optimizes memory usage and Scene loading times, and reduces the size of the build. To mark a texture as one that only Virtual Texturing uses, open its Texture Importer and enable Virtual Texture Only . In practice, when you use Virtual Te...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f188579173f2
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemInstanceID` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemInstanceID Declaration public int GetItemInstanceID (int id ); Parameters Parameter Description id Hierarchy item identifier. Description Returns InstanceID of the UnityEngine.Object associated with the sample. Additional resources: FrameDataView.GetUnityObjectInfo .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd2fa033f7ee
unity_docs
scripting
Show me a Unity C# example demonstrating `FrameTimingManager.GetCpuTimerFrequency`.
c static ulong GetCpuTimerFrequency (); Returns ulong CPU timer frequency for current platform. Description This returns the frequency of CPU timer on the current platform, used to interpret timing results. If the platform does not support returning this value it will return 0. The following example demonst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_040ad2f4f57d
unity_docs
performance
Explain 'Native memory allocators' in Unity.
Unity provides several allocator types, where each type represents a different relative prioritization of the following key factors: The performance impact of creating, accessing, and freeing memory. The overhead of tracking memory usage. Thread access safety. If an application has a lot of spare memory, it can use fas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b275433d14dc
unity_docs
rendering
Explain 'Example of Particle System GPU instancing in a Surface Shader' in Unity.
Here is a complete working example of Surface Shader using Particle System GPU Instancing: ```csharp Shader "Instanced/ParticleMeshesSurface" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1))...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b2fa57bbdaa
unity_docs
scripting
Give me an overview of the `Tree` class in Unity.
Tree class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.TerrainModule Description Tree Component for the tree creator. Properties Property Description data Data asociated to the Tree. hasSpeedTreeWind Tells if there is wind data exported from SpeedTree are saved on this compone...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05dbe3798a61
unity_docs
rendering
What is `GL.ClearWithSkybox` in Unity? Explain its purpose and usage.
GL.ClearWithSkybox Declaration public static void ClearWithSkybox (bool clearDepth , Camera camera ); Parameters Parameter Description clearDepth Should the depth buffer be cleared? camera Camera to get projection parameters and skybox from. Description Clear the current render buffer with camera's sk...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e8ede43e239
unity_docs
scripting
What is `AvatarMask.GetTransformPath` in Unity? Explain its purpose and usage.
AvatarMask.GetTransformPath Declaration public string GetTransformPath (int index ); Parameters Parameter Description index The index of the transform. Description Returns the path of the transform at the given index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d826d8b30827
unity_docs
editor
Give me an overview of the `GameObjectUtility` class in Unity.
GameObjectUtility class in UnityEditor Description GameObject utility functions. Static Methods Method Description AreStaticEditorFlagsSet Returns true if the passed in StaticEditorFlags are set on the GameObject specified. DuplicateGameObject Duplicates a single GameObject and returns the new GameObject. Du...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e67f2ce606c9
unity_docs
scripting
What is `Component.GetComponent` in Unity? Explain its purpose and usage.
Component.GetComponent Declaration public T GetComponent (); Returns T A reference to a component of the type T if one is found, otherwise null . Description Gets a reference to a component of type T on the same GameObject as the component specified. The typical usage for this method is to call it fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6ab02cf8d23
unity_docs
scripting
What is `Search.IQueryEngineFilter.type` in Unity? Explain its purpose and usage.
IQueryEngineFilter.type public Type type ; Description The type of the data that is compared by the filter. This type represents the type of objects that are filtered by this filter. See AddFilter .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_38d36e722383
unity_docs
ui
In Unity's 'Install Unity using installer files', what is 'Installation on Windows and macOS' and how does it work?
Use your file manager application to go to the location where you downloaded the installer file. Note : You can use the downloaded installer file to install the Unity Editor on other computers using the command line. Run the installer file and follow the Introduction and License prompts. Choose the folder location wher...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e19b93dd368
unity_docs
scripting
What is `SystemLanguage.Faroese` in Unity? Explain its purpose and usage.
SystemLanguage.Faroese Description Faroese. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Faroese language if (Application.systemLanguage == SystemLanguage.Faroese) { //Outputs into console that the system is Faroe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_768e0afbf532
unity_docs
scripting
What is `IMGUI.Controls.TreeView.GetRenameRect` in Unity? Explain its purpose and usage.
TreeView.GetRenameRect Declaration protected Rect GetRenameRect ( Rect rowRect , int row , IMGUI.Controls.TreeViewItem item ); Parameters Parameter Description rowRect Row rect for the item currently being renamed. row Row index for the item currently being renamed. item TreeViewItem that are curr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_46fae0f90aac
github
scripting
Write a Unity C# XR/VR script for Controller Pose Mode Test
```csharp // "Wave SDK // © 2020 HTC Corporation. All Rights Reserved. // // Unless otherwise required by copyright law and practice, // upon the execution of HTC SDK license agreement, // HTC grants you access to and use of the Wave SDK(s). // You shall fully comply with all of HTC’s SDK license agreement terms and /...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f78209aa02fc
unity_docs
scripting
What is `Experimental.GraphView.EdgeDragHelper_1.Reset` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper<T0>.Reset Declaration public void Reset (bool didConnect ); Parameters Parameter Description didConnect Whether the connection was successful or not. View will not reset in this case. Description Reset th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ba1953de003
unity_docs
audio
What is `AudioSource.GetCustomCurve` in Unity? Explain its purpose and usage.
AudioSource.GetCustomCurve Declaration public AnimationCurve GetCustomCurve ( AudioSourceCurveType type ); Parameters Parameter Description type The curve type to get. Returns AnimationCurve The custom AnimationCurve corresponding to the given curve type. Description Get the current custom curve ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42a3803c0386
unity_docs
rendering
What is `Rendering.AmbientMode` in Unity? Explain its purpose and usage.
AmbientMode enumeration Description Ambient lighting mode. Unity can provide ambient lighting in several modes, for example directional ambient with separate sky, equator and ground colors, or flat ambient with a single color. Additional resources: RenderSettings.ambientMode , Lighting Window . Properties Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89f4dbca8d77
unity_docs
scripting
What is `IMGUI.Controls.TreeView.multiColumnHeader` in Unity? Explain its purpose and usage.
TreeView.multiColumnHeader public IMGUI.Controls.MultiColumnHeader multiColumnHeader ; Description Get the MultiColumnHeader of the TreeView. Can be null if the TreeView was created without a MultiColumnHeader. Additional resources: MultiColumnHeader .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e74dafb1e57
unity_docs
math
What is `Matrix4x4.Rotate` in Unity? Explain its purpose and usage.
Matrix4x4.Rotate Declaration public static Matrix4x4 Rotate ( Quaternion q ); Description Creates a rotation matrix. ```csharp // Translate, rotate and scale a mesh. Try varying // the parameters in the inspector while running // to see the effect they have.using UnityEngine; using System.Collections;publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.