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_d580c03076b5_doc_12
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The skew coefficient which represents the non-perpendicularity of the image sensor's x and y axes Signature: ```csharp public float Skew; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4537818d0785_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The initial scales of the object in `_scaledChildren`. Only available at runtime. Signature: ```csharp private Vector3[] _initialScales; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c1966c1df305
unity_docs
rendering
In Unity's 'Add a shader pass in a custom shader', what is 'Using the Pass name with C# scripts' and how does it work?
To access the name of a Pass from C# scripts , you can use APIs such as Material.FindPass , Material.GetPassName , or ShaderData.Pass.Name . Note: Material.GetShaderPassEnabled and Material.SetShaderPassEnabled do not reference Passes by name; instead, they reference Passes using the value of the LightMode tag .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd0d52db420e
unity_docs
ui
In Unity's 'Bind with UXML and C# script', what is 'Example overview' and how does it work?
This example creates a custom Editor window with a TextField that binds to the name property of any GameObject in a scene . You can find the completed files that this example creates in this GitHub repository .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11b5e762ef66
unity_docs
rendering
What is `TextureImporterFormat` in Unity? Explain its purpose and usage.
TextureImporterFormat enumeration Description Imported texture format for TextureImporter . Most of the values match the ones in TextureFormat , with addition of the "Automatic" ones that pick the best format based on platform and texture type or usage. Additional resources: TextureImporter.textureFormat. Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3caa1ae3934e
unity_docs
scripting
What is `PlayerSettings.Android.keystorePass` in Unity? Explain its purpose and usage.
PlayerSettings.Android.keystorePass public static string keystorePass ; Description Android keystore password. This is the password for retrieving and updating the keys inside a particular keystore (known as [-storepass <storepass>] on the keytool/jarsigner command line). For a detailed code example, refer to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7005703b5cdf
unity_docs
rendering
In Unity's 'Introduction to lighting data', what is 'Generating data' and how does it work?
Unity’s precomputed lighting solutions only consider static geometry. To begin the lighting precompute process, you need at least one Static GameObject in your Scene . When you initiate a precompute, the Unity Editor evaluates and computes all aspects of your Scene lighting. To recalculate and bake only Reflection Prob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b74c03623046
unity_docs
rendering
In Unity's 'Reflective Parallax Specular', what is 'Reflective Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader will simulate reflective surfaces such as cars, metal objects etc. It requires an environment Cubemap which will define what exactly is reflected. The main texture’s alpha channel defines the strength of reflection on the object’s surf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8d5bc506421
unity_docs
rendering
What is `LightTransport.RadeonRaysContext.ctor` in Unity? Explain its purpose and usage.
RadeonRaysContext Constructor Declaration public RadeonRaysContext (); Declaration public RadeonRaysContext (IntPtr ptr ); Description Constructor. Create a new RadeonRaysContext . ```csharp using UnityEngine.LightTransport;using var ctx = new RadeonRaysContext(); ``` How to create a RadeonRaysContext.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d03025ae2739
github
scripting
Write a Unity C# MonoBehaviour script called Event Dispatcher
```csharp ο»Ώusing System; using System.Collections; using System.Collections.Generic; using BehaviourInject; using UnityEngine; public class EventDispatcher : MonoBehaviour { [Inject] public IEventDispatcher EventManager { get; private set; } IEnumerator Start () { yield return new WaitForSeconds(2f); Debug...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_4091f4462a28_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Load scene using name, or reload the active scene Signature: ```csharp public class LoadScene : MonoBehaviour ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_fab787589861
unity_docs
scripting
What is `UIElements.PropertyField.RegisterValueChangeCallback` in Unity? Explain its purpose and usage.
PropertyField.RegisterValueChangeCallback Declaration public void RegisterValueChangeCallback (EventCallback<SerializedPropertyChangeEvent> callback ); Description Registers this callback to receive SerializedPropertyChangeEvent when a value is changed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a2ce28e19784
unity_docs
rendering
Explain 'Check whether a mesh uses the asynchronous upload pipeline' in Unity.
To identify which upload pipeline Unity is using for a mesh , you can use the Profiler or another profiling tool and observe thread activity and profiler markers . The following indicate that Unity is using the asynchronous upload pipeline to upload textures or meshes: The AsyncUploadManager.ScheduleAsyncRead , AsyncRe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f3ffe7be6557
unity_docs
scripting
Explain 'Graphics API support' in Unity.
Unity supports DirectX, Metal, OpenGL, and Vulkan graphics APIs, depending on the availability of the API on a particular platform. Topic Description Configure graphics APIs How to use Unity’s default APIs or alternate APIs available on the platform. DirectX How to set up DirectX graphics API. Metal Information about M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8813cc90bed1
unity_docs
rendering
In Unity's 'Sky', what is 'Sky and render pipelines' and how does it work?
The sky solutions you can use depend on which render pipeline your Project uses. Render pipeline Sky Solution Universal Render Pipeline (URP) URP uses the same sky solution as the Built-in Render Pipeline and allows you to specify the sky on a per-Scene basis and override the sky for an individual Camera. β€’ For informa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d6c5f1f1833
unity_docs
scripting
What is `AudioDistortionFilter` in Unity? Explain its purpose and usage.
AudioDistortionFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Distortion Filter distorts the sound from an AudioSource or sounds reaching the AudioListener . Additional resources: Audio Distortion Filter information. Properties Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1c3ebc68da06
github
scripting
Write a Unity C# script called Static Cube View
```csharp ο»Ώusing TinyECS.Impls; using TinyECS.Interfaces; using TinyECSUnityIntegration.Impls; using UnityEngine; public class StaticCubeView: BaseStaticView, IEventListener<TComponentChangedEvent<TRotationComponent>> { public override void RegisterSubscriptions(IEventManager eventManager, uint entityId) { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_856e13282fec
unity_docs
math
What are the parameters of `GameObject.FindGameObjectsWithTag` in Unity?
Description Retrieves an array of all active GameObjects tagged with the specified tag. Returns an empty array if no GameObjects have the tag. Tags must be declared in the tag manager before using them. A UnityException will be thrown if the tag does not exist or if an empty string or null is supplied as the tag param...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b0dbc31bcb2
unity_docs
scripting
What is `UIElements.ScrollView.verticalHorizontalVariantViewportUssClassName` in Unity? Explain its purpose and usage.
ScrollView.verticalHorizontalVariantViewportUssClassName public static string verticalHorizontalVariantViewportUssClassName ; Description USS class name that's added when the Viewport is in both horizontal and vertical mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_339fce0971a2
unity_docs
scripting
What is `Debug.Log` in Unity? Explain its purpose and usage.
Debug.Log Declaration public static void Log (object message ); Declaration public static void Log (object message , Object context ); Parameters Parameter Description message String or object to be converted to string representation for display. context Object to which the message applies. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0765a2ca5826
unity_docs
animation
What is `StateMachineBehaviour.OnStateIK` in Unity? Explain its purpose and usage.
StateMachineBehaviour.OnStateIK(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) Parameters Parameter Description animator The Animator evaluating this state machine. animatorStateInfo Information about the state being evaluated. layerIndex The current layer being evaluated. Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6331825fcebc
unity_docs
scripting
What are the parameters of `Vector3.Project` in Unity?
Returns Vector3 The vector that results from the projection of vector . This vector points in the same direction as onNormal . Description Projects a vector onto another vector. The resulting projection is the amount of vector that points in the same direction as onNormal . Diagram showing a vector projected onto the v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b40547c47146
github
scripting
Write a Unity C# script called Persistance Controller
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; using System.Runtime.Serialization.Formatters.Binary; public class PersistanceController { private int presetNumb; private int themeNumb; public PersistanceController() { presetNumb = 10; ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_9506bc2fb3db
github
scripting
Write a Unity C# XR/VR script for VR Locomotion
```csharp // SPDX-License-Identifier: MIT using System.Collections.Generic; using UnityEngine; using UnityEngine.XR; /// <summary> /// Smooth locomotion and snap-turn for the VR Gaussian Splatting viewer. /// /// Controls (VR): /// Left stick β†’ smooth move (relative to HMD facing direction, XZ plane) /// R...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_cd10934ed7ac
unity_docs
xr
What is `XR.XRInputSubsystemDescriptor` in Unity? Explain its purpose and usage.
XRInputSubsystemDescriptor class in UnityEngine.XR / Inherits from: IntegratedSubsystemDescriptor / Implemented in: UnityEngine.XRModule Description Information about an Input subsystem. Properties Property Description disablesLegacyInput When true, will suppress legacy support for Daydream, Oculus, OpenVR...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6d6a5ab2a8e
unity_docs
physics
What is `ParticleSystem.CollisionModule.voxelSize` in Unity? Explain its purpose and usage.
ParticleSystem.CollisionModule.voxelSize public float voxelSize ; Description Size of voxels in the collision cache. Smaller values improve accuracy, but require higher memory usage and are less efficient.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7cc98d843c4a
unity_docs
editor
What is `Rendering.ResourcePathsAttribute` in Unity? Explain its purpose and usage.
ResourcePathsAttribute class in UnityEngine.Rendering / Inherits from: Rendering.ResourcePathsBaseAttribute / Implemented in: UnityEngine.CoreModule Description Attribute specifying information about the paths where these resources are located. This is only used in the editor and doesn't have any effect at ru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd43f85af188
unity_docs
ui
Show me a Unity code example for 'IMGUI Layout Modes'.
different buttons based on Save Game files, you don’t know exactly how many buttons will be drawn. In this case Automatic Layout might make more sense. It is really dependent on the design of your game and how you want to present your interface. There are two key differences when using Automatic Layout: GUILayout is us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3007a82d0081
unity_docs
scripting
What is `SceneManagement.EditorSceneManager.SceneOpeningCallback` in Unity? Explain its purpose and usage.
EditorSceneManager.SceneOpeningCallback Declaration public delegate void SceneOpeningCallback (string path , SceneManagement.OpenSceneMode mode ); Parameters Parameter Description path Path of the Scene to be opened. This is relative to the Project path. mode Mode that is used when opening the Scene. D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54d4112c10e1
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.LoadAssetAtPath`.
. Some asset files may contain multiple objects. (such as a Maya file which may contain multiple Meshes and GameObjects). All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png". Note: The assetPath parameter is not case sensitive. This returns only an asset object that is visible ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d96b3b1591ba
unity_docs
scripting
What is `IMGUI.Controls.TreeView.DoubleClickedItem` in Unity? Explain its purpose and usage.
TreeView.DoubleClickedItem Declaration protected void DoubleClickedItem (int id ); Parameters Parameter Description id ID of TreeViewItem that was double clicked. Description Override this method to handle double click events on an item.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2397aa495bb
unity_docs
ui
What is `UIElements.VisualElement.GetBindingInfos` in Unity? Explain its purpose and usage.
VisualElement.GetBindingInfos Declaration public IEnumerable<BindingInfo> GetBindingInfos (); Returns IEnumerable<BindingInfo> The bindings information. Description Gets information on all the bindings of the current element. The order in which the binding information is returned is undefined.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64c90bc78ff9
unity_docs
rendering
What are the parameters of `PlayerSettings.SetPlatformIcons` in Unity?
Description Assign a list of icons for the specified build target and platform icon kind. The icons array must be the one returned by PlayerSettings.GetPlatformIcons for the same build target and kind; texture assets must be in the project. The BuildTargetGroup overload is marked for deprecation in the future; use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c241bfff55ea
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.ToggleGroupScope`.
ToggleGroupScope class in UnityEditor Description Begin a vertical group with a toggle to enable or disable all the controls within at once. Additional resources: BeginToggleGroup . Align position/rotation/scale of the selected GameObjects. ```csharp // C# Example // Simple script that lets you align GameObjec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e855074e2a4c_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Native UnityXR Right-Hand device handle Signature: ```csharp public static InputDevice handRight ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b74e205aee00
unity_docs
editor
What is `EditorUserBuildSettings.wsaUWPBuildType` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.wsaUWPBuildType public static WSAUWPBuildType wsaUWPBuildType ; Description The build type for the Universal Windows Platform. Additional resources: WSAUWPBuildType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_082aa86c2497
unity_docs
physics
What is `PreprocessorOverride` in Unity? Explain its purpose and usage.
PreprocessorOverride enumeration Description This enum is now obsolete. Unity always uses the Caching Shader Preprocessor. Additional resources: The Caching Shader Preprocessor Properties Property Description UseProjectSettings This enum is now obsolete. Unity always uses the Caching Shader Preprocessor. For...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_137e89a631d7
unity_docs
rendering
Explain 'Check how many shader variants you have' in Unity.
You can use logging and profiling tools to check how many shader variants Unity compiles, and identify ways you can remove ( strip ) variants to improve build times and reduce memory usage. You can do the following: Get a list of shader variants the Editor uses Get a list of shader variants Unity creates at build time ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_145297f74f88
unity_docs
rendering
What is `Rendering.GlobalKeyword.ctor` in Unity? Explain its purpose and usage.
GlobalKeyword Constructor Declaration public GlobalKeyword (string name ); Parameters Parameter Description name The name of the global shader keyword. Description Creates and returns a GlobalKeyword struct that represents an existing global shader keyword. If a global shader keyword with the given name e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4e2e4e71264
unity_docs
rendering
What is `Terrain.compressedHolesFormat` in Unity? Explain its purpose and usage.
Terrain.compressedHolesFormat public static Experimental.Rendering.GraphicsFormat compressedHolesFormat ; Description Graphics format of the Terrain holes Texture when it is compressed. Additional resources: TerrainData.holesTexture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cee302e70681
unity_docs
scripting
What is `Search.ISearchQuery.GetViewState` in Unity? Explain its purpose and usage.
ISearchQuery.GetViewState Declaration public Search.SearchViewState GetViewState (); Returns SearchViewState Persisted search view state. Description Returns the search query view state. This view state is used to restore the search view UI and item view mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_583d2b7b8ec3
unity_docs
xr
What is `Networking.MultipartFormFileSection` in Unity? Explain its purpose and usage.
MultipartFormFileSection class in UnityEngine.Networking / Implemented in: UnityEngine.UnityWebRequestModule Implements interfaces: IMultipartFormSection Description A helper object for adding file uploads to multipart forms via the [IMultipartFormSection] API. This object is similar to the MultipartFormDataS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b46587a3c6f3
github
scripting
Write a Unity C# MonoBehaviour script called Waypoint Progress Tracker
```csharp using System; using UnityEngine; namespace UnityStandardAssets.Utility { public class WaypointProgressTracker : MonoBehaviour { // This script can be used with any object that is supposed to follow a // route marked out by waypoints. // This script manages the amoun...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_e812c0511848
unity_docs
scripting
What are the parameters of `AssetBundle.LoadFromMemory` in Unity?
Returns AssetBundle Loaded AssetBundle object or null if failed. Description Synchronously load an AssetBundle from a memory region. Use this method to load an AssetBundle from an array of bytes. This is useful when you have downloaded the data with encryption and need to load the AssetBundle from the decrypted bytes. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54a8a8f22653
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.SortChildren` in Unity? Explain its purpose and usage.
Hierarchy.SortChildren Declaration public void SortChildren (ref Unity.Hierarchy.HierarchyNode node , bool recurse ); Parameters Parameter Description node The hierarchy node. recurse Whether to sort the child nodes recursively. Description Sorts the child nodes of a hierarchy node according to their...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff6e697e2c12
unity_docs
rendering
What are the parameters of `ParticleSystemJobs.IJobParticleSystemParallelFor.Execute` in Unity?
Description Implement this method to access and modify particle properties. Below is an example of a script that you can use to attract particles to a supplied position. ```csharp using System; using Unity.Collections; using UnityEngine; using UnityEngine.ParticleSystemJobs;public class ParticleJob : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ce86956ba9b
unity_docs
animation
What is `Animations.AnimationPlayableBinding` in Unity? Explain its purpose and usage.
AnimationPlayableBinding class in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Description A PlayableBinding that contains information representing an AnimationPlayableOutput . Static Methods Method Description Create Creates a PlayableBinding that contains information representing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_48a85f408bf0
github
scripting
Write a Unity C# MonoBehaviour script called A Prefab Pool Component
```csharp using System; using System.Collections.Generic; using UnityEngine; using Object = UnityEngine.Object; namespace Gilzoide.PrefabPool.Internal { public abstract class APrefabPoolComponent<T, TPool> : MonoBehaviour, IPrefabPool<T>, IDisposable where T : Object where TPool : APrefabPool<T>, n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_50ccbd944add
unity_docs
rendering
In Unity's 'Video Player component targets', what is 'Display your video content on a Camera plane' and how does it work?
You can choose to project the video onto the near plane or far plane of the Camera . To enable this setting, set Render Mode to Camera Near Plane or Camera Far Plane . The near plane shows the video in front of any objects in the scene. Displaying the video on this plane is useful for video cutscenes or UI elements tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_63463e09eeb9
unity_docs
rendering
Explain 'Cubemaps' in Unity.
Resources for creating and using a collection of six square textures that represent the reflections in an environment, and form an imaginary cube around a GameObject . Page Description Introduction to cubemaps Understand that a cubemap has six squares forming the faces of an imaginary cube that surrounds an object. Cre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcc3aa7b91bc
unity_docs
editor
Show me a Unity C# example demonstrating `BuildPipeline.BuildPlayer`.
on, those changes won't take effect. It also means that the built-in scripting symbols defined for the current active target platform (such as UNITY_STANDALONE_WIN, or UNITY_ANDROID) remain in place even if you try to build for a different target platform, which can result in the wrong code being compiled into your bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f9ca0610d03
unity_docs
physics
Give me an overview of the `ColliderErrorState2D` class in Unity.
ColliderErrorState2D enumeration Description Indicates what (if any) error was encountered when creating a 2D Collider. This error state can be read directly from the 2D Collider via the property: Collider2D.errorState . Properties Property Description None Indicates that no error was encountered, therefore t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1297db13c013
unity_docs
math
What is `HandleUtility.placeObjectCustomPasses` in Unity? Explain its purpose and usage.
HandleUtility.placeObjectCustomPasses Description Subscribe to this event to handle object placement in the SceneView . This delegate is invoked by PlaceObject when drag and dropping objects from the Hierarchy and Project views. ```csharp using UnityEditor; using UnityEngine;static class PlaceObjectExample { s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96d491c40fa9
unity_docs
editor
What is `Search.SearchIndexer.AddExactWord` in Unity? Explain its purpose and usage.
SearchIndexer.AddExactWord Declaration public void AddExactWord (string word , int score , int documentIndex ); Parameters Parameter Description word Word to add to the index. score Relevance score of the word. documentIndex Document where the indexed word was found. Description Adds a new word comin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ee54b1aefa42
unity_docs
ui
In Unity's 'Create a custom control with two attributes', what is 'Create a UXML to see the attribute' and how does it work?
Create a UXML file with any name you want. Double-click the UXML file to open it in the UI Builder. In the Library section of the UI Builder, select Project > Custom Controls (C#) > MyElement . Drag MyElement to the Hierarchy window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9d6daaf9bfe
unity_docs
rendering
Give me an overview of the `ResourcesAPI` class in Unity.
ResourcesAPI class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Derive from this base class to provide alternative implementations to the C# behavior of specific Resources methods. The example provided logs the time taken to handle slower Resources APIs to the player or editor log. ```...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4b48b97a41c
unity_docs
xr
What is `XR.XRDisplaySubsystem.GetRenderPassCount` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.GetRenderPassCount Declaration public int GetRenderPassCount (); Returns int Count of render passes. Description The number of XRRenderPass entries for this XR Display.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5cf76baf16c2
unity_docs
scripting
Explain 'Audio Source component reference' in Unity.
View and edit the properties and settings of the audio source to change how it plays audio. To open the audio source’s settings, select a GameObject that contains an Audio Source component. To learn how to create an audio source, refer to Set up an Audio Source component . ## Audio Source component settings Use the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab6551a8126b
unity_docs
math
What are the parameters of `AI.NavMesh.GetAreaFromName` in Unity?
Returns int Index if the specified area name exists, or -1 if no area type has the specified name. Description Returns the area index for a named NavMesh area type. ```csharp // NearestPointOnWater using UnityEngine; using UnityEngine.AI;public class NearestPointOnWater : MonoBehaviour { void Update() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_22c48f0f93d7_doc_2
github
scripting
What does `Register` do in this Unity script? Explain its purpose and signature.
Register to have its update job scheduled every frameand optionally synchronize job data every frame.Job data provider If true and implements , data synchronization will be called every frame.Registering job provider objects is O(1).Registering an object more than once is a no-op. Signature: ```csharp public void ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_58b595c3ad27
unity_docs
scripting
What is `PlayerSettings.Android.keystoreName` in Unity? Explain its purpose and usage.
PlayerSettings.Android.keystoreName public static string keystoreName ; Description Contains the path to the Android keystore file. To set the keystore file path, specify an absolute path or a relative path to your Unity project's location. If you provide an absolute or a relative path to the keystore file wit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f679c5af28e8
unity_docs
scripting
What is `BuildCompression.UncompressedRuntime` in Unity? Explain its purpose and usage.
BuildCompression.UncompressedRuntime public static BuildCompression UncompressedRuntime ; Description Uncompressed Asset Bundle. Uncompressed Asset Bundles are large, but are the fastest to access once downloaded. Uncompressed bundles are 16-byte aligned. This BuildCompression is only supported for recompress...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2590a2d708df
unity_docs
ui
Show me a Unity C# example demonstrating `GUI.BringWindowToBack`.
GUI.BringWindowToBack Declaration public static void BringWindowToBack (int windowID ); Parameters Parameter Description windowID The identifier used when you created the window in the Window call. Description Bring a specific window to back of the floating windows. ```csharp // Draws 2 overlapped windo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c41dff3cee7
unity_docs
scripting
What is `GUI.PasswordField` in Unity? Explain its purpose and usage.
GUI.PasswordField Declaration public static string PasswordField ( Rect position , string password , char maskChar ); Declaration public static string PasswordField ( Rect position , string password , char maskChar , int maxLength ); Declaration public static string PasswordField ( Rect position ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_662e7cb50ee4
unity_docs
editor
Give me an overview of the `PlayerConnectionInitiateMode` class in Unity.
PlayerConnectionInitiateMode enumeration Description Describes how the player connects to the Editor. Properties Property Description None Player connection mode not set. PlayerConnectsToHost Player connection is initiated by the player connecting to the host, usually the host is the Editor. PlayerListens Pla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_822f2758cf24
unity_docs
audio
Explain 'Introduction to audio files' in Unity.
As with Meshes or Textures, the workflow for Audio File assets is designed to be smooth and simple. Unity can import almost every common file format, but there are a few details that are useful to be aware of when you work with audio files. For an extensive description of the compression formats and other options avail...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88df6bcfd90f
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.companyName`.
PlayerSettings.companyName public static string companyName ; Description The name of your company. This is used to locate the preferences file. Custom player settings. ```csharp using UnityEngine; using UnityEditor; // Simple Script that saves and loads custom // Stand-alone/Web player screen settings among...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_01d2fa3b7a52
unity_docs
rendering
Explain 'Use video sources' in Unity.
Reference your video sources in the Video Player to use video in Unity. To use video in Unity, you must reference your files in the Video Player through the Source dropdown. The Video Player can play video sources from video clips or URLs. This information covers referencing video files only. To configure the Video Pla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6b69ec87b91
unity_docs
animation
What is `Animator.GetFloat` in Unity? Explain its purpose and usage.
Animator.GetFloat Declaration public float GetFloat (string name ); Declaration public float GetFloat (int id ); Parameters Parameter Description name The parameter name. id The parameter ID. Returns float The value of the parameter. Description Returns the value of the given float parameter....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a034c7bd6ef
unity_docs
scripting
What is `IMGUI.Controls.AdvancedDropdownItem.AddChild` in Unity? Explain its purpose and usage.
AdvancedDropdownItem.AddChild Declaration public void AddChild ( IMGUI.Controls.AdvancedDropdownItem child ); Parameters Parameter Description child AdvancedDropdownItem to be added to the children list. Description Adds the given AdvancedDropdownItem child to the children list.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5970c17482b
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefs.GetString`.
preferences. defaultValue The value to return when no string is found for the given key in the player preferences. Returns string The string corresponding to the given key , defaultValue if no string is found for the given key . Description Gets the string that corresponds to key in the player prefere...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4d419c557b54
unity_docs
scripting
In Unity's 'Verify the Unity Accelerator version', what is 'Verify on a client machine' and how does it work?
From the client, access the API agent health end point by visiting the following page from a browser: http://[AcceleratorIP]:[AcceleratorPort]/api/agent-health Alternatively, examine the unity-accelerator.log file in the log folder of the Accelerators configuration directory. The sysinfo message displays the currently ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c51265872ede
unity_docs
scripting
Show me a Unity C# example demonstrating `AsyncOperation`.
ne until an asynchronous operation completes. WaitForSecondsRealtime can only be used with a yield statement in coroutines. You can yield until the AsyncOperation completes, check whether it's done with AsyncOperation.isDone , or check on its progress with AsyncOperation.progress . Additional resources: Scen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e383e7194db9
unity_docs
scripting
Show me a Unity C# example demonstrating `Debug.LogError`.
plies is highlighted in the Hierarchy window. You can click the hyperlinks in the stack trace to go directly to the relevant lines of code in your code editor. When the message is a string, rich text markup can be used to add emphasis. See the manual page about rich text for details of the different markup tags avail...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b3bc9744db1
unity_docs
scripting
Show me a Unity C# example demonstrating `CollisionDetectionMode.ContinuousDynamic`.
Mode.ContinuousDynamic Description Continuous collision detection is on for colliding with static and dynamic geometry. Prevent this Rigidbody from passing through static mesh geometry, and through other Rigidbodies which have continuous collision detection enabled, when it is moving fast. This is the slowest colli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_369e21837b0f
unity_docs
animation
What is `Animations.GameObjectRecorder.SaveToClip` in Unity? Explain its purpose and usage.
GameObjectRecorder.SaveToClip Declaration public void SaveToClip ( AnimationClip clip ); Declaration public void SaveToClip ( AnimationClip clip , float fps ); Declaration public void SaveToClip ( AnimationClip clip , float fps , Animations.CurveFilterOptions filterOptions ); Parameters Parame...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76298552668d
unity_docs
rendering
What is `MaterialEditor.IntegerProperty` in Unity? Explain its purpose and usage.
MaterialEditor.IntegerProperty Declaration public int IntegerProperty ( MaterialProperty prop , string label ); Declaration public int IntegerProperty ( Rect position , MaterialProperty prop , string label ); Parameters Parameter Description label Label for the property. Description Draw a prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c65b3ba7664b
unity_docs
performance
What is `ParticleSystemJobs.ParticleSystemJobData.aliveTimePercent` in Unity? Explain its purpose and usage.
ParticleSystemJobData.aliveTimePercent public NativeArray<float> aliveTimePercent ; Description Specifies how long each particle has been alive. The value is a value between 0 and 100, where 0 means the particle has just been born, and 100 means it is at the end of its lifetime.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b800f53c466f
unity_docs
rendering
What is `XR.XRSettings.renderViewportScale` in Unity? Explain its purpose and usage.
XRSettings.renderViewportScale public static float renderViewportScale ; Description Controls how much of the allocated eye texture should be used for rendering. Valid range is 0.0 to 1.0. This value can be changed at runtime without reallocating eye textures. Therefore it is useful for dynamically adjusting ey...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0055683fe11
unity_docs
physics
What is `CompositeCollider2D.offsetDistance` in Unity? Explain its purpose and usage.
CompositeCollider2D.offsetDistance public float offsetDistance ; Description Vertices are offset by this distance when compositing multiple physic shapes. Any vertices between shapes within this distance are combined. Do not set the distance offset to higher than 1% of the Sprite's length, as this may result in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecde2a5e7fa5
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryValidationOptions.validateFilters`.
QueryValidationOptions.validateFilters public bool validateFilters ; Description Boolean indicating if filters should be validated. Default is false. If true and skipUnknownFilters is false, unknown filters will generate errors if no default handler is provided with QueryEngine.SetDefaultFilter . ```csharp ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bcc39f2743c
unity_docs
rendering
What is `XR.XRDisplaySubsystem.LateLatchNode` in Unity? Explain its purpose and usage.
LateLatchNode enumeration Description Type of node to be late latched. Properties Property Description Head Head node type for late latching. This represents the camera node in the pose hierarchy. LeftHand Left hand node type for late latching. This represents the left hand anchor node in the pose hierarchy. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f860a9e48923
unity_docs
physics
Show me a Unity C# example demonstrating `GameObject.tag`.
d a tag can be overwritten when its `Awake` is called. If you do this, Unity generates the warning SendMessage cannot be called during Awake, CheckConsistency, or OnValidate . The example below sets the current GameObject's tag to "Player" and then implements MonoBehaviour.OnTriggerEnter to check if the Collider o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_103347a59c12_doc_6
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores the used to select when gravity is applied with continuous movement. Signature: ```csharp public Dropdown gravityApplicationModeDropdown ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_25280c5d80ef
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddShellScriptBuildPhase` in Unity?
Returns string Returns the GUID of the new phase. Description Creates a new copy shell script phase for a given target. If a shell script build phase with the same name, shellPath , and shellScript is already configured for the target, the function returns the existing phase. The new phase is placed at the end of the l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_199b8d033fd5
unity_docs
rendering
What is `LightmapParameters.isTransparent` in Unity? Explain its purpose and usage.
LightmapParameters.isTransparent public bool isTransparent ; Description If enabled, the object appears transparent during GlobalIllumination lighting calculations. Backfaces are not contributing to and light travels through the surface. This is useful for emissive invisible surfaces.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aefe6af209d4
unity_docs
rendering
What are the parameters of `GUI.Toolbar` in Unity?
Returns int The index of the selected button. Description Make a toolbar. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public int toolbarInt = 0; public string[] toolbarStrings = new string[] {"Toolbar1", "Toolbar2", "Toolbar3"}; void OnGUI() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1ba67885917
unity_docs
rendering
What is `RenderTextureCreationFlags.DynamicallyScalable` in Unity? Explain its purpose and usage.
RenderTextureCreationFlags.DynamicallyScalable Description Set this flag to mark this RenderTexture for Dynamic Resolution should the target platform/graphics API support Dynamic Resolution. This flag is mutually exclusive with RenderTextureCreationFlags.DynamicallyScalableExplicit . Refer to ScalableBufferManage...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ad40a5f7afa
unity_docs
rendering
What is `ShaderMessage` in Unity? Explain its purpose and usage.
ShaderMessage struct in UnityEditor Description Contains information about messages generated by Unity's Shader Compiler. Properties Property Description file The source file where the shader message was found. line The line of code where the shader message was found. message The message returned by the Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d8ccf0f3d6b
unity_docs
physics
What is `ContactFilter2D` in Unity? Explain its purpose and usage.
ContactFilter2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description A set of parameters for filtering contact results. Define the angle by referring to their position in world space, where 0 degrees is parallel to the positive x-axis, 90 degrees is parallel to the positive y-axis, 180...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1d4f8268566
unity_docs
rendering
What are the parameters of `AnimationClip.SetCurve` in Unity?
Description Assigns the curve to animate a specific property. If curve is null the curve will be removed. If a curve already exists for that property, it will be replaced. Note: SetCurve will only work at runtime for legacy animation clips. For non-legacy AnimationClips it is an editor-only function. The following scri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0475214607b1
unity_docs
scripting
What is `Keyframe.inWeight` in Unity? Explain its purpose and usage.
Keyframe.inWeight public float inWeight ; Description Sets the incoming weight for this key. The incoming weight affects the slope of the curve from the previous key to this key. The weight is a value between 0 and 1. Set weightedMode to WeightedMode.In or WeightedMode.Both to include weight when calculat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34e7126b0b22
unity_docs
physics
What are the parameters of `Rigidbody2D.MoveRotation` in Unity?
Description Rotates the Rigidbody to angle (given in degrees). Rotates the Rigidbody to the specified angle by calculating the appropriate angular velocity required to rotate the Rigidbody to that angle during the next physics update. During the move, angularDamping won't affect the body. This causes the object to rap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6efb05e47a6f
unity_docs
input
What is `TouchPhase.Ended` in Unity? Explain its purpose and usage.
TouchPhase.Ended Description A finger was lifted from the screen. This is the final phase of a touch. ```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 Syst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_21fb6a971c40
unity_docs
audio
In Unity's 'An overview of the concepts and Audio Mixer', what is 'Routing and Mixing' and how does it work?
http://en.wikipedia.org/wiki/Audio_mixing Audio routing is the process of taking a number of input audio signals and outputting 1 or more output signals. The term signal here refers to a continuous stream of digital audio data, which can be broken down into digital audio channels (such as stereo or 5.1 (6 channels)). I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_794422798905
unity_docs
scripting
Show me a Unity C# example demonstrating `WaitUntil.ctor`.
ion to perform when the timeout is reached. Only performed if the predicate fails to return true before the maximum time specified. timeoutMode Mode in which to measure time to determine timeout . Real time by default. Can be set to in-game time, which is scaled according to the value of Time.timeScale . Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_74f64a3e3a43
unity_docs
rendering
Show me a Unity code example for 'Low-level native plug-in interface'.
acks when certain events happen. You can use this to implement low-level rendering in your plug-in so it can work with Unity’s multithreaded rendering. ## Interface Registry To handle main Unity events, a plug-in must export UnityPluginLoad and UnityPluginUnload functions. IUnityInterfaces enables the plug-in to acce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ea1dbae7baa9_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Manages network connections (API, WebSocket, WebRTC) Signature: ```csharp public class NetworkManager : MonoBehaviour ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4758a8974ba6
unity_docs
scripting
What is `PackageManager.UI.IPackageManagerExtension.OnPackageRemoved` in Unity? Explain its purpose and usage.
IPackageManagerExtension.OnPackageRemoved Declaration public void OnPackageRemoved (PackageInfo packageInfo ); Parameters Parameter Description packageInfo The package information. Description Called by the Package Manager UI when a package is removed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fc8e1f06bd9
unity_docs
rendering
Give me an overview of the `LightmapBakeType` class in Unity.
LightmapBakeType enumeration Description Enum describing what part of a light contribution can be baked. Properties Property Description Realtime Real-time lights cast run time light and shadows. They can change position, orientation, color, brightness, and many other properties at run time. No lighting gets ba...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.