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_f72fb450bcd0
github
scripting
Write a Unity C# UI script for Debug Menu Item
```csharp // // Copyright (c) Sandro Figo // using UnityEngine; using UnityEngine.UI; namespace DebugMenu { public class DebugMenuItem : MonoBehaviour { [HideInInspector] public Node node; public RectTransform arrow; private RectTransform rectTransform; [HideInInspe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_844728463be5
unity_docs
editor
What is `BuildPlayerWithProfileOptions.locationPathName` in Unity? Explain its purpose and usage.
BuildPlayerWithProfileOptions.locationPathName public string locationPathName ; Description The path where the application will be built. The path you specify must end with the correct extension for the file format you will build. This path won't be changed by Unity. Set the file format using EditorUserBuildSe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9f228e14199
unity_docs
rendering
What is `RenderTexture.memorylessMode` in Unity? Explain its purpose and usage.
RenderTexture.memorylessMode public RenderTextureMemoryless memorylessMode ; Description The render texture memoryless mode property. Use this property to set or return the render texture memoryless modes. Memoryless render textures are temporarily stored in the on-tile memory when it is rendered. It does no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85c9d0425b98
unity_docs
physics
What is `IMGUI.Controls.JointAngularLimitHandle.yHandleColor` in Unity? Explain its purpose and usage.
JointAngularLimitHandle.yHandleColor public Color yHandleColor ; Description Returns or specifies the color to use for the handle limiting motion around the y-axis. Defaults to Handles.yAxisColor . This value is multiplied with the value of Handles.color . Additional resources: xHandleColor , zHandleColor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cc7f4441540
unity_docs
editor
What is `Experimental.GraphView.ISelection` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ISelection interface in UnityEditor.Experimental.GraphView Description Selection interface. Properties Property Description selection Get the selection. Public Methods Method Description AddToSelection Add element to se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c4c8cb3045d
unity_docs
editor
Show me a Unity C# example demonstrating `EditorApplication.playModeStateChanged`.
never the Editor's play mode state changes. Add an event handler to this event to receive a notification that the play mode state has changed, as well as information about the state it has changed into. The following example script logs the Editor's play mode state to the console whenever if changes. Copy it into a fi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05ea11ea9f2d
unity_docs
rendering
What is `SpriteDrawMode` in Unity? Explain its purpose and usage.
SpriteDrawMode enumeration Description SpriteRenderer draw mode. Enum defining the draw mode for SpriteRenderer.drawMode . This controls how to display the Sprite . Properties Property Description Simple Displays the full sprite. Sliced The SpriteRenderer will render the sprite as a 9-slice image where the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2b7dd30c339c
unity_docs
scripting
Explain 'Types of Light component' in Unity.
This page describes the effects of the Type property on a Light component . You can use the Type property to choose how the Light behaves. The available values are: Point Light, a Light that’s located at a point in the Scene and emits light in all directions equally Spot Light, a Light that’s located at a point in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b15d65557bd
unity_docs
rendering
What is `CubemapArray.SetPixels32` in Unity? Explain its purpose and usage.
CubemapArray.SetPixels32 Declaration public void SetPixels32 (Color32[] colors , CubemapFace face , int arrayElement , int miplevel ); Declaration public void SetPixels32 (Color32[] colors , CubemapFace face , int arrayElement ); Parameters Parameter Description colors The array of pixel colou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5c2e99dbaa11
github
scripting
Write a Unity C# MonoBehaviour script called Console Database
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using UnityEngine; namespace InGame_Console.InGame_Console_System.Scripts { public static class ConsoleDatabase { const BindingFlags Staticflags = BindingFlags.Public | BindingFlags.NonPublic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d0ede995786
unity_docs
scripting
What is `Unity.Android.Gradle.GradlePlugin` in Unity? Explain its purpose and usage.
GradlePlugin class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.Element Description Definition of a dependency gradle plugin. For more information about the element, see Gradle's documentation: Applying plugins with the plugins DSL Properties Property Description Apply The C# definition of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e0b34cc273a
unity_docs
editor
What is `AssetImporters.AssetImporterEditor.CanApply` in Unity? Explain its purpose and usage.
AssetImporterEditor.CanApply Declaration protected bool CanApply (); Returns bool Returns true if the edited import settings do not contain errors and can be applied. Otherwise returns false. Description Determines if the modifications to import settings can be applied.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cac2b90be18c
unity_docs
scripting
What is `Quaternion.Set` in Unity? Explain its purpose and usage.
Quaternion.Set Declaration public void Set (float newX , float newY , float newZ , float newW ); Description Set x, y, z and w components of an existing Quaternion. ```csharp //Create three Sliders ( Create>UI>Slider) and three Text GameObjects (Create>UI>Text). These are for manipulating the x, y, and z v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc6c9e5b9a15
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.CustomDataModule.enabled`.
ParticleSystem.CustomDataModule.enabled public bool enabled ; Description Specifies whether the CustomDataModule is enabled or disabled. Additional resources: ParticleSystem.customData . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf0d2baafa93
unity_docs
scripting
What is `Unity.Android.Gradle.BaseBlock.GetName` in Unity? Explain its purpose and usage.
BaseBlock.GetName Declaration public string GetName (); Returns string The name of the block. Description Gets the name of the block. In some cases, the name is the signature of the function.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de9a66e18e4a
unity_docs
editor
What is `PlayerSettings.WSA.SetCertificate` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.SetCertificate Declaration public static bool SetCertificate (string path , string password ); Parameters Parameter Description path The relative Asset path to the Certificate file (.pfx). password The certificate password. If the certificate does not require a password, use an empty s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98d6db2dca7d
unity_docs
rendering
What is `PlayerSettings.iOS` in Unity? Explain its purpose and usage.
iOS class in UnityEditor Description iOS specific player settings. Static Properties Property Description appInBackgroundBehavior Application behavior when entering background. appleDeveloperTeamID Set this property with your Apple Developer Team ID. You can find this on the Apple Developer website under Acc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16b75bd327bb
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerRecorderDescription.Category` in Unity? Explain its purpose and usage.
ProfilerRecorderDescription.Category public Unity.Profiling.ProfilerCategory Category ; Description Gets the ProfilerCategory value of the Profiler metric. Use to obtain ProfilerCategory value of the Profiler metric.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5b6411e5536
unity_docs
math
Show me a Unity C# example demonstrating `Quaternion.ToString`.
(string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifies culture-specific formatting. Description Returns a formatted string for this quaternion. Defaults to five digits displayed (format="F5"). For more inf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24adf38dbb47
unity_docs
rendering
What are the parameters of `Search.SearchService.Request` in Unity?
Returns ISearchList Asynchronous list of search items. Description Executes a search request that will fetch search results asynchronously. The following example executes a query and print results over many frames using EditorApplication.update . ```csharp [MenuItem("Examples/SearchService/Request List")] public static...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad62b437ea77
unity_docs
scripting
What is `ObjectNames.SetNameSmart` in Unity? Explain its purpose and usage.
ObjectNames.SetNameSmart Declaration public static void SetNameSmart ( Object obj , string name ); Description Sets the name of an Object. If the object is an Asset, renames the asset and file names to match the object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4240e91f7d01
unity_docs
input
What is `HierarchyDropFlags` in Unity? Explain its purpose and usage.
HierarchyDropFlags enumeration Description Define how dragged objects should be dropped relative to already existing Hierarchy items. Properties Property Description None Insert dragged object in the Hierarchy. The default flag value is 0. The only case in which DropMode is 0 is when dragging outside items and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c601069db749
unity_docs
math
What is `Vector2.Reflect` in Unity? Explain its purpose and usage.
Vector2.Reflect Declaration public static Vector2 Reflect ( Vector2 inDirection , Vector2 inNormal ); Parameters Parameter Description inDirection The direction vector towards the surface. inNormal The normal vector that defines the surface. Description Reflects a vector off the surface defined by ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4537818d0785_doc_13
github
scripting
What does `IsSelectableBy` do in this Unity script? Explain its purpose and signature.
Denies selection of direct and ray interactors if grabbing is not allowed, emitting the respective events.Interactor trying to selectWhether or not selection is allowed. Signature: ```csharp public override bool IsSelectableBy(IXRSelectInteractor interactor) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_4e5262d45150
unity_docs
rendering
What is `Rendering.ShaderPropertyFlags` in Unity? Explain its purpose and usage.
ShaderPropertyFlags enumeration Description Flags that control how a shader property behaves. When the Unity Editor compiles a ShaderLab script, it assigns shader property flags to its shader properties based on the attributes you assign to those properties. For example, if you add the "[HideInInspector]" attribut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18beaf80933d
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseElement.GetCustomAttribute` in Unity? Explain its purpose and usage.
BaseElement.GetCustomAttribute Declaration public Unity.Android.Gradle.Manifest.BaseAttribute GetCustomAttribute (string name ); Parameters Parameter Description name Attribute name. Returns BaseAttribute The custom attribute with the given name when one exists. Otherwise, returns null. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a21fdc4a95f
unity_docs
rendering
What is `Search.SearchItemOptions.Ellipsis` in Unity? Explain its purpose and usage.
SearchItemOptions.Ellipsis Description If the description is longer than the width of the search view, truncates the description and adds an ellipsis. ``` private static SearchItem SearchLogEntry(SearchContext context, SearchProvider provider, LogEntry logEntry) { if (!SearchUtils.MatchSearchGroups(context, logEnt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c9a6080f6e2
unity_docs
scripting
What is `SceneTemplate.ISceneTemplatePipeline.AfterTemplateInstantiation` in Unity? Explain its purpose and usage.
ISceneTemplatePipeline.AfterTemplateInstantiation Declaration public void AfterTemplateInstantiation ( SceneTemplate.SceneTemplateAsset sceneTemplateAsset , SceneManagement.Scene scene , bool isAdditive , string sceneName ); Parameters Parameter Description sceneTemplateAsset The Scene template asset t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97a340df858c
unity_docs
scripting
What is `UIElements.BindingResult` in Unity? Explain its purpose and usage.
BindingResult struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Provides information about the binding update. Properties Property Description message Gets the message associated with the binding update. status The status from the binding update. Constru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e867ddda9bf5
unity_docs
rendering
What is `AssetDatabase.ForceReserializeAssets` in Unity? Explain its purpose and usage.
AssetDatabase.ForceReserializeAssets Declaration public static void ForceReserializeAssets (); Declaration public static void ForceReserializeAssets (IEnumerable<string> assetPaths , ForceReserializeAssetsOptions options ); Parameters Parameter Description assetPaths The paths to the assets that shoul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa7dee49faa6
unity_docs
physics
What is `HandleUtility.RaySnap` in Unity? Explain its purpose and usage.
HandleUtility.RaySnap Declaration public static object RaySnap ( Ray ray ); Returns object A boxed RaycastHit, null if nothing hit it. Description Casts ray against the Scene and reports whether an object lies in its path. The ray only returns intersections with GameObjects that have a collider comp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_befeb9ec4854
github
scripting
Write a Unity C# MonoBehaviour script called Labeled Match
```csharp using Hudossay.AttributeEvents.Assets.Runtime.EventLinks; using System; using UnityEngine; namespace Hudossay.AttributeEvents.Assets.Runtime.CouplingStructure { public readonly struct LabeledMatch { public readonly object EventLabel; public readonly LabeledEvent LabeledEvent; ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_8c8ec35b1f05
unity_docs
scripting
In Unity's 'Pooling and reusing objects', what is 'Creating an object pool' and how does it work?
Unity’s ObjectPool<T> class provides an implementation of the reusable object pool pattern, and is the simplest way to implement an object pool in your application. An instance of ObjectPool<T> manages a pool of objects of type T . When you create an ObjectPool<T> through the ObjectPool<T> constructor , you provide par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbe01e9e4c9a
unity_docs
scripting
What is `Experimental.GraphView.GraphView.RemoveFromSelection` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.RemoveFromSelection Declaration public void RemoveFromSelection ( Experimental.GraphView.ISelectable selectable ); Parameters Parameter Description selectable Element to remove from selection. Description Rem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c65c7340b1f
unity_docs
input
What is `KeyCode.Escape` in Unity? Explain its purpose and usage.
KeyCode.Escape Description Escape key. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Debug.Log("Escape key was pressed"); } if (Input.GetKeyUp(KeyCode.Escape)) { Debug.Log("Escape key was released"); } if (Input.GetKey(KeyCode.Esc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b031cc44d1d4
unity_docs
scripting
What is `Networking.UnityWebRequest` in Unity? Explain its purpose and usage.
UnityWebRequest class in UnityEngine.Networking / Implemented in: UnityEngine.UnityWebRequestModule Description Provides methods to communicate with web servers. UnityWebRequest handles the flow of HTTP communication with web servers. To post-process downloaded data and pre-process uploaded data, use Download...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b75ff7be5811
unity_docs
xr
What is `Android.AndroidAssetPacks` in Unity? Explain its purpose and usage.
AndroidAssetPacks class in UnityEngine.Android / Implemented in: UnityEngine.AndroidJNIModule Description Provides methods for handling Android asset packs. Methods in this class are either direct wrappers of java APIs in Google's PlayCore plugin, or depend on values that the PlayCore API returns. Therefore to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76e61088e98e
unity_docs
editor
What is `Callbacks.RunAfterClassAttribute.ctor` in Unity? Explain its purpose and usage.
RunAfterClassAttribute Constructor Declaration public RunAfterClassAttribute (Type type ); Declaration public RunAfterClassAttribute (string assemblyQualifiedName ); Parameters Parameter Description type The class type that should be run before this callback. assemblyQualifiedName The assembly-qualifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a30d84256fc
unity_docs
rendering
What is `AssetPostprocessor.assetImporter` in Unity? Explain its purpose and usage.
AssetPostprocessor.assetImporter public AssetImporter assetImporter ; Description Reference to the asset importer. ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor;// Set the scale of all the imported models to "globalScaleModifier" // and dont generat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cafed5a6be0d
unity_docs
editor
What is `MonoImporter.GetAllRuntimeMonoScripts` in Unity? Explain its purpose and usage.
MonoImporter.GetAllRuntimeMonoScripts Declaration public static MonoScript[] GetAllRuntimeMonoScripts (); Returns MonoScript[] Returns an array of scripts. Description Gets an array of scripts that will be available at runtime. Additional resources: AssetDatabase.FindAssets . ```csharp using UnityEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f5e68b58dece
unity_docs
rendering
In Unity's 'Render queues and sorting behaviours', what is 'Set how a camera sorts materials' and how does it work?
How you change the sorting behavior within a render queue depends on the index of the render queue: For queues with an index up to and including 2500 (Geometry + 500), you can change the opaque sort mode for a Camera by using the Camera.opaqueSortMode API. For queues with an index of 2501 or above, you can change the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e310a3ae30b
unity_docs
physics
What is `AreaEffector2D.forceAngle` in Unity? Explain its purpose and usage.
AreaEffector2D.forceAngle public float forceAngle ; Description The angle of the force to be applied. The actual angle will be different depending on whether the useGlobalAngle is true or false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5f0588d908c5
unity_docs
ui
In Unity's 'Grid and Snap toolbar overlay', what is 'Grid and Snap overlay reference' and how does it work?
Property Description Grid size field Enter a value to use as the current grid size value. This value sets the size of the grid homogeneously on all axes. Toggle grid visibility Select Toggle grid visibility to display or hide the grid in the Scene view. Open the Grid Visual menu Select the downward facing arrow next to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2229e2493503
unity_docs
editor
What is `TerrainTools.TerrainPaintToolWithOverlaysBase.OnToolSettingsGUI` in Unity? Explain its purpose and usage.
TerrainPaintToolWithOverlaysBase.OnToolSettingsGUI Declaration public void OnToolSettingsGUI ( Terrain terrain , TerrainTools.IOnInspectorGUI editContext ); Parameters Parameter Description terrain Active Terrain object. editContext Interface used to communicate between Editor and Paint tools. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_764884731d2c
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.SetPreloadedAssets`.
PlayerSettings.SetPreloadedAssets Declaration public static void SetPreloadedAssets (Object[] assets ); Description Assigns the assets that will be loaded at start up in the player and be kept alive until the player terminates. This example shows how a ScriptableObject can be used to store data that can be ac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68303938d7dc
unity_docs
rendering
What is `NormalMapEncoding.DXT5nm` in Unity? Explain its purpose and usage.
NormalMapEncoding.DXT5nm Description Two-component DXT5nm-style normal map encoding. This is the default normal map encoding on non-mobile platforms. Compared to NormalMapEncoding.XYZ , the normal maps are of higher quality, but are more computationally expensive to decode in shaders.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ac5807d811f
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetPath` in Unity? Explain its purpose and usage.
Hierarchy.GetPath Declaration public string GetPath (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node. Returns string The path of the node. Description Gets the path of a hierarchy node.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3512c5cb5e1c
unity_docs
math
Explain 'Examples' in Unity.
This page lists a collection of examples that you can build with UI Toolkit: ## Layout Topics Description Relative and absolute positioning C# example Use relative and absolute positioning to lay out UI in C#. ## List and tree views Topics Description Create list and tree views Use ListView, TreeView, MultiColumnLi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14454be6abc3
unity_docs
editor
What is `SerializedProperty.managedReferenceId` in Unity? Explain its purpose and usage.
SerializedProperty.managedReferenceId public long managedReferenceId ; Description Id associated with a managed reference. Available when propertyType is SerializedPropertyType.ManagedReference . If the reference is null then the Id is SerializeUtility.RefIdNull. Additional resources: SerializeReference ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e3302afd47e
unity_docs
physics
Give me an overview of the `CustomRenderTextureUpdateMode` class in Unity.
CustomRenderTextureUpdateMode enumeration Description Frequency of update or initialization of a Custom Render Texture. Additional resources: CustomRenderTexture . Properties Property Description OnLoad Initialization/Update will occur once at load time and then can be triggered again by script. Realtime Ini...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_deff8b61950c
unity_docs
editor
What is `BuildAssetBundlesParameters.targetPlatform` in Unity? Explain its purpose and usage.
BuildAssetBundlesParameters.targetPlatform public BuildTarget targetPlatform ; Description The BuildTarget to build. (optional) An AssetBundle is only compatible with the specific platform that it was built for, so you must produce different builds of a given bundle to use the assets on different platform...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7b45db908c2
unity_docs
editor
What are the parameters of `Search.SearchIndexer.AddDocument` in Unity?
Returns int The document index/handle used to add new index entries. Description Adds a new document to be indexed. ```csharp using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_SearchIndexer_AddDocument { [MenuItem("Examples/SearchIndexer/AddDocument")] publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc8fa59575a7
unity_docs
editor
What is `BuildPipeline.GetPlaybackEngineDirectory` in Unity? Explain its purpose and usage.
BuildPipeline.GetPlaybackEngineDirectory Declaration public static string GetPlaybackEngineDirectory ( BuildTarget target , BuildOptions options ); Declaration public static string GetPlaybackEngineDirectory ( BuildTargetGroup buildTargetGroup , BuildTarget target , BuildOptions options ); Parame...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28b8a61c91e1
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddCapability`.
s. Set it to false if no additional frameworks are required. Returns bool True if the capability was successfully added. Description Adds a target capability to the Xcode project. This enables behavior based on the capability type. Some capabilities require additional setup within Xcode. For more control over ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1a910c7c83a2_doc_1
github
scripting
What does `CreateWizard` do in this Unity script? Explain its purpose and signature.
Creates a wizard for the target RuleOverrideTIleThe RuleOverrideTile to be edited by the wizard Signature: ```csharp public static void CreateWizard(RuleOverrideTile target) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_41e8b1057cd4
unity_docs
performance
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.GetWriter` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.GetWriter Declaration public static Unity.Jobs.JobHandle GetWriter ( Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle ); Parameters Parameter Description handle The AtomicSafetyHandle to check. Returns JobHandle The job handle of the writer. Description Gets any write...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f0cf4e22efd1
unity_docs
xr
In Unity's 'Collect asset loading metrics', what is 'Enable metric collection' and how does it work?
Enable metrics collection before any data is recorded. You can do this in one of the following ways: Call AsyncReadManagerMetrics.StartCollectingMetrics in your script. Pass the -enable-file-read-metrics command-line argument when launching your application. To collect metrics in Play mode, pass the -enable-file-read-m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7c59f1b91a24_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Abstract class representing a key in the non native keyboardThis is an experimental feature. This class is early in the cycle, it hasbeen labeled as experimental to indicate that it is still evolving, andsubject to change over time. Parts of the MRTK, such as this class, appearto have a lot of value even if the details...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_c811b3780fef
unity_docs
scripting
What is `PlayerSettings.SetManagedStrippingLevel` in Unity? Explain its purpose and usage.
PlayerSettings.SetManagedStrippingLevel Declaration public static void SetManagedStrippingLevel ( Build.NamedBuildTarget buildTarget , ManagedStrippingLevel level ); Obsolete Use SetManagedStrippingLevel(NamedBuildTarget buildTarget, ManagedStrippingLevel level) instead. Declaration public static void S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef47f6090e8f
unity_docs
math
What is `GridLayout.LocalToWorld` in Unity? Explain its purpose and usage.
GridLayout.LocalToWorld Declaration public Vector3 LocalToWorld ( Vector3 localPosition ); Parameters Parameter Description localPosition Local Position to convert. Returns Vector3 World position of the local position. Description Converts a local position to world position.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6cb49d6ddfa9
unity_docs
math
In Unity's 'Debug Web builds in development', what is 'Exception support' and how does it work?
Web has different levels of exception support, but by default, Unity Web only supports explicitly thrown exceptions. For more information, refer to Web Player settings . You can enable Full exception support, which emits additional checks in the IL2CPP-generated code, to catch access to null references and out-of-bound...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_54b1f6cf160a
unity_docs
xr
In Unity's 'Deploy a Windows or UWP app with the Windows Device Portal', what is 'Set up the Device Portal' and how does it work?
Before you set up the Device Portal in Unity, make sure that you enable Developer Mode and Device Portal on your Windows device using the For Developer section in Settings (Settings > Privacy & security > For developers). To access the Device Portal settings for your Unity project: Go to File > Build Profiles . From th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49be3973b878
unity_docs
editor
What is `Search.DisplayMode.List` in Unity? Explain its purpose and usage.
DisplayMode.List Description Display as a list view. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_displayMode { [MenuItem("Examples/ISearchView/displayMode")] public static void Run() { // SearchService can open a SearchView. var view = SearchServi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04581edd805a
unity_docs
editor
What is `PrefabUtility.FindAllInstancesOfPrefab` in Unity? Explain its purpose and usage.
PrefabUtility.FindAllInstancesOfPrefab Declaration public static GameObject[] FindAllInstancesOfPrefab ( GameObject prefabRoot ); Declaration public static GameObject[] FindAllInstancesOfPrefab ( GameObject prefabRoot , SceneManagement.Scene scene ); Parameters Parameter Description prefabRoot The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3526524fe6d5
unity_docs
scripting
In Unity's 'Unity Launcher Manifest', what is 'Settings' and how does it work?
You can configure all the settings in the Unity Launcher Manifest from Unity’s Player Settings . This means, unless you want to integrate Unity as a component into an existing project, you don’t need to overwrite the Unity Launcher Manifest or manually edit any settings directly in the file. A Unity Launcher Manifest f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9c18859e2ba
unity_docs
scripting
What is `Experimental.GraphView.StackNode.dragEntered` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StackNode.dragEntered protected bool dragEntered ; Description Indicates if items from this stack are currently being dragged.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4fc516f2b8f
unity_docs
ui
What is `Experimental.GraphView.Node.titleButtonContainer` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Node.titleButtonContainer public UIElements.VisualElement titleButtonContainer ; Description Title bar button container. Contains the top right buttons.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f398f2271883
unity_docs
physics
Show me a Unity C# example demonstrating `MPE.ChannelService`.
es the route of the URL connecting to the ChannelService. For example, "127.0.0.1:9292/<channelName>" The ChannelService allows custom handlers to receive all messages on a specific channel. Unity does not start the ChannelService automatically. You must start it manually using ChannelService.Start . Alternatively, yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_373c1d516a16_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Controller coordinates everything betweenthe s and contains the core app logic Signature: ```csharp public class RollABallController : IController ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_dee19e4926f1
unity_docs
rendering
What is `ParticleSystemRenderer.BakeTrailsTexture` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.BakeTrailsTexture Declaration public int BakeTrailsTexture (ref Texture2D verticesTexture , ref Texture2D indicesTexture , ParticleSystemBakeTextureOptions options ); Declaration public int BakeTrailsTexture (ref Texture2D verticesTexture , ref Texture2D indicesTexture , Ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_522e158da73e
unity_docs
xr
Explain 'Encryption export regulations' in Unity.
When publishing to the App Store, you must declare if your application uses encryption in order to comply with U.S. export regulations. To make a declaration, you must add the ITSAppUsesNonExemptEncryption key in your applications Information Property List file. If your application doesn’t use encryption, or uses encry...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2fa0a0526c0
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddFolderReference` in Unity? Explain its purpose and usage.
PBXProject.AddFolderReference Declaration public string AddFolderReference (string path , string projectPath , iOS.Xcode.PBXSourceTree sourceTree ); Parameters Parameter Description path The physical path to the folder on the filesystem. projectPath The project path to the folder. sourceTree The sour...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_28c96f57c9ca
unity_docs
physics
In Unity's 'Physics Debug window reference', what is 'Filtering' and how does it work?
The Filtering tab contains properties to configure which physics elements appear in the Physics Debug visualization. Property Description Show Physics Scene Select which Physics Scenes to include in the visualization, if you have multiple physics scenes loaded at once. Show Unity Scene Select which Unity Scenes to incl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7748b983d08
unity_docs
editor
In Unity's 'Build a macOS application', what is 'Duplicate native source files' and how does it work?
When building for macOS, using multiple native source files as plug-ins with the same name that target the same build will cause a build failure. For example, if two or more files with the same name target different architectures, such as macOS ARM64 and macOS x64, and you build a Universal app that includes both archi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e311c7434014
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerSettings.Android.predictiveBackSupport`.
PlayerSettings.Android.predictiveBackSupport public static bool predictiveBackSupport ; Description Enable to use Android's OnBackInvokedCallback for handling back events on Android 13 and above. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class PredictiveBackSupportSample ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cafee153875b
unity_docs
performance
What is `Unity.Profiling.ProfilerFlowEventType.Begin` in Unity? Explain its purpose and usage.
ProfilerFlowEventType.Begin Description Use for the flow start point. The Begin flow event type marks up the profiler sample as a flow start point. The new flow identifier is generated for the Begin event. Use it to track all profiler samples which belong to the same flow. Next denotes the next point of the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b95f675d20c
unity_docs
physics
What is `UIElements.CustomBinding` in Unity? Explain its purpose and usage.
CustomBinding class in UnityEngine.UIElements / Inherits from: UIElements.Binding / Implemented in: UnityEngine.UIElementsModule Description Base class for general purpose binding extensibility. The following example creates a custom binding that displays the current time. You can bind it to the text fie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d3d8148c6f7
unity_docs
input
Show me a Unity C# example demonstrating `TouchPhase.Began`.
TouchPhase.Began Description A finger touched the screen. ```csharp //Attach this script to an empty GameObject //Create some UI Text by going to Create>UI>Text. //Drag this GameObject into the Text field of your GameObject’s Inspector window.using UnityEngine; using System.Collections; using UnityEngine.UI;public ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6f43ffab948
unity_docs
scripting
What is `HumanPoseHandler.GetInternalHumanPose` in Unity? Explain its purpose and usage.
HumanPoseHandler.GetInternalHumanPose Declaration public void GetInternalHumanPose (ref HumanPose humanPose ); Parameters Parameter Description humanPose The output human pose. In the human pose, the bodyPosition and bodyRotation are the position and rotation of the approximate center of mass of the hu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_265a3c02e8c4
unity_docs
scripting
Give me an overview of the `CompressionLevel` class in Unity.
CompressionLevel enumeration Description Compression Levels relate to how much time should be spent compressing Assets into an Asset Bundle. Compressing files is a tradeoff between speed and size. The more time spent compressing an asset, the smaller the result is likelier to be. Compression levels are ordered lik...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3d13c89661d4_doc_7
github
scripting
What does `GetValueFromIndexInternal` do in this Unity script? Explain its purpose and signature.
Implements the public interface .Zero-based index of entry in ordered dictionary.The key.If is out of range. Signature: ```csharp protected abstract object GetValueFromIndexInternal(int index); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_3ad3fb8a819b
unity_docs
rendering
Explain 'Batch meshes at runtime' in Unity.
For more information about batching, refer to Introduction to batching meshes . Note: Unity uses additional CPU memory to store the combined meshes, even if the meshes are the same. For example, marking trees as static in a dense forest environment can have a large impact on memory. If static batching uses too much mem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fa2edd1c18f
unity_docs
editor
What is `SearchService.ISearchEngine_1` in Unity? Explain its purpose and usage.
ISearchEngine<T0> interface in UnityEditor.SearchService Implements interfaces: ISearchEngineBase Description The base interface for search engines that implement a search operation. In a search operation, the search engine is responsible for providing all the elements that satisfy the search query. This is the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a993a73dc03c
unity_docs
physics
What is `Collider2D.composite` in Unity? Explain its purpose and usage.
Collider2D.composite public CompositeCollider2D composite ; Description Get the CompositeCollider2D that is available to be attached to the collider. Gets any CompositeCollider2D that this Collider2D would use if the Collider geometry is being composited using Collider2D.compositeOperation or returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e235811d5b67
unity_docs
scripting
Give me an overview of the `AudioType` class in Unity.
AudioType enumeration Description The format type of the imported (native) data. Use this enumeration to specify the format type of the audio file you want to play. This is mostly useful if you stream your audio from a server with UnityWebRequestMultimedia.GetAudioClip . For example, if you want to stream a file ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67dcdda36f5c
unity_docs
editor
What is `EditorGUILayout.Vector3Field` in Unity? Explain its purpose and usage.
EditorGUILayout.Vector3Field Declaration public static Vector3 Vector3Field (string label , Vector3 value , params GUILayoutOption[] options ); Declaration public static Vector3 Vector3Field ( GUIContent label , Vector3 value , params GUILayoutOption[] options ); Parameters Parameter Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_747960fc659f
github
scripting
Write a Unity C# script called Scene Reference
```csharp using System; using UnityEngine; namespace SmartReference.Runtime { [Serializable] public class SceneReference { [SerializeField] private string scenePath; /// <summary> /// Get the scene path. /// </summary> // ReSharper disable once UnusedMember...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_df3ef7e76dcc
unity_docs
physics
In Unity's 'Use components', what is 'Component context menu commands' and how does it work?
Right click on a component for the context menu with several useful commands. The same commands are also available from the kebab menu (⋮) in the top-right of the component panel in the Inspector window. The table below describes the commands available so you can adjust your components: Command: Description: Reset Rest...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2671b8ee8c76
unity_docs
input
In Unity's 'IME in Unity', what is 'What is Input Method Editor (IME)?' and how does it work?
An input method is an operating system component or program that allows users to enter characters and symbols not found on their input device. For instance, on the computer, this allows the user of ‘Western’ keyboards to input Chinese, Japanese, Korean, and Indic characters. On hand-held devices such as mobile phones, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e86ebf2b0978_doc_6
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Releases the specified non-MonoBehaviour object back to its pool.The type of the non-MonoBehaviour object to release.The object to release. Signature: ```csharp public void ReleasePure<T>(T obj) where T : class, IPoolable => GetPool<PurePool<T>, T>(_purePools).Release(obj); ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_766f231ccbed
unity_docs
scripting
What is `Device.Application.logMessageReceivedThreaded` in Unity? Explain its purpose and usage.
Application.logMessageReceivedThreaded Description This has the same functionality as Application.logMessageReceivedThreaded . At the moment, the Device Simulator doesn't support simulation of this event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa4b61e343f8
unity_docs
math
What is `EditorTools.EditorToolAttribute` in Unity? Explain its purpose and usage.
EditorToolAttribute class in UnityEditor.EditorTools / Inherits from: EditorTools.ToolAttribute Description Registers an EditorTool as either a Global tool or a Component tool for a specific target type. A Global tool works on any selection. A Global tool is also always available from the top toolbar. A Com...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1738806ca1a5
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchItemOptions.RightToLeft`.
SearchItemOptions.RightToLeft Description If the description is longer than the search view, keeps the last characters. ``` private static SearchItem SearchLogEntry(SearchContext context, SearchProvider provider, LogEntry logEntry) { if (!SearchUtils.MatchSearchGroups(context, logEntry.msgLowerCased, true)) retur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_974e7f8edaad
unity_docs
scripting
Give me an overview of the `EditorUserBuildSettings` class in Unity.
EditorUserBuildSettings class in UnityEditor / Inherits from: Object Description User build settings for the Editor Additional resources: EditorBuildSettings . Static Properties Property Description activeBuildTarget The currently active build target. activeScriptCompilationDefines DEFINE directives for t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26a1b947fe79
unity_docs
scripting
What is `ShortcutManagement.IShortcutManager.activeProfileId` in Unity? Explain its purpose and usage.
IShortcutManager.activeProfileId public string activeProfileId ; Description Gets or sets the ID of the currently active profile. When active profile is changed all shortcut bindings are updated to reflect the overrides of active profile and its ancestors profiles. If the active profile is set to a profile ID o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5db3c2776850
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.RegisterCreatedObjectUndo`.
recording. Unity calls Undo.FlushUndoRecordObjects automatically. Register newly created objects with Undo.RegisterCreatedObjectUndo . If you do not follow this workflow, Unity might not store the state of the recorded objects on the undo stack correctly. The following example shows how to create and modify a Game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bc0676ba1c3
unity_docs
rendering
What is `Rendering.LightShadowCasterCullingInfo.projectionType` in Unity? Explain its purpose and usage.
LightShadowCasterCullingInfo.projectionType public Rendering.BatchCullingProjectionType projectionType ; Description The projection type of the shadow-casting light to be rendered. For example, directional light shadow-maps will have orthographic projection. Spot lights will usually have perspective projection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_126e72d92285
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.DrawRect`.
ze of the rectangle to draw. color The color of the rectange. Description Draws a filled rectangle of color at the specified position and size within the current editor window. Use this to give blocks of Color to areas you want to highlight in the Inspector window of a GameObject in the Editor. You can also use th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_613833972ab8
unity_docs
scripting
What is `UIElements.BindableElement` in Unity? Explain its purpose and usage.
BindableElement class in UnityEngine.UIElements / Inherits from: UIElements.VisualElement / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IBindable Description Element that can be bound to a property. For more information, refer to UXML element BindableElement . Properties Property...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3834c77ab5ba
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.Index_operator`.
Color.this[int] public float this[int] ; Description Access the r, g, b,a components using [0], [1], [2], [3] respectively. ```csharp using UnityEngine;public class Example : MonoBehaviour { Color color = Color.white; void Start() { //The same as color.g = 5 color[1] = 5; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.