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_man_b80b6c883735
unity_docs
physics
In Unity's 'Physics 2D reference', what is 'Multithreading' and how does it work?
The settings in the Multithreading section allow you to use the C# Job System to configure multithreaded physics. Property Function Use Multithreading Enable this option to execute the simulation steps using the job system and use the rest of these options to control how to achieve that. Use Consistency Sorting Enable ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_492bb78746e1
unity_docs
rendering
What are the parameters of `Search.FuzzySearch.FuzzyMatch` in Unity?
Returns bool Returns true if a match was found. Description Performs a fuzzy search for a pattern on a string. ```csharp using System; using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_FuzzySearch_FuzzyMatch { [MenuItem("Exampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_918456c8c383
unity_docs
physics
Show me a Unity C# example demonstrating `RaycastHit2D.point`.
RaycastHit2D.point public Vector2 point ; Description The world space position where the physics query shape intersected with the detected Collider2D surface. Additional resources: RaycastHit2D.normal and RaycastHit2D.fraction . ```csharp using UnityEngine;public class ExampleClass : MonoBehaviour { pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e17eea629d95
unity_docs
scripting
Show me a Unity C# example demonstrating `Collider.bounds`.
Collider.bounds public Bounds bounds ; Description The world space bounding volume of the collider (Read Only). Note that this will be an empty bounding box if the collider is disabled or the game object is inactive. ```csharp using UnityEngine;public class ColliderBounds : MonoBehaviour { Collider m_Collid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4981267f5a88
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.AssetEditingScope`.
ty will only perform one input process for all the changes you made while the importing was paused. This class is an alternative to the AssetDatabase.StartAssetEditing and AssetDatabase.StopAssetEditing methods, which serve the same purpose. The AssetEditingScope class is intended to be used within a using stat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_082c6c3df463
unity_docs
scripting
Show me a Unity C# example demonstrating `SortingLayer.GetLayerValueFromID`.
ption id The unique value of the sorting layer as returned by any renderer's sortingLayerID property. Returns int The final sorting value of the layer relative to other layers. Description Returns the final sorting layer value. To determine the sorting order between the various sorting layers, use this method...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e74f1a3275af
unity_docs
rendering
What are the parameters of `Material.SetTexture` in Unity?
Description Sets a named texture. Many shaders use more than one texture. Use SetTexture to change the texture (identified by shader property name, or unique property name ID). When setting textures on materials using the Standard Shader, you should be aware that you may need to use EnableKeyword to enable features of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d838cd937e0e
unity_docs
editor
Explain 'Memory Manager API for low-level native plug-ins' in Unity.
The IUnityMemoryManager memory manager API is a C++ interface that allows you to use Unity’s memory management and memory profiling in native plug-ins . This API enables you to: Access Unity’s memory manager through a memory allocator. Track your plug-in’s memory use through Unity’s Memory Profiler package. These featu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d32dc824abe4
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayoutUtility.GetLastRect`.
GUILayoutUtility.GetLastRect Declaration public static Rect GetLastRect (); Returns Rect The last used rectangle. Description Get the rectangle last used by GUILayout for a control. Note that this only works during the Repaint event. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_404ea3809f42_doc_5
github
scripting
What does `RegisterSubscriptions` do in this Unity script? Explain its purpose and signature.
The method is used to provide a single place where all subscriptions are madeA reference to IEventManager implementationEntity's identifier Signature: ```csharp public abstract void RegisterSubscriptions(IEventManager eventManager, EntityId entityId); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53e53adaf0f5
unity_docs
scripting
What is `Device.Application.absoluteURL` in Unity? Explain its purpose and usage.
Application.absoluteURL public static string absoluteURL ; Description This has the same functionality as Application.absoluteURL . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d84ab7c8522b
unity_docs
rendering
What are the parameters of `Shader.SetGlobalColor` in Unity?
Description Sets a global color property for all shaders. Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in Properties block). Usually this is used if you have a set of custom shaders that all use the same "global" color (fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f3b900e89dd
unity_docs
rendering
What is `Rendering.StencilState` in Unity? Explain its purpose and usage.
StencilState struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Values for the stencil state. Use this with RenderStateBlock and ScriptableRenderContext.DrawRenderers to override the GPU's render state. Corresponds to the Stencil command in ShaderLab . Additional resources...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_885455bb0943
unity_docs
math
What is `SerializedProperty` in Unity? Explain its purpose and usage.
SerializedProperty class in UnityEditor Description SerializedProperty and SerializedObject are classes for editing properties on objects in a completely generic way that automatically handles undo, multi-object editing and Prefab overrides. SerializedProperty is primarily used to read or change the value of a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94abedb5f26f
unity_docs
ui
Give me an overview of the `TextGenerationSettings` class in Unity.
TextGenerationSettings struct in UnityEngine / Implemented in: UnityEngine.TextRenderingModule Description A struct that stores the settings for TextGeneration. Properties Property Description alignByGeometry Use the extents of glyph geometry to perform horizontal alignment rather than glyph metrics. color ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9bf840a9fbf9
unity_docs
rendering
In Unity's 'Introduction to writing shaders in code', what is 'Different ways of writing shaders' and how does it work?
There are different ways of writing shaders: The most common way is to write vertex and fragment shaders in HLSL. For more information, see Writing vertex and fragment shaders . In the Built-in Render Pipeline, you can also write Surface Shaders. They are a simplified way of writing shaders that interact with lighting....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09805e95d92c
unity_docs
ui
What is `UIElements.BaseVerticalCollectionView.GetRootElementForId` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.GetRootElementForId Declaration public UIElements.VisualElement GetRootElementForId (int id ); Parameters Parameter Description id The item identifier. Returns VisualElement The item's root element. Description Gets the root element of the specified collection view item....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13909a0659cc
unity_docs
ui
What are the parameters of `UIElements.ScrollView.ScrollTo` in Unity?
Description Scroll to a specific child element. This example creates a ScrollView that contains multiple labels. A Button is used to scroll to a selected label. ```csharp using UnityEngine; using UnityEngine.UIElements;public class ScrollViewScrollToExample : MonoBehaviour { public UIDocument uiDocument; public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f38b45760dd1
unity_docs
math
What are the parameters of `PhysicsShapeGroup2D.GetShapeData` in Unity?
Description Gets a copy of both the shapes and vertices in the PhysicsShapeGroup2D . NOTE : Because this is a copy, changing the specified shapes and vertices lists afterwards will not change the PhysicsShapeGroup2D . ```csharp using System.Collections.Generic; using UnityEngine; using UnityEngine.Assertions;public cla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5db272296c42
unity_docs
rendering
What is `Graphics.ClearRandomWriteTargets` in Unity? Explain its purpose and usage.
Graphics.ClearRandomWriteTargets Declaration public static void ClearRandomWriteTargets (); Description Unset random write targets for Shader Model 4.5 level pixel shaders. This function unsets any "random write" targets that were previously set with SetRandomWriteTarget .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1f86c78481d
unity_docs
editor
Show me a Unity C# example demonstrating `EditorWindow.wantsMouseEnterLeaveWindow`.
tor window. If set to true, the window recieves an OnGUI call whenever the mouse enters or leaves a window. Note: This function does not trigger Repaint() Automatically. Also, entering or leaving a window while a mouse button is pressed does not trigger either event, as pressing the mouse button activates drag mode (...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98ec2a8c14dc
unity_docs
xr
What is `Playables.PlayableGraph.GetOutputByType` in Unity? Explain its purpose and usage.
PlayableGraph.GetOutputByType Declaration public Playables.PlayableOutput GetOutputByType (int index ); Parameters Parameter Description index The output index. Returns PlayableOutput The PlayableOutput at the given index among all the PlayableOutput of the same type T . Description Get Playa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28acce38856f
unity_docs
scripting
What is `UIElements.BindingInfo` in Unity? Explain its purpose and usage.
BindingInfo struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Provides information about a binding. Properties Property Description binding The binding matching this information. bindingId The binding id. targetElement The visual element targeted by th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5b09543a602
unity_docs
scripting
Show me a Unity C# example demonstrating `Logger.LogError`.
(string tag , object message , Object context ); Parameters Parameter Description tag Used to identify the source of a log message. It usually identifies the class where the log call occurs. message String or object to be converted to string representation for display. context Object to which the messag...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dcc5e414881
unity_docs
scripting
What is `Random.value` in Unity? Explain its purpose and usage.
Random.value public static float value ; Description Returns a random float within [0.0..1.0] (range is inclusive) (Read Only). Important : Both the lower and upper bounds are inclusive . Any given float value between 0.0 and 1.0, including both 0.0 and 1.0 , will appear on average approximately once every t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89b7365a9c76
unity_docs
scripting
What is `UIElements.Justify` in Unity? Explain its purpose and usage.
Justify enumeration Description Defines the alignment along the main axis, how is extra space distributed. Properties Property Description FlexStart Items are packed toward the start line. Default Value. Center Items are centered along the line. FlexEnd Items are packed toward the end line. Sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ffa17f489659
unity_docs
scripting
What is `ParticleSystem.NoiseModule.remapZ` in Unity? Explain its purpose and usage.
ParticleSystem.NoiseModule.remapZ public ParticleSystem.MinMaxCurve remapZ ; Description Define how the noise values are remapped on the z-axis, when using the ParticleSystem.NoiseModule.separateAxes option. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[Requir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65a744de5e22
unity_docs
networking
What is `XR.XRDisplaySubsystem.XRMirrorViewBlitDesc.GetBlitParameter` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.XRMirrorViewBlitDesc.GetBlitParameter Declaration public void GetBlitParameter (int blitParameterIndex , out XR.XRDisplaySubsystem.XRBlitParams blitParameter ); Parameters Parameter Description blitParameterIndex Index of the blit parameter to get. blitParameter XRBlitParams to popul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08c3f60886e8
unity_docs
rendering
What is `TerrainTools.PaintContext` in Unity? Explain its purpose and usage.
PaintContext class in UnityEngine.TerrainTools / Implemented in: UnityEngine.TerrainModule Description The context for a paint operation that may span multiple connected Terrain tiles. This class is used to apply an edit operation to an area of Terrain that may span multiple Terrain tiles. A PaintContext may ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_66db97f8da13
unity_docs
scripting
Explain 'Auto Layout' in Unity.
The Rect Transform layout system is flexible enough to handle a lot of different types of layouts and it also allows placing elements in a complete freeform fashion. However, sometimes something a bit more structured can be needed. The auto layout system provides ways to place elements in nested layout groups such as h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e46ab18bf850
unity_docs
physics
What is `PhysicsVisualizationSettings.QueryFilter` in Unity? Explain its purpose and usage.
QueryFilter enumeration Description Enumerator used for controlling query visualization filtering. Properties Property Description All Includes all query shapes and types into the filter. Box Whether the filter includes box shaped queries. Capsule Whether the filter includes capsule shaped queries. Cast Whet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54a6629e411f
unity_docs
rendering
What are the parameters of `EditorGUIUtility.GetIconForObject` in Unity?
Returns Texture2D Returns the custom icon associated with the object. If there is no custom icon associated with the object, returns null. Description Gets the custom icon associated with an object. Only GameObjects and MonoScripts have associated custom icons. ```csharp using UnityEngine; using UnityEditor;class Examp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35101ef7b88f
unity_docs
math
What is `Vector4.Distance` in Unity? Explain its purpose and usage.
Vector4.Distance Declaration public static float Distance ( Vector4 a , Vector4 b ); Description Returns the distance between a and b . Vector4.Distance(a,b) is the same as (a-b).magnitude .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_532bf8fa69cd
github
scripting
Write a Unity C# UI script for Suggestion Line
```csharp using System; using TMPro; using UnityEngine; using UnityEngine.EventSystems; public class SuggestionLine : MonoBehaviour, IPointerClickHandler { [SerializeField] TMP_Text suggestionText; [SerializeField] TMP_Text TypeText; TMP_InputField _textField; Type _commandType; public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b7ab0c99ae20
unity_docs
rendering
In Unity's 'Introduction to writing shaders in code', what is 'ShaderLab' and how does it work?
ShaderLab is a declarative language that you use in shader source files. It uses a nested-braces syntax to describe a Shader object. There are many things that you can define in ShaderLab, but the most common are: Defining the overall structure of the Shader object. See ShaderLab: creating a Shader , ShaderLab: creatin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c9099e59fca
unity_docs
input
Show me a Unity C# example demonstrating `Camera.ScreenToViewportPoint`.
orms position from screen space into viewport space. Screen space is defined in pixels. The bottom-left of the screen is (0,0); the right-top is ( pixelWidth , pixelHeight ). The z position is in world units from the camera. Viewport space is normalized and relative to the camera. The bottom-left of the camera is (0...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb832e19be65
unity_docs
performance
What are the parameters of `Profiling.FrameDataView.GetFrameMetaData` in Unity?
Returns NativeArray<T> Returns the frame metadata as a NativeArray. Description Retrieves metadata associated with the frame. Use GetFrameMetaData to retrieve the data that the Profiler.EmitFrameMetaData method wrote to the Profiler stream. Use id to identify the metadata from your Project or package. Use tag to distin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90bfe1cd719f
unity_docs
rendering
What is `PlatformIcon.SetTextures` in Unity? Explain its purpose and usage.
PlatformIcon.SetTextures Declaration public void SetTextures (params Texture2D[] textures ); Parameters Parameter Description textures Must be an array of size PlatformIcon.maxLayerCount . Description Assign all available icon layers. Will overwrite all the currently set icon layers. Texture files must b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f174c6b259a
unity_docs
editor
What are the parameters of `PrefabUtility.SaveAsPrefabAsset` in Unity?
Returns GameObject The root GameObject of the saved Prefab Asset, if available. Description Creates a Prefab Asset at the given path from the given GameObject, including any childen in the Scene without modifying the input objects. In case some of the children are Prefab instances they will automatically become nested ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_655891d84d79
unity_docs
physics
In Unity's 'Set fixed timestep to optimize physics simulation frequency', what is 'Mitigate escalating physics simulation load' and how does it work?
On lower-end devices, or when the main thread is overloaded, a common performance issue occurs when the physics system runs multiple fixed updates per frame, leading to a cycle of increasing CPU load and frame time. This performance issue is often referred to as the “spiral of doom”. If the physics system spends a long...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc338e738765
unity_docs
scripting
What is `ComputeBuffer.name` in Unity? Explain its purpose and usage.
ComputeBuffer.name public string name ; Description The debug label for the compute buffer (setter only). This name shows up in profiling and frame debugging tools, when supported. The name does not affect the rendering process.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d688e48abf50
unity_docs
input
In Unity's 'Shortcuts Manager', what is 'The Command list' and how does it work?
This section explains how to use the Command list to view shortcut assignments. For information about using the Command list to add, remove, and modify shortcuts, see Managing shortcuts . The Command list shows you which shortcuts are assigned to specific commands. Choose a category from the Category list to display it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42a3108430bc
unity_docs
physics
What is `BuildAssetBundleOptions.ForceRebuildAssetBundle` in Unity? Explain its purpose and usage.
BuildAssetBundleOptions.ForceRebuildAssetBundle Description Force rebuild the assetBundles. This allows you to rebuild the assetBundle even if none of the included assets have changed. ```csharp //Create a folder (right click in the Assets folder and go to Create>Folder), and name it “Editor” if it doesn’t already...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9464449195a0
unity_docs
editor
What are the parameters of `AssetDatabase.ExtractAsset` in Unity?
Returns string An empty string if Unity has successfully extracted the Asset, or an error message if not. Description Creates an external Asset from an object (such as a Material) by extracting it from within an imported asset (such as an FBX file). NOTE: The feature is currently only available for materials embedded i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec3e287bd63e
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.selectedItems` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.selectedItems public IEnumerable<object> selectedItems ; Description Returns the selected items from the data source. Always returns an enumerable, even if no item is selected, or a single item is selected.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08796a49dc57
unity_docs
scripting
Give me an overview of the `ParticleSystemStopAction` class in Unity.
ParticleSystemStopAction enumeration Description The action to perform when the Particle System stops. Properties Property Description None Do nothing. Disable Disable the GameObject containing the Particle System. Destroy Destroy the GameObject containing the Particle System. Callback Call MonoBehaviour.OnP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cdac97b169b2
unity_docs
physics
In Unity's 'Garbage collection modes', what is 'Incremental garbage collection' and how does it work?
Incremental garbage collection spreads out the process of garbage collection over multiple frames. This is the default garbage collection behavior in Unity. Unity’s garbage collector uses the Boehm-Demers-Weiser garbage collector . By default, Unity uses it in incremental mode, which means that the garbage collector sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_687d1ff6ba4a_doc_1
github
scripting
What does `DeltaTime` do in this Unity script? Explain its purpose and signature.
The interval in seconds from the last tick of behaviour tree. Signature: ```csharp public float DeltaTime => Time.time - behaviourTree.LastTick; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_44f5c133fd41
unity_docs
scripting
What is `UIElements.BackgroundPropertyHelper` in Unity? Explain its purpose and usage.
BackgroundPropertyHelper class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Helper to convert between background properties and ScaleMode. For more information, Refer to Set the scale mode for a background image . Static Methods Method Description ConvertScaleM...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e951cd63db6
unity_docs
math
What is `Experimental.GraphView.Placemat.CollapsedSize` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Placemat.CollapsedSize public Vector2 CollapsedSize ; Description The size of the placemat when collapsed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de813f144264
unity_docs
editor
What is `AssetDatabase.GetImplicitAssetBundleName` in Unity? Explain its purpose and usage.
AssetDatabase.GetImplicitAssetBundleName Declaration public static string GetImplicitAssetBundleName (string assetPath ); Parameters Parameter Description assetPath The asset's path. Returns string Returns the name of the AssetBundle that a given asset belongs to. See the method description for more deta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c2b32d638ae
unity_docs
physics
What is `PhysicsMaterial.frictionCombine` in Unity? Explain its purpose and usage.
PhysicsMaterial.frictionCombine public PhysicsMaterialCombine frictionCombine ; Description Determines how the friction is combined. Traditionally friction properties are dependent on the combination of the two materials in contact. This is however impractical in a game. Instead you can use the combine mode ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_703217a15142
unity_docs
math
In Unity's 'Load SSH keys automatically on Windows (PuTTY)', what is 'Procedure' and how does it work?
Follow these steps to load keys and passphrases automatically on Windows: Start Pageant from the PuTTY folder: Start-Menu > All Programs > PuTTY > Pageant Find the Pageant icon in the system tray. Right-click the Pageant icon in the system tray and select View Keys . The Pageant Key List window opens. Click Add Key . U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea75ae2d8601
unity_docs
editor
What is `PrefabUtility.GetOriginalSourceRootWhereGameObjectIsAdded` in Unity? Explain its purpose and usage.
PrefabUtility.GetOriginalSourceRootWhereGameObjectIsAdded Declaration public static GameObject GetOriginalSourceRootWhereGameObjectIsAdded ( GameObject gameObject ); Parameters Parameter Description gameObject GameObject from a Prefab instance or from a Prefab Asset. Returns GameObject The Prefab Asse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ef020471a78c
unity_docs
rendering
In Unity's 'Lights module reference', what is 'Properties' and how does it work?
For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Light Assign a Light Prefab describing how your particle lights should look. Ratio A value between 0 and 1 describing the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e433b42a5623
unity_docs
ui
Explain 'Scroller' in Unity.
A Scroller lets users scroll through content in your user interface. ## Create a Scroller You can create a Scroller with UI Builder, UXML, or C#. The following C# example creates a Scroller with a default value, low limit, and high limit, and sets the direction of the Scroller: ``` var scroller = new Scroller(); scro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_616330eb8503
github
scripting
Write a Unity C# XR/VR script for Menu Controller
```csharp using System.Collections; using System.Linq; using OpenXRRuntimeJsons; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class MenuController : MonoBehaviour { [SerializeField] private Transform buttonsParent; [SerializeField] private StartXRButton buttonPrefab; [...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_f8b17d1cf178
unity_docs
scripting
Explain 'Best practices for calling Java/Kotlin code' in Unity.
Learn about the best practices for calling Java and Kotlin plug-in code from C# scripts to improve performance of your application. ## Minimize JNI calls Using the Java Native Interface (JNI), through either the high-level or low-level C# API is resource intensive and can be slow. To improve performance, and also cod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fa77faf252ae
github
scripting
Write a Unity C# script called Base Static View
```csharp using UnityEngine; namespace TinyECSUnityIntegration.Impls { /// <summary> /// class BaseStaticView /// /// The class is a subtype of BaseView which should be used in cases when some view /// will be created in compile time and never be allocated dynamically in runtime /// </summar...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_19037b80d8dd
unity_docs
editor
Show me a Unity C# example demonstrating `PrefabUtility.RemoveUnusedOverrides`.
ct[] prefabInstances , InteractionMode action ); Parameters Parameter Description prefabInstances List of Prefab instances to remove unused overrides from. action UserAction will record undo and write result to Editor log file. Description This method identifies and removes all unused overrides from a li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5dda3bed7a59
unity_docs
editor
What is `Search.SearchResult` in Unity? Explain its purpose and usage.
SearchResult struct in UnityEditor.Search Description Contains a SearchItem that was retrieved from a query. Static Properties Property Description nil Represents a null search result. Properties Property Description id ID of the document containing that result. index Index of the document containing that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a13b152ad2c4
unity_docs
xr
What is `XR.Bone` in Unity? Explain its purpose and usage.
Bone struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description A tracked bone on the device at an XRNode in the XR input subsystem. The Bone type is a general purpose structure that represents a part of a specific body element hierarchy. such as Hand, Eyes, or Skeleton. Public Methods Meth...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1014444ae987
unity_docs
xr
Show me a Unity C# example demonstrating `PlayerSettings.Android.ARCoreEnabled`.
PlayerSettings.Android.ARCoreEnabled public static bool ARCoreEnabled ; Description Enable support for Google ARCore on supported devices. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class ARCoreEnabledSample : MonoBehaviour { [MenuItem("Build/ARCoreEnabled Sample")] publi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1613e777b83
unity_docs
animation
Show me a Unity C# example demonstrating `AssetPostprocessor.OnPreprocessCameraDescription`.
ication when a camera is imported from a Model Importer. Unity only calls this function when ModelImporter.importCameras is true. This function gives you control over camera properties and animations during the model import process. The CameraDescription structure contains all the camera data from the imported fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36814dc3d40f
unity_docs
xr
What is `SystemInfo.supportsAsyncGPUReadback` in Unity? Explain its purpose and usage.
SystemInfo.supportsAsyncGPUReadback public static bool supportsAsyncGPUReadback ; Description Returns true if asynchronous readback of GPU data is available for this device and false otherwise. Additional resources: AsyncGPUReadback , AsyncGPUReadbackRequest .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6a34c5943c9
unity_docs
rendering
What is `PlayerSettings.mipStripping` in Unity? Explain its purpose and usage.
PlayerSettings.mipStripping public static bool mipStripping ; Description Enable mip stripping for all platforms. If you enable this setting, Unity strips unused mips at build time. When Unity builds your game or application, it can strip unused mips from textures in your Project. Stripping unused mips can ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1eb8e2a4b7c
unity_docs
scripting
What is `AndroidDeviceFilterData.brandName` in Unity? Explain its purpose and usage.
AndroidDeviceFilterData.brandName public string brandName ; Description The manufacturer name of the Android device. Filter based on brand or manufacturer name. For example, google, samsung. Note : This property only accepts a valid regular expression.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_604845d40dc4
unity_docs
rendering
In Unity's 'Gamma Textures in linear color space', what is 'Importing lightmaps' and how does it work?
The data in lightmap EXR files created by Unity is in linear space. It gets converted to gamma space during import. When bringing in lightmaps from an external lightmapper, mark the lightmaps as Texture Type : Lightmap in the Texture Importer . This setting makes sure sRGB sampling is bypassed on import.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99846a4c91ca
unity_docs
rendering
What is `MaterialProperty.textureValue` in Unity? Explain its purpose and usage.
MaterialProperty.textureValue public Texture textureValue ; Description Texture value of the property. Setting a new value will apply it to all material targets , and will automatically record an undo operation. Additional resources: type , textureDimension , MaterialEditor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb37164f8239
unity_docs
editor
What is `EditorGUILayout.TagField` in Unity? Explain its purpose and usage.
EditorGUILayout.TagField Declaration public static string TagField (string tag , params GUILayoutOption[] options ); Declaration public static string TagField (string tag , GUIStyle style , params GUILayoutOption[] options ); Declaration public static string TagField (string label , string tag , par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a89a0e0886b
unity_docs
ui
What is `Experimental.GraphView.ContentZoomer` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ContentZoomer class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.Manipulator Description Manipulator that allows zooming in GraphView. Static Properties Property Description DefaultMaxScale Default ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de62b380d5eb
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.UpdateIncrementalTimed` in Unity? Explain its purpose and usage.
Hierarchy.UpdateIncrementalTimed Declaration public bool UpdateIncrementalTimed (double milliseconds ); Parameters Parameter Description milliseconds The time period in milliseconds. Returns bool true if additional invocations are needed to complete the update, false otherwise. Description Increme...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1df9109fb80d
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_ETC2_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_ETC2_SRGB Description A four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb28780a2da6
unity_docs
scripting
What is `Playables.PlayableExtensions.Play` in Unity? Explain its purpose and usage.
PlayableExtensions.Play Declaration public static void Play (U playable ); Parameters Parameter Description playable The Playable used by this operation. Description Starts to play the Playable . When playing, the local time of this Playable will be updated during the evaluation of the PlayableGraph...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd8750256d69
unity_docs
scripting
What is `RangeInt` in Unity? Explain its purpose and usage.
RangeInt struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Describes an integer range. Properties Property Description end The end index of the range (not inclusive). length The length of the range. start The starting index of the range, where 0 is the first position, 1 is the seco...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_918bf8c10ccb
unity_docs
scripting
Give me an overview of the `AssetBundleManifest` class in Unity.
AssetBundleManifest class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.AssetBundleModule Description Manifest for all the AssetBundles in the build. Additional resources: BuildPipeline.BuildAssetBundles , AssetBundle.GetAllAssetNames Public Methods Method Description GetAllAssetB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d29365c90798
unity_docs
ui
What is `Time.timeSinceLevelLoad` in Unity? Explain its purpose and usage.
Time.timeSinceLevelLoad public static float timeSinceLevelLoad ; Description The time in seconds since the last non-additive scene finished loading (Read Only). This behaves in the same way as Time.time with a negative offset. ```csharp //Attach this script to a GameObject //Create a Button (Create>UI>Button...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_74a4ac85505a
unity_docs
scripting
In Unity's 'Animator component', what is 'Animation curve information' and how does it work?
The information box at the bottom of the Animator component provides you with a breakdown of the data being used in all the clips used by the Animator Controller. An animation clip contains data in animation curves , which represent how a value changes over time. These curves may describe the position or rotation of an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e361881950a8
unity_docs
input
What is `Android.AndroidApplication.currentConfiguration` in Unity? Explain its purpose and usage.
AndroidApplication.currentConfiguration public static Android.AndroidConfiguration currentConfiguration ; Description Provides current configuration for the running application. Additional resources: AndroidApplication.onConfigurationChanged . ```csharp using UnityEngine; using UnityEngine.Android;public cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04204c17f738
unity_docs
scripting
Give me an overview of the `PatchExtents` class in Unity.
PatchExtents struct in UnityEngine / Implemented in: UnityEngine.TerrainModule Description Structure containing minimum and maximum terrain patch height values. Properties Property Description max Maximum height of a terrain patch. min Minimum height of a terrain patch.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aab5c04d1585
unity_docs
scripting
What is `PlayerSettings.SplashScreen.DrawMode` in Unity? Explain its purpose and usage.
DrawMode enumeration Description Determines how the Unity logo should be drawn, if it is enabled. Properties Property Description UnityLogoBelow The Unity logo is drawn in the lower portion of the screen for the duration of the Splash Screen, while the PlayerSettings.SplashScreen.logos are shown in the centre....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4cc037a0ee3a
unity_docs
physics
Show me a Unity C# example demonstrating `PhysicsShapeGroup2D.AddCircle`.
Description Adds a circle shape ( PhysicsShapeType2D.Circle ) to the shape group. A circle shape is comprised of a single vertex ( center ) and a radius that extends around that vertex. This is the most memory efficient and fastest primitive to use in all use-cases. NOTE : A circle forms a closed shape and does ha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b974b7ac193
unity_docs
rendering
What is `TextureImporter.wrapModeU` in Unity? Explain its purpose and usage.
TextureImporter.wrapModeU public TextureWrapMode wrapModeU ; Description Texture U coordinate wrapping mode. Controls wrapping mode along texture U (horizontal) axis. Additional resources: Texture.wrapModeU , wrapMode , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6470d2043261
github
scripting
Write a Unity C# script called Quest Splat Storage
```csharp // SPDX-License-Identifier: MIT using System.IO; using UnityEngine; static class QuestSplatStorage { const string SplatFolderName = "Splats"; public static string GetBrowseRootFolder() { return GetRootFolder(); } public static string GetRootFolder() { return Path.Com...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_106149458d72
unity_docs
rendering
What is `SceneView.IsCameraDrawModeEnabled` in Unity? Explain its purpose and usage.
SceneView.IsCameraDrawModeEnabled Declaration public bool IsCameraDrawModeEnabled ( SceneView.CameraMode mode ); Parameters Parameter Description mode A CameraMode to check. Returns bool Returns true if the CameraMode is available in this SceneView . Returns false otherwise. Description Returns...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82883528df7b
unity_docs
rendering
What is `Rendering.MetadataValue.NameID` in Unity? Explain its purpose and usage.
MetadataValue.NameID public int NameID ; Description The name ID of the property that the metadata value is tied to. To specify a value for a property declared with UNITY_DOTS_INSTANCED_PROP(float4, Example), pass Shader.PropertyToID("Example") here.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d2d48183a3e
unity_docs
editor
What is `Tools.current` in Unity? Explain its purpose and usage.
Tools.current public static Tool current ; Description The tool that is currently selected for the Scene View. This refers to the View, Move, Rotate and Scale tools available in the toolbar for the main editor window. Additional resources: Tools.viewTool , ToolManager.SetActiveTool , ToolManager.activeTool...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c5831e5a8d4b
unity_docs
scripting
Explain 'Introduction to the Resources system' in Unity.
The Resources class allows you to find and access objects that are in Resources folders in your project. You can use the Resources system to make an asset available to a project without loading it in as part of a scene . When you add content to a folder named Resources in your project, Unity makes it available to load ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b650d2e92b5
unity_docs
scripting
What is `GameObject.SendMessageUpwards` in Unity? Explain its purpose and usage.
GameObject.SendMessageUpwards Declaration public void SendMessageUpwards (string methodName , object value = null, SendMessageOptions options = SendMessageOptions.RequireReceiver); Parameters Parameter Description methodName The name of the MonoBehaviour method to call. value An optional parameter v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c0361025d6c
unity_docs
scripting
What is `FingerDof` in Unity? Explain its purpose and usage.
FingerDof enumeration Description Enumeration of all the muscles in a finger. These muscles are a sub-part of a human part. Additional resources: HumanPartDof . Properties Property Description ProximalDownUp The proximal down-up muscle. ProximalInOut The proximal in-out muscle. IntermediateCloseOpen The int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5cb4898bb0af
unity_docs
animation
What is `AnimationClip.frameRate` in Unity? Explain its purpose and usage.
AnimationClip.frameRate public float frameRate ; Description Frame rate at which keyframes are sampled. (Read Only) This is the frame rate that was used in the animation program you used to create the animation or model. ```csharp using UnityEngine; using System.Collections;public class ExampleScript : MonoBe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c3596a307c7
unity_docs
rendering
What is `UIElements.MeshGenerationNode.DrawMesh` in Unity? Explain its purpose and usage.
MeshGenerationNode.DrawMesh Declaration public void DrawMesh (NativeSlice<Vertex> vertices , NativeSlice<ushort> indices , Texture texture ); Parameters Parameter Description vertices The vertices to be drawn. All referenced vertices must be initialized. indices The triangle list indices. Must be a mul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_801d09e912e6
unity_docs
ui
In Unity's 'Name selectors', what is 'Syntax' and how does it work?
A name selector consists of an element’s assigned name prefixed with a number sign ( # ). ``` #ElementName { ... } ``` Note : Only use the number sign ( # ) when you write the selector in a USS file. Don’t use it when you assign the name to an element in a UXML or C# file. An element name that includes the number sign ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_287a27761907
unity_docs
scripting
Give me an overview of the `AudioConfiguration` class in Unity.
AudioConfiguration struct in UnityEngine / Implemented in: UnityEngine.AudioModule Description Specifies the current properties or desired properties to be set for the audio system. Use these properties to change how Unity outputs all audio in your project, including how many sounds can play at one time and wha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_672b3ed2bfec
github
scripting
Write a Unity C# script called Player Loop System Subscription
```csharp using System; using UnityEngine.LowLevel; namespace UnityMainThreadDispatcher { internal class PlayerLoopSystemSubscription<T> : IDisposable { private readonly Action _callback; public PlayerLoopSystemSubscription(Action callback) { _callback = callback; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_c5eceb14ac75
unity_docs
editor
Explain 'Set up multiple scenes for occlusion culling' in Unity.
At runtime, Unity loads only one occlusion culling data asset at a time, no matter how many Scenes are open. You must therefore prepare your occlusion culling data differently depending on whether you plan to load one Scene at a time, or multiple Scenes at a time. ## Loading one Scene at a time If you load one Scene ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_317dd286505c
unity_docs
scripting
What is `VideoSpatialQuality` in Unity? Explain its purpose and usage.
VideoSpatialQuality enumeration Description Controls the imported clip's internal resize to save space at the cost of blurrier images. The resulting clip will still store its original size but the encoded images will use smaller images. This provides an alternative way of reducing the bitrate without introducing c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c12afcb94bf6
unity_docs
rendering
What is `TextureFormat.BC6H` in Unity? Explain its purpose and usage.
TextureFormat.BC6H Description HDR compressed color texture format. BC6H format compresses RGB HDR textures to 8 bits per pixel, and is supported on DX11-class PC hardware. It is a good format for compressing floating point texture data (skyboxes, reflection probes, lightmaps, emissive textures), e.g. textures that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61c7037d071c
unity_docs
math
What is `Mathf.Exp` in Unity? Explain its purpose and usage.
Mathf.Exp Declaration public static float Exp (float power ); Description Returns e raised to the specified power. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { print(Mathf.Exp(6)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30b602a61f36
unity_docs
animation
What is `Animations.AimConstraint.worldUpVector` in Unity? Explain its purpose and usage.
AimConstraint.worldUpVector public Vector3 worldUpVector ; Description The world up Vector used when the world up type is AimConstraint.WorldUpType.Vector or AimConstraint.WorldUpType.ObjectRotationUp .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.