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
gh_e32141533cdd
github
scripting
Write a Unity C# script called Angular Resizing Visual Element
```csharp using UnityEngine.UIElements; using static UIToolkitXRAdapter.AngularResizing.DefaultElements.AngularResizingElementUtils; namespace UIToolkitXRAdapter.AngularResizing.DefaultElements { public class AngularResizingVisualElement : VisualElement, IAngularResizingElement<VisualElement> { // Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_807c11c29ad2
unity_docs
xr
In Unity's 'Code sign your application', what is 'Create a signing identity' and how does it work?
Unity adds a code signature to every macOS build it produces, known as a Signing Identity. To notarize an application, Apple requires the code signature to include a cryptographic signature, such as a Developer ID certificate, that identifies the developer. To create a new Developer ID certificate, use the following st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3bbc0ea007a
unity_docs
animation
What is `Animations.CurveFilterOptions` in Unity? Explain its purpose and usage.
CurveFilterOptions struct in UnityEditor.Animations Description The keyframe reduction settings for compressing animation curves. Use the CurveFilterOptions when saving a recording to a clip. A value of 0.5 gives a light compression. Additional resources: GameObjectRecorder.SaveToClip . Properties Property De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8eb803f22012
unity_docs
scripting
What is `SystemInfo.graphicsDeviceVendorID` in Unity? Explain its purpose and usage.
SystemInfo.graphicsDeviceVendorID public static int graphicsDeviceVendorID ; Description The identifier code of the graphics device vendor (Read Only). This is the PCI vendor ID of the user's graphics card. This number uniquely identifies a particular graphics card maker. The number is the same across operating...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_365610fedc86
unity_docs
math
Explain 'IL2CPP runtime code checks' in Unity.
You can use the [Il2CppSetOption] C# attribute and its Option parameter to control which safety checks the IL2CPP compiler includes in the C++ code it generates. The [Il2CppSetOption] attribute is not part of the standard Unity Editor and Engine public APIs but its source is shipped separately as part of your Unity ins...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_db9e7d867e39_doc_3
github
scripting
What does `GetPose` do in this Unity script? Explain its purpose and signature.
Return available pose of the controller.Absolute position of the tracked controller. Zeros if not tracked. Signature: ```csharp public abstract Vector3 GetPose(); ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_ebc8c210e7bf
unity_docs
performance
In Unity's 'Native memory allocators', what is 'Dual thread allocator' and how does it work?
The dual thread allocator is used for longer lived allocations and those that need to be passed between threads, such as graphics allocations that need passing from the main thread to the render thread. The allocator contains two dynamic heap allocators: a lock-free one for the main thread, and one for all other thread...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00b470c49611
unity_docs
scripting
What is `Animator.keepAnimatorStateOnDisable` in Unity? Explain its purpose and usage.
Animator.keepAnimatorStateOnDisable public bool keepAnimatorStateOnDisable ; Description Controls the behaviour of the Animator component when a GameObject is inactive. Set to true to keep the current state of the Animator controller. Set to false to clear the current state of the Animator controller. The de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a525e656bab
unity_docs
scripting
What is `UIElements.BaseListView` in Unity? Explain its purpose and usage.
BaseListView class in UnityEngine.UIElements / Inherits from: UIElements.BaseVerticalCollectionView / Implemented in: UnityEngine.UIElementsModule Description Base class for a list view, a vertically scrollable area that links to, and displays, a list of items. Static Properties Property Description arr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_512ae2c1c6df
unity_docs
rendering
What is `Search.SearchItemOptions` in Unity? Explain its purpose and usage.
SearchItemOptions enumeration Description Indicates how the search item description needs to be formatted when presented to the user. ``` private static SearchItem SearchLogEntry(SearchContext context, SearchProvider provider, LogEntry logEntry) { if (!SearchUtils.MatchSearchGroups(context, logEntry.msgLowerCased...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09e7dfbe2342
unity_docs
math
What are the parameters of `Mesh.SetSubMeshes` in Unity?
Description Sets information defining all sub-meshes in this Mesh , replacing any existing sub-meshes. Note that SetSubMeshes , SetSubMesh , SubMeshDescriptor , and SetIndexBufferData are designed for maximum performance. These functions operate on the underlying mesh data structures involving raw index buffers, vertex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d580c03076b5_doc_3
github
scripting
What does `GetCameraIntrinsics` do in this Unity script? Explain its purpose and signature.
Returns the camera intrinsics for a specified passthrough camera. All the intrinsics values are providedin pixels. The resolution value is the maximum resolution available for the camera.The passthrough camera Signature: ```csharp public static PassthroughCameraIntrinsics GetCameraIntrinsics(PassthroughCameraEye camer...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_75a4585a7c78
unity_docs
editor
Give me an overview of the `AssetSettingsProvider` class in Unity.
AssetSettingsProvider class in UnityEditor / Inherits from: SettingsProvider Description AssetSettingsProvider is a specialization of the SettingsProvider class that converts legacy settings to Unified Settings. Legacy settings include any settings that used the Inspector to modify themselves, such as the *.as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02666bc09baf
unity_docs
rendering
What is `ImageEffectAllowedInSceneView` in Unity? Explain its purpose and usage.
ImageEffectAllowedInSceneView class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Any Image Effect with this attribute can be rendered into the Scene view camera. If you wish your image effect to be applied to the Scene view camera add this attribute. The effect will be applied in the same...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d05d1c942f0
unity_docs
animation
Show me a Unity C# example demonstrating `AnimatorOverrideController`.
ate machine's current state. There are three ways to use the Animator Override Controller. 1. Create an Animator Override Controller in the Editor. 2. Change one Animation Clip per frame at runtime (Basic use case). In this case the indexer operator AnimatorOverrideController.this[string] could be used, but be car...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c53498cbd084
unity_docs
physics
What is `Joint2D.reactionForce` in Unity? Explain its purpose and usage.
Joint2D.reactionForce public Vector2 reactionForce ; Description Gets the reaction force of the joint. When a joint tries to constrain a Rigidbody2D it may need to apply a force to do so. This is known as the reaction force. Additional resources: GetReactionForce , breakForce .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1f405efb40c
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.TrailModule`.
TrailModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the TrailsModule. This module adds trails to your particles. For example, you can make the trails stay in the wake of particles as they move, or make them connect each particle in the system to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c4e2c7fd7f0
unity_docs
scripting
What is `Collision2D.contacts` in Unity? Explain its purpose and usage.
Collision2D.contacts public ContactPoint2D[] contacts ; Description The specific points of contact with the incoming Collider2D. You should avoid using this as it produces memory garbage. Use GetContact or GetContacts instead. Additional resources: Collider2D class. ```csharp using UnityEngine; using Sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0257eaa41e61
unity_docs
editor
What is `Search.SearchService.ShowWindow` in Unity? Explain its purpose and usage.
SearchService.ShowWindow Declaration public static Search.ISearchView ShowWindow ( Search.SearchContext context , string topic , float defaultWidth , float defaultHeight , bool saveFilters , bool reuseExisting , bool multiselect , bool dockable ); Parameters Parameter Description context Search con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_125c4e454ea5
unity_docs
scripting
What is `PropertyName.operator_eq` in Unity? Explain its purpose and usage.
PropertyName.operator == public static bool operator == ( PropertyName lhs , PropertyName rhs ); Description Determines whether two specified PropertyName have the same string value. Because two PropertyNames initialized with the same string value always have the same name index, we can simply perform a com...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae7ccdb28963
unity_docs
rendering
What is `SecondarySpriteTexture` in Unity? Explain its purpose and usage.
SecondarySpriteTexture struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Encapsulates a Texture2D and its shader property name to give Sprite-based renderers access to a secondary texture, in addition to the main Sprite texture. Properties Property Description name The shader propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fc4a58965cf8_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Gets the read-only ordered collection of values. Signature: ```csharp public ValueCollection Values ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_34fc385061cd
unity_docs
scripting
What is `Playables.PlayableOutputExtensions.GetUserData` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.GetUserData Declaration public static Object GetUserData (U output ); Parameters Parameter Description output The PlayableOutput used by this operation. Returns Object The user data. Description Returns the opaque user data. This is the same value as the last last argument ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a21d1dfa4c7
unity_docs
physics
What is `Collider.sharedMaterial` in Unity? Explain its purpose and usage.
Collider.sharedMaterial public PhysicsMaterial sharedMaterial ; Description The shared physics material of this collider. Modifying this material will change the surface properties of all colliders using the material. In most cases you want to modify Collider.material instead.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9f718bd420ff
github
scripting
Write a Unity C# script called Tetrimino Specs
```csharp using UnityEngine; using System; using System.Collections.Generic; namespace TetrisEngine.TetriminosPiece { //Struct to hold informationa about the tetrimino [Serializable] public struct TetriminoSpecs { public string name; public Color color; public List<int> serializedBlockPositions; public Ve...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_ea7e11d5f975
unity_docs
audio
What is `AudioConfiguration.numRealVoices` in Unity? Explain its purpose and usage.
AudioConfiguration.numRealVoices public int numRealVoices ; Description The current maximum number of simultaneously audible sounds in the game. WebGL: This setting doesn't affect WebGL because there is no limit on the number of audio channels in the WebGL platform. For an example of how to use this property, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98d61b3ac4dd
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.ForgiveLeaks` in Unity? Explain its purpose and usage.
UnsafeUtility.ForgiveLeaks Declaration public static int ForgiveLeaks (); Returns int The number of leaks forgiven. Description Tells the leak checking system to ignore any memory allocations made up to that point.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_960ce3d9c89e_doc_0
github
scripting
What does `GetPlainClass` do in this Unity script? Explain its purpose and signature.
Gets the plain class version of the GameObject. Always includes data from transform and rigidbody, if present. Signature: ```csharp public static PlainGameObject GetPlainClass(this GameObject unit) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_fcd4ff406bf4
github
scripting
Write a Unity C# script called Table Glitch PIP
```csharp using System.Collections; using UnityEngine; public class TableGlitchPIP : PipState { public Rigidbody mainBone; public float tableSpeed; public float minTableDist; public float tableExplosiveForce; private bool triggered = false; public float duration; public override PipStat...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_73cc51d52fad
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.Sleep`.
Forces a rigidbody to sleep until woken up. A Rigidbody can be put to sleep only if it is not in contact with an awake rigidbody, and if it does not come in contact with any rigidbody during the next simulation step. A common use is to call this from Awake in order to make a rigidbody sleep at startup. See the Rigi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7614f6683685
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyNodeTypeHandlerBase.GetNodeType` in Unity? Explain its purpose and usage.
HierarchyNodeTypeHandlerBase.GetNodeType Declaration public Unity.Hierarchy.HierarchyNodeType GetNodeType (); Returns HierarchyNodeType The type of the hierarchy node. Description Retrieves the hierarchy node type for this hierarchy node type handler.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_024df8d81102_doc_8
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Creates a clone of the given TComponent as a child transform.TComponent will be initialized with the given arguments.The GameObject to clone.The TArgs object to be passed in on initialization.The type of Component that is being cloned.The type of arguements to be given on initialization.The new TComponent Signature: `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e629fa263477
unity_docs
math
What is `AnimatedValues.AnimVector3` in Unity? Explain its purpose and usage.
AnimVector3 class in UnityEditor.AnimatedValues / Inherits from: AnimatedValues.BaseAnimValueNonAlloc_1 Description An animated Vector3 value. Animated using Vector3.Lerp . Constructors Constructor Description AnimVector3 Constructor. Protected Methods Method Description GetValue Type specific implemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7647f5e3a7b6
unity_docs
ui
What is `Experimental.GraphView.Node.inputContainer` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Node.inputContainer public UIElements.VisualElement inputContainer ; Description Input container used for input ports.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50c42c87b6f5
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystemRenderer.SetActiveTrailVertexStreams`.
tActiveTrailVertexStreams Declaration public void SetActiveTrailVertexStreams (List<ParticleSystemVertexStream> streams ); Parameters Parameter Description streams The new array of enabled vertex streams. Description Enables a set of Vertex Shader streams on the ParticleSystemRenderer for particle trails...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6e6edd7d5a03
unity_docs
ui
Show me a Unity code example for 'Develop a native DSP audio plug-in'.
n_Equalizer.cpp ), or create your own .cpp file. Include AudioPluginUtil.h in your file if it’s not already there. ## 2. Define your parameters in your audio plug-in file Create a list of parameters that would be useful for your user to interact with when they use your plug-in. To add your parameters to your plug-in:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfba54565b7b
unity_docs
scripting
What is `Build.Reporting.CommonRoles.assetBundleTextManifest` in Unity? Explain its purpose and usage.
CommonRoles.assetBundleTextManifest public static string assetBundleTextManifest ; Description The BuildFile.role value of an AssetBundle manifest file, produced during the build process, that contains information about the bundle and its dependencies.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f000242094b4
unity_docs
rendering
Explain 'Set the render pipeline and render order for a shader' in Unity.
To set the render pipeline and render order for a subshader or a shader pass, add a Tag block. ## Add a tag Add a Tag block to a SubShader block or a Pass block. For example: ``` Shader "TagsExample" { SubShader { // Add a subshader tag Tags { "TagName" = "Value" } Pass { // Add a pass tag Tags { "TagName" ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_576b40103599
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.IntField`.
ill 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 int The value entered by the user. Description Make a t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eaf66a613d39
unity_docs
scripting
What is `AwaitableCompletionSource_1.SetException` in Unity? Explain its purpose and usage.
AwaitableCompletionSource<T0>.SetException Declaration public void SetException (Exception exception ); Parameters Parameter Description exception Exception to raise in the continuation. Description Raise completion with an exception.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_198077fb6a91
unity_docs
scripting
Give me an overview of the `NetworkReachability` class in Unity.
NetworkReachability enumeration Description Describes network reachability options. Describes which options are available for connecting to the Internet on the device if there are any. ```csharp //Attach this script to a GameObject //This script checks the device’s ability to reach the internet and outputs it to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b94f2e55e9e
unity_docs
math
What is `Vector2Int.operator_Vector3Int` in Unity? Explain its purpose and usage.
Vector2Int.Vector3Int Parameters Parameter Description v The Vector2Int to convert to a Vector3Int . Description Converts a Vector2Int to a Vector3Int . Vector2Ints can be explicitly converted to Vector3Int (z is set to zero in the result).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_feef1232b79a
unity_docs
physics
Show me a Unity C# example demonstrating `Physics2D.IgnoreCollision`.
rsistent. This means that the ignore collision state will not be stored in the editor when saving a Scene. 2) You can only apply the ignore collision to Colliders in active game objects. When deactivating the Collider the IgnoreCollision state will be lost and you have to call Physics2D.IgnoreCollision again. Additiona...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0a50e4ea0c2
unity_docs
xr
What is `U2D.SpriteAtlasManager` in Unity? Explain its purpose and usage.
SpriteAtlasManager class in UnityEngine.U2D / Implemented in: UnityEngine.CoreModule Description Manages SpriteAtlas during runtime. A Sprite can be loaded without referencing any Sprite Atlas, thus having no texture. It will be invisible until the user registers an atlas to the Sprite by listening to the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_830429d63291
unity_docs
scripting
Show me a Unity C# example demonstrating `Animations.GenericBindingUtility`.
GenericBindingUtility class in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Description Animation utility functions for reading and writing values from Unity components. ```csharp using System.Collections.Generic; using UnityEngine; using UnityEngine.Animations; using UnityEditor; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac5cdbb96f58
unity_docs
scripting
What is `Rendering.PIX.BeginGPUCapture` in Unity? Explain its purpose and usage.
PIX.BeginGPUCapture Declaration public static void BeginGPUCapture (); Description Begins a GPU frame capture in PIX. If not running via PIX, or as a development build, then it has no effect. ```csharp using UnityEngine; using UnityEngine.Rendering;public class PixControl : MonoBehaviour { public int frameCapt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5889bb29b1c_doc_8
github
scripting
What does `Init` do in this Unity script? Explain its purpose and signature.
Initializes the content of the GameObjectBrush.Size of the GameObjectBrush.Pivot point of the GameObjectBrush. Signature: ```csharp public void Init(Vector3Int size, Vector3Int pivot) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_9380f91a0da3
unity_docs
ui
What is `UIElements.ToggleButtonGroupStatePropertiesAttribute.ctor` in Unity? Explain its purpose and usage.
ToggleButtonGroupStatePropertiesAttribute Constructor Declaration public ToggleButtonGroupStatePropertiesAttribute (bool allowMultipleSelection , bool allowEmptySelection , int length ); Parameters Parameter Description allowMultipleSelection If multiple buttons can be selected. allowEmptySelection If an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05e35503e86c
unity_docs
scripting
Give me an overview of the `LightProbes` class in Unity.
LightProbes class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Stores light probe data for all currently loaded Scenes. The data includes: probe positions, Spherical Harmonics (SH) coefficients and the tetrahedral tessellation. You can modify the probe positions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1b365dc18bf
unity_docs
scripting
Show me a Unity C# example demonstrating `Animator.GetBool`.
name ); Declaration public bool GetBool (int id ); Parameters Parameter Description name The parameter name. id The parameter ID. Returns bool The value of the parameter. Description Returns the value of the given boolean parameter. Return the current state of a bool parameter within the Animator...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df844b34d48d
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.ScreenDensity` in Unity? Explain its purpose and usage.
ScreenDensity enumeration Description Mirrors the ScreenDensity enum. For more information about the attribute, see Android's documentation: ScreenDensity attribute Properties Property Description Null Attribute is not set and will not appear in the element. Ldpi Mirrors android:screenDensity="ldpi". Md...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1151f66952b
unity_docs
input
What is `UnityEngine.WebGLModule` in Unity? Explain its purpose and usage.
UnityEngine.WebGLModule Description The WebGL module implements WebGL-specific API. Classes Class Description WebGLInput WebGLInput provides support for WebGL specific functionalities. Important: Browsers only allow sensor input in secure contexts, which means you must use HTTPS except during development where y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0e1b849fbbd
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefsException`.
PlayerPrefsException class in UnityEngine / Implemented in: UnityEngine.CoreModule Description An exception thrown by the PlayerPrefs class in a web player build. The exception is thrown when writing to a preference file exceeds the allotted storage space. This exception is not thrown on other platforms. ```...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1724f442d80c_doc_15
github
scripting
What does `ChangeBasis` do in this Unity script? Explain its purpose and signature.
Given a transform, returns that transform in another basis.The new basis is specified by outputFromInput.Not guaranteed to work if the change-of-basis matrix has non-axis-alignedscale, or if the rotation portion can't be expressed as the product of 90 degreerotations about an axis. Otherwise, the resulting scale will n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9445b1a677f
unity_docs
rendering
Explain 'Pass tags in ShaderLab reference' in Unity.
This page contains information on using a Tags block in your ShaderLab code to assign tags to a Pass. It also contains information on using the LightMode tag. For information on how a Shader object works, and the relationship between Shader objects , SubShaders and Passes, see Shader object fundamentals . ## Render pi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_33e6fcff04fb_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Manages XR session state and device configuration Signature: ```csharp public class XRManager : MonoBehaviour ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_8547ba37ec7a
unity_docs
ui
Explain 'Platform Browser window reference' in Unity.
Explore the supported platforms when you add a build profile for the target platform. The Platform Browser window presents a list of Unity-supported platforms you can build your application on. To open the Platform Browser window, select Add Build Profile from the Build Profiles window (menu: File > Build Profiles ). T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a16994c8c22
unity_docs
scripting
What is `DragAndDrop.SceneDropHandler` in Unity? Explain its purpose and usage.
DragAndDrop.SceneDropHandler Declaration public delegate DragAndDropVisualMode SceneDropHandler ( Object dropUpon , Vector3 worldPosition , Vector2 viewportPosition , Transform parentForDraggedObjects , bool perform ); Parameters Parameter Description dropUpon Dragged Game Object that is being d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc23ff40d12e
unity_docs
editor
Show me a Unity code example for 'Additional IL2CPP compiler arguments'.
R_FLAG_1 COMPILER_FLAG_2\" passes the compiler flags COMPILER_FLAG_1 and COMPILER_FLAG_2 to the C++ compiler. --linker-flags="<flags>" Passes additional flags to the linker. Replace <flags> with the desired flags. For example, --linker-flags="\LINKER_FLAG_1 LINKER_FLAG_2\" passes the linker flags LINKER_FLAG_1 and LINK...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16d1efd45a77
unity_docs
networking
What is `XR.XRMirrorViewBlitMode.SideBySideOcclusionMesh` in Unity? Explain its purpose and usage.
XRMirrorViewBlitMode.SideBySideOcclusionMesh public static int SideBySideOcclusionMesh ; Description Mirror view pass should blit similar to side-by-side mode, but also showing not rendered pixels saved by the occlusion mesh.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e23180e5435e
unity_docs
editor
Show me a Unity C# example demonstrating `PrefabUtility.LoadPrefabContents`.
efab and modify it directly instead of going through an instance of the Prefab. This is useful for batch operations. To release the prefab and isolated scene from memory when you are finished with it, call UnloadPrefabContents . If you modified the Prefab contents, use SaveAsPrefabAsset to save any changes, and then...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7045c770896
unity_docs
scripting
Explain 'Package management with the project manifest file' in Unity.
The project manifest file stores information that the Package Manager needs to locate and load the right packages, including a list of packages and versions declared as dependencies. Topic Description Project manifest file Learn the properties of the file that the Package Manager reads to compute a list of packages to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f04521dfeefb
unity_docs
xr
In Unity's 'Cache behavior in Web', what is 'Data Caching' and how does it work?
To access Data Caching , open the Publishing Settings for Web from File > Build Profiles > Player Settings . This enables the browser to cache the main data files into the IndexedDB database. Using the default browser HTTP cache doesn’t guarantee that the browser caches a particular response. This is because the browse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f82720f5a6e
unity_docs
scripting
What is `PlayerSettings.Android.androidVulkanDenyFilterList` in Unity? Explain its purpose and usage.
PlayerSettings.Android.androidVulkanDenyFilterList public static AndroidDeviceFilterData[] androidVulkanDenyFilterList ; Description Specifies a list of AndroidDeviceFilterData parameters to restrict Android devices from using Vulkan API when running Unity applications. Each parameter value in each AndroidD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90635189e3e3
unity_docs
scripting
What is `Video.VideoPlayer.canStep` in Unity? Explain its purpose and usage.
VideoPlayer.canStep public bool canStep ; Description Returns true if the VideoPlayer can step forward through the video content. (Read Only) Stepping is done with Video.VideoPlayer.StepForwards. This value is only valid after the movie has been prepared. See VideoPlayer.Prepare .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b2b74595120
unity_docs
rendering
What are the parameters of `AssetDatabase.GetAssetDependencyHash` in Unity?
Returns Hash128 Aggregate hash. Description Returns the hash of all the dependencies of an asset. The hash aggregates the following: source asset path, source asset, meta file, target platform and importer version. The change of this hash indicates that the imported asset may have changed so the relevant asset bundles ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7bfc7066fb0
unity_docs
rendering
What is `Light.useShadowMatrixOverride` in Unity? Explain its purpose and usage.
Light.useShadowMatrixOverride public bool useShadowMatrixOverride ; Description Set to true to enable custom matrix for culling during shadows. Additional resources: Light.shadowMatrixOverride .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_de05ef3da75d
unity_docs
ui
In Unity's 'ScrollView', what is 'Create a ScrollView' and how does it work?
You can create a ScrollView with UI Builder, UXML, or C#. The following C# example creates a ScrollView with both horizontal and vertical scroll capabilities, that contains a title Label, and a number of Toggle elements. It also adds a button that, when clicked, scrolls the list down by one page using the vertical scro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1aedffae695b
unity_docs
rendering
What is `ParticleSystem.ShapeModule.rotation` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.rotation public Vector3 rotation ; Description Apply a rotation to the shape from which the system emits particles. Additional resources: ParticleSystem.ShapeModule.shapeType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_222f47952ea3
unity_docs
math
In Unity's 'Examples', what is 'List and tree views' and how does it work?
Topics Description Create list and tree views Use ListView, TreeView, MultiColumnListView, and MultiColumnTreeView to create list and tree views. Create a complex list view Use ListView to create a custom Editor window with a list of characters. Create a list view runtime UI Use ListView to create a simple character se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60dddd6dba84
unity_docs
rendering
What is `QualitySettings.shadowmaskMode` in Unity? Explain its purpose and usage.
QualitySettings.shadowmaskMode public static ShadowmaskMode shadowmaskMode ; Description The rendering mode of Shadowmask. Set whether static shadow casters should be rendered into real-time shadow maps. Additional resources: Quality Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_975941ff6e49
unity_docs
animation
What is `EditorGUIUtility.DrawCurveSwatch` in Unity? Explain its purpose and usage.
EditorGUIUtility.DrawCurveSwatch Declaration public static void DrawCurveSwatch ( Rect position , AnimationCurve curve , SerializedProperty property , Color color , Color bgColor ); Declaration public static void DrawCurveSwatch ( Rect position , AnimationCurve curve , SerializedProperty pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d577e1dee6df
unity_docs
rendering
What is `QualitySettings.streamingMipmapsActive` in Unity? Explain its purpose and usage.
QualitySettings.streamingMipmapsActive public static bool streamingMipmapsActive ; Description Enable automatic streaming of texture mipmap levels based on their distance from all active cameras. Additional resources: Mip Map Streaming , SystemInfo.supportsMipStreaming , StreamingController , TextureImport...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_696b55678f5c
unity_docs
xr
What is `Experimental.Licensing.LicensingUtility` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LicensingUtility class in UnityEditor.Experimental.Licensing Description Use the Licensing Utility class to request user permissions. User permissions are referred to as entitlements, which are simple strings, ie. "com.unity.ed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80fc8c09be92
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.ComputeMipChainSize` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.ComputeMipChainSize Declaration public static uint ComputeMipChainSize (int width , int height , Experimental.Rendering.GraphicsFormat format , int mipCount = -1); Declaration public static uint C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33b094834175
unity_docs
scripting
What is `Video.VideoAspectRatio` in Unity? Explain its purpose and usage.
VideoAspectRatio enumeration Description Use these methods to fit a video into your target area. This enum gives you several options to manage how the VideoPlayer renders the video to a target area. To do this, the VideoPlayer adjusts or maintains the video's original aspect ratio. If you render a video into a R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cf5629ee8851
unity_docs
rendering
Explain 'Import a file from the shader library in the Built-In Render Pipeline' in Unity.
Unity contains several files that can be used by your shader programs to bring in predefined variables and helper functions. This is done by the standard #include directive, e.g.: ``` SubShader { Pass { HLSLPROGRAM #include "UnityCG.cginc" ENDHLSL } } ``` Shader include files in Unity are with.cginc extension, a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32a615ab6199
unity_docs
scripting
What is `Unity.Android.Gradle.BaseBlock.SetRaw` in Unity? Explain its purpose and usage.
BaseBlock.SetRaw Declaration public void SetRaw (string rawString ); Parameters Parameter Description rawString Raw string value. Description Sets a raw string value to this block. Empty string is a valid value. Unity throws an exception if: This block has child elements. The parent element has a raw va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc48294017f1
unity_docs
ui
Explain 'ScrollView' in Unity.
ScrollView displays its content inside a scrollable area. When you add content to a ScrollView , the content is added to the content container ( #unity-content-container ) of the ScrollView. ## Create a ScrollView You can create a ScrollView with UI Builder, UXML, or C#. The following C# example creates a ScrollView ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75ca8af79dd3
unity_docs
xr
What is `XR.Provider.XRStats` in Unity? Explain its purpose and usage.
XRStats class in UnityEngine.XR.Provider / Implemented in: UnityEngine.XRModule Description Provides timing and other statistics from XR subsystems. The XRStats class allows XR SDK providers to expose timing and other statistics related to their XR subsystems. Such statistics can be used by XR application devel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d25a7046abf4
unity_docs
rendering
In Unity's 'Color gradients', what is 'Four corner gradients' and how does it work?
A gradient with four colors. Each color radiates from one corner. This is the most versatile gradient type. You can vary some colors and keep others identical to create different kinds of gradients. This example shows three corners with one color and the fourth with a different color. This example shows pairs of adjace...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e6e7af6db52
unity_docs
rendering
Show me a Unity C# example demonstrating `MonoBehaviour.OnRenderImage`.
to true . OnRenderImage is not supported in the Scriptable Render Pipeline. To create custom fullscreen effects in the Universal Render Pipeline (URP), use the ScriptableRenderPass API. To create custom fullscreen effects in the High Definition Render Pipeline (HDRP), use a Fullscreen Custom Pass . For information...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_12
github
scripting
What does `FindLocaleIndex` do in this Unity script? Explain its purpose and signature.
Finds the index of the desired locale in the LocalizationSettings using its language code.The language code (en, de, ...).The index of the locale or -1 if not found. Signature: ```csharp public int FindLocaleIndex(string languageCode) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_0d61b8d3a8f4
unity_docs
xr
What is `Screen.currentResolution` in Unity? Explain its purpose and usage.
Screen.currentResolution public static Resolution currentResolution ; Description The current screen resolution (Read Only). Returns the current screen resolution (read only). If the player is running in windowed mode, this returns the current resolution of the desktop. If you are working with VR devices, use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d5bfafd0ee1
unity_docs
editor
What are the parameters of `BuildPipeline.BuildAssetBundles` in Unity?
Returns AssetBundleManifest The manifest summarizing all AssetBundles generated by the build. Description Builds the AssetBundles in your project. This signature of BuildAssetBundles is recommended and exposes the most functionality. The other signatures, documented below, are retained for backward compatibility and co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_59ff120c8105
github
scripting
Write a Unity Editor script for Lazy Singleton
```csharp using CoreLibrary.Exceptions; using UnityEngine; namespace CoreLibrary { /// <summary> /// Author: Cameron Reuschel /// <br/><br/> /// Any BaseBehaviour that is a lazy singleton should only be found at most once per scene. /// A lazy singleton creates an instance of itself in the...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_847a193398a2
unity_docs
physics
Show me a Unity C# example demonstrating `Physics.OverlapSphereNonAlloc`.
int Returns the amount of colliders stored into the results buffer. Description Computes and stores colliders touching or inside the sphere into the provided buffer. Does not attempt to grow the buffer if it runs out of space. The length of the buffer is returned when the buffer is full. Like Physics.OverlapS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e82f3ee53415
unity_docs
scripting
What is `UIElements.Clickable.OnPointerMove` in Unity? Explain its purpose and usage.
Clickable.OnPointerMove Declaration protected void OnPointerMove ( UIElements.PointerMoveEvent evt ); Parameters Parameter Description evt The event. Description This method is called when a PointerMoveEvent is sent to the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d01cce34e66
unity_docs
physics
What are the parameters of `Cursor.SetCursor` in Unity?
Description Sets a custom cursor to use as your cursor. Call Cursor.SetCursor with a Texture2D to change the appearance of the hardware pointer (mouse cursor). ```csharp using UnityEngine;// Attach this script to a GameObject with a Collider, then mouse over the object to see your cursor change. public class ExampleCla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_46d870e25d99
unity_docs
ui
In Unity's 'Bind to multiple properties with runtime binding', what is 'Example overview' and how does it work?
This example creates a data source asset that contains a Vector3 property and a float property. The float property is a read-only property that returns the sum of the x , y , and z values of the Vector3 property. The example binds the Vector3 property to a Vector3Field and the float property to a FloatField . When you ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93da6ff33ea0
unity_docs
scripting
What is `ReflectionProbe.cullingMask` in Unity? Explain its purpose and usage.
ReflectionProbe.cullingMask public int cullingMask ; Description This is used to render parts of the reflecion probe's surrounding selectively. If the GameObject 's layerMask AND the probe's cullingMask is zero then the game object will be invisible from this probe. See Layers for more information. ```...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8c9c93fa2b7
unity_docs
scripting
What is `Handles.DrawWireArc` in Unity? Explain its purpose and usage.
Handles.DrawWireArc Declaration public static void DrawWireArc ( Vector3 center , Vector3 normal , Vector3 from , float angle , float radius , float thickness = 0.0f); Parameters Parameter Description center The center of the circle in world space. normal The normal of the circle in world space....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5b93fe5bed6
unity_docs
scripting
Show me a Unity C# example demonstrating `SimulationMode`.
SimulationMode enumeration Description A selection of modes that control when Unity executes the physics simulation. Additional resources: Physics.simulationMode . ```csharp // SimulationMode.FixedUpdate is the default setting in Unity. // Attach this script to a gameObject and enter runtime mode.using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3c2901206ed
unity_docs
rendering
What is `Rendering.RenderQueue` in Unity? Explain its purpose and usage.
RenderQueue enumeration Description Determine in which order objects are renderered. This way for example transparent objects are rendered after opaque objects, and so on. Additional resources: Material.renderQueue , Shader.renderQueue , subshader tags . Properties Property Description Background This rende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4355cfc9e308
unity_docs
input
In Unity's 'DoubleField', what is 'Customize the input text selection' and how does it work?
Input text is selectable by default. You can customize the selection behaviors such as selectAllOnMouseUP and selectAllOnFocus . In C#, set them through textSelection : ``` myElement.textSelection.selectAllOnMouseUp = false; myElement.textSelection.selectAllOnFocus = false; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a57a597df80
unity_docs
scripting
What is `UIElements.Angle` in Unity? Explain its purpose and usage.
Angle struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Represents an angle value. Properties Property Description unit The unit of the value property. value The angle value. Constructors Constructor Description Angle Creates an Angle from a float a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82e8c1617c38
unity_docs
scripting
Explain 'Introduction to Universal Windows Platform' in Unity.
You can use this page to understand key requirements and concepts for Universal Windows Platform (UWP) before starting to develop and build your Unity application. Topic Description UWP requirements and compatibility Understand the available supported versions and requirements for UWP development in Unity. Integrate Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ef96bdb32af5
github
scripting
Write a Unity Editor script for Git Hub Page Opener
```csharp using UnityEditor; using UnityEngine; namespace Baxter.ClusterScriptExtensions.Editor.HelpUtil { public static class GitHubPageOpener { [MenuItem("CS Extensions/Open Basic Setup Help (GitHub)", priority = 11)] public static void OpenBasicSetupPage() { Application.O...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f6ae411a8b31
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Activity` in Unity? Explain its purpose and usage.
Activity class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <activity> Android Manifest element. For more information about the element, see Android's documentation: Activity element Properties Property Description Attr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ab9afe1cd752
github
scripting
Write a Unity Editor script for Item Material Set List Updater
```csharp using System.Linq; using ClusterVR.CreatorKit.Item; using ClusterVR.CreatorKit.Item.Implements; using UnityEditor; using UnityEngine; namespace Baxter.ClusterScriptExtensions.Editor.ComponentUpdater { public static class ItemMaterialSetListUpdater { public static void Update(ScriptableItemExt...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.