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_d8207c087b9c
unity_docs
physics
What is `SimulationOption.SyncTransforms` in Unity? Explain its purpose and usage.
SimulationOption.SyncTransforms Description Define whether or not to sync modified Transform poses to the physics system. This option has no effect if the SimulationStage.PrepareSimulation stage is not specified in the PhysicsScene.RunSimulationStages call.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_679ac20b97da
unity_docs
rendering
In Unity's 'Editor GUI and Legacy GUI texture Import Settings window reference', what is 'Properties' and how does it work?
Property Description Alpha Source Specifies how Unity generates the alpha value for the texture asset from the texture source file. None : The texture asset doesn’t have an alpha channel, whether the texture source file has one or not. Input Texture Alpha : Unity applies the alpha channel from the texture source file t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8e0166a1c43
unity_docs
scripting
Show me a Unity C# example demonstrating `LayerMask`.
low has User Layer 13 set to "Wall". This causes the assigned GameObject to be treated as part of a building. In the following script example, Physics.Raycast sends a ray into the world. Camera.main can be rotated around the y-axis and fire a ray. Three GameObject s represent walls that can be hit by the fired...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c2986e54f24
unity_docs
scripting
What is `Experimental.GraphView.StackNode.OnSeparatorContextualMenuEvent` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StackNode.OnSeparatorContextualMenuEvent Declaration protected void OnSeparatorContextualMenuEvent ( UIElements.ContextualMenuPopulateEvent evt , int separatorIndex ); Parameters Parameter Description evt The event. se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_564864776e73
unity_docs
scripting
What is `Device.SystemInfo.supportsDynamicResolution` in Unity? Explain its purpose and usage.
SystemInfo.supportsDynamicResolution public static bool supportsDynamicResolution ; Description Indicates whether the platform supports dynamic resolution scaling. (Read Only) Returns true if the current platform or graphics device supports dynamic resolution scaling, otherwise false . Dynamic resolution sca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5da4cb5dbf6d
unity_docs
ui
Explain 'Coordinate and position systems' in Unity.
UI Toolkit uses a powerful layout system that automatically calculates the position and size of individual elements based on the layout parameters in their style properties. This is based on Flexbox , a web layout model. For more information, refer to Layout Engine . ## Relative and absolute positions In UI Toolkit, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_164df6aa1ee6
github
scripting
Write a Unity C# UI script for Toggle Interface
```csharp using UnityEngine; /// <summary> /// Toggle canvas component /// </summary> public class ToggleInterface : MonoBehaviour { [Tooltip("Sets canvas starting visibility")] public bool enableOnStart = false; private Canvas canvas = null; private void Awake() { canvas = GetComponent<C...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_8e8392b63ba3
unity_docs
physics
Explain 'Compound colliders' in Unity.
Compound colliders are collections of multiple colliders on a single Rigidbody GameObject . Each collider is attached to a child GameObject, with the Rigidbody GameObject as its parent. This allows you to group and arrange colliders into complex shapes, and have the physics system treat them as a single rigid body . To...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4df69281211
unity_docs
scripting
What is `Rigidbody.centerOfMass` in Unity? Explain its purpose and usage.
Rigidbody.centerOfMass public Vector3 centerOfMass ; Description The center of mass relative to the transform's origin. If you don't set the center of mass from a script it will be calculated automatically from all colliders attached to the rigidbody. After a custom center of mass set, it will no longer be r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_77f1badf6016
unity_docs
rendering
In Unity's 'Set the render pipeline and render order for a shader', what is 'Set the render order' and how does it work?
Unity uses two tags to determine when to execute a shader: LightMode tag: Sets which stage of the render pipeline a shader pass runs during. For example, drawing opaque geometry, or drawing post-processing effects. Queue tag: Sets which group of objects a subshader belongs to. Unity draws each render queue in a specifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09119faf07a7
unity_docs
scripting
What is `UIElements.TwoPaneSplitViewOrientation` in Unity? Explain its purpose and usage.
TwoPaneSplitViewOrientation enumeration Description Determines the orientation of the two resizable panes. Properties Property Description Horizontal Split view panes layout is left/right with vertical resizable split. Vertical Split view panes layout is top/bottom with horizontal resizable split.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3391f1aeb7b2
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddRemotePackageReferenceWithVersionRange` in Unity? Explain its purpose and usage.
PBXProject.AddRemotePackageReferenceWithVersionRange Declaration public string AddRemotePackageReferenceWithVersionRange (string url , string minVersion , string maxVersion ); Parameters Parameter Description url The URL of the repository. minVersion The minimum version to allow updates from. maxVersion...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_014cb283d9ba
unity_docs
networking
Explain 'Trusting the web proxy security certificate' in Unity.
Some enterprises use SSL inspection as part of their networking environment, to inspect, track, and control network traffic. With SSL inspection, the web proxy acts as the server to the actual client, and then acts as the client to the actual server. To prevent the client from seeing a security warning, the web proxy m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_93026ad8977c
unity_docs
editor
Explain 'Search the Asset Database' in Unity.
The Asset Database search provider finds items in the Asset Database , which stores converted files and their data. It’s equivalent to using the AssetDatabase.FindAsset API. Note: By default, the Asset Database provider is inactive. To enable it, refer to Activate and deactivate search providers . Tip: You can use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_af59e5e73545_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Example of a "Plain" version of a Unity component. In this case, PlainMesh stores onlythe vertices, uvs and triangles of its Mesh equivalent, which is enough for many applications. Signature: ```csharp public class PlainMesh ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_0f783e95100b
unity_docs
animation
What is `Animations.AnimationHumanStream.GetGoalRotation` in Unity? Explain its purpose and usage.
AnimationHumanStream.GetGoalRotation Declaration public Quaternion GetGoalRotation ( AvatarIKGoal index ); Parameters Parameter Description index The AvatarIKGoal that is queried. Returns Quaternion The rotation of this IK goal. Description Returns the rotation of this IK goal in world space. Som...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_546f6b5c476e
unity_docs
scripting
What is `Mesh.GetBlendShapeIndex` in Unity? Explain its purpose and usage.
Mesh.GetBlendShapeIndex Declaration public int GetBlendShapeIndex (string blendShapeName ); Description Returns index of BlendShape by given name. Returns -1 if no BlendShape named blendShapeName exists.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bb8d8c0501a6
unity_docs
audio
In Unity's 'Audio Low Pass Filter', what is 'Details' and how does it work?
The Lowpass Resonance Q (short for Lowpass Resonance Quality Factor) determines how much the filter’s self-resonance is dampened. Higher lowpass resonance quality indicates a lower rate of energy loss, that is the oscillations die out more slowly. The Audio Low Pass Filter has a Rolloff curve associated with it, making...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a529e3b3e6eb
unity_docs
scripting
Show me a Unity C# example demonstrating `TextMesh.text`.
TextMesh.text public string text ; Description The text that is displayed. Additional resources: text mesh component . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Set the text of the attached Text mesh GetComponent<TextMesh>().text = "Hello World"; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7734eafe911
unity_docs
editor
Show me a Unity C# example demonstrating `ModelImporter.extraUserProperties`.
ModelImporter.extraUserProperties public string[] extraUserProperties ; Description A list of default FBX properties to treat as user properties during OnPostprocessGameObjectWithUserProperties. Specify the names of default FBX properties to be consider as extra user properties to pass to AssetPostprocessor.On...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd203ed8af38
unity_docs
scripting
What is `Unity.Properties.IProperty.GetAttributes` in Unity? Explain its purpose and usage.
IProperty.GetAttributes Declaration public IEnumerable<TAttribute> GetAttributes (); Returns IEnumerable<TAttribute> An IEnumerable_1 for all attributes of the given type. Description Returns all attribute of the given type. Declaration public IEnumerable<Attribute> GetAttributes (); Returns IEnum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_809a469cc472
unity_docs
scripting
In Unity's 'Create a Video Player component', what is 'Create a Video Player from the menu or hierarchy' and how does it work?
To create the Video Player component from the menu, select GameObject > Video > Video Player . Alternatively, in the Hierarchy , select the Add (+) button and then select Video > Video Player . Either method creates a new GameObject with a Video Player component attached.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3ad01585295d
unity_docs
math
In Unity's 'Recommended Quality settings to optimize your Web build', what is 'Quality Level' and how does it work?
The Quality settings contain a group of possible Quality Levels for your build. If you set your Quality Level to a lower setting ( Very Low or Low ), it results in faster load times and better performance which is recommended for a Web application. However, lower quality can mean the visuals don’t look as good. For mor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_189546254a27
unity_docs
editor
What is `ObjectNames.NicifyVariableName` in Unity? Explain its purpose and usage.
ObjectNames.NicifyVariableName Declaration public static string NicifyVariableName (string name ); Description Make a displayable name for a variable. This function will insert spaces before capital letters and remove optional m_ , _ or k followed by uppercase letter in front of the name. ```csharp using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb8857a9684a
unity_docs
rendering
What is `Camera.FieldOfViewToFocalLength` in Unity? Explain its purpose and usage.
Camera.FieldOfViewToFocalLength Declaration public static float FieldOfViewToFocalLength (float fieldOfView , float sensorSize ); Parameters Parameter Description fieldOfView field of view in degrees. sensorSize Sensor size in millimeters. Returns float Focal length in millimeters. Description Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7afbcde93642
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8_SRGB Description A one-component, 8-bit unsigned normalized format that has a single 8-bit R component stored with sRGB nonlinear encoding.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e41b20dcd3c
unity_docs
audio
Show me a Unity C# example demonstrating `UIElements.UxmlObjectReferenceAttribute`.
data with a field, surpassing the capabilities of a single UxmlAttributeAttribute . The field type must be a UXML object or an interface. When using an interface, only UXML Object types are valid for UXML serialization. The following example shows a common use case for the UxmlObjectReferenceAttribute. It uses t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_355293c25f15
unity_docs
editor
What is `HelpURLAttribute` in Unity? Explain its purpose and usage.
HelpURLAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provide a custom documentation URL for a class. The provided URL is expected to be an absolute path. If no file is found at the URL, the path is resolved relative to the Unity documentation, which can be either the manual...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c1f5a54cdd6
unity_docs
scripting
What is `Playables.PlayableBehaviour.PrepareData` in Unity? Explain its purpose and usage.
PlayableBehaviour.PrepareData Declaration public void PrepareData ( Playables.Playable playable , Playables.FrameData info ); Parameters Parameter Description playable The Playable that owns the current PlayableBehaviour. info A FrameData structure that contains information about the current frame ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f70de8911ce1
unity_docs
scripting
What is `Search.IQueryNode.QueryHashCode` in Unity? Explain its purpose and usage.
IQueryNode.QueryHashCode Declaration public int QueryHashCode (); Returns int An integer representing the hashcode. Description Returns a hashcode for this node. Multiple nodes can have the same hashcode if they have the same identifier.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00bc178edd84
unity_docs
physics
What is `PhysicsVisualizationSettings.QueryFilter.Check` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.QueryFilter.Check Description Whether the filter includes check type queries. For example, check type queries include Physics.CheckBox , Physics.CheckCapsule , and Physics.CheckSphere .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_081fbf45280b
unity_docs
scripting
Explain 'Scripting back ends' in Unity.
In Unity, the scripting back end is the runtime technology that compiles and executes your C# scripts . It determines how your code is turned into executable instructions and what runtime manages it on target platforms. Topic Description Introduction to scripting back ends Understand the available scripting backends an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b40f90dd98b1
unity_docs
math
What is `Rendering.BatchDrawCommandFlags` in Unity? Explain its purpose and usage.
BatchDrawCommandFlags enumeration Description Rendering options for the BatchDrawCommand struct. . Properties Property Description None This draw command does not have any special settings. FlipWinding Unity reverses the triangle winding in this draw command. Usage example: the transform has a negative scal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d1aa9dea3eb4
unity_docs
editor
Explain 'JetBrains Rider Editor' in Unity.
com.unity.ide.rider ## Description The JetBrains Rider Editor package provides an integration for using the JetBrains Rider IDE as a code editor for Unity. It adds support for generating .csproj files for code completion and auto-discovery of installations. ## Released for Unity Package version 3.0.39 is released f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e0bc9ec04550
unity_docs
scripting
In Unity's 'Thread-safe linear allocator example', what is 'Example usage report' and how does it work?
If all blocks are in use, or an allocation is too big for a block, the allocation falls back to the main heap allocator, which is much slower than the job allocator. A few overflow allocations are fine: 1 to 10 in a frame, or a few hundred, especially during load. If the overflow count grows with every frame, you can i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e9a24ddd21f
unity_docs
editor
What is `AssetImporter.GetImportLog` in Unity? Explain its purpose and usage.
AssetImporter.GetImportLog Declaration public static AssetImporters.ImportLog GetImportLog (string path ); Description Retrieves logs generated during the import of the asset at path . Additional resources: ImportLog , AssetImportContext.LogImportError , AssetImportContext.LogImportWarning . ```csharp u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a1d3f69bab01
github
scripting
Write a Unity C# script called Game Event_Invokable
```csharp using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables { [CreateAssetMenu(menuName = "Game Events/Game Event - Invokable")] public class GameEvent_Invokable : GameEvent { public void Invoke() => OnEvent(this); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa3036e45fd0
unity_docs
input
What is `UIElements.KeyboardEventBase_1.keyCode` in Unity? Explain its purpose and usage.
KeyboardEventBase<T0>.keyCode public KeyCode keyCode ; Description The key code. This is the code of the physical key that was pressed. It doesn't take into account the keyboard layout, and it displays modifier keys, since a key was pressed. For example, pressing the "A" key will cause this property to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5875036395fa
unity_docs
math
What are the parameters of `Mathf.Abs` in Unity?
Returns int Non-negative value of value . Description Returns the absolute value of value . For an integer number value , its absolute value is defined as its non-negative value without regard to its sign. Additional resources: Sign . ```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_8607eb308d8b
unity_docs
animation
What is `AssetImporters.MaterialDescription.HasAnimationCurveInClip` in Unity? Explain its purpose and usage.
MaterialDescription.HasAnimationCurveInClip Declaration public bool HasAnimationCurveInClip (string clipName , string propertyName ); Parameters Parameter Description propertyName Name of the material's animated property. clipName The name of the AnimationClip. Returns bool Returns true if the materia...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c967f095064e
unity_docs
ui
In Unity's 'ToolbarToggle', what is 'Inherited UXML attributes' and how does it work?
This element inherits the following attributes from its base class: Name Type Description binding-path string Path of the target property to be bound. focusable boolean If false, this prevents the element from being focused. The element can only be focused if its canGrabFocus property is true. label string The string r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb763292fd03
unity_docs
editor
Give me an overview of the `EditorAnalyticsSessionInfo` class in Unity.
EditorAnalyticsSessionInfo class in UnityEditor Description Provides access to Editor Analytics session information. This class contains static methods for looking up session information collected by the Editor Analytics system. Static Properties Property Description activeElapsedTime The total time, in milli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d82917019232
unity_docs
scripting
In Unity's 'FAQ for input and event systems with UI Toolkit', what is 'Method 2: Manual panel search' and how does it work?
Make a list of all the active panels in your scene. To do this, iterate through all UIDocument components in your scene and add uiDocument.rootVisualElement.panel to the list. If multiple documents share the same PanelSettings, include only one document for each distinct PanelSettings value. Iterate through the list of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4194c45d3150
unity_docs
math
What is `RectTransform.sizeDelta` in Unity? Explain its purpose and usage.
RectTransform.sizeDelta public Vector2 sizeDelta ; Description The size of this RectTransform relative to the distances between the anchors. If the anchors are together, sizeDelta is the same as size. If the anchors are in each of the four corners of the parent, the sizeDelta is how much bigger or smaller the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_830af1147adc_doc_3
github
scripting
What does `InitInternal` do in this Unity script? Explain its purpose and signature.
Identical to , but non-virtual, so slightly faster. Signature: ```csharp internal void InitInternal(TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, T...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_b21b580ac797
unity_docs
scripting
What is `Experimental.GraphView.IDropTarget.CanAcceptDrop` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IDropTarget.CanAcceptDrop Declaration public bool CanAcceptDrop (List<ISelectable> selection ); Parameters Parameter Description selection Selected elements. Returns bool Returns true if the dragged source can be drop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_291aaaf6f73f
unity_docs
rendering
What is `Material.HasProperty` in Unity? Explain its purpose and usage.
Material.HasProperty Declaration public bool HasProperty (string name ); Declaration public bool HasProperty (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 th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_503e44238ba4
unity_docs
physics
Show me a Unity C# example demonstrating `Collider.ClosestPoint`.
is the point on the Collider and location is the point in 3D space. If location is in the Collider the closestPoint is inside. If the Collider is disabled, the method returns the input position . Note: The difference from ClosestPointOnBounds is that the returned point is actually on the collider instead of o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d118adce5ad2
unity_docs
scripting
What is `Experimental.GraphView.Edge.isGhostEdge` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Edge.isGhostEdge public bool isGhostEdge ; Description Is this edge a ghost edge, which is the edge that appears snapped to a nearby port while an edge is being created.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dc63dcd5ab8
unity_docs
scripting
What is `RuntimePlatform.WindowsPlayer` in Unity? Explain its purpose and usage.
RuntimePlatform.WindowsPlayer Description In the player on Windows. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.WindowsPlayer) { Debug.Log("Do something ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_871894df9dfb
unity_docs
rendering
What is `DefaultLightingExplorerExtension.GetReflectionProbeColumns` in Unity? Explain its purpose and usage.
DefaultLightingExplorerExtension.GetReflectionProbeColumns Declaration protected LightingExplorerTableColumn[] GetReflectionProbeColumns (); Returns LightingExplorerTableColumn[] Column definitions for Reflection Probes. Description Returns column definitions for Reflection Probes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68667ec40b5f
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddRemotePackageReferenceAtVersionUpToNextMajor` in Unity? Explain its purpose and usage.
PBXProject.AddRemotePackageReferenceAtVersionUpToNextMajor Declaration public string AddRemotePackageReferenceAtVersionUpToNextMajor (string url , string version ); Parameters Parameter Description url The URL of the repository. version The version to use. Returns string Returns the GUID of the remote...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6ddb366e2e7
unity_docs
scripting
What is `UIElements.BaseTreeViewController.GetIndentationDepthByIndex` in Unity? Explain its purpose and usage.
BaseTreeViewController.GetIndentationDepthByIndex Declaration public int GetIndentationDepthByIndex (int index ); Parameters Parameter Description index The item index. Returns int The depth of the element. Description Return the depth of the element at that index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_600dcdf2680b
unity_docs
animation
What are the parameters of `AnimationUtility.GetFloatValue` in Unity?
Returns bool Returns True if the value exists. False otherwise. Description Retrieves the float value that the binding points to. Use this method when recording keyframes. Obsolete This overload is deprecated. Use the one with EditorCurveBinding instead. Declaration public static bool GetFloatValue ( GameObject root , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68a4f9b4fd2e
unity_docs
physics
What is `ContactPairHeader` in Unity? Explain its purpose and usage.
ContactPairHeader struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description A header struct which contains colliding bodies. This struct contains an array of ContactPair s that can be retrieved with the GetContactPair method. Properties Property Description body The first Rigidbody or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b593fb958a75
unity_docs
rendering
What is `AndroidETC2FallbackOverride.Quality32BitDownscaled` in Unity? Explain its purpose and usage.
AndroidETC2FallbackOverride.Quality32BitDownscaled Description Texture is decompressed to the RGBA32 format and downscaled to half of the original texture width and height. Additional resources: TextureImporter.textureFormat.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ef01b8abbb4
unity_docs
scripting
What is `GizmoUtility.iconSize` in Unity? Explain its purpose and usage.
GizmoUtility.iconSize public static float iconSize ; Description Control the size that 3D icons render in the Scene View. This is a normalized value (between 0 and 1) that ranges from very small (lower values) to very large (larger values).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5ad5b540fd96
unity_docs
scripting
In Unity's 'Bind a custom control to custom data type', what is 'Create a custom control' and how does it work?
Create a custom Editor for Planet and a custom Property Drawer for Temperature . In the custom Property Drawer, implement a button that converts temperature between Fahrenheit and Celsius by writing to properties of SerializedProperty (use doubleValue and enumValueIndex ) and then calling SerializedObject.ApplyModified...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4c98f53859b
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.DictationErrorHandler` in Unity? Explain its purpose and usage.
DictationRecognizer.DictationErrorHandler Declaration public delegate void DictationErrorHandler (string error , int hresult ); Parameters Parameter Description error The error mesage. hresult HRESULT code that corresponds to the error. Description Delegate for DictationError event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_670f3f519c35
unity_docs
scripting
Explain 'HelpBox' in Unity.
A HelpBox displays a message to the user. You can set the type of message to display, such as a warning or an error. You can also set the message to display as rich text. ## Create a HelpBox You can create a HelpBox with UXML and C#. The following C# example creates a HelpBox with the message “Help text” and the info...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ad7d43cf6d1
unity_docs
physics
What is `PhysicsVisualizationSettings.GetShowCapsuleColliders` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.GetShowCapsuleColliders Declaration public static bool GetShowCapsuleColliders (); Description Should CapsuleColliders be shown. Additional resources: CapsuleCollider .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_784551537dcf
unity_docs
editor
What is `PlayerSettings.WSA.SetVisualAssetsImage` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.SetVisualAssetsImage Declaration public static void SetVisualAssetsImage (string image , PlayerSettings.WSAImageType type , PlayerSettings.WSAImageScale scale ); Parameters Parameter Description image Asset path for the image to use as the specified Logo. type UWP Logo type to as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c4358131c81
unity_docs
rendering
Show me a Unity C# example demonstrating `LineRenderer.generateLightingData`.
LineRenderer.generateLightingData public bool generateLightingData ; Description Configures a line to generate Normals and Tangents. With this data, Scene lighting can affect the line via Normal Maps and the Unity Standard Shader, or your own custom-built Shaders. ```csharp using UnityEngine; using System.Coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4dc68e02b012
unity_docs
xr
What is `XR.InputTracking` in Unity? Explain its purpose and usage.
InputTracking class in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description A collection of methods and properties for accessing XR input devices by their XR Node representation. XR devices can be accessed in different ways, with the XR Node representing a physical input source such as a head posit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf0024c79334
unity_docs
ui
Show me a Unity C# example demonstrating `CursorLockMode.Locked`.
CursorLockMode.Locked Description Locks the cursor to the center of the Game view. CursorLockMode.Locked also hides the hardware cursor. However, the cursor is only locked and hidden after you click in the Game view. Android : Only supported on Android 8.0 (API 26) or newer. ```csharp //This script makes Buttons ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d829acdad8f
unity_docs
rendering
In Unity's 'Stereo rendering', what is 'Set the render mode' and how does it work?
You can find the Render mode setting under XR Plug-in Management in Project Settings . Each XR provider plug-in provides its own setting, if supported. To set a render mode: Open Project Settings (menu: Edit > Project Settings ). Expand the XR Plugin Management section, if necessary. Select the settings page for the re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d46bb9843fdd
unity_docs
scripting
What is `Grid` in Unity? Explain its purpose and usage.
Grid class in UnityEngine / Inherits from: GridLayout Description Grid is the base class for plotting a layout of uniformly spaced points and lines. The Grid component stores dimensional data of the layout of the grid and provides helper functions to retrieve information about the grid, such as the conversion b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d61f23b85e3
unity_docs
scripting
What is `Search.SearchExpressionRuntime.Push` in Unity? Explain its purpose and usage.
SearchExpressionRuntime.Push Declaration public IDisposable Push ( Search.SearchExpression searchExpression , IEnumerable<SearchExpression> args ); Declaration public IDisposable Push ( Search.SearchItem item ); Parameters Parameter Description searchExpression Expression to evaluate. args Paramete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08d15b41ae73
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.IntentFilter` in Unity? Explain its purpose and usage.
IntentFilter class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <intent-filter> Android Manifest element. For more information about the element, see Android's documentation: IntentFilter element Properties Property Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_234d1d9e0aac
unity_docs
animation
What is `Animations.AnimatorStateMachine.parentStateMachinePosition` in Unity? Explain its purpose and usage.
AnimatorStateMachine.parentStateMachinePosition public Vector3 parentStateMachinePosition ; Description The position of the parent state machine node. Only valid when in a hierachic state machine.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d875792ecacf
unity_docs
scripting
What is `Experimental.GraphView.Attacher.Reattach` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Attacher.Reattach Declaration public void Reattach (); Description Starts monitoring target element position changes and places the attached element accordingly.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_494ea57939d6
unity_docs
scripting
What is `Rendering.RenderPipelineGlobalSettings.Add` in Unity? Explain its purpose and usage.
RenderPipelineGlobalSettings.Add Declaration protected bool Add ( Rendering.IRenderPipelineGraphicsSettings settings ); Description Adds a IRenderPipelineGraphicsSettings interface to this instance of the RenderPipelineGlobalSettings asset.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_013e6e0c6b92
unity_docs
performance
What is `Profiling.CustomSampler.Create` in Unity? Explain its purpose and usage.
CustomSampler.Create Declaration public static Profiling.CustomSampler Create (string name , bool collectGpuData ); Parameters Parameter Description name Name of the Sampler. collectGpuData Specifies whether this Sampler records GPU timings. If you want the Sampler to record GPU timings, set this to tru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf33f6200c5a
unity_docs
math
What is `Mathf.SmoothDamp` in Unity? Explain its purpose and usage.
Mathf.SmoothDamp Declaration public static float SmoothDamp (float current , float target , ref float currentVelocity , float smoothTime , float maxSpeed = Mathf.Infinity, float deltaTime = Time.deltaTime); Parameters Parameter Description current The current value. target The target value. curren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9492dc82f044
unity_docs
physics
Show me a Unity C# example demonstrating `Collider.attachedArticulationBody`.
Collider.attachedArticulationBody public ArticulationBody attachedArticulationBody ; Description The articulation body the collider is attached to. Returns null if the collider is attached to no articulation body. Colliders are automatically connected to the articulation body attached to the same game objec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53945c9467ea
unity_docs
editor
Show me a Unity C# example demonstrating `Android.AndroidProjectFiles`.
Description Stores C# representations of Gradle project files associated with custom modules or plug-ins(libraries). Use this class to pass Gradle configuration file objects to the AndroidProjectFilesModifier.OnModifyAndroidProjectFiles callback, allowing modifications to Gradle files during the build process. This...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bb705c5d7719
unity_docs
performance
Explain 'Analyzing coroutines' in Unity.
Coroutines execute differently from other script code. Most script code in Unity appears within a performance trace in a single location, beneath a specific callback invocation. However, the CPU code of coroutines always appears in two places in a trace: All the initial code in a coroutine, from the start of the corout...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e94fe1be8bdc
unity_docs
rendering
What are the parameters of `GUILayout.Toggle` in Unity?
Returns bool The new value of the button. Description Make an on/off toggle button. Toggle button in the Game View. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws 2 toggle controls, one with a text, the other with an image. Texture aTexture; bool toggleTxt = false; bool...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1a195e83b94
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.DisallowAutoRefresh`.
n operations (for example, if you are building custom integration with a version control system). This method does not simply disable the auto-refresh feature. Instead it increments a counter, and only allows auto-refresh when the counter is returned to zero. Therefore, each time you call DisallowAutoRefresh, you must ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f2f84552475
unity_docs
scripting
What is `Search.SearchViewState.CreatePickerState` in Unity? Explain its purpose and usage.
SearchViewState.CreatePickerState Declaration public static Search.SearchViewState CreatePickerState (string title , Search.SearchContext context , Action<Object,bool> selectObjectHandler , Action<Object> trackingObjectHandler , string typeName , Type filterType , Search.SearchViewFlags flags ); Decl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e21b3f700e7
unity_docs
rendering
What is `ComputeShader.EnableKeyword` in Unity? Explain its purpose and usage.
ComputeShader.EnableKeyword Declaration public void EnableKeyword (ref Rendering.LocalKeyword keyword ); Declaration public void EnableKeyword (string keyword ); Parameters Parameter Description keyword The LocalKeyword to enable. keyword The name of the LocalKeyword to enable. Description En...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b3d593e7978
unity_docs
scripting
What is `RenderSettings.flareFadeSpeed` in Unity? Explain its purpose and usage.
RenderSettings.flareFadeSpeed public static float flareFadeSpeed ; Description The fade speed of all flares in the Scene. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { RenderSettings.flareFadeSpeed = 0.5f; } } ``` Additional resources: The Lighting window , LensFlare c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d096c5abfc65
unity_docs
physics
What is `Physics2D.useSubStepContacts` in Unity? Explain its purpose and usage.
Physics2D.useSubStepContacts public static bool useSubStepContacts ; Description Whether to calculate contacts for all simulation sub-steps or only the first sub-step. When simulation sub-stepping is enabled with Physics2D.useSubStepping , this property is used to control the whether or not contacts are calcul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64d9c43d99a7
unity_docs
scripting
Show me a Unity C# example demonstrating `LayerMask.GetMask`.
ion public static int GetMask (params string[] layerNames ); Parameters Parameter Description layerNames List of layer names to convert to a layer mask. Returns int The layer mask created from the layerNames . Description Given a set of layer names as defined by either a Builtin or a User Layer in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27aae047d2e4
unity_docs
physics
What are the parameters of `Search.ObjectIndexer.IndexNumber` in Unity?
Description Adds a key-number value pair to the index. The key won't be added with variations. The following example uses IndexNumber to index a number testsize property that can be searched using common number operators such as >= , i.e. testsize>=4.2 . ```csharp [CustomObjectIndexer(typeof(Collider), version = 3)] st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1656d275673b
unity_docs
rendering
Explain 'Camera Inspector window reference for the Built-In Render Pipeline' in Unity.
Explore the properties in the Camera component window to customize cameras. Property: Function: Clear Flags Determines which parts of the screen will be cleared. This is handy when using multiple Cameras to draw different game elements. Background The color applied to the remaining screen after all elements in view hav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_07494ce615f3_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
XR Heads-up display controllerManages persistent UI elements visible to the user Signature: ```csharp public class XRHUD : MonoBehaviour ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_43ff2574a232
unity_docs
scripting
What is `RectInt.xMax` in Unity? Explain its purpose and usage.
RectInt.xMax public int xMax ; Description Shows the maximum X value of the RectInt . Sets the maximum X value of RectInt . If you enter a maximum value that is less than the current minimum value, then the entered value becomes the new minimum value and the previous minimum value becomes the new maximum valu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62a59e898357
unity_docs
input
What is `GUI.tooltip` in Unity? Explain its purpose and usage.
GUI.tooltip public static string tooltip ; Description The tooltip of the control the mouse is currently over, or which has keyboard focus. (Read Only). When you create GUI controls, you can pass in a tooltip for them. This is done by changing the content parameter to take a custom-made GUIContent object, rat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_936ca82157ab
unity_docs
scripting
What is `Accessibility.AccessibilityHierarchy.RemoveNode` in Unity? Explain its purpose and usage.
AccessibilityHierarchy.RemoveNode Declaration public void RemoveNode ( Accessibility.AccessibilityNode node , bool removeChildren ); Parameters Parameter Description node The node to remove. removeChildren Default value is true . If removeChildren is false , Unity grafts the child nodes to the parent. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f30506e70c97
github
scripting
Write a Unity Editor script for Board Creator Window
```csharp using System; using UnityEditor; using UnityEngine; public class BoardCreatorWindow : EditorWindow { private Vector2Int boardSize = new Vector2Int(35, 28); private TileViewInfo[][] tilesInfo; private TileViewInfo selectedTile; [MenuItem("Window/Pacman/Board Creator")] static void ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_4afe8bbf739a
unity_docs
rendering
What is `RenderTextureCreationFlags.BindMS` in Unity? Explain its purpose and usage.
RenderTextureCreationFlags.BindMS Description Setting this flag causes the RenderTexture to be bound as a multisampled texture in a shader. The flag prevents the RenderTexture from being resolved by default when RenderTexture.antiAliasing is greater than 1.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1ac73c7aed8a
unity_docs
rendering
Explain 'Manage references' in Unity.
References are properties that use a GameObject , a component, or an asset as an input. For example, on a 3D GameObject: The Mesh Filter component, which gives the mesh its shape, refers to a mesh asset. The Mesh Renderer component refers to a material. Components can have default references, or you might need to add a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_392020e49658
github
scripting
Write a Unity Editor script for FB Passthrough Build Hook
```csharp using System; using System.Collections.Generic; using Unity.XR.Management.AndroidManifest.Editor; using UnityEditor; using UnityEditor.Build.Reporting; using UnityEditor.XR.OpenXR.Features; using UnityEngine.XR.OpenXR; namespace OpenXR.Extensions.Editor { public class FBPassthroughBuildHook : OpenXRFeatu...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_296a0cd701ed
unity_docs
physics
What is `Collider2D.frictionCombine` in Unity? Explain its purpose and usage.
Collider2D.frictionCombine public PhysicsMaterialCombine2D frictionCombine ; Description The friction combine mode used by the Collider2D . A Collider2D can be assigned a PhysicsMaterial2D either directly via to the Collider2D.sharedMaterial , indirectly via the attached Rigidbody2D.sharedMaterial , th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b492a2460de2
unity_docs
animation
What is `Animations.AnimatorState.cycleOffsetParameterActive` in Unity? Explain its purpose and usage.
AnimatorState.cycleOffsetParameterActive public bool cycleOffsetParameterActive ; Description Define if the cycle offset value is driven by an Animator controller parameter or by the value set in the editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29aa1c13ee34
unity_docs
math
What is `Experimental.GraphView.GraphView.UpdateViewTransform` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.UpdateViewTransform Declaration public void UpdateViewTransform ( Vector3 newPosition , Vector3 newScale ); Parameters Parameter Description newPosition New position. newScale New scale. Description Upda...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5427b423942d
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Spanish`.
SystemLanguage.Spanish Description Spanish. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Spanish language if (Application.systemLanguage == SystemLanguage.Spanish) { //Outputs into console that the system is Spani...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7924aa4c65b1
unity_docs
rendering
In Unity's 'Select the CPU or GPU for baking', what is 'Select the Progressive Lightmapper' and how does it work?
To select the Progressive Lightmapper: Go to Window > Rendering > Lighting Navigate to Lightmapping Settings Set Lightmapper to Progressive CPU or Progressive GPU You can perform many of the functions available in this window via scripts , using the LightmapEditorSettings and Lightmapping APIs.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64ad02f6b3f9
unity_docs
scripting
Show me a Unity C# example demonstrating `Color32.a`.
Color32.a public byte a ; Description Alpha component of the color. ```csharp using UnityEngine;public class Example : MonoBehaviour { Color32 color = Color.white; void Start() { color.a = 0; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.