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_c1e5eda8680f
unity_docs
animation
What is `WrapMode.Loop` in Unity? Explain its purpose and usage.
WrapMode.Loop Description When time reaches the end of the animation clip, time will continue at the beginning. When playing backwards it will do the opposite - it will jump to the end of the clip and continue from there. The animation will never automatically stop playing. Additional resources: AnimationState.wra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_cb6412bdad09
github
scripting
Write a Unity C# script called XR Adapter Utils
```csharp using System; using System.Collections.Generic; using System.Reflection; using CoreLibrary; using JetBrains.Annotations; using UnityEngine; using UnityEngine.UIElements; using UnityEngine.UIElements.InputSystem; using UnityEngine.XR; using UnityEngine.XR.Interaction.Toolkit; namespace UIToolkitXR...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_30d85e1ed42b
unity_docs
physics
What is `ArticulationBody.GetDriveTargets` in Unity? Explain its purpose and usage.
ArticulationBody.GetDriveTargets Declaration public int GetDriveTargets (List<float> targets ); Parameters Parameter Description targets Supplied list of floats to read back and store the joint drive targets data. Returns int Total degrees of freedom for the entire hierarchy of articulation bodies. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8067421e4349
unity_docs
ui
Explain 'Descendant selectors' in Unity.
USS descendant selectors match elements that are the descendant of another element in the visual tree . ## Syntax A descendant selector consists of multiple simple selectors separated by a space: ``` selector1 selector2 {...} ``` ## Example To demonstrate how simple selectors match elements, here is an example UI D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e41bd3d3390f
unity_docs
scripting
What is `iOSDeviceRequirement.values` in Unity? Explain its purpose and usage.
iOSDeviceRequirement.values public IDictionary<string,string> values ; Description The values of the device requirement description. The values are encoded as a set of key-value pairs. The keys and values defined in this setting directly correspond to keys and values used to describe device requirements in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3561e29f0123
unity_docs
scripting
Give me an overview of the `ExitGUIException` class in Unity.
ExitGUIException class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description An exception that will prevent all subsequent immediate mode GUI functions from evaluating for the remainder of the GUI loop. If you have exception handling in your GUI code, it should not catch this exception type, as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a64b9794f9a
unity_docs
scripting
What is `VideoBitrateMode` in Unity? Explain its purpose and usage.
VideoBitrateMode enumeration Description Bit rate after the clip is transcoded. Values are labeled assuming a HD 1080P stream. Properties Property Description Low Low value, safe for slower internet connections or clips where visual quality is not critical. Medium Typical bit rate supported by internet connec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72d7620763ec
unity_docs
math
What is `Rendering.RayTracingAccelerationStructure.ctor` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure Constructor Declaration public RayTracingAccelerationStructure (); Declaration public RayTracingAccelerationStructure ( Rendering.RayTracingAccelerationStructure.Settings settings ); Parameters Parameter Description settings Defines whether a RayTracingAccelerationStructu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8df212921d5b
unity_docs
rendering
Explain 'Transparent Bumped Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . One consideration for this shader is that the Base texture’s alpha channel defines both the Transparent areas as well as the Specular Map. ## Transparent Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eab5f96624a6
unity_docs
ui
In Unity's 'ToggleButtonGroup', what is 'Create a ToggleButtonGroup' and how does it work?
You can create a ToggleButtonGroup with UI Builder, UXML, and C#. UI Builder To create a ToggleButtonGroup in UI Builder: Drag ToggleButtonGroup from the Library panel into the Hierarchy panel. Add a set of Button elements to the ToggleButtonGroup element as its child elements. To create a ToggleButtonGroup in UXML, ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36f7256912cc
unity_docs
math
What is `Build.Reporting.BuildReport.scenesUsingAssets` in Unity? Explain its purpose and usage.
BuildReport.scenesUsingAssets public ScenesUsingAssets[] scenesUsingAssets ; Description An optional array of ScenesUsingAssets generated by the build process if BuildOptions.DetailedBuildReport was used during the build.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6ed61a56e276
unity_docs
rendering
In Unity's 'Limit Velocity over Lifetime module reference', what is 'Properties' and how does it work?
For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Separate Axes Splits the axes up into separate X, Y and Z components. Speed Sets the speed limit of the particles. Space S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b7cfc526d0ed_doc_3
github
scripting
What does `Unregister` do in this Unity script? Explain its purpose and signature.
Unregister , so it is not updated every frame anymore.Unregistering updatable objects is O(1).Unregistering an object that wasn't registered is a no-op. Signature: ```csharp public void Unregister(IManagedObject obj) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_24bbdf0d0971
unity_docs
input
What is `UIElements.KeyboardEventBase_1.actionKey` in Unity? Explain its purpose and usage.
KeyboardEventBase<T0>.actionKey public bool actionKey ; Description Gets a boolean value that indicates whether the platform-specific action key is pressed. True means the action key is pressed. False means it isn't. The platform-specific action key is Cmd on macOS, and Ctrl on all other platforms.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_564d739fec93
unity_docs
scripting
What is `VideoClipImporter.defaultTargetSettings` in Unity? Explain its purpose and usage.
VideoClipImporter.defaultTargetSettings public VideoImporterTargetSettings defaultTargetSettings ; Description Default values for the platform-specific import settings. Platforms that don't override the default will use these.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_107a66f155ff
unity_docs
rendering
Show me a Unity code example for 'Make a shader compatible with the Material Validator in the Built-In Render Pipeline'.
shaders for more details. Carry out the following steps to make your custom shader compatible with the Material Validator: Add the following pragma to the meta pass: #pragma shader_feature EDITOR_VISUALIZATION In the UnityMetaInput structure, assign the specular color of the Material to the field called SpecularColor ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e499b4ddd31f
unity_docs
ui
Show me a Unity code example for 'Bind with UXML and C# script'.
mpleted files that this example creates in this GitHub repository . ## Define the binding path in UXML Define the visual elements and the binding path in UXML. Create a project in Unity with any template. In your Project window , create a folder named bind-with-uxml-csharp folder to store all your files. Create a UI ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b7723435d1e
unity_docs
rendering
What is `TerrainData.SyncHeightmap` in Unity? Explain its purpose and usage.
TerrainData.SyncHeightmap Declaration public void SyncHeightmap (); Description Performs synchronization queued by previous calls to CopyActiveRenderTextureToHeightmap and DirtyHeightmapRegion , which makes the height data and LOD data used for tessellation up to date.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72bc473b9231
unity_docs
scripting
Give me an overview of the `PlayerPrefsException` class in Unity.
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.
local_sr_88ddca9956d9
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchContextAttribute.ctor`.
Search view flags used to open the Object Picker in various states. providerIdsCommaSeparated A list of Search Provider IDs that will be used to create the search context. instantiableProviders Search provider concrete types that will be instantiated and assigned to the Object Picker search context. Description S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2542039738f
unity_docs
rendering
What is `SpeedTreeImporter.enableBumpByDefault` in Unity? Explain its purpose and usage.
SpeedTreeImporter.enableBumpByDefault public bool enableBumpByDefault ; Description Gets and sets a boolean to enable normal mapping on the imported SpeedTree model. Normal mapping (or bump mapping) provides more surface detail with normal map textures to increase the visual fidelity. The default value for thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bf59151ab48
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.UnityWebRequest.Get`.
L to the uri argument specified as a string or Uri object. It sets no other custom flags or headers. By default, this method attaches a standard DownloadHandlerBuffer to the UnityWebRequest . This handler buffers the data received from the server and makes it available to your scripts when the request is complet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7869af377102
unity_docs
scripting
What is `Serialization.ManagedReferenceUtility.GetManagedReference` in Unity? Explain its purpose and usage.
ManagedReferenceUtility.GetManagedReference Declaration public static object GetManagedReference ( Object obj , long id ); Parameters Parameter Description hostObj The host object that supports SerializeReference . For example, MonoBehaviour or ScriptableObject . refId The managed reference Id. Retu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa9f73da18a8
unity_docs
performance
What is `Profiling.HierarchyFrameDataView.columnName` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.columnName public static int columnName ; Description The Profiler Sample Name column. The entries in this column are the names of the samples. They usually correspond with the name of the function they sample.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87717813ef36
unity_docs
scripting
Give me an overview of the `ScriptableWizard` class in Unity.
ScriptableWizard class in UnityEditor / Inherits from: EditorWindow Description Derive from this class to create an editor wizard. Editor wizards are typically opened using a menu item. ```csharp // Creates a simple wizard that lets you create a Light GameObject // or if the user clicks in "Apply", it will set...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d676e7340ccc
unity_docs
math
What is `Build.Content.ContentBuildInterface.GetTypeForObjects` in Unity? Explain its purpose and usage.
ContentBuildInterface.GetTypeForObjects Declaration public static Type[] GetTypeForObjects (ObjectIdentifier[] objectIDs ); Parameters Parameter Description objectIDs The specific objects. Returns Type[] The array of unique types. Description Returns the System.Type of the ObjectIdentifier s and the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f34877c41060
unity_docs
scripting
What is `Experimental.Rendering.IScriptableBakedReflectionSystemStageNotifier.ExitStage` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableBakedReflectionSystemStageNotifier.ExitStage Declaration public void ExitStage (int stage ); Parameters Parameter Description stage The completed stage. Description Indicates that a stage is complete. Call t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e14676fedfc2
unity_docs
scripting
Show me a Unity C# example demonstrating `GL.TRIANGLE_STRIP`.
ices, plus the next additional vertex. In this example, the three drawn triangles will be A, B, C, followed by B, C, D, and finally C, D, E. To set up the screen for drawing in 2D, use GL.LoadOrtho or GL.LoadPixelMatrix . To set up the screen for drawing in 3D, use GL.LoadIdentity followed by GL.MultMatrix with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5adfbc21c821
unity_docs
scripting
Give me an overview of the `WWWForm` class in Unity.
WWWForm class in UnityEngine / Implemented in: UnityEngine.UnityWebRequestModule Description Helper class to generate form data to post to web servers using the UnityWebRequest or WWW classes. ```csharp using UnityEngine; using UnityEngine.Networking; using System.Collections;public class WWWFormImage : MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75630bcdebd3
unity_docs
ui
What is `UIElements.Visibility` in Unity? Explain its purpose and usage.
Visibility enumeration Description Style value that specifies whether or not a VisualElement is visible. Properties Property Description Visible The VisualElement is visible. Default Value. Hidden The VisualElement is hidden. Hidden VisualElements will take up space in their parent layout if their pos...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6df2a314cc7
unity_docs
scripting
What is `ParticleSystem.MainModule.startSizeX` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startSizeX public ParticleSystem.MinMaxCurve startSizeX ; Description The initial size of particles along the x-axis when the Particle System first spawns them. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(Parti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1c89d007923
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.boneWeights`.
BoneWeight1 and its associated APIs; they offer more flexibility, and might result in small performance benefits as Unity does not have to perform unnessary conversion operations. Additional resources: Mesh.GetAllBoneWeights , Mesh.SetBoneWeights , Mesh.GetBonesPerVertex , Mesh.GetBoneWeights , ModelImporter.maxB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e6bdaad4ec13
unity_docs
rendering
In Unity's 'Customize how shaders contribute lightmap data in the Built-In Render Pipeline', what is 'Example Shader with a Meta pass' and how does it work?
The Shader below allows you to specify an albedo color and albedo Texture that are used only by the lighting baking system, without affecting the appearance of the Material at runtime. In this example, emission is taken from the UVs; but any value could be used to control it. ```csharp Shader "Custom/metaPassShader"{ ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9f4917548802_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Destroys the child GameObject and creates a clone of the given TComponent as a child transform.IHierarchyBehaviour's will be initialized.The child Component to destroy.The GameObject to clone.The type of Component to be created.The new TComponent Signature: ```csharp public static TComponent ReplaceChild<TComponent>(t...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_eafa0839a882
unity_docs
xr
Explain 'Remove a UPM package from a project' in Unity.
When you “remove” a UPM package from your project, the Package Manager is actually removing the project’s direct dependency from your project manifest . The result of removing the direct dependency varies, based on the dependencies for the package you are removing: If there are no other packages or feature sets that ha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_efd10dea10d8
unity_docs
rendering
What is `StaticEditorFlags` in Unity? Explain its purpose and usage.
StaticEditorFlags enumeration Description Describes which Unity systems consider the GameObject as static, and include the GameObject in their precomputations in the Unity Editor. Setting StaticEditorFlags at runtime has no effect on these systems. For more information, see the Unity Manual documentation on Stat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5ffe2055ca0
unity_docs
input
What is `UnityEngine.AndroidJNIModule` in Unity? Explain its purpose and usage.
UnityEngine.AndroidJNIModule Description AndroidJNI module allows you to call Java code. Additional resources: Best practices for calling Java/Kotlin code Classes Class Description AndroidApplication Use this class to access the runtime data of your Android application. AndroidAssetPackInfo Represents the dow...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb509609d8ca
unity_docs
physics
What is `ParticleSystem.Burst` in Unity? Explain its purpose and usage.
Burst struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for a Burst. A burst is a particle emission event, where a number of particles are all emitted at the same time. Additional resources: ParticleSystem.emission , ParticleSystem.emissionModule.SetBursts, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6ca0921e5239
unity_docs
scripting
In Unity's 'Introduction to SerializedObject data binding', what is 'CallUnbind()' and how does it work?
The Unbind() method stops the value tracking for the element and all its direct and indirect child elements. In general, you don’t need to call Unbind() because tracking stops when a user closes the Inspector or Editor window. Call Unbind() if you must bind elements to different targets in their lifetimes. If you const...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b2c44351165
unity_docs
editor
What is `SearchService.IFilterEngine_1` in Unity? Explain its purpose and usage.
IFilterEngine<T0> interface in UnityEditor.SearchService Implements interfaces: ISearchEngineBase Description The base interface for search engines that implement a filter operation. In a filter operation, the search engine must determine whether a single element satisfies the search query. This is the type of s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5a5a8783679
unity_docs
rendering
What is `EditorUtility.CompressCubemapTexture` in Unity? Explain its purpose and usage.
EditorUtility.CompressCubemapTexture Declaration public static void CompressCubemapTexture ( Cubemap texture , TextureFormat format , int quality ); Declaration public static void CompressCubemapTexture ( Cubemap texture , TextureFormat format , TextureCompressionQuality quality ); Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7278ef8e4865
unity_docs
physics
What is `ParticlePhysicsExtensions.GetSafeTriggerParticlesSize` in Unity? Explain its purpose and usage.
ParticlePhysicsExtensions.GetSafeTriggerParticlesSize Declaration public static int GetSafeTriggerParticlesSize ( ParticleSystem ps , ParticleSystemTriggerEventType type ); Parameters Parameter Description ps Particle system. type Type of trigger to return size for. Returns int Number of particles ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e13b3ffde8d5
unity_docs
scripting
What is `Unity.Properties.PropertyPath.FromName` in Unity? Explain its purpose and usage.
PropertyPath.FromName Declaration public static Unity.Properties.PropertyPath FromName (string name ); Parameters Parameter Description name The name of the <see cref="PropertyPathPart" />. Returns PropertyPath A new PropertyPath Description Returns a new PropertyPath from the provided name.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f89988e3e53
unity_docs
rendering
In Unity's 'Sample a 2D texture array in a shader', what is 'Target platforms that support 2D texture arrays' and how does it work?
To target custom shaders only at platforms that support texture arrays, use either of the following: #pragma target 3.5 to target shader model 3.5 and higher. #pragma require 2darray to target GPUs that support texture arrays.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c07aed54f68
unity_docs
editor
What is `SettingsProvider.OnInspectorUpdate` in Unity? Explain its purpose and usage.
SettingsProvider.OnInspectorUpdate Declaration public void OnInspectorUpdate (); Description OnInspectorUpdate is called at 10 frames per second to give the inspector a chance to update. See EditorWindow.OnInspectorUpdate for more details. ```csharp using UnityEditor; public static class PresetManagerHelper {...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b2f746a9c43
unity_docs
scripting
What is `AndroidJNI.SetStringField` in Unity? Explain its purpose and usage.
AndroidJNI.SetStringField Declaration public static void SetStringField (IntPtr obj , IntPtr fieldID , string val ); Description Sets the value of an instance field of the specified object. This is a convenience function that calls SetObjectField() with the same parameters, but performs the necessary marshal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d4d21640c1e
unity_docs
rendering
Give me an overview of the `CustomRenderTexture` class in Unity.
CustomRenderTexture class in UnityEngine / Inherits from: RenderTexture / Implemented in: UnityEngine.CoreModule Description Custom Render Textures are an extension to Render Textures that allow you to render directly to the Texture using a Shader. Custom Render Textures are an extension to Render Textures t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6204d762bde9
unity_docs
xr
What is `Networking.UnityWebRequest.disposeCertificateHandlerOnDispose` in Unity? Explain its purpose and usage.
UnityWebRequest.disposeCertificateHandlerOnDispose public bool disposeCertificateHandlerOnDispose ; Description If true, any CertificateHandler attached to this UnityWebRequest will have CertificateHandler.Dispose called automatically when UnityWebRequest.Dispose is called. Default: true. If no Certifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d585d54188c4_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A structure used to return the success outcome and the result of Asset Store API calls Signature: ```csharp internal class APIResult ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ccee648116c4
unity_docs
scripting
In Unity's 'Create a Video Player component', what is 'Add the component to an existing GameObject' and how does it work?
You can also add a Video Player component to an existing GameObject. To do this, either drag a video file onto the GameObject, or: Click on the GameObject. In the Inspector window, select Add Component . Select Video > Video Player . As a result, your GameObject contains a Video Player component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0b75abbf9005
unity_docs
xr
Explain 'UWP requirements and compatibility' in Unity.
This page contains system requirements and compatibility information for Universal Windows Platform (UWP) development in Unity. ## UWP application support Unity supports four CPU architectures when targeting UWP: x86 x64 ARM ARM64 Unity supports the following operating system versions: Windows 10+ HoloLens Unity supp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_462b569a24fd
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.AddObjectToAsset`.
ct to add to the existing asset. path Project relative path to the destination asset. Description Adds objectToAdd to an existing asset at path . Please note that you should only add objects to '.asset' assets, imported models or texture objects for example will lose their data. All paths are relative to the pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d61c453e7983
unity_docs
ui
In Unity's 'Style text with USS', what is 'Style text in UI builder' and how does it work?
To style text in UI Builder, you can use the Text section in a UI control’s Inspector window to style text. If the UI control is a text element that inherits from TextElement , such as Label or Button , you can also set the following text styles directly in the Canvas on selected text elements: Horizontal text align Ve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b60d6e9d058b
unity_docs
rendering
What is `LightTransport.ReferenceContext.Flush` in Unity? Explain its purpose and usage.
ReferenceContext.Flush Declaration public bool Flush (); Returns bool True if the flush was successful. Description Flush the device context. Start execution of the enqueued operations on the device. On some platforms the underlying implementation or driver flushes automatically, on others it is up to the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8750a8d0ff3
unity_docs
scripting
What is `TerrainTools.PaintContext.originTerrain` in Unity? Explain its purpose and usage.
PaintContext.originTerrain public Terrain originTerrain ; Description (Read Only) The Terrain used to build the PaintContext. When painting across a border, the PaintContext can refer to several Terrain tiles. The originTerrain is used to define the terrain space (terrain-local object space) within the Pain...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ec7292134e0
unity_docs
audio
What is `AudioSource.spatializePostEffects` in Unity? Explain its purpose and usage.
AudioSource.spatializePostEffects public bool spatializePostEffects ; Description Determines if the spatializer effect is inserted before or after the effect filters. This flag only has an effect if the spatialize flag is enabled on the AudioSource. See AudioSource.spatialize for further information about sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_05f4b283236a
unity_docs
rendering
Explain 'Package versioning' in Unity.
Packages must follow Semantic Versioning (SemVer). Semantic Versioning is a strategy that allows package authors to provide information on the type of changes included in a given version, compared to the previous version, in a format that automated tools can use. Semantic Versioning expresses versions as MAJOR.MINOR.PA...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b855d84181f4
github
scripting
Write a Unity Editor script for Mask Editor
```csharp using UnityEngine.UI; namespace UnityEditor.UI { [CustomEditor(typeof(Mask), true)] [CanEditMultipleObjects] /// <summary> /// Custom Editor for the Mask component. /// Extend this class to write a custom editor for a component derived from Mask. /// </summary> public class MaskEd...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_f67a433390e7
unity_docs
editor
What is `Compilation.CompilerMessage` in Unity? Explain its purpose and usage.
CompilerMessage struct in UnityEditor.Compilation Description Compiler Message. Additional resources: AssemblyBuilder. Properties Property Description column Line column for the message. file File for the message. line File line for the message. message Compiler message. type Message type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_078a077e1619
unity_docs
math
What is `Matrix4x4.ToString` in Unity? Explain its purpose and usage.
Matrix4x4.ToString Declaration public string ToString (); Declaration public string ToString (string format ); Declaration public string ToString (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that speci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d6b3e8da298d
unity_docs
performance
In Unity's 'IL2CPP limitations', what is 'Threads' and how does it work?
Threads aren’t supported on the Web platform, so any managed code that uses the System.Threading namespace fails at runtime. Some parts of the .NET class libraries also implicitly depend on threads. A common example is the System.Timers.Timer class, which depends on support for threads.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5850769ceeaf
unity_docs
scripting
What is `U2D.ScriptablePacker` in Unity? Explain its purpose and usage.
ScriptablePacker class in UnityEditor.U2D / Inherits from: ScriptableObject Description ScriptablePacker Interface. Provides a custom implementation to pack sprites into textures. This is the Scriptable Packer interface. Public Methods Method Description Pack Allows custom implementation to pack sprites into...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32662d37cbf1
unity_docs
rendering
What is `Shader.GetPropertyName` in Unity? Explain its purpose and usage.
Shader.GetPropertyName Declaration public string GetPropertyName (int propertyIndex ); Parameters Parameter Description propertyIndex The index of the shader property. Description Returns the name of the shader property at the specified index. If Unity cannot find a property at the specified index, the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7df94a0ac67
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioDataLoadState`.
data isn’t already loaded. Perform actions while the audio data loads. Track progress and failures of the load. Make sure certain actions don’t start until the audio starts to load or has finished loading. Use AudioClip.LoadAudioData and AudioClip.UnloadAudioData to load and unload the audio data of the AudioCl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ddd19d794b94
github
scripting
Write a Unity C# MonoBehaviour script called Scene Transition Manager
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class SceneTransitionManager : MonoBehaviour { public FadeScreen fadeScreen; public static SceneTransitionManager singleton; private void Awake() { if (singleton &...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7cf191520ba
unity_docs
scripting
What is `AppleTV.tvOSPlatformIconKind.TopShelfImage` in Unity? Explain its purpose and usage.
tvOSPlatformIconKind.TopShelfImage public static PlatformIconKind TopShelfImage ; Description Includes all top shelf images required by tvOS. Top Shelf Image (1920x720) Top Shelf Image 2X (3840x1440) Wide Top Shelf Image (2320x720) Wide Top Shelf Image 2X (4640x1440) Top shelf images are shown on the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86389b4fe81d
unity_docs
editor
What is `U2D.SpriteBone` in Unity? Explain its purpose and usage.
SpriteBone struct in UnityEngine.U2D / Implemented in: UnityEngine.CoreModule Description Stores a set of information that describes the bind pose of this Sprite. This struct describes the hierarchy and other spatial relationships between the bones of this Sprite. Properties Property Description color Shows...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b3ed9f412a0e_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Define where the pointer is drawed.Forward: Drawed forward the mounted object.Upward: Drawed upward the mounted object. Signature: ```csharp private DrawMode drawMode = DrawMode.UPWARD; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_b364a2839604
unity_docs
rendering
Give me an overview of the `ModelImporterMaterialSearch` class in Unity.
ModelImporterMaterialSearch enumeration Description Material search options for ModelImporter . Additional resources: ModelImporter.materialSearch . Properties Property Description Local Search in local Materials folder. RecursiveUp Recursive-up search in Materials folders. Everywhere Search in all project...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e6db4c1333b
unity_docs
xr
What is `Graphics.ConvertTexture` in Unity? Explain its purpose and usage.
Graphics.ConvertTexture Declaration public static bool ConvertTexture ( Texture src , Texture dst ); Declaration public static bool ConvertTexture ( Texture src , int srcElement , Texture dst , int dstElement ); Declaration public static bool ConvertTexture ( Rendering.GraphicsTexture src , Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ab96294ca0e
unity_docs
math
What is `Mathf.Epsilon` in Unity? Explain its purpose and usage.
Mathf.Epsilon public static float Epsilon ; Description The smallest positive non-zero value that a float can represent. Using Mathf.Epsilon as a delta for equality makes the comparison effectively identical to exact equality on normal-range numbers. For an approximately equal value, use Mathf.Approximately ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c64eb308959f
unity_docs
scripting
What is `Experimental.GraphView.EdgeManipulator.UnregisterCallbacksFromTarget` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeManipulator.UnregisterCallbacksFromTarget Declaration protected void UnregisterCallbacksFromTarget (); Description Called to unregister event callbacks from the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91b80ed52a08
unity_docs
scripting
What is `AI.NavMeshAgent.SamplePathPosition` in Unity? Explain its purpose and usage.
NavMeshAgent.SamplePathPosition Declaration public bool SamplePathPosition (int areaMask , float maxDistance , out AI.NavMeshHit hit ); Parameters Parameter Description areaMask A bitfield mask specifying which NavMesh areas can be passed when tracing the path. maxDistance Terminate scanning the path a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6af49cf9a2b8
unity_docs
scripting
Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MallocTracked`.
but with additional tracking that helps identify memory allocations that might contribute to memory leaks or inefficiencies in performance-critical applications. Ensure that the allocated memory is properly freed with UnsafeUtility.Free when it is no longer required to avoid memory leaks. Balance the callstacksToSki...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_74e49bdbfad9
unity_docs
scripting
In Unity's 'Look At Constraint component', what is 'Constraint Settings' and how does it work?
Property Description Lock Enable this option to let the Constraint rotate the GameObject (apply the Constraint). If you disable this option, you can modify the GameObject’s rotation, the Rotation At Rest , and Rotation Offset properties. When you are satisfied with your changes, enable Lock to let the Constraint contro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0589f12f76a6
unity_docs
rendering
What is `TextureImporterCubemapConvolution.None` in Unity? Explain its purpose and usage.
TextureImporterCubemapConvolution.None Description No convolution needed. This Cubemap texture represents mirror reflection or Skybox. Additional resources: TextureImporterSettings.cubemapConvolution .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab4a6b2549fc
unity_docs
editor
What is `AssetImporters.AssetImporterEditor.OnEnable` in Unity? Explain its purpose and usage.
AssetImporterEditor.OnEnable Declaration public void OnEnable (); Description This function is called when the object is loaded. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.AssetImporters;public class ExampleScript : AssetImporterEditor { public override void OnEnable() { base.OnEnable(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ab28e25d8ac
unity_docs
rendering
What is `GL.IssuePluginEvent` in Unity? Explain its purpose and usage.
GL.IssuePluginEvent Obsolete IssuePluginEvent(eventID) is deprecated. Use IssuePluginEvent(callback, eventID) instead. Declaration public static void IssuePluginEvent (int eventID ); Declaration public static void IssuePluginEvent (IntPtr callback , int eventID ); Parameters Parameter Description eve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d4b36ca6559
unity_docs
physics
Give me an overview of the `DistanceJoint2D` class in Unity.
DistanceJoint2D class in UnityEngine / Inherits from: AnchoredJoint2D / Implemented in: UnityEngine.Physics2DModule Description Joint that keeps two Rigidbody2D objects a fixed distance apart. Note that unlike the SpringJoint2D component, the distance separating the objects is truly fixed and does not allow f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_418a64bb9ad9
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R32G32_UInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R32G32_UInt Description A two-component, 64-bit unsigned integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2b2795530939
unity_docs
rendering
Explain 'Cull moving GameObjects' in Unity.
GameObjects can be static , or dynamic (not static). Static GameObjects and dynamic GameObjects behave differently in Unity’s occlusion culling system: Unity can bake static GameObjects into the occlusion culling data as a Static Occluder and/or a Static Occludee. Unity cannot bake dynamic GameObjects into the occlusio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0e93130478f
unity_docs
math
What are the parameters of `Tilemaps.Tilemap.SetTransformMatrix` in Unity?
Description Sets the transform matrix of a Tile given the XYZ coordinates of a cell in the Tilemap . Note that if the Tile has set TileFlags.LockTransform , then this matrix has no effect. ```csharp // Rotate the tile in (0,0,0) 90 degrees using UnityEngine; using UnityEngine.Tilemaps;public class ExampleClass : MonoBe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ea65e1ee26e
unity_docs
xr
What is `PackageManager.Requests.EmbedRequest` in Unity? Explain its purpose and usage.
EmbedRequest class in UnityEditor.PackageManager.Requests / Inherits from: PackageManager.Requests.Request_1 Description Represents an asynchronous request to embed a package inside a project. The PackageManager Client class returns an EmbedRequest instance when you call the Client.Embed method to embed ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38f2c44d6383
unity_docs
editor
What is `AssetDatabase.Refresh` in Unity? Explain its purpose and usage.
AssetDatabase.Refresh Declaration public static void Refresh ( ImportAssetOptions options = ImportAssetOptions.Default); Parameters Parameter Description options Set any asset import options. For more information, refer to ImportAssetOption. Description Import any changed assets. Import any assets that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b62f4f37abff
unity_docs
scripting
Show me a Unity C# example demonstrating `Component.gameObject`.
Component.gameObject public GameObject gameObject ; Description The game object this component is attached to. A component is always attached to a game object. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { print(gameObject.name); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_10
github
scripting
What does `GetElevation` do in this Unity script? Explain its purpose and signature.
Get the elevation of this Positioner, in meters.The elevation of this Positioner, in meters. Signature: ```csharp public double GetElevation() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_4cb6f5354a5b
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetImplicitAssetBundleName`.
he AssetBundle that a given asset belongs to. If the asset has been explicitly assigned to an AssetBundle, then that value is returned. If the asset doesn't belong to an AssetBundle, its parent folders are traversed until one that belongs to an AssetBundle is found. If a folder that matches this condition is found, it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_166aa56ef080
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.EnumPopup`.
hod called for each Enum value displayed. The specified method should return true if the option can be selected, false otherwise. Returns Enum The enum option that has been selected by the user. Description Make an enum popup selection field. Takes the currently selected enum value as a parameter and returns t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_220861e1feb3
unity_docs
physics
Show me a Unity C# example demonstrating `Physics.gravity`.
Physics.gravity public static Vector3 gravity ; Description The gravity applied to all rigid bodies in the Scene. Gravity can be turned off for an individual rigidbody using its useGravity property. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Exam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_babfa692b0d9
unity_docs
math
What is `Rendering.RayTracingAABBsInstanceConfig.aabbBuffer` in Unity? Explain its purpose and usage.
RayTracingAABBsInstanceConfig.aabbBuffer public GraphicsBuffer aabbBuffer ; Description The GraphicsBuffer that defines a list of axis-aligned bounding boxes (AABBs). To define an AABB, use a list of float values in the following order: minX, minY, minZ, maxX, maxY, maxZ.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f9e798101c18
github
scripting
Write a Unity C# XR/VR script for Device Hand Pos Rot Adjust
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR; public class DeviceHandPosRotAdjust : MonoBehaviour { // Start is called before the first frame update void Awake() { Debug.Log("In DeviceHandPosRotAdjust, XRSettings.loadedDeviceName is...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_3fc186c84eea_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
When enabled, spawn will not be triggered if an object is currently selected. Signature: ```csharp public bool blockSpawnWhenInteractorHasSelection ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_5a16c400b9ae
unity_docs
scripting
What is `Experimental.Licensing.EntitlementInfo.EntitlementGroupsData` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EntitlementInfo.EntitlementGroupsData public EntitlementGroupInfo[] EntitlementGroupsData ; Description Contains a list of EntitlementGroupInfo structures.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3fdf554e624
unity_docs
ui
What are the parameters of `UIElements.UQueryExtensions.Q` in Unity?
Returns T The first element matching all the criteria, or null if none was found. Description Convenience overload, shorthand for Query() . Build() . First() Declaration public static UIElements.VisualElement Q ( UIElements.VisualElement e , string name , params string[] classes ); Parameters Parameter Description e Ro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f683ca5a3f8b
unity_docs
rendering
What is `RenderTextureFormat.RInt` in Unity? Explain its purpose and usage.
RenderTextureFormat.RInt Description Scalar (R) render texture format, 32 bit signed integer. Note that not all graphics cards support integer render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95a0f832b9af
unity_docs
scripting
What is `PackageManager.UI.Sample.Import` in Unity? Explain its purpose and usage.
Sample.Import Declaration public bool Import ( PackageManager.UI.Sample.ImportOptions options ); Parameters Parameter Description options Custom import options. See ImportOptions for more information. Note that ImportOptions are flag attributes, therefore you can set multiple import options using the `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86b11b92b335
unity_docs
scripting
What is `Search.SearchViewState.tableConfig` in Unity? Explain its purpose and usage.
SearchViewState.tableConfig public Search.SearchTable tableConfig ; Description Access the search table configuration used if in table view. The search table gives access to all the columns displayed in table view.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11e5f63dcb07
unity_docs
scripting
Give me an overview of the `RefreshRate` class in Unity.
RefreshRate struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Represents the display refresh rate. This is how many frames the display can show per second. Display refresh rate is always a rational number which is expressed as a fraction that contains a numerator and a denominator. For ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe8396a1dec2
unity_docs
physics
What is `CursorMode` in Unity? Explain its purpose and usage.
CursorMode enumeration Description Determines whether the mouse cursor is rendered using software rendering or, on supported platforms, hardware rendering. See Cursor for supported platforms. Properties Property Description Auto Use hardware cursors on supported platforms. ForceSoftware Force the use of sof...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1f6be135de1
unity_docs
networking
What is `Android.AndroidKeyboard.Qwerty` in Unity? Explain its purpose and usage.
AndroidKeyboard.Qwerty Description Mirrors the Android property value KEYBOARD_QWERTY . For information about the property value, refer to the Android developer documentation on KEYBOARD_QWERTY .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.