id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_13d188731bc6
unity_docs
scripting
What is `Unity.IO.Archive.ArchiveHandle.GetMountPath` in Unity? Explain its purpose and usage.
ArchiveHandle.GetMountPath Declaration public string GetMountPath (); Returns string Returns the path where the archive was mounted. Description Retrieves the path where the archive was mounted.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_913a34d617ec
unity_docs
scripting
What is `Search.IQueryHandlerFactory_3.Create` in Unity? Explain its purpose and usage.
IQueryHandlerFactory<T0,T1,T2>.Create Declaration public TQueryHandler Create ( Search.QueryGraph graph , ICollection<QueryError> errors ); Parameters Parameter Description graph A graph representing a query. errors A collection of errors. Use this to report errors when needed. Returns TQueryHandler ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cea91d3a2a19
unity_docs
scripting
What is `UIElements.Experimental.StyleValues.borderRightWidth` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StyleValues.borderRightWidth public float borderRightWidth ; Description Space reserved for the right edge of the border during the layout phase.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29d206234832
unity_docs
editor
What are the parameters of `SettingsService.OpenUserPreferences` in Unity?
Returns EditorWindow Returns an instance to the Settings window. Description Open the Preferences window with the specified settings item already selected. ```csharp using UnityEditor; using UnityEngine;class MyCustomWindow : EditorWindow { void OnGUI() { if (GUILayout.Button("Open my custom preference"...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1938c2129b9
unity_docs
scripting
What is `VideoClipImporter.frameRate` in Unity? Explain its purpose and usage.
VideoClipImporter.frameRate public double frameRate ; Description Frame rate of the clip. The importer does not change the frame rate, so this is both the frame rate of the source clip and that of the imported clip.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86cdec3cc4b2
unity_docs
math
What is `AndroidJNI.ToSByteArray` in Unity? Explain its purpose and usage.
AndroidJNI.ToSByteArray Declaration public static IntPtr ToSByteArray (sbyte[] array ); Description Converts a managed array of System.SByte to a Java array of byte . Additional resources: AndroidJNI.NewSByteArray , AndroidJNI.SetSByteArrayElement .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2417a9158cea
unity_docs
rendering
Explain 'Introduction to camera output' in Unity.
A Camera can generate a depth, depth+normals, or motion vector texture. This is a minimalistic G-buffer texture that can be used for post-processing effects or to implement custom lighting models. These are mostly used by effects; for example, post-processing effects often use depth information. Pixel values in the dep...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec617d0a20ef
unity_docs
math
What is `TerrainData.GetTreeInstance` in Unity? Explain its purpose and usage.
TerrainData.GetTreeInstance Declaration public TreeInstance GetTreeInstance (int index ); Parameters Parameter Description index The index of the tree instance. Description Gets the tree instance at the specified index. It is used as a faster version of treeInstances [index] as this function doesn't cre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a59a691ce15
unity_docs
scripting
What is `UIElements.CustomStyleProperty_1` in Unity? Explain its purpose and usage.
CustomStyleProperty<T0> struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Define a custom style property for an element to be retrieved with CustomStyleResolvedEvent . Properties Property Description name Name of the custom property. Constructors Constructo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdb0c13f9074
unity_docs
input
What is `TouchPhase` in Unity? Explain its purpose and usage.
TouchPhase enumeration Description Describes phase of a finger touch. TouchPhase is an enum type that contains the states of possible finger touches. The states represent each action the finger can take on the most recent frame update. Since a touch is tracked over its "lifetime" by the device, the start and end o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a48b4838117
unity_docs
scripting
What is `IMGUI.Controls.TreeView.BuildRows` in Unity? Explain its purpose and usage.
TreeView.BuildRows Declaration protected IList<TreeViewItem> BuildRows ( IMGUI.Controls.TreeViewItem root ); Parameters Parameter Description root Root item that was created in the BuildRoot method. Returns IList<TreeViewItem> The rows list shown in the TreeView. Can later be accessed using GetRows(). ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ff8643f62e9
unity_docs
physics
Give me an overview of the `StatusQueryOptions` class in Unity.
StatusQueryOptions enumeration Description Options for querying the version control system status of a file. Additional resources: AssetDatabase.IsOpenForEdit , AssetDatabase.IsMetaFileOpenForEdit . Properties Property Description ForceUpdate Force a refresh of the version control system status of the file. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5d4717e52abf
unity_docs
rendering
Explain 'Functions reference' in Unity.
This page explains the functions you can use in search expressions. Functions are used to manipulate search results and perform operations on them. The functions are listed by category and in alphabetical order: Functions by category Functions in alphabetical order ## Set manipulation Expression Description distinct ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb36deb28339
unity_docs
input
Give me an overview of the `FocusType` class in Unity.
FocusType enumeration Description Used by GUIUtility.GetControlID to inform the IMGUI system if a given control can get keyboard focus. This allows the IMGUI system to give focus appropriately when a user presses tab for cycling between controls. Properties Property Description Keyboard This control can receive...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebc9e08d3a50
unity_docs
editor
What is `SerializedProperty.gradientValue` in Unity? Explain its purpose and usage.
SerializedProperty.gradientValue public Gradient gradientValue ; Description Value of a gradient property. Additional resources: propertyType , SerializedPropertyType.Gradient , Gradient . ```csharp using System; using UnityEditor; using UnityEngine;[CreateAssetMenu] public class SerializedPropertyGradien...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f4d49f8809dc
unity_docs
xr
Show me a Unity code example for 'Collect asset loading metrics'.
re the impact of your changes have on performance. ## Development build requirement The AsyncReadManagerMetrics class is only available in development builds . To ensure compatibility, wrap calls to AsyncReadManagerMetrics APIs in an #if preprocessor directive using the ENABLE_PROFILER symbol. For older Unity version...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_434a22e0e991
unity_docs
performance
What is `Unity.Jobs.IJobForExtensions.ScheduleParallel` in Unity? Explain its purpose and usage.
IJobForExtensions.ScheduleParallel Declaration public static Unity.Jobs.JobHandle ScheduleParallel (T jobData , int arrayLength , int innerloopBatchCount , Unity.Jobs.JobHandle dependency ); Parameters Parameter Description jobData The job and data to schedule. arrayLength The number of iterations t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a824958c6f60
unity_docs
physics
What is `Collider2D` in Unity? Explain its purpose and usage.
Collider2D class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.Physics2DModule Description Parent class for collider types used with 2D gameplay. Additional resources: BoxCollider2D , CircleCollider2D , PolygonCollider2D , EdgeCollider2D , CapsuleCollider2D & CompositeCollider...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8f23230fb8b9
unity_docs
scripting
In Unity's 'Awaitable code example reference', what is 'Asynchronous tests' and how does it work?
Unity’s Test Framework doesn’t recognize Awaitable as a valid test return type. However, the following example shows how you can use the Awaitable implementation of IEnumerator to write async tests: ```csharp [UnityTest] public IEnumerator SomeAsyncTest(){ async Awaitable TestImplementation(){ // test something with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_049737a0ce61
unity_docs
scripting
Show me a Unity C# example demonstrating `GUI.Window`.
nd by the end user. Unlike other controls, you need to pass them a separate function that renders the GUI controls inside the window. Note: If you are using GUILayout to place your components inside the window, you should use GUILayout.Window . Also, if MonoBehaviour.useGUILayout is set to false then a call to GU...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6251aea7b698
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Japanese`.
SystemLanguage.Japanese Description Japanese. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Japanese language if (Application.systemLanguage == SystemLanguage.Japanese) { //Outputs into console that the system is J...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22fde88bbad0
unity_docs
rendering
Give me an overview of the `TextureImporterSwizzle` class in Unity.
TextureImporterSwizzle enumeration Description Options for where texture color channel data comes from in the TextureImporter . By default, the Texture Importer maps each color channel from the source image to the same color channel in the imported texture. For example, the default value of TextureImporter.swizz...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ae8bea095afc
unity_docs
rendering
In Unity's 'Add trees to the terrain', what is 'Customize trees for painting' and how does it work?
Customize tree placement and characteristics. Except for Brush Size and Tree Density , the settings apply to both mass placed trees and brush painted trees. Property Function Brush Size The size of the area each brush stroke covers with trees. Tree Density How far apart trees must be. This limits the number of trees a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aee748d7b6c2
unity_docs
editor
Explain 'Build Automation' in Unity.
com.unity.services.cloud-build ## Description Integrate with Unity Build Automation This package provides services to build and distribute your applications. ## Released for Unity Package version 1.0.5 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0295b57a9157
unity_docs
physics
What is `Rigidbody2D.AddRelativeForce` in Unity? Explain its purpose and usage.
Rigidbody2D.AddRelativeForce Declaration public void AddRelativeForce ( Vector2 relativeForce , ForceMode2D mode = ForceMode2D.Force); Parameters Parameter Description relativeForce Components of the force in the X and Y axes. mode The method used to apply the specified force. Description Adds a for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_542aaddfc251
unity_docs
scripting
What is `AI.NavMeshObstacle.carvingTimeToStationary` in Unity? Explain its purpose and usage.
NavMeshObstacle.carvingTimeToStationary public float carvingTimeToStationary ; Description Time to wait until obstacle is treated as stationary (when carving and carveOnlyStationary are enabled). If the NavMeshObstacle has been moving, and becomes still, We wait carvingTimeToStationary time until the obstac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78893eb793bc
unity_docs
scripting
What is `Cloth.ClearTransformMotion` in Unity? Explain its purpose and usage.
Cloth.ClearTransformMotion Declaration public void ClearTransformMotion (); Description Clear the pending transform changes from affecting the cloth simulation. When the transform of a cloth changes, the cloth will not directly follow that change, but instead, the new positions of the SkinnedMeshRenderer's ver...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0eb68b8dae27
unity_docs
scripting
What is `UIElements.BaseListViewController.Move` in Unity? Explain its purpose and usage.
BaseListViewController.Move Declaration public void Move (int index , int newIndex ); Parameters Parameter Description index The source index. newIndex The destination index. Description Moves an item in the source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_293e0625bef7
unity_docs
ui
What is `UIElements.PointerManipulator` in Unity? Explain its purpose and usage.
PointerManipulator class in UnityEngine.UIElements / Inherits from: UIElements.MouseManipulator / Implemented in: UnityEngine.UIElementsModule Description PointerManipulators have a list of activation filters. Protected Methods Method Description CanStartManipulation Checks whether PointerEvent satisf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2a9395281ad
unity_docs
rendering
What are the parameters of `TerrainTools.TerrainPaintUtility.BeginPaintHeightmap` in Unity?
Returns PaintContext PaintContext containing the combined heightmap data for the specified region. Description Helper function to set up a PaintContext for modifying the heightmap of one or more Terrain tiles. BeginPaintHeightmap identifies all of the heightmap pixels that are within extraBorderPixels of the bounds rec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51e5992b131d
unity_docs
rendering
What is `Rendering.CommandBuffer.EnableKeyword` in Unity? Explain its purpose and usage.
CommandBuffer.EnableKeyword Declaration public void EnableKeyword (ref Rendering.GlobalKeyword keyword ); Declaration public void EnableKeyword ( Material material , ref Rendering.LocalKeyword keyword ); Declaration public void EnableKeyword ( ComputeShader computeShader , ref Rendering.LocalKeywo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c5b76c283a6
unity_docs
rendering
What is `MonoBehaviour.OnValidate` in Unity? Explain its purpose and usage.
MonoBehaviour.OnValidate() Description Editor-only function that Unity calls when the script is loaded or a value changes in the Inspector. Use this to perform an action after a value changes in the Inspector; for example, making sure that data stays within a certain range. OnValidate is called at various stages ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_404e6bb60449
unity_docs
scripting
In Unity's 'Load SSH keys automatically on Windows (OpenSSH)', what is 'Procedure' and how does it work?
Check if C:\Users\<YourUserName>\.ssh\config exists. Note : In some applications, such as Git Bash,.ssh is a hidden subdirectory. Create C:\Users\<YourUserName>\.ssh\config if it doesn’t exist. Add the following content to C:\Users\<YourUserName>\.ssh\config to set the key to load in the authentication agent and specif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16a3279166d9
unity_docs
editor
What are the parameters of `Unity.Profiling.Memory.MemoryProfiler.TakeSnapshot` in Unity?
Description Triggers a memory snapshot capture to generate a capture of the memory state that the Memory Profiler can open and analyze. Request a memory snapshot capture with the provided arguments. Not all fields corresponding to the capture flags are collected. This depends on the target build used to capture the sna...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78a9bc80b9d0
unity_docs
ui
What is `UIElements.IPanel` in Unity? Explain its purpose and usage.
IPanel interface in UnityEngine.UIElements Description Interface for classes implementing UI panels. Properties Property Description contextType Describes in which context a VisualElement hierarchy is being ran. contextualMenuManager The Contextual menu manager for the panel. dispatcher This Pan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31b8241d4dd0
unity_docs
animation
What is `Animations.TransitionInterruptionSource` in Unity? Explain its purpose and usage.
TransitionInterruptionSource enumeration Description Which AnimatorState transitions can interrupt the Transition. Properties Property Description None The Transition cannot be interrupted. Formely know as Atomic. Source The Transition can be interrupted by transitions in the source AnimatorState. Destination...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_541d2a91ca5c
unity_docs
rendering
What are the parameters of `Rendering.CommandBuffer.SetShadowSamplingMode` in Unity?
Description Add a "set shadow sampling mode" command. Shadowmap render textures are normally set up to be sampled with a comparison filter - the sampler gets a shadow-space depth value of the screen pixel and returns 0 or 1, depending on if the depth value in the shadowmap is smaller or larger. That's the default Shado...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc982b2e14a5
unity_docs
animation
In Unity's 'Retarget Humanoid animations', what is 'Recommended Hierarchy structure' and how does it work?
When working with Mecanim animations, you can expect your scene to contain the following elements: The Imported character model, which has an Avatar on it. The Animator Component , referencing an Animator Controller asset. A set of animation clips , referenced from the Animator Controller. Scripts for the character. Ch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_562e03115742
unity_docs
rendering
What are the parameters of `AssetImporters.AssetImportContext.GetReferenceToAssetMainObject` in Unity?
Returns Object Returns the main asset instance if it exists and is already imported, returns null otherwise. Description Returns the main asset from the given path (if it exists) and automatically adds a dependency on its path if it is the main asset type. Calling this method during an import will make the current impo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4095dd9868b5
unity_docs
scripting
What is `Random.insideUnitCircle` in Unity? Explain its purpose and usage.
Random.insideUnitCircle public static Vector2 insideUnitCircle ; Description Returns a random point inside or on a circle with radius 1.0 (Read Only). Note that the probability space includes the perimeter of the circle because value , which is inclusive to 1.0, is used to acquire a random radius. ```cshar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_827cffce9984
unity_docs
physics
What is `BoxCollider2D.size` in Unity? Explain its purpose and usage.
BoxCollider2D.size public Vector2 size ; Description The width and height of the rectangle. The X coordinate of the vector represents the width while the Y represents the height. These values are specified relative to a center point, so the distance from the center to the left edge is actually width/2. Additi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9d806729bf1
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.MeshData.GetIndexData`.
a 32 bit index format use the int data type. If the MeshData is writeable, and you have set the index buffer size and format using Mesh.MeshData.SetIndexBufferParams , you can write indices directly to the array. If the MeshData is read-only, the array is read-only. Additional resources: Mesh.AllocateWritableMe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b61f60adaac
unity_docs
editor
What is `InteractionMode` in Unity? Explain its purpose and usage.
InteractionMode enumeration Description The mode of interaction, user or automated, that an API method is called with. Some of Unity’s API methods allow you to specify whether the “interaction mode” is user-driven or automated. This affects whether Unity shows dialog boxes, and whether actions are recorded in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1cb6db275e6a
unity_docs
xr
In Unity's 'Asset Loading Profiler module reference', what is 'Module details pane' and how does it work?
The Asset Loading Profiler module doesn’t populate the details pane automatically. To populate the view with data, select the Analyze Markers button at the top of the details pane, then select a frame in the Asset Loading Profiler module. The module details pane displays detailed information about how and when Unity lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1a012ff38ca6
unity_docs
rendering
Explain '2D SpriteShape' in Unity.
com.unity.2d.spriteshape ## Description SpriteShape Runtime & Editor Package contains the tooling and the runtime component that allows you to create very organic looking spline based 2D worlds. It comes with intuitive configurator and a highly performant renderer. ## Released for Unity Package version 10.0.7 is re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e3b1b72d106
unity_docs
rendering
What is `DynamicGI` in Unity? Explain its purpose and usage.
DynamicGI class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Allows to control the dynamic Global Illumination. Additional resources: RendererExtensions.UpdateGIMaterials , TerrainExtensions.UpdateGIMaterials . Static Properties Property Description indirectScale Allows for scaling ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e384e09afe9
unity_docs
rendering
What is `SystemInfo.supportsMultisampleAutoResolve` in Unity? Explain its purpose and usage.
SystemInfo.supportsMultisampleAutoResolve public static bool supportsMultisampleAutoResolve ; Description Returns true if multisampled textures are resolved automatically Some platforms support multisampling without using an intermediate multisampled texture that needs to be explicitly resolved. Such platforms...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a1f5f7d3f7f
unity_docs
physics
What is `ArticulationBody.GetAccumulatedForce` in Unity? Explain its purpose and usage.
ArticulationBody.GetAccumulatedForce Declaration public Vector3 GetAccumulatedForce (float step = Time.fixedDeltaTime); Parameters Parameter Description step The timestep of the next physics simulation. Returns Vector3 Accumulated force expressed in ForceMode.Force . Description Returns the forc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6108eae7ef39
unity_docs
scripting
What is `UIElements.TextElement.isElided` in Unity? Explain its purpose and usage.
TextElement.isElided public bool isElided ; Description Returns true if text is elided, false otherwise. Text is elided when the element that contains it is not large enough to display the full text, and has the following style property settings. overflow: Overflow.Hidden whiteSpace: WhiteSpace.NoWrap te...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c512227e899f
unity_docs
rendering
Explain 'Create a cubemap array' in Unity.
A cubemap array is an array of cubemaps that are the same size and format, and that the GPU can access as a single texture resource. Cubemap arrays are often used for implementing efficient reflection probe , lighting and shadowing systems. To create a cubemap array in your Project, you must use a script. The following...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_276f7ecbe406
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightBoxShape.indirectColor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightBoxShape.indirectColor public Experimental.GlobalIllumination.LinearColor indirectColor ; Description The indirect light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8614df04b2b
unity_docs
scripting
What is `Event.mousePosition` in Unity? Explain its purpose and usage.
Event.mousePosition public Vector2 mousePosition ; Description The mouse position. Used in EventType.MouseMove and EventType.MouseDrag events. The top-left of the window returns (0, 0). The bottom-right returns (Screen.width, Screen.height). Additional resources: Event.delta . ```csharp using UnityEngin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de0aecf36c1a
unity_docs
rendering
What is `ParticleSystem.Particle.GetCurrentSize` in Unity? Explain its purpose and usage.
ParticleSystem.Particle.GetCurrentSize Declaration public float GetCurrentSize ( ParticleSystem system ); Parameters Parameter Description system The Particle System from which this particle was emitted. Returns float Current size. Description Calculate the current size of the particle by applying ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac9449535818
unity_docs
editor
What is `EventType.MouseEnterWindow` in Unity? Explain its purpose and usage.
EventType.MouseEnterWindow Description Mouse entered a window (Editor views only). The user hovered the mouse over a window without any buttons being held down. This event is sent once, as the mouse enters the window. Note that this event is only sent in the Editor for EditorWindow windows which have EditorWindo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9152ab2380a3
unity_docs
animation
What is `Animations.CustomStreamPropertyType` in Unity? Explain its purpose and usage.
CustomStreamPropertyType enumeration Description The type of custom stream property to create using BindCustomStreamProperty Properties Property Description Float A float value. Bool A boolean value. Int An integer value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d09801bf5623
unity_docs
math
What is `Vector3.SlerpUnclamped` in Unity? Explain its purpose and usage.
Vector3.SlerpUnclamped Declaration public static Vector3 SlerpUnclamped ( Vector3 a , Vector3 b , float t ); Description Spherically interpolates between two vectors. Interpolates between a and b by amount t . The difference between this and linear interpolation (aka, "lerp") is that the vectors ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e842a42c8c64
unity_docs
scripting
In Unity's 'Programming in Unity', what is 'Additional resources and examples' and how does it work?
📖 E-Book : Use a C# style guide for clean and scalable game code (Unity 6 edition) 📖 E-Book : Level up your code with design patterns and SOLID 📖 E-Book : Create modular game architecture in Unity with ScriptableObjects 📖 E-Book : Introduction to the Data-Oriented Technology Stack for advanced Unity developers 💡 R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a462e051344e
unity_docs
rendering
What is `Rendering.ScriptableCullingParameters` in Unity? Explain its purpose and usage.
ScriptableCullingParameters struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Parameters that configure a culling operation in the Scriptable Render Pipeline. Obtain a ScriptableCullingParameters struct by calling Camera.TryGetCullingParameters . Note that you can obtain and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4e71eac2b411
github
scripting
Write a Unity C# script called Float Property_Writeable
```csharp using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables { [CreateAssetMenu(menuName = "Game Properties/Float Property - Writeable")] public class FloatProperty_Writeable : FloatProperty { new public void Set(float value) => SetAndNotify(value); } } ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_65b814377017
github
scripting
Write a Unity C# script called Unsafe Native List
```csharp using System; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; using UnityEngine; namespace Gilzoide.UpdateManager.Jobs.Internal { public unsafe struct UnsafeNativeList<T> : IDisposable where T : struct { public const float TrimCapacityThreshold = 0.9f; public static ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_8d07eb19ccfe
unity_docs
rendering
In Unity's '2D renderer sorting', what is 'Sorting Layer and Order in Layer' and how does it work?
The Sorting Layer and Order in Layer (in the Renderer’s Property settings) are available to all 2D Renderers through the Inspector window or via the Unity Scripting API. Set the Renderer to an existing Sorting Layer or create a new one to determine its priority in the rendering queue. Change the value of the Order in L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dea0354ac376
github
scripting
Write a Unity C# MonoBehaviour script called Solo Network Manager
```csharp using UnityEngine; using UnityEngine.Networking; using System.Collections; public class SoloNetworkManager : MonoBehaviour { void Start () { this.GetComponent<NetworkManager>().StartServer(); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d698f1d23a4c
unity_docs
editor
What is `SearchService.ProjectSearchContext` in Unity? Explain its purpose and usage.
ProjectSearchContext class in UnityEditor.SearchService Implements interfaces: ISearchContext Description A search context implementation for Project search engines. All methods that are called on a Project search engine, and expect a ISearchContext , receive an object of this type. Properties Property Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cfd469d2ca8
unity_docs
rendering
What is `WebCamTexture.deviceName` in Unity? Explain its purpose and usage.
WebCamTexture.deviceName public string deviceName ; Description Set this to specify the name of the device to use. This only has an effect when set while the camera is not running. Note: if you want to use WebCamTexture to get the camera stream from device connected through Unity Remote, then you must initalize...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9b587cb99ad
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.SetBoneWeights`.
e floating point values passed in, so do not expect to get the exact same values back using Mesh.GetAllBoneWeights . The minimum precision used is currently 16-bit normalized integers. Additional resources: Mesh.GetAllBoneWeights , Mesh.GetBonesPerVertex , Mesh.boneWeights , Mesh.GetBoneWeights ModelImporter.max...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0079896e6b5b
unity_docs
editor
What is `SettingsProvider.OnGUI` in Unity? Explain its purpose and usage.
SettingsProvider.OnGUI Declaration public void OnGUI (string searchContext ); Parameters Parameter Description searchContext Search context for the Settings window. Used to show or hide relevant properties. Description Use this function to draw the UI based on IMGUI. This assumes you haven't added any chil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8e552ed37fa
unity_docs
physics
What are the parameters of `BoxcastCommand.ctor` in Unity?
Description Creates a BoxcastCommand. This command is run in the default physics scene. Declaration public BoxcastCommand ( PhysicsScene physicsScene , Vector3 center , Vector3 halfExtents , Quaternion orientation , Vector3 direction , QueryParameters queryParameters , float distance ); Parameters Parameter Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28241eeda726
unity_docs
ui
What is `UIElements.RadioButton.labelUssClassName` in Unity? Explain its purpose and usage.
RadioButton.labelUssClassName public static string labelUssClassName ; Description USS class name for Labels in RadioButton elements. Unity adds this USS class to the Label sub-element of the RadioButton if the RadioButton has a Label.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4decff19453
unity_docs
scripting
What is `AnimationClip` in Unity? Explain its purpose and usage.
AnimationClip class in UnityEngine / Inherits from: Motion / Implemented in: UnityEngine.AnimationModule Description Stores keyframe based animations. AnimationClip is used by Animation to play back animations. Properties Property Description empty Returns true if the animation clip has no curves and n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3973b30cb9e2
unity_docs
scripting
What is `Unity.Android.Gradle.DependencyResolutionManagement` in Unity? Explain its purpose and usage.
DependencyResolutionManagement class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description The C# definition of the dependencyResolutionManagement element in a gradle file. For more information about the element, see Android's documentation: Remote repositories Properties Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06ceb873972b
unity_docs
scripting
What is `Device.Application.RequestAdvertisingIdentifierAsync` in Unity? Explain its purpose and usage.
Application.RequestAdvertisingIdentifierAsync Declaration public static bool RequestAdvertisingIdentifierAsync ( Application.AdvertisingIdentifierCallback delegateMethod ); Description This has the same functionality as Application.RequestAdvertisingIdentifierAsync . At the moment, the Device Simulator doesn'...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f112c433d013
unity_docs
rendering
What are the parameters of `Graphics.CopyBuffer` in Unity?
Description Copies the contents of one GraphicsBuffer into another. The GPU copies the buffer contents efficiently. Total buffer sizes (i.e. count multiplied by stride ) must match between source and destination buffers. The source buffer must have a GraphicsBuffer.Target.CopySource target flag, and the destination buf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_751c0de7e4e8
unity_docs
rendering
What is `UIElements.PanelSettings.forceGammaRendering` in Unity? Explain its purpose and usage.
PanelSettings.forceGammaRendering public bool forceGammaRendering ; Description Forces the UI shader to output colors in the gamma color space. This is only applicable when the project is in linear color space and when the panel is being rendered into a Render Texture with a compatible format (e.g. R8G8B8A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8031c57fec47_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Defines a three dimensional slider interactable with a spherical shape. Signature: ```csharp public class Slider3DRound : ValueRangeInteractable<SphereDescriptor, Slider3DSphereVisualizer, Vector3> ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_4d7330214455
github
scripting
Write a Unity Editor script for Dropdown Editor
```csharp using UnityEngine.UI; namespace UnityEditor.UI { [CustomEditor(typeof(Dropdown), true)] [CanEditMultipleObjects] /// <summary> /// Custom editor for the Dropdown component /// Extend this class to write a custom editor for a component derived from Dropdown. /// </summary> public c...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_b4a93328022e
unity_docs
ui
Explain 'Structure UI with C# scripts' in Unity.
Technical users can define the layout of the UI directly in C# scripts . You can define the look of controls in a USS file, or modify the style properties of the control in your C# script . Controls are interactive and represent a value that you can change. For example, a FloatField represents a float value. You can cr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_158cb03bdd8d
unity_docs
rendering
What is `SketchUpImportScene.camera` in Unity? Explain its purpose and usage.
SketchUpImportScene.camera public SketchUpImportCamera camera ; Description The camera data of the SketchUp scene. This is the camera view data that was extracted from the SketchUp scene of the file. See SketchUpImportCamera and SketchUpImporter.GetScenes .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_243fc8fa4160
unity_docs
editor
What is `EditorWindow.minSize` in Unity? Explain its purpose and usage.
EditorWindow.minSize public Vector2 minSize ; Description The minimum size of this window when it is floating or modal. The minimum size is not used when the window is docked. An EditorWindow can be resized. The minSize variable provides the minimum width and height that is supported. This is typically a V...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_129ba2dec4fe
unity_docs
performance
In Unity's 'Configure vertex compression', what is 'Configure Vertex Compression' and how does it work?
To change the Vertex Compression settings: Open the Player settings (menu: Edit > Project Settings > Player ). Open the Other Settings submenu and navigate to the Optimization heading. Select the Vertex Compression dropdown and select any channel to enable or disable compression for that channel. You can also select No...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88d53cacb0fc
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.left`.
Vector3.left public static Vector3 left ; Description Shorthand for writing Vector3(-1, 0, 0) . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { transform.position += Vector3.left * Time.deltaTime; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b736289e9aa
unity_docs
physics
What is `Physics2D.OverlapPointAll` in Unity? Explain its purpose and usage.
Physics2D.OverlapPointAll Declaration public static Collider2D[] OverlapPointAll ( Vector2 point , int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Parameter Description minDepth Only include objects with a Z coordinate (depth) greate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_486c60fee378
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Icelandic`.
SystemLanguage.Icelandic Description Icelandic. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Icelandic language if (Application.systemLanguage == SystemLanguage.Icelandic) { //Outputs into console that the system ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cebe56a88e3
unity_docs
rendering
What is `AssetPostprocessor` in Unity? Explain its purpose and usage.
AssetPostprocessor class in UnityEditor Description AssetPostprocessor lets you hook into the import pipeline and run scripts before or after importing assets. During model import the functions are called in the following order: OnPreprocessModel is called at the very beginning and you can override ModelImport...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e684a9feed14
unity_docs
rendering
Give me an overview of the `ModelImporterMaterialLocation` class in Unity.
ModelImporterMaterialLocation enumeration Description Material import options for ModelImporter. Additional resources: ModelImporter.materialLocation . Properties Property Description External Extract the materials and textures from the model. InPrefab Unity imports materials as sub-assets.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_46773c4022d4
github
scripting
Write a Unity C# XR/VR script for XR Input Handler
```csharp using UnityEngine; #if ENABLE_INPUT_SYSTEM using UnityEngine.InputSystem; #endif namespace TapLive.XR { /// <summary> /// Handles XR input from controllers and maps to actions /// Refactored from VRInputHandler to support general XR interactions /// </summary> public class XRInputHandler ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_adb9da5bef42
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddRemotePackageReferenceAtRevision`.
PBXProject.AddRemotePackageReferenceAtRevision Declaration public string AddRemotePackageReferenceAtRevision (string url , string revision ); Parameters Parameter Description url The URL of the repository. revision The ID of the commit. Returns string Returns the GUID of the remote package reference. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d72fccaf731
unity_docs
xr
What is `Rendering.AsyncGPUReadback.RequestIntoNativeArrayAsync` in Unity? Explain its purpose and usage.
AsyncGPUReadback.RequestIntoNativeArrayAsync Declaration public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync (ref NativeArray<T> output , Texture src , int mipIndex ); Declaration public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync (ref NativeArray<T> outpu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0e617273d3b
unity_docs
scripting
What is `SceneVisibilityManager` in Unity? Explain its purpose and usage.
SceneVisibilityManager class in UnityEditor / Inherits from: ScriptableSingleton_1 Description Manages Scene Visibility in the editor. Public Methods Method Description AreAllDescendantsHidden Checks whether all the descendants of a GameObject are hidden. AreAllDescendantsVisible Checks whether all the desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4183d0415cb
unity_docs
physics
Show me a Unity C# example demonstrating `AssetImporters.ScriptedImporterAttribute`.
ScriptedImporterAttribute class in UnityEditor.AssetImporters Description Class attribute used to register a custom asset importer derived from ScriptedImporter with Unity's Asset import pipeline. ```csharp using UnityEngine; using UnityEditor.AssetImporters;[ScriptedImporter(version: 1, ext: "sphere", AllowCac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Wrld API defines two different map behaviors / systems which allow different waysto interact with Unity. Each system has its pros and cons outlined in the Examples page. Signature: ```csharp public enum CoordinateSystem ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_33a896f4c30e
unity_docs
animation
Show me a Unity C# example demonstrating `ModelImporterClipAnimation.ConfigureMaskFromClip`.
rrent masking settings from the clip to an AvatarMask . When writing an AssetPostprocessor , use this method to copy the AvatarMask from your clip configuration so that you can modify it. Note: you will need to use ModelImporterClipAnimation.ConfigureClipFromMask to apply the AvatarMask back on the ModelImpor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4846bc51cc3
unity_docs
animation
What is `AnimationMode.BeginSampling` in Unity? Explain its purpose and usage.
AnimationMode.BeginSampling Declaration public static void BeginSampling (); Description Initialise the start of the animation clip sampling. BeginSampling arranges for the ::SampleAnimationClip to operate correctly. Not calling BeginSampling prevents the animation data to be sampled. This function must be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11ed1eff61bb
unity_docs
ui
Show me a Unity C# example demonstrating `EditorPrefs.GetFloat`.
float from. defaultValue Float value to return if the key is not in the storage. Returns float The float value stored in the preference file or the defaultValue id the requested float does not exist. Description Returns the float value corresponding to key if it exists in the preference file. If GetFloat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8327b45be9f5
unity_docs
editor
What is `SceneManagement.EditorSceneManager.OpenPreviewScene` in Unity? Explain its purpose and usage.
EditorSceneManager.OpenPreviewScene Declaration public static SceneManagement.Scene OpenPreviewScene (string scenePath ); Parameters Parameter Description scenePath Scene file to open. Returns Scene The created preview Scene. Description Opens a Scene Asset in a preview Scene. You can use this fun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e711797cc0b9
unity_docs
editor
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.MarkerFlags`.
MarkerFlags enumeration Description Profiler marker usage flags. Use to specify marker usage or availability information. ```csharp using System.Collections.Generic; using Unity.Profiling.LowLevel; using Unity.Profiling.LowLevel.Unsafe;public class Example { public static unsafe void WriteAllNonDevelopmentStatsT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a334d5c63a99
unity_docs
rendering
Give me an overview of the `MaterialPropertyBlock` class in Unity.
MaterialPropertyBlock class in UnityEngine / Implemented in: UnityEngine.CoreModule Description A block of material values to apply. MaterialPropertyBlock is used by Graphics.RenderMesh and Renderer.SetPropertyBlock . Use it in situations where you want to draw multiple objects with the same material, but sl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c728219612ee
unity_docs
rendering
What is `Rendering.RayTracingShader.SetBool` in Unity? Explain its purpose and usage.
RayTracingShader.SetBool Declaration public void SetBool (string name , bool val ); Declaration public void SetBool (int nameID , bool val ); Parameters Parameter Description name The name of the property being set. nameID The ID of the property as given by Shader.PropertyToID. val The boolean val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9cd2e41b215a
unity_docs
editor
In Unity's 'Import Activity window introduction', what is 'Overview of import data' and how does it work?
Select the Show Overview option in the toolbar to get an overview of the most impactful assets in your project. The Import Activity Overview panel displays a list of assets with the most dependencies and longest import duration. It’s useful to identify which assets might slow down the import process of your project. As...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_968987a50af0
unity_docs
animation
What is `UIElements.IResolvedStyle` in Unity? Explain its purpose and usage.
IResolvedStyle interface in UnityEngine.UIElements Description Style values after layout pass. Properties Property Description alignContent Alignment of the whole area of children on the cross axis if they span over multiple lines in this container. alignItems Alignment of children on the cross axis ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7787db042736
unity_docs
editor
What are the parameters of `AssetDatabase.SetLabels` in Unity?
Description Replaces the list of labels on an asset. ```csharp using UnityEngine; using UnityEditor;public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Set Vegetation Labels")] static void SetVegetationAssetLabels() { //Search the Assets folder for all assets with "tree" in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.