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_eac99a6298d4
unity_docs
scripting
Explain 'Layers and layerMasks' in Unity.
Unity APIs use layerMasks to define which layers the API can interact with. Topic Description Introduction to layerMasks Understand how the Unity API uses layerMasks to define which layers it can interact with. Set a layerMask Set up a layerMask to use in API calls. Add a layer to a layerMask Add a new layer to a layer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e335b351e2a
unity_docs
math
What is `RectInt.ClampToBounds` in Unity? Explain its purpose and usage.
RectInt.ClampToBounds Declaration public void ClampToBounds ( RectInt bounds ); Parameters Parameter Description bounds Bounds to clamp the RectInt . Description Clamps the position and size of the RectInt to the given bounds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9cf43a85641e
unity_docs
scripting
What is `LightTransport.IDeviceContext.WriteBuffer` in Unity? Explain its purpose and usage.
IDeviceContext.WriteBuffer Declaration public void WriteBuffer (BufferSlice<T> dst , NativeArray<T> src ); Declaration public void WriteBuffer (BufferSlice<T> dst , NativeArray<T> src , LightTransport.EventID id ); Parameters Parameter Description dst The buffer slice specifying the destination on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c0c79ddee111
unity_docs
scripting
In Unity's 'Grid Layout Group', what is 'Grid Layout Group and auto layout' and how does it work?
There are special considerations to be aware of when using the Grid Layout Group as part of an auto layout setup, such as using it with a Content Size Fitter . The auto layout system calculates the horizontal and vertical sizes independently. This can be at odds with the Grid Layout Group, where the number of rows depe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f267cf9d9b18
unity_docs
physics
Explain 'Introduction to primitive collider shapes' in Unity.
Primitive colliders are the most computationally efficient type of collider in Unity. They are called “primitive” because they are defined by simple geometric shapes such as boxes, spheres, and capsules. They match the Primitive Objects , which are built-in GameObject shapes. There are three primitive collider shapes i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_609d5a9231ae
unity_docs
physics
Give me an overview of the `ArticulationBody` class in Unity.
ArticulationBody class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.PhysicsModule Description A body that forms part of a Physics articulation. An articulation is a set of bodies arranged in a logical tree. The parent-child link in this tree reflects that the bodies have their rela...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e8dc14ed65a
unity_docs
physics
What are the parameters of `PhysicsScene2D.GetRayIntersection` in Unity?
Returns RaycastHit2D The ray intersection result. Description Cast a 3D ray against the 2D Colliders in the Scene. This function acts as a 3D "ray cast" but specifically designed to detect 2D Colliders. It achieved this by projecting the 3D ray into 2D space and then performs the 2D intersection test, ordering the resu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4309d8559f2d
unity_docs
editor
What is `IMGUI.Controls.TreeViewState` in Unity? Explain its purpose and usage.
TreeViewState class in UnityEditor.IMGUI.Controls Description The TreeViewState contains serializable state information for the TreeView. This is primarily state that the user could have changed by interacting with the TreeView, for example the selection state, expanded state, navigation state and scroll state. T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a48cca317bd
unity_docs
math
What is `Tilemaps.TileChangeData` in Unity? Explain its purpose and usage.
TileChangeData struct in UnityEngine.Tilemaps / Implemented in: UnityEngine.TilemapModule Description Represents the position and Tile information to change in a Tilemap. Properties Property Description color The color to set the Tile to. position The position to change Tile properties at. tile The Tile ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_65eaeb6ba790
unity_docs
scripting
In Unity's 'Introduction to instantiating prefabs', what is 'Instantiate a prefab' and how does it work?
To instantiate a prefab at runtime, your code needs a reference to the prefab. To make this reference, you can create a public field of type GameObject in your code, then assign the prefab you want to use to this field in the Inspector . The following script example has a single public variable, myPrefab , which is a r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d53b2a929d0a
unity_docs
performance
What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.ScheduleParallelForTransform` in Unity? Explain its purpose and usage.
JobsUtility.ScheduleParallelForTransform Declaration public static Unity.Jobs.JobHandle ScheduleParallelForTransform (ref Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobScheduleParameters parameters , IntPtr transfromAccesssArray ); Returns JobHandle A JobHandle to the new job. Description Schedules an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6544b613098
unity_docs
math
What is `SerializedPropertyType` in Unity? Explain its purpose and usage.
SerializedPropertyType enumeration Description Represents the type of a SerializedProperty . Additional resources: SerializedProperty.propertyType . Properties Property Description Generic Represents an array, list, struct or class. Integer Represents an integer property, for example int, byte, short, uint ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03030927c793
unity_docs
rendering
What is `ImageConversion.LoadImage` in Unity? Explain its purpose and usage.
ImageConversion.LoadImage Declaration public static bool LoadImage ( Texture2D tex , byte[] data , bool markNonReadable ); Parameters Parameter Description tex The texture to load the image into. data The byte array containing the image data to load. markNonReadable Set to false by default, pass true ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4824e2ba5bd0
unity_docs
math
Show me a Unity C# example demonstrating `Input.GetJoystickNames`.
u want to support in the Input Manager. The position of a joystick in this array corresponds to the joystick number, i.e. the name in position 0 of this array is for the joystick that feeds data into 'Joystick 1' in the Input Manager, the name in position 1 corresponds to 'Joystick 2', and so on. Note that some entries...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bbdcec485c1
unity_docs
scripting
What are the parameters of `AssetDatabase.IsMainAsset` in Unity?
Returns bool True if the asset is a main asset, false otherwise. Description Checks whether the asset is a main asset in the Project window. For example, an imported model has a GameObject as its root and several meshes and child GameObjects in an expanded state. The root GameObject is the main asset in this case. ```c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae085eea2a1b
unity_docs
editor
What is `StaticEditorFlags.ReflectionProbeStatic` in Unity? Explain its purpose and usage.
StaticEditorFlags.ReflectionProbeStatic Description Include this GameObject when when precomputing data for Reflection Probes whose Type property is set to Baked . For more information, see the documentation on [[wiki:ReflectionProbes|Reflection Probes]. ```csharp using UnityEngine; using UnityEditor; public ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_560f98968575
unity_docs
scripting
What is `PlayerSettings.Android.keyaliasPass` in Unity? Explain its purpose and usage.
PlayerSettings.Android.keyaliasPass public static string keyaliasPass ; Description Password for the key used for signing an Android application. This is the password for signing an application with a particular key (known as [-keypass <keypass>] on the keytool/jarsigner command line). For a detailed code exam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2fb754aab19e
unity_docs
scripting
What is `ParticleSystem.noise` in Unity? Explain its purpose and usage.
ParticleSystem.noise public ParticleSystem.NoiseModule noise ; Description Script interface for the NoiseModule of a Particle System. The Noise Module allows you to apply turbulence to the movement of your particles. Use the low quality settings to create computationally efficient Noise, or simulate smoother...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26cb393b1ea8
unity_docs
scripting
What is `Build.BuildPlayerContext.AddAdditionalPathToStreamingAssets` in Unity? Explain its purpose and usage.
BuildPlayerContext.AddAdditionalPathToStreamingAssets Declaration public void AddAdditionalPathToStreamingAssets (string directoryOrFile , string pathInStreamingAssets ); Parameters Parameter Description directoryOrFile Path representing an existing file or directory. If the path doesn't exist, this functio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b59860ca9eb4
unity_docs
scripting
In Unity's 'APK expansion files in Unity', what is 'Create the main APK expansion file' and how does it work?
To create the main APK expansion file for your application, indicate to Unity to split the application. For information on how to do this, refer to Splitting the application binary . Now when you Build the application , Unity generates the APK and the main APK expansion file then copies them both to the output director...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e19704321c2f
unity_docs
math
What is `Graphics.ExecuteCommandBufferAsync` in Unity? Explain its purpose and usage.
Graphics.ExecuteCommandBufferAsync Declaration public static void ExecuteCommandBufferAsync ( Rendering.CommandBuffer buffer , Rendering.ComputeQueueType queueType ); Parameters Parameter Description buffer The CommandBuffer to be executed. queueType Describes the desired async compute queue the supp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13198b26226f
unity_docs
rendering
What is `Rendering.RealtimeGICPUUsage.Low` in Unity? Explain its purpose and usage.
RealtimeGICPUUsage.Low Description 25% of the allowed CPU threads are used as worker threads. 25% of the total number of allowed logical CPU cores are populated with Enlighten Realtime Global Illumination worker threads. Additional resources: TierSettings.realtimeGICPUUsage .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4a1fb304cfdb
unity_docs
scripting
Explain 'Event function execution order' in Unity.
The following diagram provides a high-level overview of the execution sequence for event functions that run during the lifecycle of a MonoBehaviour script component. For readability, the scope of the chart is limited to key parts of the script lifecycle, with some extra internal subsystem updates provided for context. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_759c84552a8d
unity_docs
scripting
Explain 'Manage GameObjects in the Hierarchy window' in Unity.
Use the Hierarchy window to create and organize GameObjects and control their visibility in a scene . The Hierarchy window displays every GameObject in a scene, including models, cameras, and prefabs . You can use the Hierarchy window to manage and group the GameObjects you use in a Scene. When you add or remove GameOb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_926916d8d32f
unity_docs
scripting
What is `Presets.PresetType.IsValid` in Unity? Explain its purpose and usage.
PresetType.IsValid Declaration public bool IsValid (); Returns bool Returns true if the PresetType is valid. Returns false otherwise. Description Checks whether a PresetType corresponds with a valid native or managed class. A PresetType is invalid when a MonoScript has been removed from the project, o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_762272eff736
unity_docs
xr
What is `Search.SearchUtils.GetAssetPreviewFromPath` in Unity? Explain its purpose and usage.
SearchUtils.GetAssetPreviewFromPath Declaration public static Texture2D GetAssetPreviewFromPath (string path , Search.FetchPreviewOptions previewOptions ); Declaration public static Texture2D GetAssetPreviewFromPath (string path , Vector2 previewSize , Search.FetchPreviewOptions previewOptions ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f605e26462e0
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeaderState.CanOverwriteSerializedFields` in Unity? Explain its purpose and usage.
MultiColumnHeaderState.CanOverwriteSerializedFields Declaration public static bool CanOverwriteSerializedFields ( IMGUI.Controls.MultiColumnHeaderState source , IMGUI.Controls.MultiColumnHeaderState destination ); Parameters Parameter Description source State that have serialized data to be transfered to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8046a18885e8
unity_docs
physics
Explain 'Speculative CCD' in Unity.
Speculative collision detection is the CCD algorithm for Continuous Speculative mode. Speculative collision detection is less computationally demanding than sweep-based collision detection . It also works for collisions that occur as a result of both linear movement (for example, a ball moving in a straight line) and r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8d0cb3356c38_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Serialize array to JSON (wrapper required for Unity) Signature: ```csharp public static string ArrayToJson<T>(T[] array, bool prettyPrint = false) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cac2e4672c72
unity_docs
animation
What is `Animations.AnimationScriptPlayable.GetJobData` in Unity? Explain its purpose and usage.
AnimationScriptPlayable.GetJobData Declaration public T GetJobData (); Returns T Returns the IAnimationJob data contained in the playable. Description Gets the job data contained in the playable. The generic type must be the same as the one used for the creation of the playable, otherwise an ArgumentEx...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1d0f6eea5b3
unity_docs
physics
What is `UIElements.DataBinding` in Unity? Explain its purpose and usage.
DataBinding class in UnityEngine.UIElements / Inherits from: UIElements.Binding / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IDataSourceProvider Description Binding type that enables data synchronization between a property of a data source and a property of a VisualElement . Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_775bf781f268
github
scripting
Write a Unity Editor script for Tap To Place Editor
```csharp // Copyright (c) Mixed Reality Toolkit Contributors // Licensed under the BSD 3-Clause using MixedReality.Toolkit.Editor; using UnityEditor; using UnityEngine; namespace MixedReality.Toolkit.SpatialManipulation.Editor { /// <summary> /// Custom editor for the Tap to Place component. /// </summa...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_3441f850847e
unity_docs
rendering
What is `RenderTextureDescriptor` in Unity? Explain its purpose and usage.
RenderTextureDescriptor struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description This struct contains all the information required to create a RenderTexture. It can be copied, cached, and reused to easily create RenderTextures that all share the same properties. Avoid using the default construc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b49cc9678ccb
unity_docs
performance
What is `Awaitable.NextFrameAsync` in Unity? Explain its purpose and usage.
Awaitable.NextFrameAsync Declaration public static Awaitable NextFrameAsync (CancellationToken cancellationToken ); Parameters Parameter Description cancellationToken Optional cancellation token. Description Resumes execution on the next frame. Note: This method can only be called from the main thread ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa59d576c561
unity_docs
rendering
Explain 'Tessellation Surface Shader examples in the Built-In Render Pipeline' in Unity.
In the Built-in Render Pipeline , Surface Shaders have some support for DirectX 11 / OpenGL Core GPU Tessellation. Tessellation is indicated by tessellate:FunctionName modifier. That function computes triangle edge and inside tessellation factors. When tessellation is used, “vertex modifier” ( vertex:FunctionName ) is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_aef1e5a6b348
github
scripting
Write a Unity C# script called Dispatcher
```csharp using System; using System.Collections.Concurrent; using UnityEngine; using UnityEngine.PlayerLoop; namespace UnityMainThreadDispatcher { public static class Dispatcher { private static readonly ConcurrentQueue<Action> _actionQueue = new ConcurrentQueue<Action>(); [RuntimeInitializeO...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_1b5af7acaa02
unity_docs
input
What is `KeyCode.Mouse4` in Unity? Explain its purpose and usage.
KeyCode.Mouse4 Description Additional (fifth) mouse button. Use this for detecting mouse button presses. The “4” mouse button is the fifth button on the user’s mouse if this additional button exists, for example, volume buttons on the mouse. Unity defines this as the "4" Mouse button, as the mouse Button numbering ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e941216fabd8
unity_docs
rendering
Explain 'Grass and other details' in Unity.
A Terrain might have grass clumps and other small objects (such as rocks) covering its surface. Unity renders these objects using textured quads or full meshes, depending on the level of detail and performance you require. Instancing details work with all render pipelines , including the High Definition Render Pipeline...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9591b5583c99
unity_docs
physics
What is `Cloth.SetSelfAndInterCollisionIndices` in Unity? Explain its purpose and usage.
Cloth.SetSelfAndInterCollisionIndices Declaration public void SetSelfAndInterCollisionIndices (List<uint> indices ); Parameters Parameter Description indices List of cloth particles indices to use for cloth self and/or inter collision. Description This allows you to set the cloth indices used for self and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c2d81f04903c
unity_docs
rendering
In Unity's 'Shader Import Settings window reference', what is 'ShaderLab shader properties' and how does it work?
The following properties are available only for ShaderLab shaders . Property Description Default Maps Displays the textures that appear as material properties. NonModifiable Maps Displays the textures that have the [NonModifiableTextureData] attribute in the shader. These textures don’t appear as material properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7913a104b3d
unity_docs
scripting
What is `UIElements.PointerEventBase_1.azimuthAngle` in Unity? Explain its purpose and usage.
PointerEventBase<T0>.azimuthAngle public float azimuthAngle ; Description Gets the angle of the stylus relative to the x-axis, in radians. A value of 0 indicates that the stylus is pointed along the x-axis of the device.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1034f9f0d31
unity_docs
scripting
What is `PlayerSettings.WSA.vcxProjDefaultLanguage` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.vcxProjDefaultLanguage public static string vcxProjDefaultLanguage ; Description Sets the XML <defaultLanguage> value specified in the generated Visual Studio project file (.vcxproj). Applies only to the initial file generation, preexisting files will not be modified. When empty 'en-US' will ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_302dcab912cc
unity_docs
editor
What is `EditorGUILayout.LinkButton` in Unity? Explain its purpose and usage.
EditorGUILayout.LinkButton Declaration public static bool LinkButton (string label , params GUILayoutOption[] options ); Declaration public static bool LinkButton ( GUIContent label , params GUILayoutOption[] options ); Parameters Parameter Description label Label of the link. options An optional l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c89440aa9d9
unity_docs
scripting
Show me a Unity C# example demonstrating `EventType.ValidateCommand`.
EventType.ValidateCommand Description Validates a special command (e.g. copy & paste). "Copy", "Cut", "Paste", "Delete", "FrameSelected", "Duplicate", "SelectAll" and so on. Sent only in the editor. Example: Make pasting work in current window or control: ```csharp using UnityEngine; using UnityEditor;public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3481d80851d5
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AssetLoadingSubsystem` in Unity? Explain its purpose and usage.
AssetLoadingSubsystem enumeration Description Subsystem tags for the read request, describing broad asset type or subsystem that triggered the read request. Properties Property Description Other The subsystem where the read request originated is unknown. Texture The read request originated in texture loading. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2745d8c8f99e
unity_docs
ui
What are the parameters of `Overlays.OverlayCanvas.ShowPopup` in Unity?
Description Displays an overlay as a pop-up in a EditorWindow . ```csharp using UnityEditor; using UnityEditor.Overlays; using UnityEditor.ShortcutManagement; using UnityEngine; using UnityEngine.UIElements; class PopUpOnlyOverlay : Overlay { public PopUpOnlyOverlay() { displayName = "Pop Me Up"; }...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0e9252a1aaae
unity_docs
rendering
In Unity's 'Optimize the size of the iOS Player', what is 'Managed code stripping' and how does it work?
Unity removes unused or unreachable code during the build process through a technique called managed code stripping, which can significantly reduce the final size of your application. Refer to managed code stripping for more information. Note: It can sometimes be difficult to determine which classes are getting strippe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9faaa637fd2
unity_docs
rendering
Show me a Unity C# example demonstrating `FileUtil.DeleteFileOrDirectory`.
FileUtil.DeleteFileOrDirectory Declaration public static bool DeleteFileOrDirectory (string path ); Description Deletes a file or a directory given a path. This function's path is relative to the project root folder but it can also accept absolute paths. All file separators should be forward ones "/" (Unix sty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9caed588f006
unity_docs
scripting
What is `ContactFilter2D.SetNormalAngle` in Unity? Explain its purpose and usage.
ContactFilter2D.SetNormalAngle Declaration public void SetNormalAngle (float minNormalAngle , float maxNormalAngle ); Parameters Parameter Description minNormalAngle The value used to set the minNormalAngle . maxNormalAngle The value used to set the maxNormalAngle . Description Sets the minNormalAngl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fb052fdaeec5_doc_8
github
scripting
What does `ConvertEnumerator` do in this Unity script? Explain its purpose and signature.
Convert all table data. Signature: ```csharp public static IEnumerable ConvertEnumerator(Type dataType, string csvContent, char cellSeparator = CSVDataHelper.CommaCharacter, bool supportCellMultiline = true) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_3ef1d6d02207
unity_docs
ui
Show me a Unity C# example demonstrating `GUI.EndScrollView`.
GUI.EndScrollView Declaration public static void EndScrollView (); Declaration public static void EndScrollView (bool handleScrollWheel ); Description Ends a scrollview started with a call to BeginScrollView. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f40c6035062
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.DataEquals`.
SerializedProperty.DataEquals Declaration public static bool DataEquals ( SerializedProperty x , SerializedProperty y ); Description Compares the data for two SerializedProperties. This method ignores paths and SerializedObjects. ```csharp using System; using UnityEngine; using UnityEditor;public class Ser...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_16b9f4ba528c
unity_docs
animation
Explain 'Live Capture' in Unity.
com.unity.live-capture ## Description Capture data from physical devices to animate characters and cameras in real time within the Editor. Record the animations in the form of takes and iterate on the recordings. Genlock and synchronize devices for frame and timecode accuracy. ## Released for Unity Package version ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1aa90eea9a3b
unity_docs
animation
What is `Animations.AnimationClipPlayable.Create` in Unity? Explain its purpose and usage.
AnimationClipPlayable.Create Declaration public static Animations.AnimationClipPlayable Create ( Playables.PlayableGraph graph , AnimationClip clip ); Parameters Parameter Description graph The PlayableGraph object that will own the AnimationClipPlayable. clip The AnimationClip that will be added in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_37d4bb8d9844
unity_docs
rendering
In Unity's '2D SpriteShape', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.2d.spriteshape@10.1 released 10.1.0 com.unity.2d.spriteshape@10.0 released 10.0.7
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6f7952a42b77
github
scripting
Write a Unity C# MonoBehaviour script called Family Test9
```csharp using System.Collections; using UnityEngine; public class FamilyTest9 : MonoBehaviourExtended, ITest { [FamilyComponent(SkipItself = true)] private Monster monster; private void Start() { if (!Test()) { Debug.LogError("Test failed: " + this); } } ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_a090884b9ed2
unity_docs
scripting
Show me a Unity C# example demonstrating `LightProbes.TetrahedralizeAsync`.
positions, and update the LightProbes object with the result. Note that Unity does not raise an event when this asynchronous method completes. Call this method after you load a Scene with LoadSceneMode.Additive , or unload a Scene with SceneManager.UnloadSceneAsync . Note that updating the tetrahedral tessellation ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b60d9476b7f
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.PrepareUndisposable` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.PrepareUndisposable Declaration public static void PrepareUndisposable (ref Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle ); Parameters Parameter Description handle The AtomicSafetyHandle to mark. Description Marks an AtomicSafetyHandle so that it can't be disposed of.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7c7e5b16e4b
unity_docs
scripting
What are the parameters of `UIElements.TextField.ctor` in Unity?
Description Creates a new textfield. Declaration public TextField (string label ); Description Creates a new textfield. Declaration public TextField (string label , int maxLength , bool multiline , bool isPasswordField , char maskChar ); Parameters Parameter Description maxLength The maximum number of characters this t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee8b91752d68
unity_docs
scripting
What are the parameters of `Camera.WorldToScreenPoint` in Unity?
Description Transforms position from world space into screen space. Screen space is defined in pixels. The lower left pixel of the screen is (0,0). The upper right pixel of the screen is (screen width in pixels - 1, screen height in pixels - 1). The z coordinate is the distance from the camera in world units. If positi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6afa2a911573
unity_docs
scripting
What is `Mesh.indexFormat` in Unity? Explain its purpose and usage.
Mesh.indexFormat public Rendering.IndexFormat indexFormat ; Description Format of the mesh index buffer data. Index buffer can either be 16 bit (supports up to 65535 vertices in a mesh), or 32 bit (supports up to 4 billion vertices). Default index format is 16 bit, since that takes less memory and bandwidth....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95ddd89f8eb4
unity_docs
scripting
Show me a Unity C# example demonstrating `BuildOptions.BuildScriptsOnly`.
ldScriptsOnly to force a script only build and ignore any pending player data changes. The following script example uses BuildScriptsOnly . The script builds the entire Project initially. After you've run the script for the first time, you can use the script to only compile any changes you make to the script. To try ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29d50beb2939
unity_docs
editor
What is `AssetDatabase.LoadAssetAtPath` in Unity? Explain its purpose and usage.
AssetDatabase.LoadAssetAtPath Declaration public static Object LoadAssetAtPath (string assetPath , Type type ); Parameters Parameter Description assetPath Path of the asset to load. type Data type of the asset. Returns Object Returns the first asset object of type type at given path assetPath . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45c915884c14
unity_docs
rendering
What is `Rendering.ShaderType` in Unity? Explain its purpose and usage.
ShaderType enumeration Description Identifies the stage in the rendering pipeline. Additional resources: ShaderType , IPreprocessShaders.OnProcessShader , Shader programming documentation . Properties Property Description Vertex Identifier for the vertex Shader stage. Fragment Identifier for the fragmen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81cd8215b375
unity_docs
editor
What is `TestTools.Coverage.enabled` in Unity? Explain its purpose and usage.
Coverage.enabled public static bool enabled ; Returns bool Returns true if code coverage is enabled; otherwise, returns false. Description Enables or disables code coverage. Note that Code Coverage can affect the performance. ```csharp // Create a new C# script called CodeCoverageMenuItem and place it und...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d70eacfb6369
unity_docs
networking
Explain 'Use the Multiplayer Center' in Unity.
The Multiplayer Center provides a starting point to create a multiplayer game. It recommends Unity multiplayer packages based on the needs of your game, and gives you access to samples and tutorials to help you use them. To use the Multiplayer Center: Open the Unity Multiplayer Center window Window > Multiplayer > Mult...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1724f442d80c_doc_9
github
scripting
What does `ConvertToLinearColorspace` do in this Unity script? Explain its purpose and signature.
Convert the vertex Color32s to linearBeware that you will lose information when quantizing down fromlinear-float32 to linear-uint8. Signature: ```csharp public static void ConvertToLinearColorspace(MeshPayload meshes) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4e8e943eb6fd
unity_docs
physics
What are the parameters of `Collider.ClosestPoint` in Unity?
Returns Vector3 The closest point on the collider, returned in world space coordinates. Description The closest point on the collider given a specified location. This method computes the point on the Collider that is closest to a 3D location in the world. In the example below closestPoint is the point on the Collider a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fc5e19bc5b57
unity_docs
ui
Show me a Unity code example for 'ToolbarSearchField'.
A ToolbarSearchField is an Editor-only control that serves as a search field. It’s a TextField with predefined styles that matches the Toolbar style. ## Create a ToolbarSearchField You can create a ToolbarSearchField with UI Builder, UXML, or C#. The following C# example creates a ToolbarSearchField a placeholder tex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cd331885f09
unity_docs
physics
What is `Rigidbody.Sleep` in Unity? Explain its purpose and usage.
Rigidbody.Sleep Declaration public void Sleep (); Description Forces a rigidbody to sleep until woken up. A Rigidbody can be put to sleep only if it is not in contact with an awake rigidbody, and if it does not come in contact with any rigidbody during the next simulation step. A common use is to call this f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_776446f229b2
unity_docs
editor
What is `iOS.Xcode.PBXProject.GetAllBuildPhasesForTarget` in Unity? Explain its purpose and usage.
PBXProject.GetAllBuildPhasesForTarget Declaration public string[] GetAllBuildPhasesForTarget (string targetGuid ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . Returns string[] Returns all of the build phases for the specified target....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4ebf4cc23f2e_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Helper for reading large quantities of binary data to a stream.Tries to minimize memory allocation and garbage creation. Signature: ```csharp public class SketchBinaryReader : IDisposable ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_165e2dc60b66
unity_docs
scripting
In Unity's 'Receive callbacks when any bound properties change', what is 'Create the binding to receive callbacks' and how does it work?
Create a C# script that defines a custom Inspector for Weapon and uses the TrackSerializedObjectValue() method to check for changes in the m_BaseDamage and m_HardModeModifier properties. In the callback-any-SerializedProperty-changes folder, create a folder named Editor . In the Editor folder, create a C# script named ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3fb110ed4acd
unity_docs
rendering
What is `MaterialEditor.RegisterPropertyChangeUndo` in Unity? Explain its purpose and usage.
MaterialEditor.RegisterPropertyChangeUndo Declaration public void RegisterPropertyChangeUndo (string label ); Parameters Parameter Description label Undo Label. Description Call this when you change a material property. It will add an undo for the action.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef0ca378de00
unity_docs
scripting
What are the parameters of `Animations.GameObjectRecorder.BindComponent` in Unity?
Description Adds bindings for all the properties of component . ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Animations;public class BindComponentScript : MonoBehaviour { void Start() { var recorder = new GameObjectRecorder(gameObject); // Add bindings for all the properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e2ee2cd8e09
unity_docs
editor
What is `EditorGUIUtility.editingTextField` in Unity? Explain its purpose and usage.
EditorGUIUtility.editingTextField public static bool editingTextField ; Description Is a text field currently editing text? In Editor GUI, text fields can have focus without the text being edited. For example you may switch focus between text fields or other controls by using the up and down arrow keys. Once yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f3771bb9dba
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector2.Angle`.
n degrees between from and to . The angle returned is the unsigned angle between the two vectors. Note: The angle returned will always be between 0 and 180 degrees, because the method returns the smallest angle between the vectors. That is, it will never return a reflex angle. Angles are calculated from world orig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_667fc9c09acb
unity_docs
scripting
Show me a Unity C# example demonstrating `Rendering.CommandBuffer.SetViewMatrix`.
iewProjectionMatrices . Note: The camera space in Unity matches OpenGL convention, so the negative z-axis is the camera's forward. This is different from usual Unity convention, where the camera's forward is the positive z-axis. If you are manually creating the view matrix, for example with an inverse of Matrix4x4.Loo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_50db46222fe5
unity_docs
physics
Show me a Unity code example for 'Specify Android Player command-line arguments'.
ivity.updateUnityCommandLineArguments(String cmdLine) method. In the method, concatenate the cmdLine argument with your own startup arguments, then return the result. Important : The cmdLine argument can be an empty string or null. Make sure your code handles these possible values. The following example shows how to sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c7975490f20
unity_docs
scripting
What is `Rendering.AttachmentDescriptor.ConfigureClear` in Unity? Explain its purpose and usage.
AttachmentDescriptor.ConfigureClear Declaration public void ConfigureClear ( Color clearColor , float clearDepth , uint clearStencil ); Parameters Parameter Description clearCol Color clear value. Ignored on depth/stencil attachments. clearDep Depth clear value. Ignored on color surfaces. clearStenc S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e38b4f8cd79c
unity_docs
scripting
Show me a Unity C# example demonstrating `Projector.nearClipPlane`.
Projector.nearClipPlane public float nearClipPlane ; Description The near clipping plane distance. The projector will not affect anything that is nearer than this distance. Additional resources: projector component . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Project...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a922f2d55e96
unity_docs
scripting
What is `Rect.MinMaxRect` in Unity? Explain its purpose and usage.
Rect.MinMaxRect Declaration public static Rect MinMaxRect (float xmin , float ymin , float xmax , float ymax ); Parameters Parameter Description xmin The minimum X coordinate. ymin The minimum Y coordinate. xmax The maximum X coordinate. ymax The maximum Y coordinate. Returns Rect A rectangle ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4cf8849f88d3
github
scripting
Write a Unity C# MonoBehaviour script called Persistent Singleton Behaviour
```csharp using UnityEngine; namespace BcoffeeDev.Patterns { public class PersistentSingletonBehaviour<T> : MonoBehaviour where T : MonoBehaviour { public static T Instance { get; private set; } protected virtual void Awake() { if (Instance == null) { ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_c8a728f9604b
unity_docs
editor
What is `Toolbars.IAccessContainerWindow` in Unity? Explain its purpose and usage.
IAccessContainerWindow interface in UnityEditor.Toolbars Description Implement this interface to gain access to toolbar's container EditorWindow . Properties Property Description containerWindow EditorToolbar's container EditorWindow.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_403e26ab6a34
unity_docs
scripting
What is `Audio.AudioMixer` in Unity? Explain its purpose and usage.
AudioMixer class in UnityEngine.Audio / Inherits from: Object / Implemented in: UnityEngine.AudioModule Description AudioMixer asset. This is a singleton representing a specific audio mixer asset in the project. Properties Property Description outputAudioMixerGroup Routing target. updateMode How time sho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e579ca9f859b
unity_docs
rendering
Explain 'Single-pass stereo rendering for Android' in Unity.
Unity supports single-pass stereo rendering for Android devices that support multiview. Multiview consists of the GL_OVR_multiview2 and GL_OVR_multiview_multisampled_render_to_texture OpenGL ES extensions. These extensions require shaders to use a 2D texture array that consists of two slices, one slice per eye. ## Sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6815914f332f
unity_docs
scripting
In Unity's 'Vertical Layout Group', what is 'Properties' and how does it work?
Property: Function: Padding The padding inside the edges of the layout group. Spacing The spacing between the layout elements. Child Alignment The alignment to use for the child layout elements if they don't fill out all the available space. Control Child Size Whether the Layout Group controls the width and height of i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04b7fa219e2e
unity_docs
xr
What is `Android.AndroidAssetPackError.DownloadNotFound` in Unity? Explain its purpose and usage.
AndroidAssetPackError.DownloadNotFound Description Indicates that the requested download is not found. Additional resources: AndroidAssetPacks.DownloadAssetPackAsync , AndroidAssetPacks.GetAssetPackStateAsync .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df9204373515
unity_docs
scripting
What is `ForceMode2D` in Unity? Explain its purpose and usage.
ForceMode2D enumeration Description Option for how to apply a force using Rigidbody2D.AddForce . Use this to apply a certain type of force to a 2D RigidBody. There are two types of forces to apply: Force mode and Impulse Mode. For a 3D Rigidbody see ForceMode . ```csharp //This script adds force to a Rigidbody....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10ea4f67230b
unity_docs
physics
What is `PhysicsMaterial.dynamicFriction` in Unity? Explain its purpose and usage.
PhysicsMaterial.dynamicFriction public float dynamicFriction ; Description The friction used when already moving. This value is usually between 0 and 1. A value of 0 feels like ice, 1 feels like rubber.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a25dfce58091
unity_docs
scripting
In Unity's 'Vector3Field', what is 'Create a Vector3Field' and how does it work?
You can create a Vector3Field with UI Builder, UXML, and C#. The following C# example creates a Vector3Field with the default value (15.5, 12.5, 14.5) : ``` Vector3Field myElement = new Vector3Field("Label text"); // Set the default value to (15.5, 12.5, 14.5). myElement.value = new Vector3(15.5f, 12.5f, 14.5f); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f935ad59597
unity_docs
editor
Give me an overview of the `GizmoType` class in Unity.
GizmoType enumeration Description Determines how a gizmo is drawn or picked in the Unity editor. The types can be combined together with an OR operator. Additional resources: DrawGizmo . Properties Property Description Pickable The gizmo can be picked in the editor. NotInSelectionHierarchy Draw the gizmo if ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed7659b54e87
unity_docs
editor
Show me a Unity C# example demonstrating `Callbacks.RunBeforeClassAttribute.ctor`.
s a dependency graph and uses topological sorting to ensure that all dependencies are run in sequence based on their dependencies. If callbacks dependencies are not present in the project then the instruction will be ignored during the generation of the dependency graph. Note: Defining callback dependencies is current...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5717115bc165
unity_docs
input
Explain 'Perform an action on multiple packages' in Unity.
You can select multiple packages or feature sets in the Package Manager list panel and perform an operation on all selected items at once. For example, you can use this feature to update multiple packages to their latest versions in one operation. The following table lists shortcuts you can use to select multiple items...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca9eabf53fa8
unity_docs
rendering
What is `Device.SystemInfo.SupportsRenderTextureFormat` in Unity? Explain its purpose and usage.
SystemInfo.SupportsRenderTextureFormat Declaration public static bool SupportsRenderTextureFormat ( RenderTextureFormat format ); Description This has the same functionality as SystemInfo.SupportsRenderTextureFormat and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b21451a0330
unity_docs
scripting
What is `UIElements.IntegerField.ctor` in Unity? Explain its purpose and usage.
IntegerField Constructor Declaration public IntegerField (); Description Constructor. Declaration public IntegerField (int maxLength ); Parameters Parameter Description maxLength Maximum number of characters the field can take. Description Constructor. Declaration public IntegerField (string ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a36715ae41f
unity_docs
scripting
What is `Overlays.Overlay.layoutChanged` in Unity? Explain its purpose and usage.
Overlay.layoutChanged Parameters Parameter Description value layoutChanged is invoked when the Overlay.layout is modified. Description Subscribe to this event to be notified when the Overlay.Layout property is modified. This is commonly used to apply styling changes based on the active layout.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_549081e0a34c
unity_docs
editor
What is `Search.ISearchView.displayMode` in Unity? Explain its purpose and usage.
ISearchView.displayMode public Search.DisplayMode displayMode ; Description Indicates how the data is displayed in the UI. . ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_displayMode { [MenuItem("Examples/ISearchView/displayMode")] public static...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0f944f0fcf54
unity_docs
scripting
In Unity's 'Encapsulate UXML documents with logic', what is 'Create the custom control class' and how does it work?
Create a C# script that defines the CardElement custom control. In addition to defining a constructor to assign an image and badge values to CardElement , the custom control loads the hierarchy UXML document in its class definition. ```csharp using UnityEngine; using UnityEngine.UIElements; // Define the custom contro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_944c07aece68
unity_docs
ui
Explain 'Package Manifest window reference' in Unity.
The Package Manifest window opens when you select the package manifest file ( package.json ) in a Packages subfolder in the Project window. (A) Select Open to load this package manifest in your default code editor, such as Visual Studio. Select View in Package Manager to open the Package Manager window and load this pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.