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_df25730b81e2
unity_docs
xr
What is `XR.XRDisplaySubsystem.TryGetFramePresentCount` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.TryGetFramePresentCount Declaration public bool TryGetFramePresentCount (out int framePresentCount ); Parameters Parameter Description framePresentCount Outputs the number of times the current frame has been presented. Returns bool Returns true if the current frame count is available. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad86d469bd3f
unity_docs
scripting
Show me a Unity C# example demonstrating `ScriptableObject.Reset`.
ScriptableObject.Reset() Description Reset to default values. Reset is called when the user hits the Reset button in the Inspector's context menu or when adding the component the first time. This function is only called in editor mode. Reset is most commonly used to give good default values in the Inspector. ```c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_383225aec735
github
scripting
Write a Unity C# XR/VR script for Gaze Input Manager
```csharp using System.Collections.Generic; using UnityEngine.InputSystem; namespace UnityEngine.XR.Interaction.Toolkit.Samples.StarterAssets { /// <summary> /// Manages input fallback for <see cref="XRGazeInteractor"/> when eye tracking is not available. /// </summary> public class GazeInputManager : ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_8303d59b47f2
unity_docs
rendering
What is `SceneManagement.EditorSceneManager.SetSceneCullingMask` in Unity? Explain its purpose and usage.
EditorSceneManager.SetSceneCullingMask Declaration public static void SetSceneCullingMask ( SceneManagement.Scene scene , ulong sceneCullingMask ); Parameters Parameter Description scene The scene to set the culling mask on. sceneCullingMask The value of the culling mask, stored as a bitfield. Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f77dc435e2e
unity_docs
rendering
What is `Highlighter.activeVisible` in Unity? Explain its purpose and usage.
Highlighter.activeVisible public static bool activeVisible ; Description Is the current active highlight visible yet? If the element to be highlighted is inside a scrollview, the scrollview automatically scrolls to reveal the element. Once it is within view, activeViisble will be true.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49a1a9e54030
unity_docs
ui
What is `UIElements.VisualElement.GetDataSourceContext` in Unity? Explain its purpose and usage.
VisualElement.GetDataSourceContext Declaration public UIElements.DataSourceContext GetDataSourceContext ( UIElements.BindingId bindingId ); Parameters Parameter Description bindingId The binding ID to query. Returns DataSourceContext A context object with the data source and data source path of a bind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5eac2b5bb84b
unity_docs
ui
What is `Experimental.GraphView.Node.topContainer` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Node.topContainer public UIElements.VisualElement topContainer ; Description Entire top area containing input and output containers.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b0aef5a94d2
unity_docs
rendering
What is `ParticleSystem.MinMaxGradient.colorMax` in Unity? Explain its purpose and usage.
ParticleSystem.MinMaxGradient.colorMax public Color colorMax ; Description Set a constant color for the upper bound. Useful when ParticleSystem.MinMaxGradient.mode is set to ParticleSystemGradientMode.TwoColors .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5103f269e94a
unity_docs
rendering
What is `Material.HasMatrix` in Unity? Explain its purpose and usage.
Material.HasMatrix Declaration public bool HasMatrix (string name ); Declaration public bool HasMatrix (int nameID ); Parameters Parameter Description nameID The name ID of the property. Use Shader.PropertyToID to get this ID. name The name of the property. Returns bool Returns true if the Shad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_360b5d376f0d
unity_docs
input
Show me a Unity C# example demonstrating `iOS.Device.generation`.
Device.generation public static iOS.DeviceGeneration generation ; Description The generation of the device. (Read Only) For information on the possible values, see DeviceGeneration . ```csharp using UnityEngine; using UnityEngine.iOS;public class DeviceGenerationExample : MonoBehaviour { string m_DeviceGen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e242ff05af0b
unity_docs
rendering
In Unity's 'Set the render pipeline and render order for a shader', what is 'Set the render pipeline' and how does it work?
To make a subshader compatible with the Universal Render Pipeline (URP) or the High Definition Render Pipeline (HDRP), add a RenderPipeline tag to the SubShader block: For URP, use "RenderPipeline" = "UniversalPipeline" For HDRP, use "RenderPipeline" = "HDRenderPipeline"
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b8a8a099ff1
unity_docs
rendering
Explain 'Light component Inspector window reference for the Built-In-Render-Pipeline' in Unity.
Unity displays different properties in the Light Inspector depending on the render pipeline that your Project uses. ## Light settings Property: Function: Type The current type of light. Possible values are Directional , Point , Spot and Area (Rectangle or Disc light). For information on these values, see Types of Lig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7004cb32aa0b
unity_docs
ui
Show me a Unity C# example demonstrating `Mathf.Clamp`.
s the given value if it is within the minimum and maximum range. Returns the minimum value if the given float value is less than the minimum. Returns the maximum value if the given value is greater than the maximum value. Use Clamp to restrict a value to a range that is defined by the minimum and maximum values. Retu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd5d61525222
unity_docs
scripting
What is `AudioSettings` in Unity? Explain its purpose and usage.
AudioSettings class in UnityEngine / Implemented in: UnityEngine.AudioModule Description Controls the global audio settings from script. Setup speaker output and format. Static Properties Property Description audioSpatialExperience Determines if the Unity app's final mixed audio stream is spatialized. dri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_55cd5db840c5
unity_docs
input
Show me a Unity code example for 'Detect Game Controllers'.
oystick $number by $model . $profile_type can be either basic or extended , and $connection_type is either wired or wireless . When Unity detects at least one controller, you can either disable on-screen touch controls or amend them to supplement controller input. ## Example: Detect attached Game Controllers The foll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bf5cf5c5d6e1_doc_5
github
scripting
What does `IsMiddleGrabbing` do in this Unity script? Explain its purpose and signature.
Returns true if the given hand's middle finger tip is closer to the wrist than the middle proximal joint.Hand to check for the required pose.True if the given hand's middle finger tip is closer to the wrist than the middle proximal joint, false otherwise. Signature: ```csharp static bool IsMiddleGrabbing(XRHand hand) ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_2333290dbebd
unity_docs
math
What is `ScriptableWizard.DisplayWizard` in Unity? Explain its purpose and usage.
ScriptableWizard.DisplayWizard Declaration public static T DisplayWizard (string title ); Parameters Parameter Description title The title shown at the top of the wizard window. Returns T The wizard. Description Creates a wizard. When the user hits the Create button OnWizardCreate function will be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3fdca7e27c75_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A Burst-enabled version of .Implement this if you want to have your job compiled by Burst. A concrete version of using the job type itself as type parameter. Signature: ```csharp public interface IBurstUpdateTransformJob<TBurstJob> : IUpdateTransformJob where TBurstJob : IInternalBurstUpdateTransformJob ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_ec09d05810dd
unity_docs
ui
What is `HideInCallstackAttribute` in Unity? Explain its purpose and usage.
HideInCallstackAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Marks the methods you want to hide from the Console window call stack. When you hide these methods they are removed from the detail area of the selected message in the Console window. Note : The intended use for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_841fcc4ef74e
unity_docs
audio
What is `AudioEchoFilter.decayRatio` in Unity? Explain its purpose and usage.
AudioEchoFilter.decayRatio public float decayRatio ; Description Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (i.e. simple 1 line delay). Default = 0.5. ```csharp using UnityEngine;[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioEchoFilter))] public class Example : Mono...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8da412d4830
unity_docs
scripting
What is `UIElements.FocusEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
FocusEventBase<T0>.GetPooled Declaration public static T GetPooled ( UIElements.IEventHandler target , UIElements.Focusable relatedTarget , UIElements.FocusChangeDirection direction , UIElements.FocusController focusController , bool bIsFocusDelegated ); Parameters Parameter Description target The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_841d855d1581
unity_docs
physics
In Unity's 'Terrain collider component reference', what is 'Layer overrides' and how does it work?
The Layer Overrides section provides properties that allow you to override the project-wide Layer-based collision detection settings for this collider. Property Description Layer Override Priority Define the priority of this collider override. When two colliders have conflicting overrides, the settings of the collider ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a8c81e28b0ed
unity_docs
ui
In Unity's 'Pseudo-classes', what is 'Supported pseudo-classes' and how does it work?
The following table lists supported pseudo-classes. You can’t extend pseudo-classes or create custom ones. Pseudo-class Matches an element when :hover The cursor is positioned over the element. :active A user interacts with the element, which is a Button , RadioButton , or Toggle . :inactive A user stops to interact wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20aac543e5f3
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.DefaultGUI.minimumHeight` in Unity? Explain its purpose and usage.
MultiColumnHeader.DefaultGUI.minimumHeight public static float minimumHeight ; Description This height is the minium height the header can have and can only be used if sorting is disabled. If sorting is enabled with MultiColumnHeader.canSort = true, then defaultHeight and larger can be used. Additional resource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7daf95d46d8c
unity_docs
rendering
In Unity's 'GLSL in Unity', what is 'GLSL snippets' and how does it work?
GLSL program snippets are written between GLSLPROGRAM and ENDGLSL keywords. In GLSL, all shader function entry points have to be called main() . When Unity loads the GLSL shader, it loads the source once for the vertex program, with the VERTEX preprocessor define, and once more for the fragment program, with the FRAGME...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3aa8f6b63ad
unity_docs
scripting
What is `NVIDIA.GraphicsDevice` in Unity? Explain its purpose and usage.
GraphicsDevice class in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description Provides the main entry point for the NVIDIA Module. Use this to interact with specific NVIDIA graphics card features. Static Properties Property Description device Gets the device created by GraphicsDevice.Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ab12a2588197
unity_docs
scripting
In Unity's 'Event function execution order', what is 'Run code on Editor launch' and how does it work?
Sometimes it can be useful to make parts of your code run immediately on launch of the Unity Editor or runtime, without any additional user action and without the code needing to be part of a MonoBehaviour script. You can run code on Editor launch without requiring any user action by applying the [InitializeOnLoad] att...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8bd72d25089
unity_docs
xr
What is `Search.PropertyDatabase.IsPersistableType` in Unity? Explain its purpose and usage.
PropertyDatabase.IsPersistableType Declaration public static bool IsPersistableType (Type type ); Parameters Parameter Description type A type. Returns bool True if the type can be persisted in the file, false otherwise. Description Returns a boolean indicating if a type can be persisted into the bac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bde2b08c0c2a
unity_docs
input
In Unity's 'Create a custom activity', what is 'Example activity with GameActivity application entry point' and how does it work?
The following code sample shows an example activity with GameActivity application entry point that overrides multiple functions. ```csharp package com.company.product; import com.unity3d.player.UnityPlayerGameActivity; import android.os.Bundle; import android.util.Log; public class OverrideExample extends UnityPlayerG...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5e9de130533
unity_docs
animation
What is `Tilemaps.Tilemap.GetAnimationFrameCount` in Unity? Explain its purpose and usage.
Tilemap.GetAnimationFrameCount Declaration public int GetAnimationFrameCount ( Vector3Int position ); Parameters Parameter Description position Grid cell position. Returns int Returns the number of animation frames. Returns 0 when there is no animation for the Tile at the given position. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5fdf989fdd2
unity_docs
scripting
What is `CullingGroup.GetDistance` in Unity? Explain its purpose and usage.
CullingGroup.GetDistance Declaration public int GetDistance (int index ); Parameters Parameter Description index The index of the sphere. Returns int The sphere's current distance band index. Description Get the current distance band index of a given sphere.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4dcd4ef92e93
unity_docs
physics
Give me an overview of the `MeshCollider` class in Unity.
MeshCollider class in UnityEngine / Inherits from: Collider / Implemented in: UnityEngine.PhysicsModule Description A mesh collider allows you to do collision detection between meshes and primitives. Additional resources: BoxCollider , CapsuleCollider , PhysicsMaterial , Rigidbody . Properties Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb3312fb80a0
unity_docs
scripting
What is `Build.Content.ContentBuildInterface.WriteSceneSerializedFile` in Unity? Explain its purpose and usage.
ContentBuildInterface.WriteSceneSerializedFile Declaration public static Build.Content.WriteResult WriteSceneSerializedFile (string outputFolder , Build.Content.WriteSceneParameters parameters ); Description Writes Scene objects to a serialized file on disk. Internal use only. See note on ContentBuildInt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df2e04bdec70
unity_docs
scripting
What is `UIElements.Rotate.angle` in Unity? Explain its purpose and usage.
Rotate.angle public UIElements.Angle angle ; Description The angle applied by the rotation. Positive values represent clockwise rotation and negative values represent counterclockwise rotation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c4ee6f1fb27
unity_docs
audio
What is `UIElements.UxmlObjectReferenceAttribute` in Unity? Explain its purpose and usage.
UxmlObjectReferenceAttribute class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Declares that a field or property is associated with nested UXML objects. You can utilize the UxmlObjectReferenceAttribute to indicate that a property or field is linked to one or multipl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5623cf74f142
unity_docs
ui
What is `Presets.PresetSelector.ShowSelector` in Unity? Explain its purpose and usage.
PresetSelector.ShowSelector Declaration public static void ShowSelector (Object[] targets , Presets.Preset currentSelection , bool createNewAllowed ); Declaration public static void ShowSelector (Object[] targets , Presets.Preset currentSelection , bool createNewAllowed , Action<Preset> onSelectionCha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_293900d19dce
unity_docs
physics
What is `RaycastHit2D.collider` in Unity? Explain its purpose and usage.
RaycastHit2D.collider public Collider2D collider ; Description The Collider2D detected by the physics query. When the RaycastHit2D result is returned from a physics query, the collider refers to the specific Collider2D that was detected. NOTE : This field will be NULL if nothing was detected however w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b49d47ab9de1
unity_docs
scripting
What is `Experimental.GraphView.GridBackground` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GridBackground class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.ImmediateModeElement Description Default GraphView background. Constructors Constructor Description GridBackground GridBackground's co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba8b61656308
unity_docs
animation
What is `HumanBone` in Unity? Explain its purpose and usage.
HumanBone struct in UnityEngine / Implemented in: UnityEngine.AnimationModule Description The mapping between a bone in the model and the conceptual bone in the Mecanim human anatomy. The names of the Mecanim human bone and the bone in the model are stored along with the limiting muscle values that constrain th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d6b9f6f510d5
unity_docs
rendering
Explain 'Shader in ShaderLab reference' in Unity.
Explore the Shader block in ShaderLab to create a shader , and add material properties, custom editors and a fallback shader. Page Description Shader block reference Reference for the Shader block in ShaderLab. Properties block reference Reference for the Properties block in ShaderLab. Fallback block reference Referenc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9bab6061ad10
unity_docs
scripting
Explain 'MonoBehaviour' in Unity.
The MonoBehaviour class provides the framework that allows you to attach your script to a GameObject in the Editor. It also provides hooks into useful Events such as Start and Update . You can create new MonoBehaviour scripts in the Editor as described in Create scripts . For a complete reference of every member of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e693496b694b
unity_docs
scripting
What are the parameters of `AndroidJavaObject.SetStatic` in Unity?
Description Set the value of a static field in an object type. The generic parameter determines the field type. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Create an object of user provided class org.example.StaticFields, // and set the value of field 'globalName'. void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5a2831e8cf0f
unity_docs
editor
Explain 'Version Control' in Unity.
com.unity.collab-proxy ## Description The package gives you the ability to use Unity Version Control in the Unity editor. To use Unity Version Control, a subscription is required. Learn more about how you can get started for free by visiting https://unity.com/solutions/version-control ## Released for Unity Package ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f12b2ca4a03
unity_docs
editor
What is `Presets.DefaultPreset` in Unity? Explain its purpose and usage.
DefaultPreset struct in UnityEditor.Presets Description This structure defines a default Preset. See Preset.GetDefaultListForType and Preset.SetDefaultListForType for usage. Properties Property Description enabled Set this value to false to disable this DefaultPreset setting from the default preset list withou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6917a878749
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.PropertyField`.
nd customize the rendering of children if necessary. Description Make a field for SerializedProperty . Use this when you want to customise the look of the options for a GameObject in the Inspector. Use this to create fields for Serialized Properties. More information on changing the Editor is available in the Ed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_842e1045ab20
unity_docs
rendering
What is `TerrainData.DirtyTextureRegion` in Unity? Explain its purpose and usage.
TerrainData.DirtyTextureRegion Declaration public void DirtyTextureRegion (string textureName , RectInt region , bool allowDelayedCPUSync ); Parameters Parameter Description textureName The name of the Terrain texture. region The rectangular region to mark as dirty. allowDelayedCPUSync Specifies whet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f9520209776
unity_docs
animation
What is `Animations.AnimatorControllerPlayable.SetBool` in Unity? Explain its purpose and usage.
AnimatorControllerPlayable.SetBool Declaration public void SetBool (string name , bool value ); Declaration public void SetBool (int id , bool value ); Parameters Parameter Description name The parameter name. id The parameter ID. value The new parameter value. Description Sets the value of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f613185027c
unity_docs
math
Give me an overview of the `BoundsInt` class in Unity.
BoundsInt struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Represents an axis aligned bounding box with all values as integers. An axis-aligned bounding box, or AABB for short, is a box aligned with coordinate axes and fully enclosing some object. As the box is never rotated with respe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc1704092e90
unity_docs
scripting
What is `ImageEffectOpaque` in Unity? Explain its purpose and usage.
ImageEffectOpaque class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Any Image Effect with this attribute will be rendered after opaque geometry but before transparent geometry. This allows for effects which extensively use the depth buffer (SSAO, etc) to affect only opaque pixels. This a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_188df22d8d66
unity_docs
physics
In Unity's 'Articulation Body component reference', what is 'Joint anchor properties' and how does it work?
Define the coordinates of the joint anchors for the Articulation Body and its parent Articulation Body. Property Description Compute Parent Anchor Enable this property to make the parent-relative anchor match the anchor of the current Articulation Body. If you disable this property, you can separately set values for Pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ed76e2d8f6e8
unity_docs
xr
In Unity's 'Player', what is 'Platform-specific settings' and how does it work?
The platform-specific settings are divided into the following sections: Icon : the game icon(s) as shown on the desktop. You can choose icons from 2D image assets in the Project, such as sprites or imported images. Resolution and Presentation : settings for screen resolution and other presentation details such as wheth...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ad5af24ab1f
unity_docs
physics
What is `Experimental.GraphView.Placemat.MinSizePolicy.EnsureMinSize` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Placemat.MinSizePolicy.EnsureMinSize Description Enforce the placemat minimum size when calculating the bounds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fac2f321b53e
unity_docs
rendering
What is `GL.Color` in Unity? Explain its purpose and usage.
GL.Color Declaration public static void Color ( Color c ); Description Sets current vertex color. In OpenGL this matches glColor4f(c.r,c.g,c.b,c.a) ; on other graphics APIs the same functionality is emulated. In order for per-vertex colors to work reliably across different hardware, you have to use a shader ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31f0c5a6989c
unity_docs
rendering
What is `LightTransport.PostProcessing.ReferenceProbePostProcessor.Initialize` in Unity? Explain its purpose and usage.
ReferenceProbePostProcessor.Initialize Declaration public bool Initialize ( LightTransport.IDeviceContext context ); Parameters Parameter Description context Device context. Returns bool True if the initialization was successful. Description Initialize the ReferenceProbePostProcessor . Must be cal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_04eed56e121d
unity_docs
scripting
In Unity's 'Supported dependency versions', what is 'SDK' and how does it work?
Unity relies on tools that the Android SDK provides and different versions of the SDK usually have the same tools available. This means you can use any recent version of the SDK as they all contain the build tools that Unity requires. The following table shows the supported versions of Android SDK tools installed with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1a5a62a6f7e
unity_docs
rendering
What is `GizmoUtility.use3dIcons` in Unity? Explain its purpose and usage.
GizmoUtility.use3dIcons public static bool use3dIcons ; Description Determines whether icons in the Scene View are a fixed size (false) or scaled relative to distance from the camera and iconSize .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_516c054e9eab
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.LerpAngle`.
gle b , based on the interpolation value t . Description Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees. This method returns the shortest path between the specified angles. This method wraps around values that are outside the range [-180, 180]. For example, LerpA...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_677db8a8460f
unity_docs
networking
Explain 'Package Manager configuration' in Unity.
Some environments require customized settings for network configuration, cache locations, and authentication for private repositories. Topic Description Configuration files Learn about the global and user-specific files where you store configuration information. Configure your network for Package Manager Configure fire...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_205c7802274a
unity_docs
rendering
What is `ImageConversion.EncodeToEXR` in Unity? Explain its purpose and usage.
ImageConversion.EncodeToEXR Declaration public static byte[] EncodeToEXR ( Texture2D tex , Texture2D.EXRFlags flags ); Parameters Parameter Description tex The texture to convert. flags Flags used to control compression and the output format. The default is Texture2D.EXRFlags.None Description Encode...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7da740d9d9e
unity_docs
ui
What is `GUI.FocusControl` in Unity? Explain its purpose and usage.
GUI.FocusControl Declaration public static void FocusControl (string name ); Parameters Parameter Description name Name set using SetNextControlName . Description Move keyboard focus to a named control. Additional resources: SetNextControlName , GetNameOfFocusedControl . For focusing text in Editor GUI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a685ce62e8f7
unity_docs
scripting
What is `Unity.Properties.PropertyVisitor.VisitList` in Unity? Explain its purpose and usage.
PropertyVisitor.VisitList Declaration protected void VisitList (Property<TContainer,TList> property , ref TContainer container , ref TList value ); Parameters Parameter Description property The property providing access to the list. container The container being visited. value The list being visited. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_708187f8acae
unity_docs
performance
What is `Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility.GetUnsafePtr` in Unity? Explain its purpose and usage.
NativeArrayUnsafeUtility.GetUnsafePtr Declaration public static void* GetUnsafePtr (NativeArray<T> nativeArray ); Parameters Parameter Description nativeArray The NativeArray to check. Returns void* The memory buffer pointer of the NativeArray. Description Gets the pointer to the memory buffer owner ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2c3557412694
unity_docs
rendering
In Unity's 'Audio overview', what is 'Basic theory' and how does it work?
In real life, objects emit sounds that listeners hear. The way a sound is perceived depends on many factors. A listener can tell roughly which direction a sound is coming from and may also get some sense of its distance from its loudness and quality. A fast-moving sound source (such as a falling bomb or a passing polic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f1ed8910723
unity_docs
scripting
What is `UIElements.IPointerEvent.actionKey` in Unity? Explain its purpose and usage.
IPointerEvent.actionKey public bool actionKey ; Description Gets a boolean value that indicates whether the platform-specific action key is pressed. True means the action key is pressed. False means it isn't. The platform-specific action key is Cmd on macOS, and Ctrl on all other platforms.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1efc2f80d4f3
unity_docs
rendering
What is `ParticleSystem.ShapeModule.meshSpawnSpeedMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.meshSpawnSpeedMultiplier public float meshSpawnSpeedMultiplier ; Description A multiplier of the Mesh spawn speed. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall speed multiplier. Additional resources: ParticleSystem....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b6a2c49a96f4
unity_docs
rendering
Explain 'Universal Render Pipeline' in Unity.
com.unity.render-pipelines.universal ## Description The Universal Render Pipeline (URP) is a prebuilt Scriptable Render Pipeline, made by Unity. URP provides artist-friendly workflows that let you quickly and easily create optimized graphics across a range of platforms, from mobile to high-end consoles and PCs. ## V...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e240435b9ddc
unity_docs
scripting
What is `SystemInfo.batteryStatus` in Unity? Explain its purpose and usage.
SystemInfo.batteryStatus public static BatteryStatus batteryStatus ; Description Returns the current status of the device's battery (Read Only). See the BatteryStatus enumeration for possible values. The battery status includes information about whether the device is plugged in to a power source and whether...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6910d9d9a9ea_doc_4
github
scripting
What does `OnCollisionStay2DAsObservable` do in this Unity script? Explain its purpose and signature.
Sent each frame where a collider on another object is touching this object's collider (2D physics only). Signature: ```csharp public static IObservable<Collision2D> OnCollisionStay2DAsObservable(this Component component) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_673637611032
unity_docs
scripting
What is `UIElements.Vertex.nearZ` in Unity? Explain its purpose and usage.
Vertex.nearZ public static float nearZ ; Description A special value representing the near clipping plane. Always use this value as the vertex position's z component when building 2D (flat) UI geometry.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc83c13b1765
unity_docs
scripting
What is `PlayerSettings.SplashScreen.unityLogoStyle` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.unityLogoStyle public static PlayerSettings.SplashScreen.UnityLogoStyle unityLogoStyle ; Description The style to use for the Unity logo during the Splash Screen.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1979bb7f913
unity_docs
rendering
What is `WebCamTexture.requestedHeight` in Unity? Explain its purpose and usage.
WebCamTexture.requestedHeight public int requestedHeight ; Description Set the requested height of the camera device. It will use a closest resolution to the one requested which is supported by the camera. The requested values only have an effect when set while the camera is not running.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3af11cc4d6c7
unity_docs
rendering
What is `TerrainTools.PaintContext.GetTerrain` in Unity? Explain its purpose and usage.
PaintContext.GetTerrain Declaration public Terrain GetTerrain (int terrainIndex ); Parameters Parameter Description terrainIndex Index of the terrain. Returns Terrain Returns the Terrain object. Description Retrieves a Terrain from the PaintContext. When painting across a border, the PaintContext...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a28d55d2dfa
unity_docs
rendering
What is `SceneManagement.StageUtility.IsGameObjectRenderedByCamera` in Unity? Explain its purpose and usage.
StageUtility.IsGameObjectRenderedByCamera Declaration public static bool IsGameObjectRenderedByCamera ( GameObject gameObject , Camera camera ); Parameters Parameter Description gameObject The GameObject to check. camera The camera to check. Returns bool True if the GameObject is rendered by the ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d1eea0bdfb5
unity_docs
physics
What is `ConfigurableJointMotion` in Unity? Explain its purpose and usage.
ConfigurableJointMotion enumeration Description Constrains movement for a ConfigurableJoint along the 6 axes. Properties Property Description Locked Motion along the axis will be locked. Limited Motion along the axis will be limited by the respective limit. Free Motion along the axis will be completely free...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_23dbf889c4f6
unity_docs
editor
Explain 'Apply styles in C# scripts' in Unity.
You can write to style to set style values to an element. However, to get the actually rendered styles of an element, read from resolvedStyle . ## Set styles In a C# script, you can set styles directly to the style properties of a visual element . For example, the following code sets the background color of a button ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a22b73e3228c
unity_docs
math
In Unity's 'Serialization rules', what is 'Serialization of properties' and how does it work?
Unity doesn’t normally serialize properties except in the following situations: If a property has an explicit backing field, Unity serializes it according to regular serialization rules. For example: ```csharp public int MyInt { get => m_backing; private set => m_backing = value; } [SerializeField] private int m_backin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65b4cc48e5e8
unity_docs
rendering
What are the parameters of `ParticleSystemJobs.IJobParticleSystem.Execute` in Unity?
Description Implement this method to access and modify particle properties. You can use the following script to attract particles to a supplied position. ```csharp using System; using Unity.Collections; using UnityEngine; using UnityEngine.ParticleSystemJobs;public class ParticleJob : MonoBehaviour { public float e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c79155f81011
unity_docs
scripting
What is `Rendering.BatchCullingOutputDrawCommands.instanceSortingPositionFloatCount` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands.instanceSortingPositionFloatCount public int instanceSortingPositionFloatCount ; Description If BatchDrawCommandFlags.HasSortingPosition is set for one or more draw commands, this contains float3 world-space positions that Unity uses for depth sorting. You must set this in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07df6fbb5370
unity_docs
math
What are the parameters of `GeometryUtility.CalculateFrustumPlanes` in Unity?
Returns Plane[] The planes that form the camera's view frustum. Description Calculates frustum planes. This function takes the given camera's view frustum and returns six planes that form it. The normal of each plane points into the frustum. Ordering: [0] = Left, [1] = Right, [2] = Bottom, [3] = Top, [4] = Near, [5] = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a9a0830b0f4a
unity_docs
ui
In Unity's 'Conditionally including assemblies', what is 'Version define expressions' and how does it work?
You can use expressions to specify an exact version or a range of versions. A version expression uses mathematical interval notation , where square brackets [] designate that the range includes the endpoint and parentheses () designate that the range excludes the endpoint. The following table illustrates the syntax: Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4eac095304da
unity_docs
input
What is `Input.GetAxis` in Unity? Explain its purpose and usage.
Input.GetAxis Declaration public static float GetAxis (string axisName ); Description Returns the value of the virtual axis identified by axisName . 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 Inpu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f19a7a538921
unity_docs
scripting
What is `Unity.Properties.PropertyPath.AppendKey` in Unity? Explain its purpose and usage.
PropertyPath.AppendKey Declaration public static Unity.Properties.PropertyPath AppendKey (ref Unity.Properties.PropertyPath path , object key ); Parameters Parameter Description path The <see cref="PropertyPath" /> key The key to add. Returns PropertyPath A new PropertyPath Description Returns...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c86a8480908
unity_docs
rendering
What is `Experimental.GlobalIllumination.AngularFalloffType` in Unity? Explain its purpose and usage.
AngularFalloffType enumeration Description Sets the method to use to compute the angular attenuation of spot lights. Properties Property Description LUT Uses a lookup table to calculate falloff and does not support the inner angle. AnalyticAndInnerAngle No falloff inside inner angle then compute falloff using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04ca23bab9ed
unity_docs
rendering
What is `CustomRenderTexture.SetUpdateZones` in Unity? Explain its purpose and usage.
CustomRenderTexture.SetUpdateZones Declaration public void SetUpdateZones (CustomRenderTextureUpdateZone[] updateZones ); Description Setup the list of Update Zones for the Custom Render Texture. Additional resources: CustomRenderTextureUpdateZone .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a241234c3590
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.FileHandle.Status` in Unity? Explain its purpose and usage.
FileHandle.Status public Unity.IO.LowLevel.Unsafe.FileStatus Status ; Description The current status of this FileHandle. After you call AsyncReadManager.OpenFileAsync , the FileHandle enters the FileStatus.Pending state. Once the open operation completes, the status changes to either FileStatus.Open or ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f5e3ec4db4b
unity_docs
editor
What is `AssetDatabase.ResetCacheServerReconnectTimer` in Unity? Explain its purpose and usage.
AssetDatabase.ResetCacheServerReconnectTimer Declaration public static void ResetCacheServerReconnectTimer (); Description Resets the internal cache server connection reconnect timer values. The default delay timer value is 1 second, and the max delay value is 5 minutes. Everytime a connection attempt fails it w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_85fceb0f4b6a
unity_docs
scripting
In Unity's 'App slicing', what is 'Create a variant' and how does it work?
To create a variant, use the following steps: Click on your AssetBundle folder and navigate to the Asset Labels section at the bottom of the Inspector window. Click on the right-hand drop-down menu, select New , and enter the name of your new variants. AssetBundle variants must be lowercase. Create a new script in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe04ae4c0da5
unity_docs
rendering
What is `SystemInfo.GetGraphicsFormat` in Unity? Explain its purpose and usage.
SystemInfo.GetGraphicsFormat Declaration public static Experimental.Rendering.GraphicsFormat GetGraphicsFormat ( Experimental.Rendering.DefaultFormat format ); Parameters Parameter Description format The DefaultFormat format to look up. Description Returns the platform-specific GraphicsFormat that is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ddd4c2dd96a1
unity_docs
rendering
What is `Profiling.ProfilerTimeSampleSelection.sampleDisplayName` in Unity? Explain its purpose and usage.
ProfilerTimeSampleSelection.sampleDisplayName public string sampleDisplayName ; Description The name of the Sample as it is displayed in the Profiler Window . This might be a shorter version than the last item in _markerNamePath . The Profiler Window might shorten some Sample names, e.g. Deep Profiling sample...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d21c5e535a10
unity_docs
rendering
In Unity's 'Audio Chorus Effect', what is 'Properties' and how does it work?
Property: Function: Dry mix Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5. Wet mix tap 1 Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5. Wet mix tap 2 Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5. Wet mix tap 3 Volume of 3rd chor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07b9f6459dc1
unity_docs
scripting
What are the parameters of `Experimental.Rendering.GraphicsStateCollection.SaveToFile` in Unity?
Returns bool Returns true if collection successfully saved, false otherwise. Description Save GraphicsStateCollection to disk. The file extension of GraphicsStateCollection is *.graphicsstate. ```csharp using UnityEngine; using UnityEngine.Experimental.Rendering;public class SaveToFileExample : MonoBehaviour { publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a5581b94b3b
unity_docs
scripting
Show me a Unity C# example demonstrating `Cloth.enabled`.
Cloth.enabled public bool enabled ; Description Is this cloth enabled? This is the same as the checkbox next to the component label in the inspector. A disabled cloth component will not update it's physics simulation, so you can use this to suspend the simulation of cloth objects when they are not needed, as c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c40e2ff0736
unity_docs
rendering
What are the parameters of `Cubemap.Apply` in Unity?
Description Copies changes you've made in a CPU texture to the GPU. For most types of textures, Unity can store a copy of the texture in both CPU and GPU memory. The CPU copy is optional. If the CPU copy exists, you can read from and write to the CPU copy more flexibly than the GPU copy. But to render the updated textu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb6fca67f30b
unity_docs
rendering
What is `UIElements.RuntimePanelUtils.SetTextureDirty` in Unity? Explain its purpose and usage.
RuntimePanelUtils.SetTextureDirty Declaration public static void SetTextureDirty ( UIElements.IPanel panel , Texture2D texture ); Parameters Parameter Description panel The current panel texture The texture whose content has changed. Description Notifies the dynamic atlas of the panel that the conte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c036376d5f24
unity_docs
scripting
What is `Application.systemLanguage` in Unity? Explain its purpose and usage.
Application.systemLanguage public static SystemLanguage systemLanguage ; Description The language in which the user's operating system is running in. Use this property to select localized content based on the user's system language. Query the current system language with Application.systemLanguage . Note : C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_69728b3b5ff2
unity_docs
editor
In Unity's 'Apply styles in C# scripts', what is 'Get resolved styles' and how does it work?
Style values on an element are computed from various sources, including multiple applied classes, inheritance from ancestors, and inline styles from UXML or C# code. These values might change from frame to frame. The style only holds the inline styles for the element and doesn’t reflect other sources. The resolvedStyle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5a46cea646a
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayout.TextField`.
e will override settings defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns string The edited string. Description Make a single-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0a4e6ebe9ff4
unity_docs
ui
Show me a Unity code example for 'Best practices for USS'.
behavior of a block or element. Append a modifier to a block or element name with two dashes. For example, menu--disabled , menu__item--disabled , button--small , or list-view__item--selected . Each name part may consist of Latin letters, digits, and dashes. Each name part is joined together with either a double unders...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e86122ce63e
unity_docs
scripting
What is `Application.Unload` in Unity? Explain its purpose and usage.
Application.Unload Declaration public static void Unload (); Description Unloads the Unity Player. Unity triggers an Application.unloading event and releases memory acquired by the Unity Player while keeping the current process alive. The amount of memory that is released depends on the platform. This is usef...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8245940e0c7
unity_docs
audio
Give me an overview of the `Microphone` class in Unity.
Microphone class in UnityEngine / Implemented in: UnityEngine.AudioModule Description Use this class to record to an AudioClip using a connected microphone. You can get a list of connected microphones from the devices property and then use the Start and End functions to start or end a recording session...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.