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_b9a82f8e7625
unity_docs
scripting
What is `Experimental.GraphView.GraphView.AddToSelection` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.AddToSelection Declaration public void AddToSelection ( Experimental.GraphView.ISelectable selectable ); Parameters Parameter Description selectable Element to add to selection. Description Add element to sel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1e1664522e0
unity_docs
math
What is `Tilemaps.Tilemap.GetUsedSpritesNonAlloc` in Unity? Explain its purpose and usage.
Tilemap.GetUsedSpritesNonAlloc Declaration public int GetUsedSpritesNonAlloc (Sprite[] usedSprites ); Parameters Parameter Description usedSprites The array to be filled. Returns int The number of Sprites filled. Description Fills the given array with the total number of different Sprite s used in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_177778e82b95_doc_2
github
scripting
What does `CreateWorldContextManager` do in this Unity script? Explain its purpose and signature.
The extension method returns a new allocated manager of world contextsA name of a game object that will have WorldContextsManager componentThe extension method returns a new allocated manager of world contexts Signature: ```csharp public static WorldContextsManager CreateWorldContextManager(this IWorldContext worldCon...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_07f8d8e59ff7
unity_docs
rendering
What is `PlayerSettings.SetIcons` in Unity? Explain its purpose and usage.
PlayerSettings.SetIcons Declaration public static void SetIcons ( Build.NamedBuildTarget buildTarget , Texture2D[] icons , IconKind kind ); Parameters Parameter Description buildTarget The NamedBuildTarget . Description Assigns a list of icons for the specified platform. Most platforms support view...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7750bdfdc3e7
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.Remove` in Unity? Explain its purpose and usage.
Hierarchy.Remove Declaration public bool Remove (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node to remove from the hierarchy. Returns bool true if the node was removed, false otherwise. Description Removes a node from the hierarchy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_847cde176375
unity_docs
editor
Give me an overview of the `GUIStyleState` class in Unity.
GUIStyleState class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Specialized values for the given states used by GUIStyle objects. The GUIStyle contains all values for displaying GUI elements. Properties Property Description background The background image used by GUI elements in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_929a7c46ab03
github
scripting
Write a Unity Editor script for Open XR Android Settings Build Hook
```csharp using System; using System.Collections.Generic; using System.IO; using Unity.XR.Management.AndroidManifest.Editor; using UnityEditor; using UnityEditor.Build.Reporting; using UnityEditor.XR.OpenXR.Features; using UnityEngine; using UnityEngine.XR.OpenXR; namespace OpenXR.Extensions.Editor { public class ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_06c0c68854f6
unity_docs
scripting
What is `Video.VideoPlayer.canSetSkipOnDrop` in Unity? Explain its purpose and usage.
VideoPlayer.canSetSkipOnDrop public bool canSetSkipOnDrop ; Description Whether frame-skipping to maintain synchronization can be controlled. (Read Only) When true , the value of VideoPlayer.skipOnDrop can be changed. When false , the value cannot be changed. This value is only valid after the movie has bee...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc2ed0664a98
unity_docs
input
What is `UIElements.PointerType` in Unity? Explain its purpose and usage.
PointerType class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description A static class that holds pointer type values. These values are used as the values for IPointerEvent.pointerType. Static Properties Property Description mouse The pointer type for mouse events. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1efc56deafac
unity_docs
scripting
What is `Unity.Properties.ICollectionPropertyVisitor.Visit` in Unity? Explain its purpose and usage.
ICollectionPropertyVisitor.Visit Declaration public void Visit (Property<TContainer,TCollection> property , ref TContainer container , ref TCollection collection ); Parameters Parameter Description property The property being visited. container The container being visited. collection The collection val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c90f3278cfb
unity_docs
rendering
What are the parameters of `Shader.SetGlobalVector` in Unity?
Description Sets a global vector property for all shaders. Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in Properties block). Usually this is used if you have a set of custom shaders that all use the same "global" vector (...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_42d8c27f1e8e
unity_docs
rendering
In Unity's 'Introduction to AssetBundles', what is 'Structure of an AssetBundle' and how does it work?
The AssetBundle is a container file format, similar to a zip file. It contains the following file types in a binary-format header: Serialized files : Contains serialized Unity objects. This is the same binary file format used in Player builds. The output depends on what the AssetBundle contains: Only assets: Unity crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_190f6c3776e2
unity_docs
editor
What is `EditorGUI.Foldout` in Unity? Explain its purpose and usage.
EditorGUI.Foldout Declaration public static bool Foldout ( Rect position , bool foldout , string content , GUIStyle style = EditorStyles.foldout); Declaration public static bool Foldout ( Rect position , bool foldout , string content , bool toggleOnLabelClick , GUIStyle style = EditorStyles.fold...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77e3ff8e70be
unity_docs
physics
Give me an overview of the `ContactPairPoint` class in Unity.
ContactPairPoint struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description A readonly struct describing a contact point between two Collider s. Properties Property Description impulse The impulse applied to this contact pair to resolve the collision. normal Normal of the contact point. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f4f4ffd12694
unity_docs
scripting
Explain 'Primitive collider shapes' in Unity.
Primitive colliders are defined by simple geometric shapes with a low number of polygons. They match Unity’s Primitive Objects , which are built-in GameObject shapes. Topic Description Introduction to primitive collider shapes Overview of the primitive collider shapes (Box, Sphere and Capsule) in Unity. Box collider co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7e5e2718753d
unity_docs
rendering
Explain 'Compute shaders' in Unity.
Compute shaders are shader programs that run on the GPU, outside of the normal rendering pipeline. Page Description Introduction to compute shaders Which graphics APIs support compute shaders, and what you need to understand and create them. Create a compute shader Create a compute shader asset, and use keywords. Use H...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84944b54b919
unity_docs
rendering
What are the parameters of `Mesh.GetVertexBuffer` in Unity?
Returns GraphicsBuffer The mesh vertex buffer as a GraphicsBuffer . Description Retrieves a GraphicsBuffer that provides direct acces to the GPU vertex buffer. Most of the Mesh methods work on a CPU copy of the mesh data, which Unity then uploads to the GPU. For example, SetIndexBufferData modifies CPU copy of the data...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d35cf8005de6
unity_docs
scripting
Show me a Unity C# example demonstrating `Bounds.Intersects`.
ntersects Declaration public bool Intersects ( Bounds bounds ); Description Does another bounding box intersect with this bounding box? Check if the bounding box comes into contact with another bounding box. This returns a Boolean that is set to true if there is an intersection between bounds. Two bounds are ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_681f346a5a5b
unity_docs
rendering
In Unity's 'Lighting Mode', what is 'How Unity calculates lighting' and how does it work?
The following table shows how Unity calculates lighting from Mixed lights for each Lighting Mode. Lighting from Mixed lights Baked Indirect Lighting Mode Shadowmask Lighting Mode Distance Shadowmask Lighting Mode Subtractive Lighting Mode Direct lighting Real-time Real-time Real-time Real-time for dynamic GameObjects ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9cb7c0d9729
unity_docs
rendering
In Unity's 'Add ambient occlusion in the Built-In Render Pipeline', what is 'Realtime ambient occlusion' and how does it work?
If Global Illumination is not enabled in your Scene but you still want the effect of ambient occlusion, you can use a post-processing effect to apply real-time ambient occlusion to your Scene. If Enlighten Realtime Global Illumination is enabled in your scene, the resolution for indirect lighting does not capture fine ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9506bc2fb3db_doc_1
github
scripting
What does `GetHMDForwardFlat` do in this Unity script? Explain its purpose and signature.
Returns the HMD's look direction projected flat onto the XZ plane. Signature: ```csharp static Vector3 GetHMDForwardFlat() ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_79a798fd0c6e
unity_docs
animation
Show me a Unity C# example demonstrating `AnimatorOverrideController.GetOverrides`.
ublic void GetOverrides (List<KeyValuePair<AnimationClip,AnimationClip>> overrides ); Parameters Parameter Description overrides Array to receive results. Description Gets the list of Animation Clip overrides currently defined in this Animator Override Controller. This function is allocation-free if you pre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e96d453855ec
unity_docs
xr
Explain 'Prepare your application for in-app purchases' in Unity.
In-app purchases (IAP) allow you to offer additional downloadable content in your application, such as new levels or character cosmetics. You must integrate with the StoreKit API within your application using a native code plug-in before you can set up in-app purchases. For more information, refer to StoreKit (Apple). ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b62f97d15d42
unity_docs
editor
In Unity's 'Nest prefab instances in other prefabs', what is 'Add a nested prefab from the Hierarchy' and how does it work?
You can add a prefab instance as a child of another prefab in the Hierarchy view. In the Hierarchy, select the dropdown arrow next to the prefab you want to edit. Drag a prefab from the Project window into the prefab’s hierarchy. The nested prefab is applied as an override to the parent prefab asset, indicated by a gre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_117cf135b935
unity_docs
scripting
What is `Accessibility.AccessibilitySettings.isClosedCaptioningEnabled` in Unity? Explain its purpose and usage.
AccessibilitySettings.isClosedCaptioningEnabled public static bool isClosedCaptioningEnabled ; Description Checks whether or not closed captioning is enabled in the system settings. For all the supported platforms, refer to AccessibilitySettings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee9912ca59da
unity_docs
math
Show me a Unity C# example demonstrating `Ray.ToString`.
ToString (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifies culture-specific formatting. Description Returns a formatted string for this ray. Defaults to two digits displayed (format="F2"). For more in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c9a847da338
unity_docs
rendering
What is `CameraEditor.Settings.DrawCameraWarnings` in Unity? Explain its purpose and usage.
CameraEditor.Settings.DrawCameraWarnings Declaration public static void DrawCameraWarnings ( Camera camera ); Parameters Parameter Description camera The camera from which warnings are read. Description Draws the default [[CameraEditor] warnings issued by a camera.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fd716cf0d37
unity_docs
scripting
What is `Rendering.ScriptableCullingParameters.SetLayerCullingDistance` in Unity? Explain its purpose and usage.
ScriptableCullingParameters.SetLayerCullingDistance Declaration public void SetLayerCullingDistance (int layerIndex , float distance ); Description Set the distance for the culling of a specific layer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ffe8cda44f9a
unity_docs
scripting
Give me an overview of the `WeightedMode` class in Unity.
WeightedMode enumeration Description Sets which weights to use when calculating curve segments. Additional resources: Keyframe.weightedMode , Keyframe.inWeight , Keyframe.outWeight . Properties Property Description None Exclude both inWeight or outWeight when calculating curve segments. In Include inWeight...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b18afbc04d0
unity_docs
physics
What is `MPE.ProcessService.ProcessExitedEvent` in Unity? Explain its purpose and usage.
ProcessService.ProcessExitedEvent Parameters Parameter Description value The first parameter is the process ID (PID) of the slave process that exited. The second parameter is the ProcessState of the slave process. Description An event triggered in a master instance of UnityEditor when you start a slave instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_10cc9db37457
unity_docs
scripting
Explain 'Analyzer scope and diagnostics' in Unity.
## Analyzer scope You can limit the scope of analyzers in your project by using assembly definitions, so that they only analyze certain portions of your code. Unity applies analyzers to all assemblies in your project’s Assets folder, or in any subfolder whose parent folder doesn’t contain an assembly definition file ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_694ee4642da5
unity_docs
rendering
What is `Rendering.RenderPipelineAsset.defaultParticleMaterial` in Unity? Explain its purpose and usage.
RenderPipelineAsset.defaultParticleMaterial public Material defaultParticleMaterial ; Returns Material Default material. Description Return the default particle Material for this pipeline. This is used whenever a ParticleSystem is created in the Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_226531eb2ac3
github
scripting
Write a Unity C# script called Separator
```csharp using System.Collections.Generic; using shadcnui.GUIComponents.Core.Base; using shadcnui.GUIComponents.Core.Styling; using shadcnui.GUIComponents.Core.Utils; using UnityEngine; #if IL2CPP_MELONLOADER_PRE57 using UnhollowerBaseLib; #elif IL2CPP_BEPINEX using Il2CppInterop.Runtime.InteropTypes.Arrays; #endif n...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_5e98e19cf619
unity_docs
rendering
What is `Sprites.Packer.GetAtlasDataForSprite` in Unity? Explain its purpose and usage.
Packer.GetAtlasDataForSprite Declaration public static void GetAtlasDataForSprite ( Sprite sprite , out string atlasName , out Texture2D atlasTexture ); Parameters Parameter Description sprite Sprite to query. atlasName Gets set to the name of the atlas containing the specified Sprite. atlasTexture ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_57c5fd7d8089_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Object that is rotated about its Z axis to point at the potential destination while still evaluating. Signature: ```csharp public GameObject potentialDestinationIndicator ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_9c8ae1221174
unity_docs
editor
What is `EditorUserBuildSettings.allowDebugging` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.allowDebugging public static bool allowDebugging ; Description Enable source-level debuggers to connect. You can also set this property in the Unity Editor using the Script Debugging setting on the Build Profiles window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50754c07505b
unity_docs
scripting
What is `UIElements.Translate` in Unity? Explain its purpose and usage.
Translate struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Represents a translation of the object. Percentage values in X and Y are relative to the width and height of the visual element where the style value is applied. Constructors Constructor Description Trans...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_020edd615f50
unity_docs
math
What is `XR.XRNodeState.TryGetRotation` in Unity? Explain its purpose and usage.
XRNodeState.TryGetRotation Declaration public bool TryGetRotation (out Quaternion rotation ); Returns bool True if the rotation was set in the output parameter. False if the rotation is not available due to limitations of the underlying platform or if the node is not presently tracked. Description Attem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06cb527141d1
unity_docs
scripting
What is `UIElements.SortColumnDescriptions.Index_operator` in Unity? Explain its purpose and usage.
SortColumnDescriptions.this[int] public UIElements.SortColumnDescription this[int] ; Parameters Parameter Description index The index of the SortColumnDescription to locate. Returns SortColumnDescription The SortColumnDescription at the specified index. Description Returns the SortColumnDescription...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d078a663add6
unity_docs
scripting
Show me a Unity C# example demonstrating `Input.GetButtonDown`.
he Input Manager. 2. Expand Axis by clicking the arrow next to it. This shows the list of the current buttons you have. You can use one of these as the parameter "buttonName". 3. Expand one of the items in the list to access and change aspects such as the button's name and the key, joystick or mouse movement that tri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d20254c822d0
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.colorBySpeed`.
ParticleSystem.colorBySpeed public ParticleSystem.ColorBySpeedModule colorBySpeed ; Description Script interface for the ColorByLifetimeModule of a Particle System. This module assigns colors to the particles based on the speed that they are travelling. Particle System modules do not need to be reassigned ba...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df37e42ec7d8
unity_docs
ui
What is `UIElements.CollectionViewController.BindItem` in Unity? Explain its purpose and usage.
CollectionViewController.BindItem Declaration protected void BindItem ( UIElements.VisualElement element , int index ); Parameters Parameter Description element The element from that row, created by MakeItem(). index The item index. Description Binds a row to an item index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1ac1650048b
unity_docs
scripting
Show me a Unity C# example demonstrating `FilterMode.Trilinear`.
FilterMode.Trilinear Description Trilinear filtering - texture samples are averaged and also blended between mipmap levels. For textures without mipmaps, this setting is the same as Bilinear . Additional resources: Texture.filterMode , texture assets . ```csharp //This script changes the filter mode of your Tex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21ec69834cfa
unity_docs
rendering
What is `RenderTexture.Release` in Unity? Explain its purpose and usage.
RenderTexture.Release Declaration public void Release (); Description Releases the RenderTexture. This function releases the hardware resources used by the render texture. The texture itself is not destroyed, and will be automatically created again when being used. As with other "native engine object" types, i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_32d47af6bc01
github
scripting
Write a Unity C# MonoBehaviour script called Tile View Info
```csharp using PacEngine.board.tiles; using UnityEngine; public class TileViewInfo { public TileInfo engineInfo; public Sprite sprite; public TileViewInfo(TileInfo engineInfo, Sprite sprite) { this.engineInfo = engineInfo; this.sprite = sprite; } public TileViewInfo() ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_7aa2e6853e21
unity_docs
physics
What are the parameters of `EditorApplication.updateMainWindowTitle` in Unity?
Description Register a custom callback to specify how the Unity Editor title can be generated. Unity will trigger this callback when a new scene is loaded , when Unity starts or when EditorApplication.UpdateMainWindowTitle is called. ```csharp using UnityEditor; using UnityEngine; public class WindowTitleExample { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1474d3a7b32f
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.transform`.
GameObject.transform public Transform transform ; Description The Transform attached to the GameObject (Read Only). Every GameObject has a Transform component attached to it on creation, which cannot be removed. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { gameObjec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_044dc1b89922
unity_docs
editor
Show me a Unity C# example demonstrating `Callbacks.RunAfterAssemblyAttribute.ctor`.
s a dependency graph and uses topological sorting to ensure that all dependencies are run in sequence based on their dependencies. If callbacks dependencies are not present in the project then the instruction will be ignored during the generation of the dependency graph. Note: Defining callback dependencies is current...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_25ae8895ce4d
unity_docs
xr
Explain 'Submit a license request from a command line and browser (macOS, Linux)' in Unity.
Submit a license request from the command line to manually activate your license if you’re unable to use the other activation methods . Note : The manual activation method doesn’t work with floating license subscriptions or Unity Personal. To activate a license for Unity Personal, log in to the Unity Hub. To return a P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fec643d60c38
unity_docs
scripting
What is `UIElements.BaseTreeViewController.HasChildren` in Unity? Explain its purpose and usage.
BaseTreeViewController.HasChildren Declaration public bool HasChildren (int id ); Parameters Parameter Description id The item id. Returns bool Whether the item with the specified ID has one or more child. Description Return whether the item with the specified ID has one or more child.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e51d1e492cba
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector2.ctor`.
Vector2 Constructor Declaration public Vector2 (float x , float y ); Description Constructs a new vector with given x, y components. ```csharp //This script moves a GameObject to a new x position using a Vector2. //Attach this script to a GameObject //Set your x position in the Inspectorusing UnityEngine;publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f0edabf23f7
unity_docs
rendering
What is `Rendering.OpaqueSortMode` in Unity? Explain its purpose and usage.
OpaqueSortMode enumeration Description Opaque object sorting mode of a Camera . Opaque objects are sorted by various criteria (sorting layers, shader queues, materials, distance, lightmaps etc.) to maximize both the CPU efficiency (reduce number of state changes and improve draw call batching), and to maximize GP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_217d1d98a48d
unity_docs
animation
What is `AnimatorOverrideController.Index_operator` in Unity? Explain its purpose and usage.
AnimatorOverrideController.this[string] public AnimationClip this[string] ; public AnimationClip this[AnimationClip] ; Description Returns either the overriding Animation Clip if set or the original Animation Clip named name. Note: You should avoid calling this function more than once per frame per Anim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dd77601fc3da_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
When this component is no longer the target of the poke, the returns to the original position. Signature: ```csharp public bool returnToInitialPosition ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_9c4647325a24
unity_docs
scripting
What is `TestTools.Coverage.ResetFor` in Unity? Explain its purpose and usage.
Coverage.ResetFor Declaration public static void ResetFor (MethodBase method ); Parameters Parameter Description method The method. Description Resets the coverage data for the specified method. ```csharp using UnityEngine; using UnityEngine.TestTools; using System.Reflection; using System;// A simple tes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0d57f9a0089
unity_docs
rendering
Give me an overview of the `LightingWindowEnvironmentSection` class in Unity.
LightingWindowEnvironmentSection class in UnityEditor Description Base class for the Inspector that overrides the Environment section of the Lighting window. See also SupportedOnRenderPipelineAttribute . ```csharp using UnityEditor; using UnityEngine; using UnityEngine.Rendering;[SupportedOnRenderPipeline(typeo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3e52b192b295
unity_docs
scripting
Explain 'Scoped registries' in Unity.
Use scoped registries to communicate the location of any custom package registry server to the Package Manager, so you can access several collections of packages at the same time. Organizations often use scoped registries as a mechanism to distribute custom packages within the organization. This information covers how ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_718442f13cbd
unity_docs
physics
What is `TerrainTools.DetailBrushRepresentation.Update` in Unity? Explain its purpose and usage.
DetailBrushRepresentation.Update Declaration public void Update ( Texture2D brushTex , int size , bool forceUpdate ); Parameters Parameter Description brushTex The brush mask. size The size of the brush. forceUpdate When the value is true, Unity forces the DetailBrushRepresentation to always update. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3fbd60dafddf
unity_docs
rendering
In Unity's 'Cinematic Studio feature set', what is 'Packages' and how does it work?
The Cinematic Studio feature set contains the following packages: Package Description Timeline Author and record cinematic content, gameplay sequences, audio sequences, and complex particle effects. Use Sequences and Cinemachine on top of Timeline to realize your cinematic vision. Sequences Create editorial structures ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ca1ecd8fdef
unity_docs
scripting
What is `Search.ISearchList` in Unity? Explain its purpose and usage.
ISearchList interface in UnityEditor.Search Description A search list represents a collection of search results that is filled. ```csharp public static IEnumerable<SearchItem> YieldResults() { ISearchList results = SearchService.Request("*.cs"); foreach (var result in results) yield return result; } ``` Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a54af37d16fc
unity_docs
ui
What is `UIElements.VisualElement.ElementAt` in Unity? Explain its purpose and usage.
VisualElement.ElementAt Declaration public UIElements.VisualElement ElementAt (int index ); Parameters Parameter Description index The index of the element. Description Retrieves the child element at a specific index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e4ab6c79c8c
unity_docs
physics
Show me a Unity C# example demonstrating `Physics.defaultSolverVelocityIterations`.
too much after collisions you can try to increase this value. This value is usually changed in Edit->Project Settings->Physics inspector instead of from scripts. Note: Changing the defaultSolverVelocityIterations does not affect already created Rigidbodies. To change an existing Rigidbody please use Rigidbody.solve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7b715bb6d40f
unity_docs
rendering
Explain 'Rendering Statistics window reference' in Unity.
The Game view includes a Rendering Statistics window that displays real-time rendering information about your application during Play mode. To open this window, click the Stats button in the top right corner of the Game view. Unity displays the Statistics window as an overlay in the top right of the Game view. The rend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82b4437ce387
unity_docs
rendering
What is `TextureMipmapLimitSettings.limitBias` in Unity? Explain its purpose and usage.
TextureMipmapLimitSettings.limitBias public int limitBias ; Description The new value to apply on top of the global texture mipmap limit. Can act as an offset (default) or an override to it. By default, this is equal to 0 . If limitBiasMode is set to TextureMipmapLimitBiasMode.OffsetGlobalLimit , limitBias...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_267a227b3cc7
unity_docs
editor
Explain 'Profiler Module Editor reference' in Unity.
The Profiler Module Editor is a tool you can use to add your own custom modules to the Unity Profiler window. You can also add built-in counters to modules, or use the runtime API to add your own custom counters to modules. For information on how to implement your own counters, refer to Adding profiler counters to your...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e123895a140f
unity_docs
input
What is `Input.compass` in Unity? Explain its purpose and usage.
Input.compass public static Compass compass ; Description Property for accessing compass (handheld devices only). (Read Only) Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To le...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_015222818ec2
unity_docs
rendering
In Unity's 'Gamma Textures in linear color space', what is 'Linear supported platforms' and how does it work?
Linear rendering is not supported on all platforms. The build targets that support the feature are: Windows, Mac OS X and Linux (Standalone) Android iOS Web There is no fallback to gamma when linear rendering is not supported by the device. In this situation, the Player quits. You can check the active color space from ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e406919c3e3
unity_docs
rendering
What is `SystemInfo.graphicsShaderLevel` in Unity? Explain its purpose and usage.
SystemInfo.graphicsShaderLevel public static int graphicsShaderLevel ; Description Graphics device shader capability level (Read Only). This is approximate "shader capability" level of the graphics device, expressed in DirectX shader model terms. Possible values are: 50 Shader Model 5.0 (DX11.0) 46 OpenGL 4...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f3e7a50e937
unity_docs
rendering
What is `Rendering.BatchRendererGroupStrippingMode` in Unity? Explain its purpose and usage.
BatchRendererGroupStrippingMode enumeration Description Enum of the different modes of operation for BatchRendererGroup shader variant stripping. Properties Property Description KeepIfEntitiesGraphics Keeps all BatchRendererGroup variants if the Entities Graphics package is present. StripAll Strips all BatchRe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86d0227d9809
unity_docs
scripting
Show me a Unity C# example demonstrating `Tilemaps.Tilemap.SwapTile`.
Tilemap.SwapTile Declaration public void SwapTile ( Tilemaps.TileBase changeTile , Tilemaps.TileBase newTile ); Parameters Parameter Description changeTile Tile to swap. newTile Tile to swap to. Description Swaps all existing Tile s of changeTile to newTile and refreshes all the swapped Tile s....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8648c886cc27
unity_docs
rendering
Explain 'IMGUI Basics' in Unity.
This section will explain the bare necessities for scripting Controls with Unity’s Immediate Mode GUI system (IMGUI). ## Making Controls with IMGUI Unity’s IMGUI controls make use of a special function called OnGUI() . The OnGUI() function gets called every frame as long as the containing script is enabled - just lik...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28e5e92e7f99
unity_docs
editor
What is `EditorApplication.applicationContentsPath` in Unity? Explain its purpose and usage.
EditorApplication.applicationContentsPath public static string applicationContentsPath ; Description Path to the Unity editor contents folder. (Read Only) The contents folder contains several items internally required by the editor for building players. Additional resources: applicationPath .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8f542aebd9f9_doc_4
github
scripting
What does `InstantiateSelf` do in this Unity script? Explain its purpose and signature.
Instantiate this object's associated GameObject.Must provide the Instantiate function from a Unity object (e.g. MonoBehaviour) Signature: ```csharp public GameObject InstantiateSelf(Func<GameObject, GameObject> instantiateFunc) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_add13634d039
unity_docs
rendering
What is `ParticleSystemRenderMode` in Unity? Explain its purpose and usage.
ParticleSystemRenderMode enumeration Description The rendering mode for particle systems. This is used by the ParticleSystemRenderer to determine how to render the particles. Properties Property Description Billboard Render particles as billboards facing the active camera. (Default) Stretch Stretch particle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d2ab88b7abc
unity_docs
math
What is `Bounds.ctor` in Unity? Explain its purpose and usage.
Bounds Constructor Declaration public Bounds ( Vector3 center , Vector3 size ); Parameters Parameter Description center The location of the origin of the Bounds. size The dimensions of the Bounds. Description Creates a new Bounds. Create a new Bounds with the given center and total size. Bound exten...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b46cdb442e79
unity_docs
scripting
Explain 'Check the status of a UPM package for the Asset Store' in Unity.
When you submit a UPM package to the Asset Store the package status changes from Draft to Pending Review . To check the approval status of your package: Use the unique link in your confirmation email to open the Publisher Portal. Select the All tab. Find the package you submitted for approval. Go to the Status column. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00f18d0cec2e
unity_docs
math
What is `Mathf.Min` in Unity? Explain its purpose and usage.
Mathf.Min Declaration public static float Min (float a , float b ); Declaration public static float Min (params float[] values ); Description Returns the smallest of two or more values. ```csharp using UnityEngine;public class ScriptExample : MonoBehaviour { void Start() { // Prints 0 Debug.Log(Math...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4289bcbefe0d
unity_docs
xr
What is `Application.HasUserAuthorization` in Unity? Explain its purpose and usage.
Application.HasUserAuthorization Declaration public static bool HasUserAuthorization ( UserAuthorization mode ); Description Check if the user has authorized use of the webcam or microphone on iOS and WebGL. This is used to check the result of a previous call to Application.RequestUserAuthorization . Explici...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d62d028f55f2
unity_docs
audio
In Unity's 'Validate and upload assets to your package', what is 'Validate assets' and how does it work?
The Asset Store Publishing Tools validator checks your assets to make sure they follow the Submission Guidelines . Use it to identify errors that you can fix before you submit a package for approval. To validate your assets: Open the Unity Project that contains the content you want to submit to the Asset Store. In the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_33
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive ten or more arguments as part of its initialization process,with the twelfth one being an object of type . Type of the twelfth argument. Signature: ```csharp public interface ITenthArgument<TTenthArgument> ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_d20fa0675351
unity_docs
scripting
What is `ObjectPreview.OnPreviewSettings` in Unity? Explain its purpose and usage.
ObjectPreview.OnPreviewSettings Declaration public void OnPreviewSettings (); Description Override this method if you want to show custom controls in the preview header. The default implementation is a no-op.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_278ea3ede271
unity_docs
animation
What is `Animations.AnimatorStateMachine.AddStateMachineExitTransition` in Unity? Explain its purpose and usage.
AnimatorStateMachine.AddStateMachineExitTransition Declaration public Animations.AnimatorTransition AddStateMachineExitTransition ( Animations.AnimatorStateMachine sourceStateMachine ); Parameters Parameter Description sourceStateMachine The source state machine. Description Utility function to add an o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4c4e386d178a
unity_docs
scripting
Explain 'Use Mesh API to create a radial progress indicator' in Unity.
Version : 2023.2+ This example demonstrates how to use the Mesh API to draw visual content onto a visual element . Note : The Mesh API is a tool for advanced users. In version 2022.1 and later, if you only want to generate simple geometry, use the Vector API instead. For more information, see Use Vector API to create a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7faa92a8ca91
unity_docs
editor
Explain 'Log files reference' in Unity.
Unity produces log files for the Editor, package manager, licensing, development players, and Hub. You can use these log files to understand where any problems happened in your application. Unity adds all messages, warnings, and errors from the Console window to the log files. To add your own messages to the Console wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93462fb51baf
unity_docs
scripting
What is `BeforeRenderOrderAttribute.ctor` in Unity? Explain its purpose and usage.
BeforeRenderOrderAttribute Constructor Declaration public BeforeRenderOrderAttribute (int order ); Parameters Parameter Description order The sorting order, sorted lowest to highest. Description When applied to methods, specifies the order called during Application.onBeforeRender events.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c50daa4b5b21
unity_docs
scripting
What is `GUISkin.label` in Unity? Explain its purpose and usage.
GUISkin.label public GUIStyle label ; Description Style used by default for GUI.Label controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the label style of the current GUISkin GUIStyle style; void OnGUI() { GUI.skin.label = style; GUILayout.Label("This is a l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18521d266ea4
unity_docs
physics
Give me an overview of the `ContactPoint2D` class in Unity.
ContactPoint2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Details about a specific point of contact involved in a 2D physics collision. A contact point describes a point of intersection between two Collider2D . ContactPoint2D can only exist on Collider2D that are not se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c01793eb350
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture.IncrementUpdateCount`.
Texture.IncrementUpdateCount Declaration public void IncrementUpdateCount (); Description Increment the update counter. Call this method when you update a Texture from the GPU side, or you want to explicitly increment the counter. ```csharp using UnityEngine;public class RenderSomething { RenderTexture m_RT; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c18ea7495b33
unity_docs
animation
In Unity's 'Animate a GameObject', what is 'Add keyframes in preview mode' and how does it work?
As well as using Record mode to automatically add keyframes when you modify a GameObject, you can add keyframes in Preview mode by modifying a property on the GameObject, then explicitly choosing to add a keyframe for that property. In preview mode, animated properties are tinted blue in the Inspector window. When you ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf97a29e2ac7
unity_docs
editor
Show me a Unity C# example demonstrating `SceneManagement.EditorSceneManager.OpenScene`.
ription Open a Scene in the Editor. Use this function to open Scenes in the Hierarchy while in the Editor, for example for making custom Editor scripts, tools, or menu items. Do not use it for loading Scenes at run time. To load Scenes at run time, see SceneManager.LoadScene . If the function fails for any reason (f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5804382b3bc3
unity_docs
physics
What are the parameters of `Physics.ContactEvent` in Unity?
Description Subscribe to this event to read all collisions that occurred during the physics simulation step. Each subscriber to this event gets invoked with a physics scene and a native array of ContactPairHeader s. Each ContactPairHeader contains an array of ContactPair s and each ContactPair contains an array of Cont...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8a719daf205
unity_docs
scripting
What is `Object.Instantiate` in Unity? Explain its purpose and usage.
Object.Instantiate Declaration public static Object Instantiate ( Object original ); Declaration public static Object Instantiate ( Object original , Transform parent ); Declaration public static Object Instantiate ( Object original , Transform parent , bool instantiateInWorldSpace ); Declar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_277872bb57cb
unity_docs
editor
What is `EditorWindowTitleAttribute` in Unity? Explain its purpose and usage.
EditorWindowTitleAttribute class in UnityEditor Description Use this class to set title text and icon for an Editor window. Unity displays the text in the window's title bar. If the window is dockable, Unity displays the text and icon in the window's tab. Icons must be .png files. The recommended size is 16x16 p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2c495b26d69
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.r`.
Color.r public float r ; Description Red 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 { R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d63419483a2
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.IsValidAllocator` in Unity? Explain its purpose and usage.
UnsafeUtility.IsValidAllocator Declaration public static bool IsValidAllocator ( Unity.Collections.Allocator allocator ); Description Returns true if the allocator label is valid and can be used to allocate or deallocate memory.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a79b0b855202
unity_docs
scripting
What is `ConvertToPrefabInstanceSettings.recordPropertyOverridesOfMatches` in Unity? Explain its purpose and usage.
ConvertToPrefabInstanceSettings.recordPropertyOverridesOfMatches public bool recordPropertyOverridesOfMatches ; Description When a Component or GameObject is matched with objects in the Prefab Asset then existing values can be recorded as overrides on the new Prefab instance if this property is set to true. If ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ea2a9573037f
unity_docs
editor
Show me a Unity code example for 'Use Property Drawers with IMGUI to customize the Inspector'.
members with custom Property Attributes . ## Customize the GUI of a Serializable class If you have a custom Serializable class, you can use a Property Drawer to control how it looks in the Inspector . Consider the Serializable class Ingredient in the script examples below ( Note : These are not editor scripts. Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bf7f68fe4885
github
scripting
Write a Unity C# script called Local Instantiator
```csharp using System; using UnityEngine; namespace BehaviourInject { public class LocalInstantiator : IInstantiator { private Context _containerContext; public LocalInstantiator(Context container) { _containerContext = container; } public T New<T>() { return (T) _containerContext.Autocompo...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3de9bc374230
unity_docs
rendering
Give me an overview of the `BillboardRenderer` class in Unity.
BillboardRenderer class in UnityEngine / Inherits from: Renderer / Implemented in: UnityEngine.CoreModule Description Renders a billboard from a BillboardAsset. BillboardRenderers that share the same BillboardAsset can be rendered in a batch if they are next to each other in the order of rendering. The batch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0e7d1f76519e
unity_docs
scripting
In Unity's 'Instantiate projectiles and explosions', what is 'Add an explosion script to the projectile prefab asset' and how does it work?
To add an explosion to the projectile prefab, you must have a prefab asset that represents an explosion. You can use the particle system to create a prefab asset , or find an explosion effect on the Asset Store and add it to the Assets folder of your project. Then create a script called Projectile as follows: ```csharp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.