id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_a3ac2f05cf4c
unity_docs
scripting
What is `UIElements.StartDragArgs.SetUnityObjectReferences` in Unity? Explain its purpose and usage.
StartDragArgs.SetUnityObjectReferences Declaration public void SetUnityObjectReferences (IEnumerable<Object> references ); Parameters Parameter Description references The Unity Object references. Description Sets Unity Objects associated with the current drag-and-drop operation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69d893ab6948
unity_docs
rendering
What is `LightEditor.Settings.OnEnable` in Unity? Explain its purpose and usage.
LightEditor.Settings.OnEnable Declaration public void OnEnable (); Description Populate the settings from the referenced SerializedObject . This should be called before the settings object is used.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3ddb5df8f72d
unity_docs
editor
In Unity's 'Run Unity from a command-line interface', what is 'Launching Unity from a command-line interface' and how does it work?
To launch a Unity project through a command-line interface, enter the directory path for the Unity application, followed by -projectPath and the directory path for the target project. Important: If the project’s pathname contains spaces, enclose it in quotes. For example "Unity Projects/My Game" . When launched in this...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ff2b821ea41
unity_docs
scripting
What is `Experimental.GraphView.EdgeDragHelper.Reset` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper.Reset Declaration public void Reset (bool didConnect ); Parameters Parameter Description didConnect Whether the connection was successful or not. View will not reset in this case. Description Reset the st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75da9b31ac61
unity_docs
scripting
What is `UIElements.IBindable` in Unity? Explain its purpose and usage.
IBindable interface in UnityEngine.UIElements Description Interface for all bindable fields. Properties Property Description binding Binding object that will be updated. bindingPath Path of the target property to be bound.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25e8ac623ae5
unity_docs
scripting
What are the parameters of `Android.AndroidAssetPacks.DownloadAssetPackAsync` in Unity?
Returns DownloadAssetPackAsyncOperation Returns an object that represents the download operation. If you yield this object inside a coroutine, the coroutine pauses until the operation is complete. Description Downloads Android asset packs. This method directly wraps Google's PlayCore plugin API. If the PlayCore plugin ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d384e63b591
unity_docs
scripting
What is `Mesh.MeshData.HasVertexAttribute` in Unity? Explain its purpose and usage.
Mesh.MeshData.HasVertexAttribute Declaration public bool HasVertexAttribute ( Rendering.VertexAttribute attr ); Parameters Parameter Description attr The vertex attribute to check for. Returns bool Returns true if the data attribute is present in the Mesh. Returns false if it is not. Description Ch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9661ff8a9490
unity_docs
scripting
What is `Animator.SetIKPosition` in Unity? Explain its purpose and usage.
Animator.SetIKPosition Declaration public void SetIKPosition ( AvatarIKGoal goal , Vector3 goalPosition ); Parameters Parameter Description goal The AvatarIKGoal that is set. goalPosition The position in world space. Description Sets the position of an IK goal. An IK goal is a target position and r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6de450e1b29f
unity_docs
scripting
What is `UIElements.BaseListView.reorderableItemContainerUssClassName` in Unity? Explain its purpose and usage.
BaseListView.reorderableItemContainerUssClassName public static string reorderableItemContainerUssClassName ; Description The USS class name for item container in reorderable animated ListView. Unity adds this USS class to every item container in the ListView when reorderMode is set to Animated . Any styl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6684dabb0c55
unity_docs
animation
In Unity's 'Use curves', what is 'Delete or replace a curve preset' and how does it work?
To delete a preset, in the Presets panel, right-click the preset and select Delete . To replace a preset, in the Presets panel, right-click the preset and select Replace . This action saves your current curve to the preset.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9b1367446a07
github
scripting
Write a Unity C# UI script for Button Controller
```csharp using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; namespace yaSingleton.Examples { public class ButtonController : MonoBehaviour, IPointerClickHandler { public Text welcomeLabel; public Text versionLabel; private string _versionLabelText = null; ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_9eca801d50d7
unity_docs
rendering
In Unity's 'Hierarchy window reference', what is 'Scene visibility icons' and how does it work?
The scene visibility status controls whether the GameObject is hidden or displayed in the Scene view . You can toggle visibility on and off using the status indicator at the edge of the Hierarchy window. For more information, refer to Scene visibility . The following visibility states are available. State Icon Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02f2630718ea
unity_docs
editor
What is `Device.SystemInfo.supportedRenderTargetCount` in Unity? Explain its purpose and usage.
SystemInfo.supportedRenderTargetCount public static int supportedRenderTargetCount ; Description This has the same functionality as SystemInfo.supportedRenderTargetCount and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eeb7a0843e1d
unity_docs
scripting
Show me a Unity C# example demonstrating `WindZone.windTurbulence`.
WindZone.windTurbulence public float windTurbulence ; Description The turbulence wind force. Produces a rapidly changing wind pressure. ```csharp // Creates a wind zone to produce a softly changing general wind // Just place this into an empty game object using UnityEngine;public class ExampleScript : MonoBeh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5eb906c982cf
unity_docs
rendering
What are the parameters of `Graphics.RenderMesh` in Unity?
Description Renders a mesh with given rendering parameters. RenderMesh renders a Mesh for the current frame. This Mesh is affected by Lights, can cast and receive shadows, and is affected by Projectors. This Mesh can be rendered by all Cameras or by a specific Camera. Use RenderMesh to control Mesh rendering programmat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdd00d608906
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.g`.
Color.g public float g ; Description Green component of the color. The value ranges from 0 to 1. ```csharp //Attach this script to a GameObject with a Renderer attached to it //Use the sliders in Play Mode to change the Color of the GameObject's Materialusing UnityEngine;public class Example : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85a4a66ea1be
unity_docs
rendering
What is `Rendering.GraphicsTexture` in Unity? Explain its purpose and usage.
GraphicsTexture class in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents the view on a single texture resource that is uploaded to the graphics device. A GraphicsTexture specifically represents the actual resource that a Texture object uploads to the GPU. A Texture may cr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2666f220e622
unity_docs
scripting
Show me a Unity C# example demonstrating `Pool.LinkedPool_1.ctor`.
n exception will be thrown if the instance is already in the pool. Collection checks are only performed in the Editor. maxSize The maximum size of the pool. When the pool reaches the max size then any further instances returned to the pool will be destroyed and garbage-collected. This can be used to prevent the pool ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04cee465d54d
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.GraphicsTexture.active`.
Graphics.SetRenderTarget with a single GraphicsTexture. Typically you change or query the active render target when implementing custom graphics effects; if all you need is to make a Camera render into a texture, then use Camera.targetTexture with a RenderTexture instead. Additional resources: GraphicsTextureDesc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df764c75c332
unity_docs
physics
What is `PhysicsVisualizationSettings.GetShowStaticColliders` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.GetShowStaticColliders Declaration public static bool GetShowStaticColliders (); Description Should the Colliders without a Rigidbody component be considered by the display filter. Additional resources: Collider .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_309b046ba564
unity_docs
scripting
What is `PlayerSettings.WSA.certificateSubject` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.certificateSubject public static string certificateSubject ; Description The subject for the current Universal Windows Platform certificate. This value is the same as certificateIssuer for Certificates that Unity creates. This value does not appear within the UWP Player Settings . Read-on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f6a9336cbc6
unity_docs
scripting
What is `GizmoInfo.script` in Unity? Explain its purpose and usage.
GizmoInfo.script public Object script ; Description The MonoBehaviour script asset corresponding to the component type represented by this GizmoInfo. User-defined types are accessible through the script property, but built-in types (e.g., Transform) are not. Use name to identify built-in gizmo types.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63ea5acfc031
unity_docs
scripting
What is `OcclusionPortal` in Unity? Explain its purpose and usage.
OcclusionPortal class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.CoreModule Description The portal for dynamically changing occlusion at runtime. Properties Property Description open Gets / sets the portal's open state. Inherited Members Properties Property Description game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a704fedd960b
github
scripting
Write a Unity C# script called Standalone Input
```csharp using System; using UnityEngine; namespace UnityStandardAssets.CrossPlatformInput.PlatformSpecific { public class StandaloneInput : VirtualInput { public override float GetAxis(string name, bool raw) { return raw ? Input.GetAxisRaw(name) : Input.GetAxis(name); ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_625bab46d5e4
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.Zoom`.
MouseCursor.Zoom Description Cursor with a magnifying glass for zoom. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a small window that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_95dfd8ed67ab
github
scripting
Write a Unity C# UI script for Testing Z Legacy
```csharp using UnityEngine; using System.Collections; using System; using System.Threading; using DentedPixel; public class TestingZLegacy : MonoBehaviour { public AnimationCurve customAnimationCurve; public Transform pt1; public Transform pt2; public Transform pt3; public Transform pt4; public Transform pt5; ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_31f58df0329d
unity_docs
animation
What is `Animations.AnimationPlayableOutput` in Unity? Explain its purpose and usage.
AnimationPlayableOutput struct in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Implements interfaces: IPlayableOutput Description A IPlayableOutput implementation that connects the PlayableGraph to an Animator in the Scene. NOTE: You can use PlayableOutputExtensions methods on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbb368eccc7c
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetTextMetaFilePathFromAssetPath`.
AssetDatabase.GetTextMetaFilePathFromAssetPath Declaration public static string GetTextMetaFilePathFromAssetPath (string path ); Parameters Parameter Description path Project relative path to the asset. Returns string The path to the .meta text file or an empty string if the file does not exist. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c921a8c3e903
unity_docs
xr
What are the parameters of `Caching.ClearAllCachedVersions` in Unity?
Returns bool Returns true when cache clearing succeeded. Description Removes all the cached versions of the given AssetBundle from the cache. Returns false if any cached bundle is in use. ```csharp using System.Collections; using UnityEngine.Networking; using UnityEngine;public class Example : MonoBehaviour { IEnum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e21df9c0dce
unity_docs
scripting
What is `PrefabUtility.GetNearestPrefabInstanceRoot` in Unity? Explain its purpose and usage.
PrefabUtility.GetNearestPrefabInstanceRoot Declaration public static GameObject GetNearestPrefabInstanceRoot ( Object componentOrGameObject ); Parameters Parameter Description componentOrGameObject The object to check. Must be a component or GameObject. Returns GameObject The nearest Prefab instance r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5b96ec760e07_doc_3
github
scripting
What does `StopCoroutine` do in this Unity script? Explain its purpose and signature.
Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.Name of the function in code, including coroutines. Signature: ```csharp protected void StopCoroutine(Coroutine routine) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_eaaccbc36a5f
unity_docs
math
Give me an overview of the `AndroidJNIHelper` class in Unity.
AndroidJNIHelper class in UnityEngine / Implemented in: UnityEngine.AndroidJNIModule Description Helper interface for JNI interaction; signature creation and method lookups. Note: Using raw JNI functions requires advanced knowledge of the Android Java Native Interface (JNI). Please take note. Static Propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77e2075a2a7f
unity_docs
animation
Give me an overview of the `HumanLimit` class in Unity.
HumanLimit struct in UnityEngine / Implemented in: UnityEngine.AnimationModule Description This class stores the rotation limits that define the muscle for a single human bone. Properties Property Description axisLength Length of the bone to which the limit is applied. center The default orientation of a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcf9b2e5a14e
unity_docs
editor
What is `Presets.PresetType` in Unity? Explain its purpose and usage.
PresetType struct in UnityEditor.Presets Description Stores a type to which a Preset can be applied. Only classes that inherit from UnityEngine.Object are represented by a PresetType. This structure is used instead of Type because some native C++ types in Unity are not exposed to managed C# for optimization reaso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_024df8d81102_doc_1
github
scripting
What does `CreateChild` do in this Unity script? Explain its purpose and signature.
Creates a clone of the given GameObject as a child transform.The GameObject to clone.The new GameObject Signature: ```csharp public static GameObject CreateChild(this GameObject parent, GameObject toClone) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_46291621d20c
unity_docs
xr
Show me a Unity code example for 'Set up your IIS server configuration for Web builds'.
Microsoft products. For more information on IIS and how to install and use the server, refer to the Microsoft IIS documentation . ## Configure your IIS server for compressed Web builds without decompression fallback To update your IIS server configuration file so that it works with a compressed Web build without deco...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d09b2c469c8c
github
scripting
Write a Unity C# script called Gpu Sorting
```csharp using UnityEngine; using UnityEngine.Assertions; using UnityEngine.Rendering; namespace GaussianSplatting.Runtime { // GPU (uint key, uint payload) 8 bit-LSD radix sort, using reduce-then-scan // Copyright Thomas Smith 2024, MIT license // https://github.com/b0nes164/GPUSorting public class ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_5ebe306954c1
unity_docs
animation
Give me an overview of the `HumanDescription` class in Unity.
HumanDescription struct in UnityEngine / Implemented in: UnityEngine.AnimationModule Description Class that holds humanoid avatar parameters to pass to the AvatarBuilder.BuildHumanAvatar function. Properties Property Description armStretch Amount by which the arm's length is allowed to stretch when using I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_792d1822072c
unity_docs
scripting
In Unity's 'Web Build folder', what is 'Name files as hashes' and how does it work?
If you enable Name Files As Hashes in the Player Settings , Unity uses the hash of the file content instead of the default file name. This applies to each file in the build folder. This option allows you to upload updated versions of the game builds into the same folder on the server, and only upload the files which ha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51555f620792
unity_docs
rendering
What is `Rendering.FilteringSettings.layerMask` in Unity? Explain its purpose and usage.
FilteringSettings.layerMask public int layerMask ; Description Unity renders objects whose GameObject.layer value is enabled in this bit mask. Additional resources: ScriptableRenderContext.DrawRenderers, GameObject.layer , Creating a simple render loop in a custom render pipeline .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ca35beaf18e
unity_docs
editor
What are the parameters of `AssetDatabase.CanOpenAssetInEditor` in Unity?
Returns bool Returns true if Unity can successfully open the asset in the Editor, otherwise returns false. Description Checks if Unity can open an asset in the Editor. Checks if Unity can open a given asset instance in the Editor if AssetDatabase.OpenAsset is executed. Note: The asset must be written to disk, or this f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6eeb3a780a6
unity_docs
animation
Show me a Unity C# example demonstrating `AnimatorClipInfo`.
AnimatorClipInfo struct in UnityEngine / Implemented in: UnityEngine.AnimationModule Description Information about clip being played and blended by the Animator. Additional resources: Animator.GetCurrentAnimatorClipInfo and Animator.GetNextAnimatorClipInfo . ```csharp //Create a GameObject and attach an Ani...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e916dd22aef
unity_docs
scripting
In Unity's 'Make the camera perspective oblique', what is 'Setting frustum obliqueness' and how does it work?
Although the Camera component does not have functions specifically for setting the obliqueness of the frustum, you can do it by either enabling the camera’s Physical Camera properties and applying a Lens Shift, or by adding a script to alter the camera’s projection matrix. Note: In the Built-in Render Pipeline , a Came...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9d6769e29e36
unity_docs
rendering
In Unity's 'Trails module reference', what is 'Properties' and how does it work?
For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property: Function: Mode Choose how trails are generated for the Particle System. - Particle mode creates an effect where each particle leav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95f9cb15bcac
unity_docs
xr
What is `EditorUtility.RequestScriptReload` in Unity? Explain its purpose and usage.
EditorUtility.RequestScriptReload Declaration public static void RequestScriptReload (); Description The Unity Editor reloads script assemblies asynchronously on the next frame. This resets the state of all the scripts, but Unity does not compile any code that has changed since the previous compilation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6e225df8766e
unity_docs
rendering
Explain 'Additional Search filters' in Unity.
This page reviews additional search filters that you can use to narrow down your search results. ## Combine search tokens for complex searches You can combine search tokens to create more complex queries. The queries are written on one line with one character space between tokens. The character space between each new...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a949cb14eb42
unity_docs
physics
Give me an overview of the `Collision` class in Unity.
Collision class in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Describes a collision. Collision information is passed to Collider.OnCollisionEnter , Collider.OnCollisionStay and Collider.OnCollisionExit events. Note : The contact points are in world-space. Additional resources: Con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_289b241f34c5
unity_docs
scripting
What is `CloudProjectSettings.userId` in Unity? Explain its purpose and usage.
CloudProjectSettings.userId public static string userId ; Description The user ID is derived from the user name without the domain (removing all characters starting with '@'), formatted in lowercase with no symbols.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_61e51d198967
github
scripting
Write a Unity Editor script for Bundle Packer
```csharp // /*=============================================================================== // Copyright (C) 2020 PhantomsXR Ltd. All Rights Reserved. // // This file is part of the XR-MOD SDK. // // The XR-MOD SDK cannot be copied, distributed, or made available to // third-parties for commercial purposes withou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9a30b855647b
github
scripting
Write a Unity C# XR/VR script for AR Mesh Classification
```csharp using System.Collections.Generic; using Unity.Collections; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.InputSystem; using UnityEngine.XR; using UnityEngine.XR.ARFoundation; #if UNITY_IOS && !UNITY_EDITOR using UnityEngine.XR.ARKit; #endif using UnityEngine.XR.ARSubsystems; public cla...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4315874935e3
unity_docs
scripting
What is `Actions.ContextMenuUtility.AddMenuItemsForType` in Unity? Explain its purpose and usage.
ContextMenuUtility.AddMenuItemsForType Declaration public static void AddMenuItemsForType ( UIElements.DropdownMenu menu , IEnumerable<T> targets ); Declaration public static void AddMenuItemsForType ( UIElements.DropdownMenu menu , Type type , IEnumerable<Object> targets , string submenu ); Parameter...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dce69c2975ac
unity_docs
editor
Show me a Unity C# example demonstrating `AndroidArchitecture`.
AndroidArchitecture enumeration Description Android CPU architecture. ```csharp using UnityEditor.Build; using UnityEditor; using UnityEngine;public class AndroidArchitectureExample : MonoBehaviour { [MenuItem("Build/Android Architectures Example")] public static void AndroidArchitectures() { PlayerSettings.Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a41bcb26944d
unity_docs
xr
In Unity's 'Store credentials for automatic proxy configuration (macOS)', what is 'Procedure' and how does it work?
The following procedure is based on the Apple Support article, Enter proxy server settings on Mac . Open the Apple menu () and select System Settings (or System Preferences on older versions of macOS). Select the Network category. Select a network service from the list, then click Details (or Advanced on older version...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70f0fe34b490
unity_docs
editor
What is `PrefabUtility.GetAddedGameObjects` in Unity? Explain its purpose and usage.
PrefabUtility.GetAddedGameObjects Declaration public static List<AddedGameObject> GetAddedGameObjects ( GameObject prefabInstance ); Parameters Parameter Description prefabInstance The Prefab instance to get information about. Returns List<AddedGameObject> List of objects with information about added Ga...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f2c67c407df
unity_docs
scripting
What is `ExecuteInEditMode` in Unity? Explain its purpose and usage.
ExecuteInEditMode class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Causes a MonoBehaviour-derived class to execute in Edit mode in addition to at runtime. By default, MonoBehaviour event functions only execute at runtime. Applying ExecuteInEditMode to a MonoBehaviour-derived class c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_06d020ec09fa
unity_docs
ui
Show me a Unity code example for 'Descendant selectors'.
USS descendant selectors match elements that are the descendant of another element in the visual tree . ## Syntax A descendant selector consists of multiple simple selectors separated by a space: ``` selector1 selector2 {...} ``` ## Example To demonstrate how simple selectors match elements, here is an example UI D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_efe4347e22d3
unity_docs
scripting
What is `CullingGroup.enabled` in Unity? Explain its purpose and usage.
CullingGroup.enabled public bool enabled ; Description Pauses culling group execution. No events will be sent when the culling group is disabled. No state is cleared when disabling the culling group thus when you re-enable it, it will send visibility events relative to the last frame it was active on.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e144057b6e0f
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.GetTempMemoryHandle` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.GetTempMemoryHandle Declaration public static Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle GetTempMemoryHandle (); Returns AtomicSafetyHandle The AtomicSafetyHandle for temporary memory allocations in the current scope. Description Gets an AtomicSafetyHandle for the temporary m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_295341754b0f
github
scripting
Write a Unity C# UI script for Benchmark
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using BehaviourInject; using System.Diagnostics; using Debug = UnityEngine.Debug; public class Benchmark : MonoBehaviour { [Inject] public IReader _dependency; [Inject] public IReader _de...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_ab62ade6d83e
unity_docs
physics
What are the parameters of `PhysicsScene2D.OverlapPoint` in Unity?
Returns Collider2D The collider overlapping the point. Description Checks a point against Colliders in the PhysicsScene2D, returning the first intersection only. An "OverlapPoint" is conceptually like looking at the Scene through an infinitely small hole to determine what can be seen. Any Collider2D seen can be detecte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20358c4e1d64
unity_docs
editor
What is `SceneTemplate.DependencyInfo` in Unity? Explain its purpose and usage.
DependencyInfo class in UnityEditor.SceneTemplate Description A descriptor that stores one of a template Scene's dependency Assets, and specifies whether to clone or reference it when the template is instantiated. Properties Property Description dependency A dependency Asset of the template Scene. instantiati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bad77f56d13
unity_docs
scripting
What is `FlareLayer` in Unity? Explain its purpose and usage.
FlareLayer class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.CoreModule Description FlareLayer component. The FlareLayer is a lensflare component to be used on cameras. It has no properties. Inherited Members Properties Property Description enabled Enabled Behaviours are Updated...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c20a4ddd0e44
unity_docs
rendering
Give me an overview of the `LightBakingOutput` class in Unity.
LightBakingOutput struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Struct describing the result of a Global Illumination bake for a given light. The example below demonstrates how you can check the baked status of a light and change its active state. ```csharp using UnityEngine; using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13def32477d6
unity_docs
ui
What are the parameters of `GUILayout.HorizontalSlider` in Unity?
Returns float The value that has been set by the user. Description A horizontal slider the user can drag to change a value between a min and a max. Horizontal slider in the GameView. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { float hSliderValue; void OnGUI() { hSliderVal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc1246059fd1
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightBoxShape` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightBoxShape struct in UnityEngine.Experimental.GlobalIllumination / Implemented in: UnityEngine.CoreModule Description Use this Struct to help initialize a LightDataGI structure as a box-shaped spot light. Properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a5a15bb3044b
unity_docs
networking
In Unity's 'Unity multiplayer overview', what is 'Netcode for GameObjects' and how does it work?
Netcode for GameObjects is a high-level networking library that abstracts networking logic and allows you to send GameObjects and world data across a networking session to many players at once. It’s suitable for most types of multiplayer project, but if you want to create a large or highly-optimized game then Netcode f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_28e6d4d33721
unity_docs
editor
Explain 'Push Notifications' in Unity.
com.unity.services.push-notifications ## Description This package adds support for Push Notifications to your game. It allows sending rich push notifications with images, and provides analytics on the number of received push notifications. ## Released for Unity Package version 4.0.2 is released for Unity Editor ver...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98f4cb245ae9
unity_docs
physics
What is `Physics.SphereCastAll` in Unity? Explain its purpose and usage.
Physics.SphereCastAll Declaration public static RaycastHit[] SphereCastAll ( Vector3 origin , float radius , Vector3 direction , float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac4475661729_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can be initialized using four arguments.-derived classes that implement this interface can be instantiated with arguments using the function.-derived classes that implement this interface can be added to a with arguments using the GameObject.AddComponent function.These functions can automatic...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_9ca2a46686fd
unity_docs
physics
Give me an overview of the `CapsulecastCommand` class in Unity.
CapsulecastCommand struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Use this struct to set up a capsule cast command that is performed asynchronously during a job. When you use this struct to schedule a batch of capsule casts, the capsule casts are performed asynchronously and in pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d6da826e32e
unity_docs
rendering
What is `WebCamTexture.didUpdateThisFrame` in Unity? Explain its purpose and usage.
WebCamTexture.didUpdateThisFrame public bool didUpdateThisFrame ; Description Did the video buffer update this frame? Use this to check if the video buffer has changed since the last frame. When setting a low frame rate, it is likely that the video will update slower than the game. Since it would not make sense...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_58c5affe9654
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryEngine_1.GetAllFilters`.
QueryEngine<T0>.GetAllFilters Declaration public IEnumerable<IQueryEngineFilter> GetAllFilters (); Returns IEnumerable<IQueryEngineFilter> An enumerable of IQueryEngineFilter . Description Get all filters added on this QueryEngine . This method returns all the filters that were added on the QueryEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc9b7c5e5ae0
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemMergedSamplesColumnDataAsDoubles` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemMergedSamplesColumnDataAsDoubles Declaration public void GetItemMergedSamplesColumnDataAsDoubles (int id , int column , List<double> outValues ); Parameters Parameter Description id Hierarchy item identifier. column Column identifier. outValues The merged samples for the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5babc0f3447f
unity_docs
scripting
What is `Vector3.one` in Unity? Explain its purpose and usage.
Vector3.one public static Vector3 one ; Description Shorthand for writing Vector3(1, 1, 1) . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { transform.position = Vector3.one; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4cf403e121e
unity_docs
audio
What is `AudioType.UNKNOWN` in Unity? Explain its purpose and usage.
AudioType.UNKNOWN Description The audio file you want to stream has a file format that is unknown to Unity. Use this audio type for files with an extension the other audio types don’t cover. If the audio file has a different format to the AudioType you choose, Unity might not play the audio correctly. Note : Avoid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b711a5f46c4
unity_docs
animation
In Unity's 'Animation tab', what is 'Asset-specific properties' and how does it work?
These properties apply to all animation clips and constraints defined within this Asset: Property Function Import Constraints Import constraints from this asset. Import Animation Import animation from this asset. Note: If disabled, all other options on this page are hidden and no animation is imported. Bake Animations ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5980e93a699e
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchProvider.toObject`.
SearchProvider.toObject public Func<SearchItem,Type,Object> toObject ; Description Returns any valid Unity object held by the search item. ```csharp [SearchItemProvider] internal static SearchProvider CreateProvider() { return new SearchProvider("example_tree", "Trees") { filterId = "tree:", priority = 9999...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1bb4f6b6962e
unity_docs
rendering
What is `Rendering.CommandBuffer.GenerateMips` in Unity? Explain its purpose and usage.
CommandBuffer.GenerateMips Declaration public void GenerateMips ( RenderTexture rt ); Declaration public void GenerateMips ( Rendering.RenderTargetIdentifier rt ); Parameters Parameter Description rt The render texture requiring mipmaps generation. Description Generate mipmap levels of a render text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0313ed181310
unity_docs
rendering
Show me a Unity C# example demonstrating `ComputeShader.enabledKeywords`.
taining the local shader keywords that are currently enabled for this compute shader. Shader keywords determine which shader variants Unity uses. For information on working with local shader keywords and global shader keywords and how they interact, see Using shader keywords with C# scripts . This example prints ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_076bc1dbc05e
unity_docs
math
What is `Rendering.BlendShapeBufferLayout.PerShape` in Unity? Explain its purpose and usage.
BlendShapeBufferLayout.PerShape Description Order the data by blend shape. When you call Mesh.GetBlendShapeBuffer with this option, it returns a GraphicsBuffer containing blend shape vertex data ordered by blend shape. In this buffer, each blend shape vertex comprises: An int that represents the index of the m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65e49c4189ef
unity_docs
scripting
What are the parameters of `PlayerPrefs.GetFloat` in Unity?
Returns float The float value corresponding to the given key . Returns 0,0f if no float value is found for the given key . Description Returns the float value that corresponds to key in the player preferences. Returns 0.0f if no float value is found for the given key . ```csharp //Use this script to get the PlayerPrefs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_78608dc5c5d6
unity_docs
rendering
Show me a Unity code example for 'Call JavaScript functions from Unity C# scripts'.
ed efficient communication between the two. Use the following tips on how to pass various types of data from JavaScript to Unity. ## Numeric types You can pass simple numeric types to JavaScript in function parameters without converting them. For example, this function in JavaScript: lang-js AddNumbers: function (x, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_442396051c0e
unity_docs
editor
Explain 'Documentation versions' in Unity.
We continually improve the Unity Editor and Engine in each release. A release can include new features, improvements to existing features, and the removal of old features. Unity’s documentation changes to reflect each release. In addition, each version of the documentation is dynamic and changes over time. We routinely...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80e7d6ed974f
unity_docs
rendering
What is `Rendering.ThreadedBatchContext.SetBatchBuffer` in Unity? Explain its purpose and usage.
ThreadedBatchContext.SetBatchBuffer Declaration public void SetBatchBuffer ( Rendering.BatchID batchID , GraphicsBufferHandle buffer ); Parameters Parameter Description batchID Unity changes the batch with this ID. buffer The GraphicsBufferHandle of the GraphicsBuffer to be associated with the batc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77c48e7a4325
unity_docs
math
What is `AndroidJNI.SetShortArrayElement` in Unity? Explain its purpose and usage.
AndroidJNI.SetShortArrayElement Declaration public static void SetShortArrayElement (IntPtr array , int index , short val ); Description Sets the short value of one element in a primitive array. This function is a special case of SetShortArrayRegion(), called with region size set to 1. Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e9c91c0cf25
unity_docs
rendering
Explain 'Building plug-ins for desktop platforms' in Unity.
Plug-ins for desktop platforms are libraries of native code you can write in C, C++ and Objective C. This page describes plug-ins for macOS, Windows, and Linux. For more information, refer to Native plug-ins . ## macOS plug-ins You can deploy macOS plug-ins as bundles or, if you are using the IL2CPP scripting backend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07a3b2098a5c
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector2.Index_operator`.
Vector2.this[int] public float this[int] ; Description Access the x or y component using [0] or [1] respectively. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector2 p = new Vector2(); p[1] = 5; // the same as p.y = 5 } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35d31b560493
unity_docs
performance
What is `Profiling.HierarchyFrameDataView.GetItemRawFrameDataViewIndices` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemRawFrameDataViewIndices Declaration public void GetItemRawFrameDataViewIndices (int id , List<int> outSampleIndices ); Parameters Parameter Description id Hierarchy item identifier. outSampleIndices List filled with all profiler sample indices represented by the hierarchy ite...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af17ec7533af
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingConfig.subMeshFlagsConfig` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingConfig.subMeshFlagsConfig public Rendering.RayTracingSubMeshFlagsConfig subMeshFlagsConfig ; Description The configuration that defines the RayTracingSubMeshFlags values for different types of Materials. Additional resources: RayTracingAccelerationStructure .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fca0f9a41a37
unity_docs
rendering
What is `TerrainTools.TerrainBuiltinPaintMaterialPasses` in Unity? Explain its purpose and usage.
TerrainBuiltinPaintMaterialPasses enumeration Description Built-in render passes for paint material. Properties Property Description RaiseLowerHeight Built-in render pass for raising and lowering Terrain height. StampHeight Built-in render pass for stamping heights on the Terrain. SetHeights Built-in render p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55ea6f163228
unity_docs
scripting
Show me a Unity C# example demonstrating `Projector.ignoreLayers`.
Projector.ignoreLayers public int ignoreLayers ; Description Which object layers are ignored by the projector. See layer mask . By default this is zero - i.e. no layers are ignored. Each set bit in ignoreLayers will make this layer not affected by the projector. ```csharp using UnityEngine;public class Exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0d645491cd5
unity_docs
scripting
What is `CompressionLevel` in Unity? Explain its purpose and usage.
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_c14f5b1a4f35
github
scripting
Write a Unity C# MonoBehaviour script called Wall
```csharp using UnityEngine; using System.Collections; public class Wall : MonoBehaviour { public GameObject player; private bool isSet = false; public bool isFixed = false; public void FitBetween(Vector3 A, Vector3 B) { this.transform.position = (A + B) / 2; Vector3 scale = this.transform.localScale; sc...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4d1bc1c6aa2f
unity_docs
networking
What is `Android.AndroidKeyboard` in Unity? Explain its purpose and usage.
AndroidKeyboard enumeration Description Options to indicate the type of keyboard the device is using. Additional resources: AndroidConfiguration.keyboard Properties Property Description Undefined Mirrors the Android property value KEYBOARD_UNDEFINED. NoKeys Mirrors the Android property value KEYBOARD_NOKEYS....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7dc40105650
unity_docs
scripting
What is `PlayerLoop.FixedUpdate` in Unity? Explain its purpose and usage.
FixedUpdate struct in UnityEngine.PlayerLoop / Implemented in: UnityEngine.CoreModule Description Update phase in the native player loop. This is the C# representation of an update phase in the native player loop. It can only be used to identify the update phase in native.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c74d4a9c3c4
unity_docs
scripting
What is `Rendering.RenderTargetBinding.flags` in Unity? Explain its purpose and usage.
RenderTargetBinding.flags public Rendering.RenderTargetFlags flags ; Description Optional flags. See RenderTargetFlags for available flags such as read-only depth buffer and read-only stencil buffer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_604853091273
unity_docs
scripting
What are the parameters of `ParticleSystem.CustomDataModule.SetVectorComponentCount` in Unity?
Description Specify how many curves are used to generate custom data for this stream. Additional resources: ParticleSystem.CustomDataModule.GetVectorComponentCount , MinMaxCurve , ParticleSystem.GetCustomParticleData . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1bb922c3dd7
unity_docs
rendering
What is `Rendering.BatchCullingContext.localToWorldMatrix` in Unity? Explain its purpose and usage.
BatchCullingContext.localToWorldMatrix public Matrix4x4 localToWorldMatrix ; Description Local to world matrix. The local to world matrix for this culling context. This field is present only when culling Lights.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_89107ca71085
unity_docs
math
Explain 'Bindable data types and fields' in Unity.
This section describes the data type conversions and fields supported by PropertyField . ## Data type conversions Most built-in controls in UI Toolkit implement the INotifyValueChanged interface for a specific data type. For example, DoubleField implements INotifyValueChanged<Double> , which means you can bind the Do...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f9bec144d48
unity_docs
editor
What is `EditorGUILayout.Foldout` in Unity? Explain its purpose and usage.
EditorGUILayout.Foldout Declaration public static bool Foldout (bool foldout , string content , bool toggleOnLabelClick , GUIStyle style = EditorStyles.foldout); Declaration public static bool Foldout (bool foldout , GUIContent content , bool toggleOnLabelClick , GUIStyle style = EditorStyles.fol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.