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_2fef01e14347
unity_docs
editor
Show me a Unity C# example demonstrating `ShortcutManagement.ShortcutManager.RegisterContext`.
ShortcutManager.RegisterContext Declaration public static void RegisterContext ( ShortcutManagement.IShortcutContext context ); Parameters Parameter Description context The custom context to add to the shortcut context list. Description Registers a IShortcutContext as a custom context used to filter sho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b41c3ad11e74
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddBuildProperty` in Unity? Explain its purpose and usage.
PBXProject.AddBuildProperty Declaration public void AddBuildProperty (string targetGuid , string name , string value ); Declaration public void AddBuildProperty (IEnumerable<string> targetGuids , string name , string value ); Parameters Parameter Description targetGuid The GUID of the target, such a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89dbc9493e04
unity_docs
rendering
Show me a Unity C# example demonstrating `LightTransport.IDeviceContext.CreateBuffer`.
ore the specified number of elements, each with the given stride (size in bytes). The actual memory allocation may occur in CPU memory, GPU memory, or unified memory depending on the hardware platform and implementation. The returned BufferID can be used to create typed BufferSlice objects for reading and writing dat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2329a7941cc1_doc_12
github
scripting
What does `Leave` do in this Unity script? Explain its purpose and signature.
Leaves this state, performs a set of changes to the associate components to disable things. Signature: ```csharp public void Leave() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_48bb036f49d6
unity_docs
audio
What is `AudioReverbFilter.reflectionsDelay` in Unity? Explain its purpose and usage.
AudioReverbFilter.reflectionsDelay public float reflectionsDelay ; Description Late reverberation level relative to room effect in millibels (mB). Ranges from -10000.0 to 2000.0. Default is 0.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_635ad53f7070
unity_docs
scripting
Show me a Unity C# example demonstrating `EditorGUI.InspectorTitlebar`.
ebar is for. expandable Whether this editor should display a foldout arrow in order to toggle the display of its properties. Returns bool The foldout state selected by the user. Description Makes an inspector-window-like titlebar. The titlebar has a foldout arrow, a help icon, and a settings menu that depend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0d3baef1f206
unity_docs
xr
In Unity's 'Cache behavior in Web', what is 'Customize Web Cache behavior' and how does it work?
By default, the cache configuration stores the asset data file .data and AssetBundle files .bundle, and revalidates them before loading them from the cache. To change this behavior, add a new Web template that changes the UnityLoader configuration. The following example shows how to add a custom cacheControl function t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e662585786c0
unity_docs
physics
In Unity's 'Wheel collider suspension', what is 'Target Position' and how does it work?
The Target Position of the Wheel collider is the point along the Suspension Distance line that the center of the Wheel collider always returns to when there are no forces (or equal forces) acting upon it. To set the Target Position , specify a coordinate between 0 and 1 along the Suspension Distance line. A value of 0 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54717f658a6b
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioType.AUDIOQUEUE`.
AudioType.AUDIOQUEUE Description The audio file you want to stream uses Apple’s Audio Queue file format. Use Apple’s Audio Queue audio type to stream an AAC, ALAC or MP3 file on iOS or macOS. Extracodecdata is a pointer to an FMOD_AUDIOQUEUE_EXTRACODECDATA structure. Use this type to stream files with the extension...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f417ef3bfa63
unity_docs
xr
What is `FrameTiming` in Unity? Explain its purpose and usage.
FrameTiming struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Struct containing high level CPU and GPU frame timings and accompanying relevant data. Use the FrameTiming struct to get access to the duration of CPU and GPU activities, their start time and other important performance infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_864c4fd5d7eb
unity_docs
input
What is `Touch.tapCount` in Unity? Explain its purpose and usage.
Touch.tapCount public int tapCount ; Description Number of taps. This is intended as a way to detect "double-clicks", etc, from the finger in a particular position. In some circumstances, two fingers may be tapped alternately and this may incorrectly register as a single finger tapping and simultaneously moving...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_907a461b2efc
unity_docs
rendering
What is `Graphics` in Unity? Explain its purpose and usage.
Graphics class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Raw interface to Unity's drawing functions. This is the high-level shortcut into the optimized mesh drawing functionality of Unity. Static Properties Property Description activeColorBuffer Currently active color buffer (Read ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8efb7c8ab76
unity_docs
rendering
What is `Rendering.BuiltinShaderType.MotionVectors` in Unity? Explain its purpose and usage.
BuiltinShaderType.MotionVectors Description Shader used for Motion Vectors when enabled on a Camera. Additional resources: Renderer.motionVectorGenerationMode , Camera.depthTextureMode , SkinnedMeshRenderer.skinnedMotionVectors , PassType.MotionVectors , DepthTextureMode.MotionVectors , SystemInfo.supportsMot...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0b09436c400b
unity_docs
rendering
Show me a Unity code example for 'Write HLSL for different graphics APIs'.
with the same data layout, do the following: Use float4 and float4x4 instead of float3 and float3x3 , because float4 variables are the same size on all graphics APIs, while float3 variables can become a different size on some graphics APIs. Declare variables in decreasing size order, for example float4 then float2 then...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5217da72135e
unity_docs
scripting
What is `IMGUI.Controls.TreeViewItem.AddChild` in Unity? Explain its purpose and usage.
TreeViewItem.AddChild Declaration public void AddChild ( IMGUI.Controls.TreeViewItem child ); Parameters Parameter Description child TreeViewItem to be added to the children list. Description Helper method that adds the child TreeViewItem to the children list and sets the parent property on the child...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b75bdfc795f1
unity_docs
rendering
What is `TextureCompressionFormat.ETC` in Unity? Explain its purpose and usage.
TextureCompressionFormat.ETC Description Use ETC1 texture compression (or ETC2 for textures with alpha). The ETC1 texture compression format is available on all devices. Additional resources: TextureCompressionFormat.ETC2 .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28545251c578
unity_docs
physics
What is `ParticleSystem.SubEmittersModule` in Unity? Explain its purpose and usage.
SubEmittersModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the SubEmittersModule. The sub-emitters module allows you to spawn particles in child emitters from the positions of particles in the parent system. This module triggers child particle em...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52a8b9e66f78
unity_docs
editor
What is `EditorPrefs.DeleteAll` in Unity? Explain its purpose and usage.
EditorPrefs.DeleteAll Declaration public static void DeleteAll (); Description Removes all keys and values from the preferences. Use with caution. Clears all editor prefs keys. ```csharp // Clear all the editor prefs keys. // // Warning: this will also remove editor preferences as the opened projects, etc.usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33bcc58f98f4
unity_docs
rendering
Show me a Unity C# example demonstrating `GUILayout.Toggle`.
y values passed in here will override settings defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns bool The new value of the button. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d3baccec4b1
unity_docs
rendering
What is `RenderTextureDescriptor.shadowSamplingMode` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.shadowSamplingMode public Rendering.ShadowSamplingMode shadowSamplingMode ; Description Determines how the RenderTexture is sampled if it is used as a shadow map. Additional resources: ShadowSamplingMode for more details.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5c39948013a
unity_docs
rendering
What is `RenderTextureFormat.RHalf` in Unity? Explain its purpose and usage.
RenderTextureFormat.RHalf Description Scalar (R) render texture format, 16 bit floating point. Note that not all graphics cards support floating point render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8c28e4023d07
github
scripting
Write a Unity C# UI script for Testing Z Legacy Ext
```csharp using UnityEngine; using System.Collections; using System; using System.Threading; using DentedPixel; public class TestingZLegacyExt : MonoBehaviour { public AnimationCurve customAnimationCurve; public Transform pt1; public Transform pt2; public Transform pt3; public Transform pt4; pu...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_bd0aa0bf019d
unity_docs
scripting
What is `Experimental.GraphView.GraphViewToolWindow.IsGraphViewSupported` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewToolWindow.IsGraphViewSupported Declaration protected bool IsGraphViewSupported ( Experimental.GraphView.GraphView gv ); Parameters Parameter Description gv A GraphView. Returns bool Returns true if the Grap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_566e421b830d
unity_docs
math
What is `Mathf.Rad2Deg` in Unity? Explain its purpose and usage.
Mathf.Rad2Deg public static float Rad2Deg ; Description Radians-to-degrees conversion constant (Read Only). This is equal to 360 / (PI * 2) . Additional resources: Deg2Rad constant. ```csharp using UnityEngine;public class MathfRad2Deg : MonoBehaviour { // convert 1 radian to degrees float rad = 1.0f; voi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6f7f512e4a9
unity_docs
animation
What is `Animations.AnimatorController.layers` in Unity? Explain its purpose and usage.
AnimatorController.layers public AnimatorControllerLayer[] layers ; Description The layers in the controller. It's important to note that the AnimatorControllerLayer are returned as a copy. The array should be set back into the property when changed. ```csharp class ControllerModifier { UnityEditor.Animatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b7abee7d44a
unity_docs
input
What is `UIElements.ScrollView.TouchScrollBehavior` in Unity? Explain its purpose and usage.
TouchScrollBehavior enumeration Description The behavior to use when a user tries to scroll past the end of the ScrollView content using a touch interaction. Properties Property Description Unrestricted The content position can move past the ScrollView boundaries. Elastic The content position can over...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1d0626193a3
unity_docs
scripting
What is `VersionControl.VersionControlDescriptor.name` in Unity? Explain its purpose and usage.
VersionControlDescriptor.name public string name ; Description Version control system name. It must be unique within Unity project. Additional resources: VersionControlDescriptor , VersionControlObject , VersionControlManager .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ae2f3c0dffd
unity_docs
input
What is `UIElements.UnsignedIntegerField` in Unity? Explain its purpose and usage.
UnsignedIntegerField class in UnityEngine.UIElements / Inherits from: UIElements.TextValueField_1 / Implemented in: UnityEngine.UIElementsModule Description Makes a text field for entering an unsigned integer. For more information, refer to UXML element UnsignedIntegerField . Static Properties Property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ac7672aec59
unity_docs
ui
Show me a Unity code example for 'Pseudo-classes'.
A pseudo-class narrows a selector’s scope so it only matches elements when they enter a specific state. Append a pseudo-class to a simple selector to match specific elements when they’re in a specific state. For example, the following USS rule uses the :hover pseudo-class to change the color of Button elements when a u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ee7fc4b49383
unity_docs
scripting
Show me a Unity code example for 'ScriptPlayable and PlayableBehaviour'.
ang-cs public class MyCustomPlayableBehaviour : PlayableBehaviour { // Implementation of the custom playable behaviour // Override PlayableBehaviour methods as needed } To use a PlayableBehaviour as a custom playable, it also must be encapsulated within a ScriptPlayable<> object. If you don’t have an instance of your...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8e484ea00ef
unity_docs
rendering
Show me a Unity C# example demonstrating `ComputeShader.SetKeyword`.
local shader keywords and global shader keywords and how they interact, see Using shader keywords with C# scripts . When value is true , this function calls EnableKeyword . Otherwise, it calls DisableKeyword . If the LocalKeyword does not exist in the keywordSpace , this function has no effect. The followin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb593f988152
unity_docs
rendering
What is `ShaderUtil.ClearCachedData` in Unity? Explain its purpose and usage.
ShaderUtil.ClearCachedData Declaration public static void ClearCachedData ( Shader s ); Description Clears all internally-cached data that was generated for the given shader, such as errors and compilation info. This happens automatically on import for shader assets but should be called for programmatically-g...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc7dcb8bec45
unity_docs
scripting
What is `UIElements.SortColumnDescriptions.RemoveAt` in Unity? Explain its purpose and usage.
SortColumnDescriptions.RemoveAt Declaration public void RemoveAt (int index ); Parameters Parameter Description index The index of the sort description to remove. Description Removes the sort description at the specified index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16c57f80ab76
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.LightsModule.light`.
ParticleSystem.LightsModule.light public Light light ; Description Select what Light Prefab you want to base your particle lights on. Additional resources: Light . ```csharp using UnityEngine; using System.Collections;// For best results, use Deferred Rendering (see Camera settings) [RequireComponent(typeo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc8512e1a041
unity_docs
editor
Show me a Unity C# example demonstrating `EditorBuildSettings.AddConfigObject`.
r if there is a name conflict and the overwrite parameter is set to false. Description Store a reference to a config object by name. The object must be an asset in the project, otherwise it will not be saved when the editor is restarted or scripts are reloaded. To avoid name conflicts with other packages, it is rec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5edc8975cd0f
unity_docs
scripting
Give me an overview of the `Font` class in Unity.
Font class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.TextRenderingModule Description Script interface for font assets . You can use this class to dynamically switch fonts on Text Meshes. Additional resources: TextMesh . Properties Property Description ascent The ascent of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44761b25ec40
unity_docs
rendering
What is `Sprites.AtlasSettings.allowsAlphaSplitting` in Unity? Explain its purpose and usage.
AtlasSettings.allowsAlphaSplitting public bool allowsAlphaSplitting ; Description Marks this atlas so that it contains textures that have been flagged for Alpha splitting when needed (for example ETC1 compression for textures with transparency).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ae011c10f44a
unity_docs
rendering
Explain 'Customizing native memory allocators' in Unity.
To customize allocator settings you can either edit the configurable values through the Unity Editor or supply them as command line arguments . Unity stores allocator settings in MemorySettings.asset and applies them during the build process. This means new settings take effect at every build, for both Editor and Playe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7824d355d04d
unity_docs
xr
In Unity's 'Collect asset loading metrics', what is 'Getting metric data' and how does it work?
Use GetMetrics to retrieve collected metrics from AsyncReadManagerMetrics . Specify AsyncReadManagerMetrics.Flags to determine whether to clear metrics after retrieval. Clearing metrics removes completed (including canceled and failed) reads but retains queued or in-progress operations. To access the metrics for unfini...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd18561eaea5
unity_docs
scripting
What is `UIElements.FlexDirection` in Unity? Explain its purpose and usage.
FlexDirection enumeration Description Defines the main-axis of the flex layout. Properties Property Description Column Top to Bottom. ColumnReverse Bottom to Top. Row Left to Right. RowReverse Right to Left.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b31f1eb9c34
unity_docs
scripting
What is `UIElements.DropdownMenu` in Unity? Explain its purpose and usage.
DropdownMenu class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Represents a dropdown menu. Properties Property Description allowDuplicateNames Determines whether the menu allows duplicate names. Public Methods Method Description AppendAction Adds an item ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bdab09e0c707
unity_docs
animation
What is `Animations.AnimatorJobExtensions.CloseAnimationStream` in Unity? Explain its purpose and usage.
AnimatorJobExtensions.CloseAnimationStream Declaration public static void CloseAnimationStream ( Animator animator , ref Animations.AnimationStream stream ); Parameters Parameter Description animator The Animator instance that calls this method. stream The stream to close. Description Close a strea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1e34e3669c00
github
scripting
Write a Unity C# MonoBehaviour script called Event Link
```csharp using Hudossay.AttributeEvents.Assets.Runtime.GameEvents; using System; using UnityEngine; namespace Hudossay.AttributeEvents.Assets.Runtime.EventLinks { /// <summary> /// Links one event from broadcaster GameObject to one method from listener GameObject's MoonoBehaviour. /// </summary> publi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_961ac39230ea
unity_docs
scripting
What is `PlayerSettings.SplashScreen.overlayOpacity` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.overlayOpacity public static float overlayOpacity ; Description To increase the contrast between the background and logos, you apply an overlay color modifier. Use the overlay opacity to adjust the strength of this effect.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_31c42f8cf08a
unity_docs
input
Explain 'Developing for tvOS' in Unity.
When you are developing applications for tvOS, you need to know how to support the tvOS input devices and how to set up application navigation. Topic Description Supporting input devices on tvOS Explains how to support the Apple TV Remote and Made for iOS (MFi) controllers. Setting up application navigation for tvOS Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_545b7e978cf6
unity_docs
scripting
What is `AndroidJNI.NewObject` in Unity? Explain its purpose and usage.
AndroidJNI.NewObject Declaration public static IntPtr NewObject (IntPtr clazz , IntPtr methodID , jvalue[] args ); Description Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with <init> as the method name and void (V)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_adf22e06dbdc
unity_docs
ui
What is `UIElements.UIDocument.visualTreeAsset` in Unity? Explain its purpose and usage.
UIDocument.visualTreeAsset public UIElements.VisualTreeAsset visualTreeAsset ; Description The VisualTreeAsset loaded into the root visual element automatically. If you leave this empty, the root visual element is also empty.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_18
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This is automatically set using Unity's viewport resolution. Signature: ```csharp public double ViewportHeight ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_1b5320fe5387
unity_docs
scripting
What is `Animations.GameObjectRecorder.Bind` in Unity? Explain its purpose and usage.
GameObjectRecorder.Bind Declaration public void Bind ( EditorCurveBinding binding ); Parameters Parameter Description binding The binding definition. Description Binds a GameObject's property as defined by EditorCurveBinding . Use this function to bind a specific GameObject's property. The binding is de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80a22f8da464
unity_docs
xr
What is `Profiling.Profiler` in Unity? Explain its purpose and usage.
Profiler class in UnityEngine.Profiling / Implemented in: UnityEngine.CoreModule Description Controls the Profiler from script. You can add custom Profiler sections in your scripts with Profiler.BeginSample and Profiler.EndSample . On standalone platforms, you can save all profiling information to a file, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bc1afde467a
unity_docs
scripting
What are the parameters of `JsonUtility.FromJson` in Unity?
Returns T An instance of the object. Description Create an object from its JSON representation. Internally, this method uses the Unity serializer. The object you're creating and all its fields must meet the requirements for serialization by the Unity serializer. For the full list of these requirements, refer to Seriali...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3ae88ea0327
unity_docs
rendering
What is `Texture.streamingRendererCount` in Unity? Explain its purpose and usage.
Texture.streamingRendererCount public static ulong streamingRendererCount ; Description Number of renderers registered with the Texture streaming system. This is the number of renderers with streaming Textures associated.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36bc97165984
unity_docs
scripting
What is `Editor` in Unity? Explain its purpose and usage.
Editor class in UnityEditor / Inherits from: ScriptableObject Description Derive from this base class to create a custom inspector or editor for your custom object. ```csharp using UnityEngine; using System.Collections;// This is not an editor script. public class MyPlayer : MonoBehaviour { public int armor = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_730c9b74c726
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.AnimatorController.CreateStateMachineBehaviour`.
instance id of created object, returns 0 if something is not valid. Description This function will create a StateMachineBehaviour instance based on the class define in this script. This function will validate that the monoscript is a valid statemachine behaviour, the class must be a sub class of StateMachineBehavi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15dfccb6fcdc
unity_docs
animation
What is `AnimationClipCurveData` in Unity? Explain its purpose and usage.
AnimationClipCurveData class in UnityEditor Description An AnimationClipCurveData object contains all the information needed to identify a specific curve in an AnimationClip. The curve animates a specific property of a component / material attached to a game object / animated bone. Additional resources: Animatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45359b7c7b53
unity_docs
rendering
What is `Search.SearchUtils.GetHierarchyAssetPath` in Unity? Explain its purpose and usage.
SearchUtils.GetHierarchyAssetPath Declaration public static string GetHierarchyAssetPath ( GameObject gameObject , bool prefabOnly ); Parameters Parameter Description gameObject GameObject to find the scene path. prefabOnly If true, will return a path only if the GameObject is a prefab. Returns string ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e9055f0c5a0e
unity_docs
rendering
In Unity's 'Style UI with UI Builder', what is 'Manage a style sheet' and how does it work?
To add a style sheet, use the + dropdown menu and select one of the following options: Create New USS : This opens a Save File Dialog to create a new style sheet in your project. Add Existing USS : This opens the Open File Dialog to add an existing style sheet to the UI Document. To remove a style sheet from the active...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce53650a9537
unity_docs
xr
What is `Networking.UnityWebRequest.EscapeURL` in Unity? Explain its purpose and usage.
UnityWebRequest.EscapeURL Declaration public static string EscapeURL (string s ); Declaration public static string EscapeURL (string s , Encoding e ); Parameters Parameter Description s A string with characters to be escaped. e The text encoding to use. Description Escapes characters in a string to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb41d376b72a
unity_docs
scripting
What is `ParticleSystem.NoiseModule.octaveCount` in Unity? Explain its purpose and usage.
ParticleSystem.NoiseModule.octaveCount public int octaveCount ; Description Layers of noise that combine to produce final noise. Please note that adding octaves substantially decreases performance. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e29953f30e1
unity_docs
scripting
What is `Progress.EnumerateItems` in Unity? Explain its purpose and usage.
Progress.EnumerateItems Declaration public static IEnumerable<Item> EnumerateItems (); Returns IEnumerable<Item> The enumerable progress indicators. Description Returns an enumerator to loop over all progress indicators.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e38aa1e47b35
unity_docs
input
What is `TerrainTools.PaintContext.heightWorldSpaceSize` in Unity? Explain its purpose and usage.
PaintContext.heightWorldSpaceSize public float heightWorldSpaceSize ; Description The height range (from Min to Max) of all Terrain tiles that this PaintContext touches in world space. Unity uses this value to transform a height value from a world space Y-coordinate to a value in the [0, 1] range.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cf5cdc87b9f0
unity_docs
editor
Explain 'Authentication' in Unity.
com.unity.services.authentication ## Description Client SDK offering player identity management for Unity Gaming Services. Identity providers can be configured from the editor or the Unity Dashboard. Player management is available in the Unity Dashboard. ## Released for Unity Package version 3.6.1 is released for U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9fedd73a1b6b
github
scripting
Write a Unity Editor script for Create From Template
```csharp using UnityEngine; using UnityEditor; namespace Unity.MaterialPropertyProvider.Editor { public static class CreateFromTemplate { [MenuItem("Assets/Create/Scripting/Material Property Provider")] private static void CreateExample() { ProjectWindowUtil.CreateScriptAss...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_aa2ec82ecc92
unity_docs
physics
What is `LowLevelPhysics.BoxGeometry` in Unity? Explain its purpose and usage.
BoxGeometry struct in UnityEngine.LowLevelPhysics / Implemented in: UnityEngine.PhysicsModule Implements interfaces: IGeometry Description Contains the basic geometric shape of a box. Properties Property Description GeometryType Returns the geometry type of this shape, which is BoxGeometry. HalfExtents The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07f500277491
unity_docs
input
What is `LocationService.lastData` in Unity? Explain its purpose and usage.
LocationService.lastData public LocationInfo lastData ; Description The last geographical location that the device registered. Before you access this property, call Start() in Input.location to start the location service. Note : On WebGL, this value is 0 or null if the browser has no implementation for it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_96e990412d08
unity_docs
scripting
Explain 'Project Settings reference' in Unity.
Use the Project Settings window to define settings for your project. To open the Project Settings window, from the main menu, select Edit > Project Settings . Topic Description Use the Project Settings window Learn about the Project Settings window and how to find settings in the Project Settings window. Audio Control ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4eaeb640fba
unity_docs
scripting
What is `IMGUI.Controls.TreeView.SetSelection` in Unity? Explain its purpose and usage.
TreeView.SetSelection Declaration public void SetSelection (IList<int> selectedIDs ); Declaration public void SetSelection (IList<int> selectedIDs , IMGUI.Controls.TreeViewSelectionOptions options ); Parameters Parameter Description selectedIDs TreeViewItem IDs. options Options for extra logic perf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a8da75f7f769_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The width of the texture feathering (in world units). Signature: ```csharp public float featheringWidth ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_45f676be7110
unity_docs
rendering
What is `RenderTexture.stencilFormat` in Unity? Explain its purpose and usage.
RenderTexture.stencilFormat public Experimental.Rendering.GraphicsFormat stencilFormat ; Description The format of the stencil data that you can encapsulate within a RenderTexture. Specifying this property creates a stencil element for the RenderTexture and sets its format. This allows for stencil data to be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2bf927cc7d8
unity_docs
rendering
What is `Renderer.lightProbeProxyVolumeOverride` in Unity? Explain its purpose and usage.
Renderer.lightProbeProxyVolumeOverride public GameObject lightProbeProxyVolumeOverride ; Description If set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0195c412c1a6
unity_docs
scripting
What is `Experimental.GraphView.Scope.Overlaps` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.Overlaps Declaration public bool Overlaps ( Rect rectangle ); Parameters Parameter Description rectangle The rect. Returns bool Returns true when the specified rect overlaps the Scope. Description Determine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75d5849492b6
unity_docs
scripting
What are the parameters of `Selection.GetFiltered` in Unity?
Description Returns the current selection filtered by type and mode. For a selected GameObject that has multiple Components of type , only the first one will be included in the results. If type is a subclass of Component or GameObject the full SelectionMode is supported. If type does not subclass from Component or Game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e7a8f770a72b
unity_docs
rendering
Explain 'UI Renderer' in Unity.
UI Renderer is a rendering system built directly on top of Unity’s graphics device layer that you can use to generate visual content. Topic Description Generate 2D visual content Understand the Mesh API, the Vector API, and the types of graphics that you can create with the Vector API. Create a pie chart in the Editor ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b444db63dfb6
unity_docs
animation
What is `Animations.AnimatorState.mirror` in Unity? Explain its purpose and usage.
AnimatorState.mirror public bool mirror ; Description Whether the animation state is mirrored. When true, the animation for the left side of the humanoid animation is applied to the right side and animation for the right side is applied to the left side. For example, if the animation is of a humanoid waving its...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_706345fed57d
unity_docs
rendering
What are the parameters of `ComputeShader.EnableKeyword` in Unity?
Description Enables a local shader keyword for this compute shader. Shader keywords determine which shader variants Unity uses. For information on working with local shader keywords and global shader keywords and how they interact, see Using shader keywords with C# scripts . If you pass in a LocalKeyword and it does no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b61f44728ee
unity_docs
scripting
What is `Awaitable` in Unity? Explain its purpose and usage.
Awaitable class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Custom Unity type that can be awaited and used as an async return type in the C# asynchronous programming model. Awaitable is usually a preferable alternative to .NET Task for asynchronous code in Unity. It's important, howev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3619a2f53add_doc_2
github
scripting
What does `Refresh` do in this Unity script? Explain its purpose and signature.
Refreshes the tint color of the GridGrid to refresh color Signature: ```csharp public void Refresh(Grid grid) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_60bf2aa84755
unity_docs
math
Show me a Unity code example for 'Build a structure with prefabs'.
wall with. In the Hierarchy, right-click and select 3D Object > Cube . Drag the cube into the Assets folder in the Project window . Unity creates a prefab asset of the cube. Rename the prefab asset to Block . Delete the original cube asset from the Hierarchy. ## Create a script that instantiates blocks Create a MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_558149787ad5
unity_docs
rendering
Explain 'ZTest command in ShaderLab reference' in Unity.
Sets the conditions under which geometry passes or fails depth testing. ## Render pipeline compatibility Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Custom SRP Built-in Render Pipeline ZTest Yes Yes Yes Yes ## Syntax This command makes a change to the render state. Use it in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36fdb078942d
unity_docs
scripting
Give me an overview of the `EditorWindow` class in Unity.
EditorWindow class in UnityEditor / Inherits from: ScriptableObject Description Derive from this class to create a custom Editor window. Use this class to create Editor windows that can either float independently or dock as tabs, similar to the default windows in the Unity Editor. You can use the MenuItem att...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9521ad1a135e
unity_docs
scripting
In Unity's 'Auto Layout', what is 'Understanding Layout Elements' and how does it work?
The auto layout system is based on a concept of layout elements and layout controllers . A layout element is an Game Object with a Rect Transform and optionally other components as well. The layout element has certain knowledge about which size it should have. Layout elements don't directly set their own size, but othe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee945354bffc
unity_docs
editor
What is `GlobalObjectId` in Unity? Explain its purpose and usage.
GlobalObjectId struct in UnityEditor Description Unique and stable project-scoped identifier for objects in scenes and in other types of assets for use at authoring time. Use this struct to obtain unique identifiers to objects that are part of scenes or inside other assets such as prefabs and ScriptableObjects. T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78b81ad1886c
unity_docs
scripting
What is `Camera.usePhysicalProperties` in Unity? Explain its purpose and usage.
Camera.usePhysicalProperties public bool usePhysicalProperties ; Description Enable usePhysicalProperties to use physical camera properties to compute the field of view and the frustum. The physical properties include the sensor size, lens shift, and focal length. ```csharp using UnityEngine;public class Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ef8d5a0842f
unity_docs
scripting
Show me a Unity C# example demonstrating `Animator.SetInteger`.
example directions (turn left, turn right etc.). Each direction could correspond to a number instead of having multiple Booleans that have to be reset each time. See documentation on Animation for more information on setting up Animators. Note: You can identify the parameter by name or by ID number, but the name or I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c4869700ee7c
github
scripting
Write a Unity Editor script for Generated Singletons Menu
```csharp // Dynamically generated by SingletonAttribute using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public static class GeneratedSingletonsMenu { #if UNITY_EDITOR [UnityEditor.MenuItem("Window/Singletons/SingletonTemplate")] public static v...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_acf65b7e16dc
unity_docs
scripting
Give me an overview of the `Ping` class in Unity.
Ping class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Ping any given IP address (given in dot notation). The ping operation is asynchronous and a ping object can be polled for status using Ping.isDone . When a response is received it is in Ping.time . Windows Store Apps : A stream soc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb06604752d8
unity_docs
scripting
What is `GameObject.GetComponentsInChildren` in Unity? Explain its purpose and usage.
GameObject.GetComponentsInChildren Declaration public T[] GetComponentsInChildren (); Declaration public T[] GetComponentsInChildren (bool includeInactive ); Parameters Parameter Description includeInactive Whether to include inactive child GameObjects in the search. Returns T[] An array containing ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5c2072e69bc
unity_docs
rendering
What are the parameters of `LightTransport.IProbeIntegrator.IntegrateOcclusion` in Unity?
Returns Result Result indicating success or failure with detailed error information. Description Computes occlusion values for mixed lighting scenarios with shadowmask support. This method computes occlusion factors for mixed lights at each probe position. Mixed lights are lights that provide both real-time dynamic lig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_078a817c8a30
unity_docs
input
Show me a Unity C# example demonstrating `Input.inputString`.
nput Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, refer to Input . Only ASCII characters are contained in the inputString . The string can contain two special characters which should be handled: Charac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89e72088ace1
unity_docs
math
What is `Texture2D.GetPixel` in Unity? Explain its purpose and usage.
Texture2D.GetPixel Declaration public Color GetPixel (int x , int y , int mipLevel = 0); Parameters Parameter Description x The x coordinate of the pixel to get. The range is 0 through (texture width - 1). y The y coordinate of the pixel to get. The range is 0 through (texture height - 1). mipLev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bb3d139d780
unity_docs
math
What is `HandleUtility.GUIPointToScreenPixelCoordinate` in Unity? Explain its purpose and usage.
HandleUtility.GUIPointToScreenPixelCoordinate Declaration public static Vector2 GUIPointToScreenPixelCoordinate ( Vector2 guiPoint ); Description Converts a 2D GUI position to screen pixel coordinates. The bottom-left of the screen or window is at (0, 0). The top-right of the screen or window is at ( Screen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1682dedd9dc
unity_docs
scripting
What is `VideoClipImporter.transcodeSkipped` in Unity? Explain its purpose and usage.
VideoClipImporter.transcodeSkipped public bool transcodeSkipped ; Description Returns true if transcoding was skipped during import, false otherwise. (Read Only) When VideoImporterTargetSettings.enableTranscoding is set to true, the resulting transcoding operation done at import time may be quite long, up to m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_83b7febf883e
unity_docs
rendering
Explain 'Enable mipmap streaming' in Unity.
To enable mipmap streaming, follow these steps: Go to Edit > Project Settings > Quality . In the Textures section, enable Mipmap Streaming . By default, this enables mipmap streaming for all the cameras in your project. In the Editor, mipmap streaming is active in both Edit mode and Play mode by default. For more infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d908d3a49e1b
unity_docs
rendering
Explain 'Surface Shaders and rendering paths in the Built-In Render Pipeline' in Unity.
In the Built-in Render Pipeline , when using a Surface Shader , how lighting is applied and which Passes of the shader are used depends on which rendering path is used. Each pass in a shader communicates its lighting type via Pass Tags . ## Render pipeline compatibility Feature name Universal Render Pipeline (URP) Hi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2aac63faaebf
unity_docs
physics
What is `Collider2D.bounceCombine` in Unity? Explain its purpose and usage.
Collider2D.bounceCombine public PhysicsMaterialCombine2D bounceCombine ; Description The bounciness combine mode used by the Collider2D . A Collider2D can have a PhysicsMaterial2D assigned in several ways: directly through the Collider2D.sharedMaterial , indirectly through the attached Rigidbody2D.shar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c89299e4188
unity_docs
math
What is `Vector4` in Unity? Explain its purpose and usage.
Vector4 struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Representation of four-dimensional vectors. This structure is used in some places to represent four component vectors (e.g. mesh tangents, parameters for shaders). In the majority of other cases a Vector3 is used. Static Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_335b4c62b404
unity_docs
scripting
What is `SearchService.ISearchContext.requiredTypes` in Unity? Explain its purpose and usage.
ISearchContext.requiredTypes public IEnumerable<Type> requiredTypes ; Description IEnumerable of types that contains the type constraints for this search. These constraints provide the types of the objects included in the search. This IEnumerable can be null or empty. If it is not empty, but contains null eleme...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a5d6ff2693f3
unity_docs
ui
In Unity's 'Relative and absolute positioning', what is 'Create the example for the Editor UI' and how does it work?
Create a custom Editor window and add all the boxes with a C# script: four boxes with gray backgrounds for comparison purposes; one box with a black background set up using absolute position placement; one box with a purple background set up using relative position placement. Create a Unity project with any template. R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18f3a70bf7be
unity_docs
scripting
What is `PlayerSettings.iOS.tvOSManualProvisioningProfileType` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.tvOSManualProvisioningProfileType public static ProvisioningProfileType tvOSManualProvisioningProfileType ; Description A ProvisioningProfileType that will be set when building a tvOS Xcode project. The type will be set automatically if the used provisioning profile is installed on the b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80121d7bc063
unity_docs
math
What is `U2D.SpriteAtlasExtensions.Remove` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.Remove Declaration public static void Remove ( U2D.SpriteAtlas spriteAtlas , Object[] objects ); Parameters Parameter Description objects Object in the array you wish to remove. Description Remove objects from the atlas's packable objects list. If there are multiple of the exact sa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.