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_0e34bdf6f7ff
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingShaderTagConfig.tagValueId` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingShaderTagConfig.tagValueId public Rendering.ShaderTagId tagValueId ; Description A shader tag id value. Use ShaderTagId constructor to create one (e.g. ShaderTagId("UltraHDRP").
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f4432856d9fc
unity_docs
rendering
In Unity's 'Leaf group reference', what is 'Geometry' and how does it work?
Property Function Geometry Mode The shape of the leaves: Billboard for a square leaf that always faces you, Plane for a square leaf that can be seen from the side, and Cross or TriCross for 3D leaves. Use a mesh for complex flowers, fruit, and other objects. Material A material for the leaves. Not available when you se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e03f6da1fab3
unity_docs
audio
What are the parameters of `Audio.AudioMixer.FindMatchingGroups` in Unity?
Returns AudioMixerGroup[] Groups in the mixer whose paths match the specified search path. Description Connected groups in the mixer form a path from the mixer's master group to the leaves. This path has the format Master Group/Child of Master Group/Grandchild of Master Group , and so on. For example, in the hierarchy ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d0be75345be
unity_docs
scripting
What are the parameters of `Handles.CubeHandleCap` in Unity?
Description Draw a cube handle. Pass this into handle functions. On EventType.Layout event, calculates handle distance to mouse and calls HandleUtility.AddControl accordingly. On EventType.Repaint event, draws the handle shape. Cube Handle Cap in the Scene View. Add the following script to your Assets folder as CubeExa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b64dd154c34
unity_docs
rendering
What is `Rendering.RendererListParams.cullingResults` in Unity? Explain its purpose and usage.
RendererListParams.cullingResults public Rendering.CullingResults cullingResults ; Description The set of visible objects to draw. You typically obtain this from ScriptableRenderContext.Cull .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_344ca914cfd8
github
scripting
Write a Unity Editor script for Singleton Updater Editor
```csharp using System.Collections.Generic; using UnityEditor; using UnityEngine; using yaSingleton.Helpers; namespace yaSingleton.Editor { [CustomEditor(typeof(SingletonUpdater), true)] public class SingletonUpdaterEditor : UnityEditor.Editor { private Dictionary<int, UnityEditor.Editor> _ed...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_cef01edddba7
unity_docs
ui
What is `UIElements.TreeView.makeItem` in Unity? Explain its purpose and usage.
TreeView.makeItem public Func<VisualElement> makeItem ; Description Callback for constructing the VisualElement that is the template for each recycled and re-bound element in the list. This callback needs to call a function that constructs a blank VisualElement that is bound to an element from the list. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83df7242dff6
unity_docs
rendering
Show me a Unity C# example demonstrating `Graphics.RenderMesh`.
arameter. This call creates internal resources while the Mesh is in the render queue. The allocation happens immediately and exists until the end of frame if the object is in the render queue for all cameras. Otherwise, the allocation exists until the specified Camera finishes rendering. Additional resources: Material...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_60c99f332b74
unity_docs
scripting
Show me a Unity code example for 'LayerField'.
ld allows the users to select a layer from a list of available layers . Note : To align a LayerField with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a LayerField You can create a LayerField with UI Builder, UXML...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_198cc7d89d2d
unity_docs
rendering
Explain 'Set the lighting model in a Surface Shader in the Built-In Render Pipeline' in Unity.
In the Built-in Render Pipeline , when writing Surface Shaders , you describe the properties of a surface (such as albedo color and normal), and a Lighting Model computes the lighting interaction. There are two built-in lighting models: Lambert for diffuse lighting, and BlinnPhong for specular lighting. The Lighting.cg...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02f99915609a
unity_docs
scripting
What is `Search.QueryEngine_1.SetFilterNestedQueryTransformer` in Unity? Explain its purpose and usage.
QueryEngine<T0>.SetFilterNestedQueryTransformer Declaration public void SetFilterNestedQueryTransformer (string filterToken , Func<TNestedQueryData,TRhs> transformer ); Parameters Parameter Description filterToken The identifier of the filter. Typically what precedes the operator in a filter (for example, "...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3981a5b7b345
unity_docs
xr
What is `U2D.SpriteAtlas.GetSprite` in Unity? Explain its purpose and usage.
SpriteAtlas.GetSprite Declaration public Sprite GetSprite (string name ); Parameters Parameter Description name The name of the Sprite . Description Clone the first Sprite in this atlas that matches the name packed in this atlas and return it. The clone will use the packed texture of this atlas. Usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4f2f2a7afbf
unity_docs
scripting
What are the parameters of `ReflectionProbe.IsFinishedRendering` in Unity?
Returns bool True if the render has finished, false otherwise. Additional resources: timeSlicingMode Description Checks if a probe has finished a time-sliced render. ```csharp using UnityEngine; using System.Collections; public class UpdateProbeEvery2Seconds : MonoBehaviour { private int RenderId = -1; private ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c53aaf5d619
unity_docs
physics
What is `HingeJoint.useSpring` in Unity? Explain its purpose and usage.
HingeJoint.useSpring public bool useSpring ; Description Enables the joint's spring . Disabled by default. Additional resources: JointSpring Enabling the motor overrides the spring, given the spring was enabled. If the motor is again disabled the spring will be restored.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33581743fa7b
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.ScriptableRenderContext.BeginRenderPass`.
target is needed to work around that - The maximum amount of attachments allowed per render pass is currently 8 + depth, but note that various GPUs may have stricter limits. Additional resources: BeginSubPass , EndRenderPass , BeginScopedRenderPass , BeginScopedSubPass . A quick example on how to use the render p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_600db157fe31
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormatUtility.IsUNormFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsUNormFormat Declaration public static bool IsUNormFormat ( Experimental.Rendering.GraphicsFormat format ); Description Returns true if the format is an unsigned normalized format. Returns false other...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9e9ac39defb
unity_docs
physics
What are the parameters of `Physics.CapsuleCastAll` in Unity?
Returns RaycastHit[] An array of all colliders hit in the sweep. Description Like Physics.CapsuleCast , but this function will return all hits the capsule sweep intersects. Casts a capsule against all colliders in the Scene and returns detailed information on each collider which was hit. The capsule is defined by the t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_baeacc8202b2
unity_docs
performance
What is `Unity.Profiling.ProfilerCategory.ctor` in Unity? Explain its purpose and usage.
ProfilerCategory Constructor Declaration public ProfilerCategory (string categoryName ); Parameters Parameter Description categoryName Profiler category name. Description Use to construct ProfilerCategory by category name. This constructor performs a lookup across built-in Profiler categories and stores t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7cd4fa02f24
unity_docs
rendering
What is `Build.Reporting.CommonRoles` in Unity? Explain its purpose and usage.
CommonRoles class in UnityEditor.Build.Reporting Description This class provides constant values for some of the common roles used by files in the build. The role of each file in the build is available in BuildFile.role . Static Properties Property Description appInfo The BuildFile.role value of the file that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1f95b77fea95
unity_docs
rendering
Explain 'Shader methods in the Built-In Render Pipeline' in Unity.
Resources for importing prebuilt shader files and using built-in shader functions in the Built-In Render Pipeline . Page Description Import a file from the shader library Import files that contain helper functions and macros, such as UnityCG.cginc and HLSLSupport.cginc . Use built-in shader functions Use built-in funct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff2fa809fc6d
unity_docs
scripting
What is `Experimental.GraphView.GraphView.GetEdgeByGuid` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.GetEdgeByGuid Declaration public Experimental.GraphView.Edge GetEdgeByGuid (string guid ); Parameters Parameter Description guid The GUID. Returns Edge The first edge with given GUID. Null if none found. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7147f4cafec
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RG_EAC_SNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RG_EAC_SNorm Description A two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values follo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d82ee7400acd
unity_docs
performance
What is `Unity.Collections.NativeArray_1.Equals` in Unity? Explain its purpose and usage.
NativeArray<T0>.Equals Declaration public bool Equals (NativeArray<T> other ); Parameters Parameter Description other The NativeArray to compare against. Returns bool True if the two NativeArray instances are the same, false otherwise. Description Compares two NativeArray<T0> instances. Two Nativ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad270b3425a6
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemMetadata` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemMetadata Declaration public string GetItemMetadata (int id , int index ); Parameters Parameter Description id Hierarchy item identifier. index Metadata index. Returns string Value of the metadata as string. Description Returns string representation of hierarchy item m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4ade450a055
unity_docs
animation
What is `Experimental.Animations.AnimationStreamSource.PreviousInputs` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AnimationStreamSource.PreviousInputs Description AnimationStream will be initialized with the values from the previous AnimationPlayableOutput connected to the same Animator . Before it is modified during IAnimationJob.Proc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9eb620b70f00
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.Providers.SceneQueryEngineFilterAttribute`.
This sample shows to use the SceneQueryEngineFilter attribute to customize the search engine used by the scene search provider. The scene search provider allows the user to search for scene objects using custom filters, such as is:prefab prefab:modified , etc. The following example shows how you can add a property f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23f07d473f25
unity_docs
physics
Give me an overview of the `SimulationOption` class in Unity.
SimulationOption enumeration Description An enumerator that specifies physics simulation options. Properties Property Description None Shorthand for no SimulationOption flags. SyncTransforms Define whether or not to sync modified Transform poses to the physics system. IgnoreEmptyScenes Define whether or not t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_798887a0fec8
unity_docs
rendering
What is `UIElements.Cursor` in Unity? Explain its purpose and usage.
Cursor struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Script interface for VisualElement cursor style property IStyle.cursor . Properties Property Description hotspot The offset from the top left of the texture to use as the target point (must be within th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c01c6cd63426
unity_docs
scripting
What is `Unity.Properties.IDictionaryPropertyBagVisitor.Visit` in Unity? Explain its purpose and usage.
IDictionaryPropertyBagVisitor.Visit Declaration public void Visit (IDictionaryPropertyBag<TDictionary,TKey,TValue> properties , ref TDictionary container ); Parameters Parameter Description properties The properties of the container. container The container being visited. Description Implement this met...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ee7c653cba6
unity_docs
scripting
What is `TagHandle` in Unity? Explain its purpose and usage.
TagHandle struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description A handle to one of the tag values that can be applied to a GameObject. If you are checking the tag on a GameObject to see if it matches a particular value, then using a TagHandle instead of the raw tag name can be faster. Addit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9faaac7ca75
unity_docs
scripting
What is `SceneManagement.SceneManager.sceneUnloaded` in Unity? Explain its purpose and usage.
SceneManager.sceneUnloaded Parameters Parameter Description value Use a subscription of either a UnityAction< Scene > or a method that takes a Scene type argument. Description Add a delegate to this to get notifications when a Scene has unloaded. Rather than being called directly this script code shows use o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d4845935a32
unity_docs
animation
What is `AnimationWindow.previewing` in Unity? Explain its purpose and usage.
AnimationWindow.previewing public bool previewing ; Description This property toggles previewing in the Animation window. Previewing allows the Animation window to update the animated Game Object hierarchy in the Scene View with animated values. Disabling this also disables AnimationWindow.recording and Anim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5df21441ae8d
unity_docs
physics
What is `Physics2D.BoxCast` in Unity? Explain its purpose and usage.
Physics2D.BoxCast Declaration public static RaycastHit2D BoxCast ( Vector2 origin , Vector2 size , float angle , Vector2 direction , float distance = Mathf.Infinity, int layerMask = Physics2D.AllLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Parameter D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9886e00e7e1f
unity_docs
rendering
Explain 'External Tools preferences reference' in Unity.
Use the External Tools preferences to set up external applications for scripting, working with images, and source control. To open the preferences, go to Edit > Preferences > External Tools (macOS: Unity > Settings > External Tools ). Property Function External Script Editor Choose the application Unity uses to open sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fd53a2f9e75
unity_docs
scripting
What is `Logger.logEnabled` in Unity? Explain its purpose and usage.
Logger.logEnabled public bool logEnabled ; Description To runtime toggle debug logging [ON/OFF]. ```csharp using UnityEngine; using System.Collections;public class MyGameClass : MonoBehaviour { private static ILogger logger = Debug.unityLogger; private static string kTAG = "MyGameTag"; void Start() { logger...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_015a0e31cb83
unity_docs
rendering
In Unity's 'Streaming Virtual Texturing requirements and compatibility', what is 'Texture compatibility' and how does it work?
SVT is built on top of Texture2D . SVT Textures go through the same importer, which limits the maximum texture size. SVT doesn’t support textures larger than 16K x 16K. It also does not support UDIM Textures, or merging tiled image files into one large texture. SVT doesn’t support all Texture graphics formats. The supp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10d9973617f8
unity_docs
editor
What is `EditorGUILayout.EndScrollView` in Unity? Explain its purpose and usage.
EditorGUILayout.EndScrollView Declaration public static void EndScrollView (); Description Ends a scrollview started with a call to BeginScrollView. Label inside a scroll view. ```csharp using UnityEngine; using UnityEditor;// Simple Editor Window that creates a scroll view with a Label insidepublic class Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4cc03531c28
unity_docs
math
What is `Compilation.CompilationPipeline.GetAssemblies` in Unity? Explain its purpose and usage.
CompilationPipeline.GetAssemblies Declaration public static Assembly[] GetAssemblies ( Compilation.AssembliesType assembliesType ); Returns Assembly[] Array of script assemblies compiled by Unity. Description Get all script assemblies compiled by Unity filtered by AssembliesType . Additional resources:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e823c508a47
unity_docs
scripting
What is `Tilemaps.Tilemap.GetUsedSpritesCount` in Unity? Explain its purpose and usage.
Tilemap.GetUsedSpritesCount Declaration public int GetUsedSpritesCount (); Returns int The total number of different Sprite s used in the Tilemap . Description Gets the total number of different Sprite s used in the Tilemap .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1487a7904dcd
unity_docs
editor
What is `PluginImporter.SetEditorData` in Unity? Explain its purpose and usage.
PluginImporter.SetEditorData Declaration public void SetEditorData (string key , string value ); Parameters Parameter Description key Key value for data. value Data. Description Sets editor specific data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_18661fd4506c
unity_docs
rendering
In Unity's 'Sprite Asset properties reference', what is 'Sprite Character Table' and how does it work?
Manage the sprites in this asset. Click a sprite to make it active. Click Up or Down to move the sprite up or down in the list. To move the sprite to a specific position, enter the index ID of the position in the text field and then click Goto to move the sprite to that position in the list. Note: Moving a sprite updat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7abb08695874
unity_docs
animation
What is `Animations.AnimationHumanStream.SetGoalPosition` in Unity? Explain its purpose and usage.
AnimationHumanStream.SetGoalPosition Declaration public void SetGoalPosition ( AvatarIKGoal index , Vector3 pos ); Parameters Parameter Description index The AvatarIKGoal that is queried. pos The position of this IK goal. Description Sets the position of this IK goal in world space. Additional resou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ae285f9db95
unity_docs
math
What is `Matrix4x4.MultiplyPoint3x4` in Unity? Explain its purpose and usage.
Matrix4x4.MultiplyPoint3x4 Declaration public Vector3 MultiplyPoint3x4 ( Vector3 point ); Description Transforms a position by this matrix (fast). Returns a position v transformed by the current transformation matrix. This function is a faster version of MultiplyPoint ; but it can only handle regular 3D ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7ff2416b591
unity_docs
scripting
What are the parameters of `Tilemaps.Tilemap.GetTilesRangeCount` in Unity?
Returns int Returns the number of Tiles within the given range. Description Retrieves the number of Tiles within the given range, inclusive of the Cells at both the starting position and the ending positions. This method begins at the given starting position and iterates through all available Z Positions, then iterates...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9ed29cc78c0
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.TryGetGUIDAndLocalFileIdentifier`.
possible to manually modify this information. A common use is moving C# script files from a project to a DLL while keeping any GameObjects using these scripts intact. As an example, suppose your project contains a C# MonoBehaviour, a Scene, and a GameObject with this script attached. When serialized the Unity Scene fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c2b45383d88
unity_docs
scripting
What is `IMGUI.Controls.TreeView.SetupParentsAndChildrenFromDepths` in Unity? Explain its purpose and usage.
TreeView.SetupParentsAndChildrenFromDepths Declaration protected static void SetupParentsAndChildrenFromDepths ( IMGUI.Controls.TreeViewItem root , IList<TreeViewItem> rows ); Parameters Parameter Description root The hidden root item. rows TreeViewItems where only the depth property have been set. Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f828675a30c6
unity_docs
rendering
What is `Texture.dimension` in Unity? Explain its purpose and usage.
Texture.dimension public Rendering.TextureDimension dimension ; Description Dimensionality (type) of the Texture (Read Only). Indicates type of a Texture (2D Texture, cubemap, 3D volume Texture etc.). Additional resources: TextureDimension .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4c8a082052f
unity_docs
scripting
What is `LayerMask` in Unity? Explain its purpose and usage.
LayerMask struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Specifies Layers to use in a Physics.Raycast . A GameObject can use up to 32 LayerMask s supported by the Editor. The first 8 of these Layers are specified by Unity; the following 24 are controllable by the user. Bitmasks...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28178e4073cc
unity_docs
editor
What are the parameters of `Callbacks.RunBeforeAssemblyAttribute.ctor` in Unity?
Description Add this attribute to a callback method to indicate that this callback must be run before any callbacks that are part of the specified assembly. To define dependencies for a callback, use the following attributes: RunAfterClassAttribute , RunBeforeClassAttribute RunAfterAssemblyAttribute , RunBeforeAssembly...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80254e5708a5
unity_docs
scripting
Show me a Unity code example for 'ObjectField'.
t is available in the Library panel. To restrict the type of objects that can be selected, use the type property. In UXML, the format of the type property is Type Name, Type assembly name . Tip: To find the assembly name of a type, use Debug.Log(theType.AssemblyQualifiedName); or find it in the type’s Script API page. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20b0a725362d
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.WriteArrayElement` in Unity? Explain its purpose and usage.
UnsafeUtility.WriteArrayElement Declaration public static void WriteArrayElement (void* destination , int index , T value ); Parameters Parameter Description destination Memory pointer. index Array index. value Value to write. Description Write array element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e1af70737c1
unity_docs
physics
What is `MonoBehaviour.OnMouseUp` in Unity? Explain its purpose and usage.
MonoBehaviour.OnMouseUp() Description Called on releasing the mouse button while the mouse pointer is over the Collider attached to this GameObject. The key factor is where the mouse button is released rather than where it was initially pressed down: If you press the mouse button down anywhere, then move the curs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5da5f14cdf38
unity_docs
scripting
What is `AssetBundle.LoadFromMemoryAsync` in Unity? Explain its purpose and usage.
AssetBundle.LoadFromMemoryAsync Declaration public static AssetBundleCreateRequest LoadFromMemoryAsync (byte[] binary ); Declaration public static AssetBundleCreateRequest LoadFromMemoryAsync (byte[] binary , uint crc ); Parameters Parameter Description binary Array of bytes with the AssetBundle da...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3cda4e1ae638
unity_docs
physics
Show me a Unity C# example demonstrating `PhysicsShapeGroup2D.AddEdges`.
ShapeType2D.Edges ) to the shape group. An edge shape is comprised of multiple edges (line segments) defined by all the specified vertices and an edgeRadius that extends around the all the edge(s). NOTE : Edges do not form closed a shape as they do not have any interior even if the first and last vertex were to ov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8336da490f5
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Thai`.
SystemLanguage.Thai Description Thai. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Thai language if (Application.systemLanguage == SystemLanguage.Thai) { //Outputs into console that the system is Thai Debug.Log("...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05aa78772d5b
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefs.DeleteAll`.
PlayerPrefs.DeleteAll Declaration public static void DeleteAll (); Description Removes all keys and values from the preferences. Use with caution. Call this function in a script to delete all current settings in the PlayerPrefs . The following example demonstrates creating a button that deletes all PlayerPrefs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8356a6d9bdbe
unity_docs
performance
What is `Unity.Collections.Allocator.Persistent` in Unity? Explain its purpose and usage.
Allocator.Persistent Description Use a persistent allocation. The slowest allocation but can last as long as you need it to, and if necessary, throughout the application's lifetime. It's a wrapper for a direct call to malloc. Longer jobs can use this NativeContainer allocation type. Don't use Persistent where perf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac00a0b60728
unity_docs
rendering
What is `Texture.width` in Unity? Explain its purpose and usage.
Texture.width public int width ; Description Width of the Texture in pixels (Read Only). This value is the width of the Texture at the highest resolution that PlayerSettings.mipStripping allows. In the Unity Editor, this returns the width of the Texture at full resolution. At run time, if PlayerSettings.mipS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f478a60e8a6c
unity_docs
editor
Explain 'Asset package Asset Store publishing workflow' in Unity.
You can create an asset package (.unitypackage ) from assets that you own and make it available to download on Unity’s Asset Store . To do this, follow the Asset Store publishing workflow which requires personal information, information about your package, and approval from Unity’s Asset Store team. Note: For informati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7823b05d135c
unity_docs
scripting
What is `Transform.GetChild` in Unity? Explain its purpose and usage.
Transform.GetChild Declaration public Transform GetChild (int index ); Parameters Parameter Description index Index of the child transform to return. Must be smaller than Transform.childCount. Returns Transform Transform child by index. Description Returns a transform child by index. If the trans...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e09a1356ccf
unity_docs
scripting
What are the parameters of `Search.QueryEngine_1.SetGlobalStringComparisonOptions` in Unity?
Description Sets global string comparison options. Used for word matching and filter handling (unless overridden by filter). Calling this function will set the global string comparison options used for word and filter matching: ``` // Set the global string comparison options (default is OrdinalIgnoreCase) queryEngine.S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b58173b46c58
unity_docs
rendering
What is `Renderer.rayTracingAccelerationStructureBuildFlags` in Unity? Explain its purpose and usage.
Renderer.rayTracingAccelerationStructureBuildFlags public Rendering.RayTracingAccelerationStructureBuildFlags rayTracingAccelerationStructureBuildFlags ; Description The flags Unity uses when it builds acceleration structures associated with geometry used by renderers. If you set Renderer.rayTracingAccelerat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d82cb618aa67
unity_docs
editor
Explain 'Interaction with browser scripting' in Unity.
When you build content for the web, you might need to communicate with other elements on your web page or use Web APIs to implement functionality that Unity doesn’t expose by default. In both cases, you need to directly interface with the browser’s JavaScript engine. Unity Web provides different methods to handle these...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_803767640973
unity_docs
rendering
What is `Experimental.GlobalIllumination.LightmapperUtils.ExtractIndirect` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LightmapperUtils.ExtractIndirect Declaration public static Experimental.GlobalIllumination.LinearColor ExtractIndirect ( Light l ); Description Extracts the indirect color from a light.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aba395f28dc4
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.ToolsNode` in Unity? Explain its purpose and usage.
ToolsNode enumeration Description Mirrors the ToolsNode enum. For more information about the attribute, see Android's documentation: ToolsNode attribute Properties Property Description Null Attribute is not set and will not appear in the element. Merge Mirrors tools:node="merge". MergeOnlyAttributes Mir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_72469c87944a
github
scripting
Write a Unity C# script called Image Effects
```csharp using System; using UnityEngine; namespace UnityStandardAssets.ImageEffects { /// A Utility class for performing various image based rendering tasks. [AddComponentMenu("")] public class ImageEffects { public static void RenderDistortion(Material material, RenderTexture source...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_b6dbb79e967d
unity_docs
scripting
Explain 'Install Unity Accelerator with Docker Hub' in Unity.
You can use Docker Hub to install Unity Accelerator with the following link: https://hub.docker.com/r/unity/accelerator ## Set up persistent storage To host Unity Accelerator’s configuration and cache, you must set up a persistent storage area. To set this up, use one or more of the following variables when running t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f15deeb46af
unity_docs
animation
What is `Animator.GetLayerWeight` in Unity? Explain its purpose and usage.
Animator.GetLayerWeight Declaration public float GetLayerWeight (int layerIndex ); Parameters Parameter Description layerIndex The layer index. Returns float The layer weight. Description Returns the weight of the layer at the specified index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb939e818ce7
unity_docs
scripting
Show me a Unity C# example demonstrating `PhysicsScene.Simulate`.
omponents including Rigidbody , Collider and Joint including the generation of contacts however contacts are not reported via the standard script callbacks. This is a safety measure to prevent allowing callbacks to delete objects in the Scene which would not be an undoable operation. Here is an example of a basic ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a69ee0dca981
unity_docs
rendering
Explain 'Get started with UI Builder' in Unity.
Want to learn how to create UI with UI Builder? Use this example to get started. To create UI in the UI Builder: Create a new UI Document (UXML). Add elements to create your UI hierarchy. Set up attributes and style properties in the Inspector . When more than one element starts to need the same style properties, creat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1938e1a3e7cc
unity_docs
ui
What is `DecoratorDrawer.CreatePropertyGUI` in Unity? Explain its purpose and usage.
DecoratorDrawer.CreatePropertyGUI Declaration public UIElements.VisualElement CreatePropertyGUI (); Description Override this method to make your own GUI for the property based on UIElements.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf318a6b6aad
unity_docs
scripting
What is `SubsystemsImplementation.SubsystemWithProvider.Stop` in Unity? Explain its purpose and usage.
SubsystemWithProvider.Stop Declaration public void Stop (); Description Stops an instance of a subsystem. Once the instance is stopped, the subsystem representing this instance is no longer active and should not consume CPU resources.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7201d6e4a8f6
unity_docs
scripting
Explain 'Particle velocity' in Unity.
Understand how the Particle System can change a particle’s velocity. ## Limiting velocity over lifetime The Limit Velocity over Lifetime module is very useful for simulating air resistance that slows the particles, especially when a decreasing curve is used to lower the speed limit over time. For example, an explosio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ad0659ebea0
unity_docs
scripting
Show me a Unity C# example demonstrating `Terrain.collectDetailPatches`.
alse all the detail patches for a given density will be initialized and kept in memory. Changing the density will recreate the patches. Note that detail patches can use a large amount of memory, therefore this property when set to false can increase the memory usage of your application significantly. The value is not s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7def9a14e472
unity_docs
scripting
What is `Rendering.AsyncGPUReadback.RequestIntoNativeArray` in Unity? Explain its purpose and usage.
AsyncGPUReadback.RequestIntoNativeArray Declaration public static Rendering.AsyncGPUReadbackRequest RequestIntoNativeArray (ref NativeArray<T> output , Texture src , int mipIndex , Action<AsyncGPUReadbackRequest> callback ); Declaration public static Rendering.AsyncGPUReadbackRequest RequestIntoNativeA...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5fec0769c91
unity_docs
rendering
What are the parameters of `ParticleSystemRenderer.SetActiveVertexStreams` in Unity?
Description Enables a set of Vertex Shader streams on the ParticleSystemRenderer . Additional resources: ParticleSystemRenderer.GetActiveVertexStreams . ```csharp using UnityEngine; using UnityEditor; using System.Collections.Generic;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour {...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79be0ab5694d
unity_docs
editor
What is `EditorUserBuildSettings.wsaUWPSDK` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.wsaUWPSDK public static string wsaUWPSDK ; Description Sets and gets target UWP SDK to build Windows Store application against. If the value of this property is empty or is not a valid installed UWP SDK, Unity uses the latest SDK installed on the development machine.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_33ec883d5761
unity_docs
scripting
Explain 'Create a car with Wheel colliders' in Unity.
This tutorial takes you through the process of creating a basic functioning four-wheeled car with the PhysX Wheel collider . The steps include: Prepare the project Prepare the car model Add the Wheel colliders , and set their position and radius Add scripts to control car behavior , including car movement and wheel rot...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c5214c5c84c
unity_docs
input
What is `UIElements.PointerCaptureEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
PointerCaptureEventBase<T0>.GetPooled Declaration public static T GetPooled ( UIElements.IEventHandler target , UIElements.IEventHandler relatedTarget , int pointerId ); Parameters Parameter Description target For PointerCapture and MouseCapture events, the element that captures the pointer. For Pointer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b0e76ea5896
unity_docs
scripting
What is `Unity.Android.Gradle.JniLibs` in Unity? Explain its purpose and usage.
JniLibs class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description The C# definition of the jniLibs element in a gradle file. For more information about the file, see Android's documentation: JniLibs Properties Property Description UseLegacyPackaging Whether to use the lega...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_107319655b2e
unity_docs
rendering
Explain 'Usage and Performance of Built-in Shaders' in Unity.
Shaders in Unity are used through Materials , which essentially combine shader code with parameters like textures. An in-depth explanation of the Shader/Material relationship can be read here . Material properties will appear in the Inspector when either the Material itself or a GameObject that uses the Material is sel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6871e99c05cc
unity_docs
scripting
What is `PlayerSettings.GetApiCompatibilityLevel` in Unity? Explain its purpose and usage.
PlayerSettings.GetApiCompatibilityLevel Declaration public static ApiCompatibilityLevel GetApiCompatibilityLevel ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description buildTarget The NamedBuildTarget . Returns ApiCompatibilityLevel Returns the ApiCompatibilityLevel associated with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c828db86281e
unity_docs
scripting
What is `Rendering.RenderPipelineGlobalSettings.settingsList` in Unity? Explain its purpose and usage.
RenderPipelineGlobalSettings.settingsList protected List<IRenderPipelineGraphicsSettings> settingsList ; Description Exposes a List<IRenderPipelineGraphicsSettings> that this RenderPipelineGlobalSettings instance is managing.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_098d086ad731
unity_docs
scripting
Give me an overview of the `ChangeRootOrderEventArgs` class in Unity.
ChangeRootOrderEventArgs struct in UnityEditor Description A change of this type indicates that a GameObject placed at the scene root has been reordered. This happens when Undo.SetSiblingIndex is called or when reordering a root GameObject in the hierarchy under the same parent. Properties Property Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80cd26254635
unity_docs
physics
Explain 'Create a scripts-only build' in Unity.
A scripts-only build is a build that reuses the content from the previous build, rather than rebuilding it. When testing script changes it can be useful to force a scripts-only build to avoid the time taken to rebuild the content. This can be useful if you know that there are data changes, but want to quickly test a co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9f917f67004
unity_docs
physics
What is `CompositeCollider2D.generationType` in Unity? Explain its purpose and usage.
CompositeCollider2D.generationType public CompositeCollider2D.GenerationType generationType ; Description Specifies when to generate the Composite Collider geometry. The values in this enumeration allows you to control when the Composite Collider geometry updates when a Collider of that Composite Collider cha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29317574924e
unity_docs
scripting
What is `InstantiateParameters` in Unity? Explain its purpose and usage.
InstantiateParameters struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Parameters for Object.Instantiate and Object.InstantiateAsync. This structure is used in Object.Instantiate and Object.InstantiateAsync in order to provide maximum flexibility in the parameters you provide. It h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9fb14e772cc
unity_docs
scripting
What is `UIElements.MaskField` in Unity? Explain its purpose and usage.
MaskField class in UnityEditor.UIElements / Inherits from: UIElements.BaseMaskField_1 Description Make a field for masks. Static Properties Property Description inputUssClassName USS class name of input elements in elements of this type. labelUssClassName USS class name of labels in elements of thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a83d8a95e871
unity_docs
scripting
What is `ParticleSystem.MainModule.gravityModifier` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.gravityModifier public ParticleSystem.MinMaxCurve gravityModifier ; Description A scale that this Particle System applies to gravity, defined either by Physics.gravity or [Physics2D.gravity]]. Additional resources: MinMaxCurve , ParticleSystem.MainModule.gravitySource . ```csha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_712ea3dcd46c
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.IncomingChangeSetAssets`.
ssets ( VersionControl.ChangeSet changeset ); Declaration public static VersionControl.Task IncomingChangeSetAssets (string changesetID ); Parameters Parameter Description changeset Incoming changeset. changesetID Incoming changesetid. Description Given an incoming changeset this will start a task t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_773935eb4503
unity_docs
editor
What is `Android.AndroidProjectFiles.GetData` in Unity? Explain its purpose and usage.
AndroidProjectFiles.GetData Declaration public string GetData (string key ); Parameters Parameter Description key Data key. value Data value as string. Description Gets data that was set in the Setup method. This method is used to get data from the Unity Editor by setting it in the Setup method. If d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8172685b5712
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh.GetVertexAttributeStream`.
here attributes use different vertex buffers (see SetVertexBufferParams ). When you use such a layout, use this function to query which vertex buffer stream a given attribute is part of. Note that this function returns the index of the stream, without specifying where the attribute is within the stream. To identify th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aae95f49e368
unity_docs
rendering
Give me an overview of the `BoneWeight` class in Unity.
BoneWeight struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Describes 4 skinning bone weights that affect a vertex in a mesh. Elements in this struct must be in descending order of weight value. The sum of all weight values must be 1. If a vertex is affected by fewer than 4 bones, each...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b73f0516adc9
unity_docs
rendering
What is `QualitySettings.softVegetation` in Unity? Explain its purpose and usage.
QualitySettings.softVegetation public static bool softVegetation ; Description Use a two-pass shader for the vegetation in the terrain engine. If enabled, vegetation will have smoothed edges, if disabled all plants will have hard edges but are rendered roughly twice as fast. Additional resources: Quality Sett...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a433ddf143d
unity_docs
animation
What is `Animations.AnimationHumanStream.GetGoalLocalPosition` in Unity? Explain its purpose and usage.
AnimationHumanStream.GetGoalLocalPosition Declaration public Vector3 GetGoalLocalPosition ( AvatarIKGoal index ); Parameters Parameter Description index The AvatarIKGoal that is queried. Returns Vector3 The position of this IK goal. Description Returns the position of this IK goal relative to the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ea1ac9a28e1d
unity_docs
rendering
Explain 'Mesh LOD' in Unity.
This page contains information on level of detail (LOD) for meshes. For information on LOD for shaders , see SubShader LOD value . Level of detail (LOD) is a technique that reduces the number of GPU operations that Unity requires to render distant meshes. When a GameObject in the Scene is far away from the Camera , you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1c055cf2ae40
github
scripting
Write a Unity C# XR/VR script for Stop XR
```csharp using System.Collections; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.XR; [DefaultExecutionOrder(-1)] public class StopXR : MonoBehaviour { private IEnumerator Start() { var routine = ManualXRControl.StartXRCoroutine(); yield return StartCoroutine(routine);...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_df30dc349d02
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.SetParent`.
reen and the child sphere is in its original position, next to the parent sphere on the right of the screen. After calling SetParent with worldPositionStays set to true, all objects are in the same position as their original positions. After calling SetParent with worldPositionStays set to false, the child sphe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a81d5e0d1773
unity_docs
rendering
What is `SpriteTileMode` in Unity? Explain its purpose and usage.
SpriteTileMode enumeration Description Tiling mode for SpriteRenderer.tileMode . Properties Property Description Continuous Sprite Renderer tiles the sprite continuously when is set to SpriteRenderer.tileMode. Adaptive Sprite Renderer tiles the sprite once the Sprite Renderer size is above SpriteRenderer.adap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4be51887414d
unity_docs
rendering
In Unity's 'Occlusion Culling window reference', what is 'Bake tab' and how does it work?
In the Bake tab, you can fine-tune the parameters of the Occlusion Culling bake process. Configure these settings to find a balance between bake times, data size at runtime, and visual results. The Set Default Parameters button resets the parameters to the default values. Setting Description Smallest Occluder The size ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.