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_00a7b35ab495
unity_docs
scripting
What is `Grid.GetCellCenterWorld` in Unity? Explain its purpose and usage.
Grid.GetCellCenterWorld Declaration public Vector3 GetCellCenterWorld ( Vector3Int position ); Parameters Parameter Description position Grid cell position. Returns Vector3 Center of the cell transformed into world space coordinates. Description Get the logical center coordinate of a grid cell in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f859f1a0138c
unity_docs
scripting
Give me an overview of the `ScriptableObject` class in Unity.
ScriptableObject class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description A class you can derive from if you want to create objects that live independently of GameObjects. Use ScriptableObjects to centralise data in a way that can be conveniently accessed from scenes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3aeed44d53ba
github
scripting
Write a Unity C# UI script for Result View
```csharp using System.Threading; using Cysharp.Threading.Tasks; using UnityEngine; using UnityEngine.UI; namespace AntiMonoBehaviour.Views { public interface IResultView { void SetScore(int score); UniTask ReplayButtonClickAsync(CancellationToken cancel); UniTask ToTitleButtonClickAsy...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_0886da9a7faf
unity_docs
scripting
What is `UIElements.PointerCaptureEventBase_1` in Unity? Explain its purpose and usage.
PointerCaptureEventBase<T0> class in UnityEngine.UIElements / Inherits from: UIElements.EventBase_1 / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IPointerCaptureEvent Description Base class for pointer capture events and mouse capture events. Properties Property Description poin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bcb09e3fe7d
unity_docs
scripting
Give me an overview of the `CreateAssetMenuAttribute` class in Unity.
CreateAssetMenuAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Mark a ScriptableObject-derived type to be automatically listed in the Assets/Create submenu, so that instances of the type can be easily created and stored in the project as ".asset" files. Properties Property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91c187943ab9
unity_docs
rendering
What is `Lightmapping.BakeOnSceneLoadMode` in Unity? Explain its purpose and usage.
BakeOnSceneLoadMode enumeration Description Enum describing whether a scene should be baked on load. Additional resources: Lightmapping.bakeOnSceneLoad . Properties Property Description Never Never bake a scene on load. IfMissingLightingData When opening a scene, generate lighting data for the scene, if ther...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecdc9deff23a
unity_docs
physics
What is `Collider2D.Cast` in Unity? Explain its purpose and usage.
Collider2D.Cast Declaration public int Cast ( Vector2 direction , List<RaycastHit2D> results , float distance = Mathf.Infinity, bool ignoreSiblingColliders = true); Parameters Parameter Description direction Vector representing the direction to cast the shape. results List to receive results. distan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6822567f88e
unity_docs
rendering
What is `Device.SystemInfo.supportsCompressed3DTextures` in Unity? Explain its purpose and usage.
SystemInfo.supportsCompressed3DTextures public static bool supportsCompressed3DTextures ; Description This has the same functionality as SystemInfo.supportsCompressed3DTextures 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_73c383185c87
unity_docs
scripting
What are the parameters of `UIElements.EventInterestAttribute.ctor` in Unity?
Description Use this constructor when the affected method uses only specific event types that can easily be determined at compile time. Multiple EventInterestAttribute can be used on the same method to add more type interests. Declaration public EventInterestAttribute ( UIElements.EventInterestOptions interests ); Pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_887460eb770c
unity_docs
scripting
What is `UIElements.IFocusRing.GetNextFocusable` in Unity? Explain its purpose and usage.
IFocusRing.GetNextFocusable Declaration public UIElements.Focusable GetNextFocusable ( UIElements.Focusable currentFocusable , UIElements.FocusChangeDirection direction ); Description Get the next element in the given direction.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ebda8dfb374
unity_docs
scripting
What is `UIElements.StyleRotate` in Unity? Explain its purpose and usage.
StyleRotate struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IStyleValue<T0> Description Represents a style value that can be either a Rotate or a StyleKeyword . Properties Property Description keyword The style keyword. value The Rotate val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90c9ed589edd
unity_docs
rendering
Show me a Unity C# example demonstrating `TrailRenderer.minVertexDistance`.
TrailRenderer.minVertexDistance public float minVertexDistance ; Description Set the minimum distance the trail can travel before a new vertex is added to it. Smaller values with give smoother trails, consisting of more vertices, but costing more performance. ```csharp using UnityEngine; using System.Collecti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9fa64d558e18
unity_docs
performance
In Unity's 'Native memory allocators', what is 'Allocator usage' and how does it work?
Each allocator type has a different algorithm for fitting allocations into blocks of memory, and is therefore useful for different types of allocations. The important difference between allocations is usually persistence, or allocation lifespan, which determines where to put an allocation. For example, a long-lived (pe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e9b8d878fad
unity_docs
rendering
Show me a Unity C# example demonstrating `Graphics.DrawMesh`.
olor of each mesh), use MaterialPropertyBlock parameter. Note that this call will create some internal resources while the mesh is queued up for rendering. The allocation happens immediately and will be kept around until the end of frame (if the object was queued for all cameras) or until the specified camera renders...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd425a653999
unity_docs
scripting
Show me a Unity C# example demonstrating `Rigidbody.GetRelativePointVelocity`.
Rigidbody.GetRelativePointVelocity Declaration public Vector3 GetRelativePointVelocity ( Vector3 relativePoint ); Description The velocity relative to the rigidbody at the point relativePoint . GetRelativePointVelocity will take the angularVelocity of the rigidbody into account when calculating the veloci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f07106011af
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.SetBuildProperty` in Unity?
Description Sets a build property to the given value in all build configurations for the specified target(s). Values for names LIBRARY_SEARCH_PATHS and FRAMEWORK_SEARCH_PATHS are quoted if they contain spaces. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f97adf930c3
unity_docs
input
What is `GUI.changed` in Unity? Explain its purpose and usage.
GUI.changed public static bool changed ; Description Returns true if any controls changed the value of the input data. ```csharp // Draws a text field and when it gets modified prints a message using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public string stringToEdit = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e54d53b3f61d
unity_docs
scripting
What is `Compilation.ScriptCompilerOptions.LanguageVersion` in Unity? Explain its purpose and usage.
ScriptCompilerOptions.LanguageVersion public string LanguageVersion ; Description String representation of the language version being used to compile the current Assembly . This language version is set to the latest language version compatible with the target framework.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc082d3a3fac
unity_docs
editor
What are the parameters of `SceneManagement.SceneManager.GetSceneAt` in Unity?
Returns Scene A reference to the Scene at the index specified. Description Gets the scene at the specified index in the SceneManager's scene list. This includes scenes that are currently loading or unloading. Additional resources: SceneManager.loadedSceneCount , SceneManager.sceneCount . ```csharp using System.Text; us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_befa6464f207
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.PushDisableApiRenderers` in Unity? Explain its purpose and usage.
ScriptableRenderContext.PushDisableApiRenderers Declaration public static void PushDisableApiRenderers (); Description Prevent the immediate addition or removal of renderer scene nodes to the scene arrays. This protects against the creation of invalid indices or dangling pointers caused by changes to the scene a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_233c853c165f
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.CreateSkyboxRendererList` in Unity? Explain its purpose and usage.
ScriptableRenderContext.CreateSkyboxRendererList Declaration public Rendering.RendererList CreateSkyboxRendererList ( Camera camera ); Declaration public Rendering.RendererList CreateSkyboxRendererList ( Camera camera , Matrix4x4 projectionMatrix , Matrix4x4 viewMatrix ); Declaration public Ren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_caf42478b78e
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture2D.SetPixelData`.
re. The size of the data array must be the width × height of the mipmap level, and the data layout must match the texture format, otherwise SetPixelData fails. You can use byte for T if you don't want to define a custom struct to match the texture format. Unity throws an exception when SetPixelData fails. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fd7c2a3cf76f
unity_docs
editor
Explain 'Install dependencies' in Unity.
Install required dependencies to develop your Android application in Unity. To set up your Unity project for Android development, you need to install the required dependencies which are Android Build Support, SDK, NDK, and JDK. Unity distributes these dependencies as modules which means you must use the Unity Hub to in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_985ffc278916
unity_docs
scripting
What is `PrefabUtility.RevertRemovedComponent` in Unity? Explain its purpose and usage.
PrefabUtility.RevertRemovedComponent Declaration public static void RevertRemovedComponent ( GameObject instanceGameObject , Component assetComponent , InteractionMode action ); Parameters Parameter Description assetComponent The removed component on the Prefab instance to revert. action The interac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3117e8a43c6
unity_docs
editor
What is `Playables.PlayableGraph.Create` in Unity? Explain its purpose and usage.
PlayableGraph.Create Declaration public static Playables.PlayableGraph Create (); Declaration public static Playables.PlayableGraph Create (string name ); Parameters Parameter Description name The name of the graph. Returns PlayableGraph The newly created PlayableGraph . Description Creates ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b60fa4b95642
unity_docs
scripting
What is `SortingLayer.id` in Unity? Explain its purpose and usage.
SortingLayer.id public int id ; Description This is the unique id assigned to the layer. It is not an ordered running value and it should not be used to compare with other layers to determine the sorting order.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_390a5e68b150
unity_docs
performance
In Unity's 'Search profiler markers', what is 'Provider filters' and how does it work?
The Profiler Markers provider has additional filters in the visual query builder , using standard search query operators . Filter Search token Query example Description Average (avg) perf: avg=<value> perf: avg<512kb Searches for performance trackers with an average value smaller than 512kb . Last time perf: lastTime=<...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_865ecd13a899
unity_docs
performance
Show me a Unity code example for 'Memory in Unity Web'.
cause a temporary quadratic memory growth pressure for the garbage collector. For example, if you have a long-running loop, the following code might fail when you run it on Web because the garbage collector doesn’t run between iterations of the for loop. In this case, the garbage collector can’t free up memory that the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3119aebffdd3
github
scripting
Write a Unity C# script called Grenade
```csharp using UnityEngine; using System.Collections; [DisallowMultipleComponent] [RequireComponent(typeof(Projectile))] abstract class Grenade : Equipable { public Grenade() { _triggerTime = 0; _canStopTrigger = false; _isTriggered = false; } protected virtual void Awake() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c1784cdf745b
github
scripting
Write a Unity C# script called I Internal Update Transform Job
```csharp using UnityEngine.Jobs; namespace Gilzoide.UpdateManager.Jobs.Internal { public interface IInternalUpdateTransformJob<TData> : IJobParallelForTransform where TData : struct { UnsafeNativeList<TData> Data { set; } } public interface IInternalBurstUpdateTransformJob { }...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef4bf140a5aa
unity_docs
rendering
What is `Rendering.CommandBuffer.ClearRandomWriteTargets` in Unity? Explain its purpose and usage.
CommandBuffer.ClearRandomWriteTargets Declaration public void ClearRandomWriteTargets (); Description Unset random write targets for Shader Model 4.5 level pixel shaders. This function unsets any "random write" targets that were previously set with SetRandomWriteTarget .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5d936fa389d
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.FindFileGuidByRealPath` in Unity?
Returns string The GUID of the file if the search succeeded. Returns null if not successful. Description Finds a file with the given physical path in the project. The version without source tree argument matches paths of all known files. Use this overload with care. ```csharp using UnityEngine; using UnityEditor; using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bb96828785f
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayout.MinWidth`.
GUILayout.MinWidth Declaration public static GUILayoutOption MinWidth (float minWidth ); Description Option passed to a control to specify a minimum width. Note: This option will override the Automatic width Layout parameter Minimum allowed width for a Window. ```csharp using UnityEngine;public class Exam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_296715d42a69
unity_docs
scripting
What is `Rendering.Watermark` in Unity? Explain its purpose and usage.
Watermark class in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Provides an interface to the system that draws the Unity trial version and development build watermarks in screen space. Static Methods Method Description IsVisible Returns true if the watermark is visible on-screen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7130ad5d1d73
unity_docs
rendering
In Unity's 'Introduction to USS built-in variables', what is 'Roles' and how does it work?
Role Description default Default style settings such as text color, background, and margin. alternated_rows Elements that display tabular data with alternating row colors. For example, list items in a list view. error Elements that communicate error states to users. highlight Highlighted parts of the UI. For example, t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2bb3317941e7
unity_docs
scripting
What is `Events.UnityEvent.RemoveListener` in Unity? Explain its purpose and usage.
UnityEvent.RemoveListener Declaration public void RemoveListener ( Events.UnityAction call ); Parameters Parameter Description call Callback function. Description Remove a non persistent listener from the UnityEvent. If you have added the same listener multiple times, this method will remove all occurrenc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8690f7f531a9
unity_docs
physics
What is `PhysicsVisualizationSettings.sleepingBodyColor` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.sleepingBodyColor public static Color sleepingBodyColor ; Description Color for Rigidbodies that are controlled by the physics simulator, but are not currently being simulated. This color will be slightly dimmed. Additional resources: Rigidbody .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_436d0e65915d
unity_docs
animation
What is `Animations.AnimationHumanStream.SetLookAtEyesWeight` in Unity? Explain its purpose and usage.
AnimationHumanStream.SetLookAtEyesWeight Declaration public void SetLookAtEyesWeight (float weight ); Parameters Parameter Description weight The LookAt eyes weight. Description Sets the LookAt eyes weight. Determines how much the eyes are involved in the LookAt. Rotates the eyes transforms so the forward...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e0ba7fa8683a
unity_docs
scripting
Show me a Unity code example for 'Java and Kotlin source plug-ins'.
e Plugin Inspector . ## Example: Create and use Kotlin source plug-in The following example demonstrates how to create a Kotlin source plug-in and access its code from a C# script. This allows you to use Android-specific functionality in your Unity project. In the Assets folder of your project, create a subfolder nam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eba7d6990a27
unity_docs
ui
Show me a Unity code example for 'Install and use an existing analyzer or source generator'.
e in scope. For more information about scope, refer to Analyzer scope and diagnostics . To test that your analyzers work correctly, follow the example below. If you have installed the analyzers correctly, the ErrorProne.NET analyzer raises warnings when it analyzes the code in the example. Create a new script file name...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_888136375eae
unity_docs
physics
Show me a Unity C# example demonstrating `ArticulationBody.AddRelativeForce`.
result in only the Linear Velocity Per Second accumulator being applied. For more information on how ForceMode affects velocity, see Rigidbody.AddForce . Applying a force to an ArticulationBody wakes up that body. If the force size is zero then the ArticulationBody does not wake up. Unit of measurement - N (newtons)....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d1ae6b11536f
unity_docs
editor
Explain '2D Tilemap Extras' in Unity.
com.unity.2d.tilemap.extras ## Description 2D Tilemap Extras is a package that contains extra scripts for use with 2D Tilemap features in Unity. These include custom Tiles and Brushes for the Tilemap feature. The following are included in the package: Brushes: GameObject Brush, Group Brush, Line Brush, Random Brush T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed1f654238cd
unity_docs
rendering
What is `LightingExplorerTableColumn.CopyPropertiesDelegate` in Unity? Explain its purpose and usage.
LightingExplorerTableColumn.CopyPropertiesDelegate Declaration public delegate void CopyPropertiesDelegate ( SerializedProperty target , SerializedProperty source ); Description A delegate for copying of properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b1220273794
unity_docs
editor
What is `Build.IPostBuildPlayerScriptDLLs.OnPostBuildPlayerScriptDLLs` in Unity? Explain its purpose and usage.
IPostBuildPlayerScriptDLLs.OnPostBuildPlayerScriptDLLs Declaration public void OnPostBuildPlayerScriptDLLs ( Build.Reporting.BuildReport report ); Parameters Parameter Description report A report containing information about the build, such as its target platform and output path. Description Implement thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0108d4bb78c
unity_docs
scripting
What is `SystemLanguage` in Unity? Explain its purpose and usage.
SystemLanguage enumeration Description The language the user's operating system is running in. Returned by Application.systemLanguage. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the French language if (Application.sy...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_642f4b32e7e3
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefs.GetInt`.
); Parameters Parameter Description key The key used to retrieve the corresponding int value in the player preferences. Returns int The int value that corresponds to the given key . Returns 0 if no int value is found for the given key . Description Gets the int value that corresponds to key in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_efa8da9b2577
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorder.StartNew`.
ions ProfilerRecorder options. Returns ProfilerRecorder Returns new enabled recorder instance. Description Initialize a new instance of ProfilerRecorder and start data collection. For a list of built-in Profiler markers available, see the User Manual documentation on Common Profiler markers . Note: capaci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_37376bfbd0e3
unity_docs
scripting
Explain 'Control a camera in first person' in Unity.
Navigate through the Scene view while you look through a camera. In first-person, work through the lens of a camera to better frame your shots. You can use the Cameras overlay to select and take first-person control of a GameObject that has a Camera or Cinemachine camera component attached to it. While you control a ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_41cb708361a5
unity_docs
rendering
In Unity's 'Import a texture', what is 'Platform-specific overrides' and how does it work?
When building for different platforms, you need to think about the resolution, the file size with associated memory size requirements, the quality of your Textures, and what compression format to use for each target platform. The Platform-specific overrides panel provides one tab for the Default options, and one tab fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d1f7822fd8c7
unity_docs
physics
In Unity's 'Tilemap component reference', what is 'Properties' and how does it work?
Property Description Animation Frame Rate Set the frame rate at which tile animations play. Increasing or decreasing this value changes the frame rate of the tile animations. For example, if set to 2, tile animations play at double the base frame rate. If set to 3, tile animations play at triple the base frame rate. Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3cd3f35e6c28
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyPropertyString.SetValue` in Unity? Explain its purpose and usage.
HierarchyPropertyString.SetValue Declaration public void SetValue (ref Unity.Hierarchy.HierarchyNode node , string value ); Parameters Parameter Description node The hierarchy node. value The value to set. Description Sets the property value for a HierarchyNode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e962c5ee1f75
unity_docs
editor
What is `Device.SystemInfo.maxComputeBufferInputsVertex` in Unity? Explain its purpose and usage.
SystemInfo.maxComputeBufferInputsVertex public static int maxComputeBufferInputsVertex ; Description This has the same functionality as SystemInfo.maxComputeBufferInputsVertex 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_5a9d8df752ed
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.Dispose` in Unity? Explain its purpose and usage.
DictationRecognizer.Dispose Declaration public void Dispose (); Description Disposes the resources this dictation recognizer uses. After calling this method, the dictation recognizer will stop functioning.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbd7d3f7e86f
unity_docs
scripting
What is `MenuItem` in Unity? Explain its purpose and usage.
MenuItem class in UnityEditor Description The MenuItem attribute allows you to add menu items to the main menu and Inspector window context menus. The MenuItem attribute turns any static function into a menu command. Only static functions can use the MenuItem attribute. To create a hotkey, use the following...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e996692adad
unity_docs
scripting
What is `UIElements.TextElement.text` in Unity? Explain its purpose and usage.
TextElement.text public string text ; Description The text to be displayed. Changing this value will implicitly invoke the INotifyValueChanged_1.value setter, which will raise a ChangeEvent_1 of type string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fc99652ad15
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.ColumnHeaderGUI` in Unity? Explain its purpose and usage.
MultiColumnHeader.ColumnHeaderGUI Declaration protected void ColumnHeaderGUI ( IMGUI.Controls.MultiColumnHeaderState.Column column , Rect headerRect , int columnIndex ); Parameters Parameter Description column Column header data. headerRect Rect for column header. columnIndex Column index. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_414774a14506
unity_docs
rendering
Explain 'Example of Particle System GPU instancing with custom vertex streams in the Built-In Render Pipeline' in Unity.
The examples above only use the default vertex stream setup for particles . This includes a position, a normal, a color, and one UV. However, by using custom vertex streams , you can send other data to the shader , such as velocities, rotations and sizes. In this next example, the shader is designed to display a specia...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4d47339f37d7
unity_docs
rendering
Explain 'Load and unload assets with the Resources system' in Unity.
To load assets with the Resources system: Create a new folder called Resources in your project, and add assets to it. Unity then makes these assets available even if they’re not directly referenced in a scene . Note: You can have multiple Resources folders located in different subfolders within your Assets folder, and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc72533f8011
unity_docs
math
What is `Gizmos.DrawWireMesh` in Unity? Explain its purpose and usage.
Gizmos.DrawWireMesh Declaration public static void DrawWireMesh ( Mesh mesh , Vector3 position = Vector3.zero, Quaternion rotation = Quaternion.identity, Vector3 scale = Vector3.one); Declaration public static void DrawWireMesh ( Mesh mesh , int submeshIndex , Vector3 position = Vector3.zero...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5f8bd0cf012
unity_docs
editor
Show me a Unity C# example demonstrating `QualitySettings.GetActiveQualityLevelsForPlatformCount`.
ic static int GetActiveQualityLevelsForPlatformCount (string buildTargetGroupName ); Parameters Parameter Description buildTargetGroupName The platform to obtain the number of selected Quality Levels. Returns int The total amount of Quality Levels active for the given platform. Description [Editor Only...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7461f03e62ab
unity_docs
performance
In Unity's 'Introduction to NativeContainer', what is 'Types of NativeContainers' and how does it work?
The Unity.Collections namespace contains the following built-in NativeContainer objects: NativeArray : An unmanaged array which exposes a buffer of native memory to managed code NativeSlice : Gets a subset of a NativeArray from a particular position to a certain length. Note: The Collections package contains additional...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b58ef56b8ab
unity_docs
scripting
Give me an overview of the `Logger` class in Unity.
Logger class in UnityEngine / Implemented in: UnityEngine.CoreModule Implements interfaces: ILogger , ILogHandler Description Initializes a new instance of the Logger. Create a new instance or use default Debug.unityLogger . Additional resources: ILogger , ILogHandler . ```csharp using UnityEngine; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_304a6eac4cd5
unity_docs
input
What is `Playables.PlayableGraph.DestroySubgraph` in Unity? Explain its purpose and usage.
PlayableGraph.DestroySubgraph Declaration public void DestroySubgraph (U playable ); Parameters Parameter Description playable The Playable to destroy. Description Destroys the Playable and all its inputs, recursively.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5022bb21184
unity_docs
scripting
What is `Rendering.GraphicsSettings.TryGetRenderPipelineSettings` in Unity? Explain its purpose and usage.
GraphicsSettings.TryGetRenderPipelineSettings Declaration public static bool TryGetRenderPipelineSettings (out T settings ); Parameters Parameter Description setting The found IRenderPipelineGraphicsSettings . Null if not found. Returns bool True if the IRenderPipelineGraphicsSettings is currently ava...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6acc62225376
unity_docs
scripting
What is `UIElements.UxmlTypeAttributeDescription_1.TryGetValueFromBag` in Unity? Explain its purpose and usage.
UxmlTypeAttributeDescription<T0>.TryGetValueFromBag Declaration public bool TryGetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc , ref Type value ); Parameters Parameter Description bag The attribute bag. cc The context in which the method retrieves attribute values. va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a455005f5290
unity_docs
ui
Show me a Unity C# example demonstrating `GUISkin.verticalSlider`.
GUISkin.verticalSlider public GUIStyle verticalSlider ; Description Style used by default for the background part of GUI.VerticalSlider controls. The padding property is used to determine the size of the area the thumb can be dragged within. ```csharp using 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_f94e87f28aae
unity_docs
editor
What is `Unity.Profiling.Editor.ProfilerModuleViewController.Dispose` in Unity? Explain its purpose and usage.
ProfilerModuleViewController.Dispose(bool) Parameters Parameter Description disposing The flag to indicate whether the method call comes from a Dispose method or from a finalizer. A bool. When the value is true, the method call comes from a Dispose method. Otherwise, the method call comes from a finalizer. Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a2b090d7ec3
unity_docs
physics
What is `PhysicsMaterial2D.bounceCombine` in Unity? Explain its purpose and usage.
PhysicsMaterial2D.bounceCombine public PhysicsMaterialCombine2D bounceCombine ; Description Determines how the effective bounciness is calculated when two Collider2D come into contact. Defaults to PhysicsMaterialCombine2D.Maximum which allows either Collider2D to maximize bounciness. For example, a very...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_740916639b0d
unity_docs
physics
What is `Collision2D.otherRigidbody` in Unity? Explain its purpose and usage.
Collision2D.otherRigidbody public Rigidbody2D otherRigidbody ; Description The other Rigidbody2D involved in the collision with the rigidbody . This may be null if the Collision2D.otherCollider is not attached to a Rigidbody2D . Additional resources: Collider2D and Rigidbody2D .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fc2c7ad2afb
unity_docs
scripting
What is `iOS.Xcode.XcScheme.SetMetalValidationOnRun` in Unity? Explain its purpose and usage.
XcScheme.SetMetalValidationOnRun Declaration public void SetMetalValidationOnRun ( iOS.Xcode.XcScheme.MetalValidation validation ); Description Sets the **Metal API Validation** option in the scheme.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fef2463d0f43
unity_docs
ui
What is `GUISkin.window` in Unity? Explain its purpose and usage.
GUISkin.window public GUIStyle window ; Description Style used by default for Window controls (Additional resources: GUI.Window ). ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the window style of the current GUISkin GUIStyle style; Rect windowRect = new Rect(20, 20, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ef1aa445173
unity_docs
scripting
What is `MPE.ChannelService.GetChannelClientList` in Unity? Explain its purpose and usage.
ChannelService.GetChannelClientList Declaration public static ChannelClientInfo[] GetChannelClientList (); Returns ChannelClientInfo[] A list that contains the ChannelInfo for every channel client. Description Gets a list of all channel clients connected to the ChannelService . This method lists all conn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe93c3adf45b
unity_docs
input
What is `IMECompositionMode` in Unity? Explain its purpose and usage.
IMECompositionMode enumeration Description Controls IME input. Properties Property Description Auto Enable IME input only when a text field is selected (default). On Enable IME input. Off Disable IME input.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3763c4b1e1e0
unity_docs
animation
Explain 'Add events to animation clips' in Unity.
You can attach animation events to imported animation clips in the Animation tab . Events allow you to add additional data to an imported clip which determines when certain actions should occur in time with the animation. For example, for an animated character you might want to add events to walk and run cycles indicat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38917e150dfa
unity_docs
rendering
What is `Camera.SubmitRenderRequest` in Unity? Explain its purpose and usage.
Camera.SubmitRenderRequest Declaration public void SubmitRenderRequest (RequestData renderRequest ); Parameters Parameter Description renderRequest RequestData. Description Submit a renderRequest. Call this method via ScriptableRenderer.SubmitRenderRequest. Use ScriptableRenderer.SupportsRenderRequest to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_30a4a9b25726
unity_docs
rendering
In Unity's 'SpeedTree Model tab reference', what is 'Lighting' and how does it work?
Property Description Cast Shadows Let the model cast shadows on its environment when directly lit by a light source. Receive Shadows Let the model receive shadows from other GameObjects in the scene . Light Probes Enable Light Probes rendering for the model.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_861c6c07e352
unity_docs
editor
What is `PrefabUtility.SaveAsPrefabAssetAndConnect` in Unity? Explain its purpose and usage.
PrefabUtility.SaveAsPrefabAssetAndConnect Declaration public static GameObject SaveAsPrefabAssetAndConnect ( GameObject instanceRoot , string assetPath , InteractionMode action ); Declaration public static GameObject SaveAsPrefabAssetAndConnect ( GameObject instanceRoot , string assetPath , Interac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3f0cbc9b50c9
unity_docs
rendering
In Unity's 'Get started with 3D game development', what is 'Create the game' and how does it work?
What you focus on next depends on your role, but if you’re a sole creator, you might want to consider the following: Create an environment in your game: For a natural environment, use the Terrain system or import an environment from a third-party modeling application. For a built environment, such as buildings and room...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d39eab6c2b30
github
scripting
Write a Unity Editor script for Incoming Changes Tree Header State
```csharp using System; using System.Collections.Generic; using UnityEditor.IMGUI.Controls; using UnityEngine; using PlasticGui; using Unity.PlasticSCM.Editor.UI.Tree; namespace Unity.PlasticSCM.Editor.Views.IncomingChanges.Gluon { internal enum IncomingChangesTreeColumn { Path, LastEditedBy...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_726b1dad5387
unity_docs
scripting
What is `Networking.UnityWebRequest.Post` in Unity? Explain its purpose and usage.
UnityWebRequest.Post Declaration public static Networking.UnityWebRequest Post (string uri , string postData , string contentType ); Declaration public static Networking.UnityWebRequest Post (Uri uri , string postData , string contentType ); Parameters Parameter Description uri The target URI to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e4568b6aef4
unity_docs
rendering
In Unity's 'SubShader block in ShaderLab reference', what is 'Syntax' and how does it work?
Signature Function SubShader { <optional: LOD> <optional: tags> <optional: commands> <One or more Pass definitions> } Defines a SubShader. You can define as many Passes as you like within a SubShader.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2f0803a9bfc2
unity_docs
audio
In Unity's 'Set up your environment for Embedded Linux', what is 'SDK packages' and how does it work?
Target architecture Package aarch64 com.unity.sdk.embeddedlinux-aarch64 x86_64 com.unity.sdk.embeddedlinux-x86_64 arm32 com.unity.sdk.embeddedlinux-arm32 x86 com.unity.sdk.embeddedlinux-x86 When you install a sysroot package, ensure to install the appropriate toolchain package based on the intended target platform. For...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3e7676fbcbd
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector4.Min`.
Vector4.Min Declaration public static Vector4 Min ( Vector4 lhs , Vector4 rhs ); Description Returns a vector that is made from the smallest components of two vectors. Additional resources: Max function. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector4 a = n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13d892329ff0
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Jobs.IJobFor`.
ize of 1. IJobFor performs work stealing using atomic operations. Batch sizes can be small but they are not for free. You can use the returned JobHandle to check that the job has completed, or pass it to other jobs as a dependency. When you pass a JobHandle as a dependency, it ensures that the jobs are executed one...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29e6783170d8
unity_docs
animation
What are the parameters of `AnimationClip.SampleAnimation` in Unity?
Description Samples an animation at a given time for any animated properties. It is recommended to use the Animation interface instead for performance reasons. This will sample animation at the given time . Any component properties that are animated in the clip will be replaced with the sampled value. Most of the time ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30a589514a1e
unity_docs
scripting
Give me an overview of the `ScriptingImplementation` class in Unity.
ScriptingImplementation enumeration Description Scripting implementation (backend). Certain platforms might offer multiple scripting backends. Properties Property Description Mono2x The standard Mono 2.6 runtime. IL2CPP Unity's .NET runtime. WinRTDotNET Microsoft's .NET runtime.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_142c4ca4782a
unity_docs
scripting
Show me a Unity C# example demonstrating `Handles.RectangleHandleCap`.
a rectangle handle. Pass this into handle functions. On EventType.Layout event, calculates handle distance to mouse and calls HandleUtility.AddControl accordingly. On EventType.Repaint event, draws the handle shape. Rectangle Handle Cap in the Scene View. Add the following script to your Assets folder as Rectan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_befec939de9c
unity_docs
rendering
Show me a Unity C# example demonstrating `GUI.BeginGroup`.
,0) is the top-left corner of the group. All controls are clipped to the group. Groups can be nested - if they are, children are clipped to their parents. This is very useful when moving a bunch of GUI elements around on screen. A common use case is designing your menus to fit on a specific screen size, then centering ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2392453bb33
unity_docs
audio
What is `AudioSource.Pause` in Unity? Explain its purpose and usage.
AudioSource.Pause Declaration public void Pause (); Description Pauses playing the clip . Additional resources: Play , Stop functions. ```csharp // Allow a song to be chosen and played. If can be paused, and the song played further. // Two songs are supported.using System.Collections; using System.Collect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0705ce7981c7
unity_docs
rendering
In Unity's 'Create your first project', what is 'Install the Unity Editor' and how does it work?
Check that your computer meets the system requirements for Unity. Download and install the Unity Editor . This process includes the following tasks: Install the Unity Hub , which manages your Unity installations and projects. Create a Unity account . Your account gives you access to free assets, collaboration tools, an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a233f61bd82
unity_docs
scripting
What is `Progress.GetPriority` in Unity? Explain its purpose and usage.
Progress.GetPriority Declaration public static int GetPriority (int id ); Parameters Parameter Description id The progress indicator's unique ID. Returns int The priority. Description Gets a progress indicator's priority. Additional resources: Progress.SetPriority .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d718406c4123
unity_docs
scripting
Show me a Unity code example for 'Scripting Root Motion'.
e RootMotionController. Select the character Dude in the Hierarchy , whose inspector should already have an Animator component. Drag RootMotionController onto the Controller property of the Animator. If you press play now, you should see the “Dude” running in place. Finally, to control the motion, you will need to crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_242cd86a739f
unity_docs
rendering
What is `Shader.GetGlobalInt` in Unity? Explain its purpose and usage.
Shader.GetGlobalInt Declaration public static int GetGlobalInt (string name ); Declaration public static int GetGlobalInt (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. Description This method is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8a49ab1fe8e7
unity_docs
scripting
In Unity's 'Selector precedence', what is 'Selector specificity' and how does it work?
Selector specificity is a measure of relevance. The higher the specificity, the more relevant the selector is to the elements it matches. Name selectors are more specific than Class selectors. Class selectors are more specific than Type selectors. Type selectors are more specific than the Universal ( * ) selector. Univ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65e3248ffe77
unity_docs
ui
What is `UIElements.VisualElement.ClassListContains` in Unity? Explain its purpose and usage.
VisualElement.ClassListContains Declaration public bool ClassListContains (string cls ); Parameters Parameter Description cls The name of the class for the search query. Returns bool Returns true if the class is part of the list. Otherwise, returns false. Description Searches for a class in the clas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_805867ac3e62
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioType.WAV`.
AudioType.WAV Description The audio file you want to stream has the Microsoft WAV audio file format. Use this enumeration value to ensure the format type of the audio file has the Microsoft WAV audio file format. Use this audio type for files with the extension .wav . If the audio file has a different format, Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7b2a0b8bdb3
unity_docs
ui
What is `UIElements.ToggleButtonGroupState.Compare` in Unity? Explain its purpose and usage.
ToggleButtonGroupState.Compare Declaration public static bool Compare ( UIElements.ToggleButtonGroupState options , T value ); Parameters Parameter Description options The ToggleButtonGroupState to be compared with. value The value of a given flag enum. Returns bool True if both options sets are the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_890a4bd8e9df
unity_docs
ui
What is `Overlays.ICreateToolbar.toolbarElements` in Unity? Explain its purpose and usage.
ICreateToolbar.toolbarElements public IEnumerable<string> toolbarElements ; Description List of toolbarElements IDs to show when the Overlay is in a toolbar layout. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Overlays; using UnityEditor.Toolbars; using UnityEngine; using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f1589ae485e
unity_docs
xr
Show me a Unity C# example demonstrating `iOS.Device.RequestStoreReview`.
nce flow of your application to ask the user for a review. Don't use buttons or other controls to request feedback because the actual display of a rating request is rate-limited and the user can opt-out of receiving these prompts. Make sure the user has demonstrated an engagement with your application before asking for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ca976316a288
unity_docs
rendering
In Unity's 'Use the Project Settings window', what is 'Find settings in the Project Settings window' and how does it work?
To find a setting, enter a partial or whole keyword in the search box at the top of the Project Settings window. As you enter a keyword in the search box, the category list changes dynamically. For example, if you enter the keyword mode , the category list limits its scope to only the Project settings that match this k...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.