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_man_4d59c3095fb7
unity_docs
input
Explain 'IMGUI events' in Unity.
The IMGUI event family refers to IMGUI events that directly affect the Unity Editor, and are Editor-only events. UI Toolkit receives its events from the IMGUI events in the Editor. If there are IMGUI events that don’t fit into other event types, they fall under the IMGUI event family. Currently, IMGUI events support mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e33579cfe0a4
unity_docs
editor
What is `Profiling.ProfilerTimeSampleSelection` in Unity? Explain its purpose and usage.
ProfilerTimeSampleSelection class in UnityEditor.Profiling Description An object describing a selection made in a frame time sample based Profiler module . Use ProfilerWindow.GetFrameTimeViewSampleSelectionController to get a frame time sample based Profiler module, then use IProfilerFrameTimeViewSampleSelect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1317844178e4
unity_docs
physics
What is `SimulationStage.RunSimulation` in Unity? Explain its purpose and usage.
SimulationStage.RunSimulation Description This stage advances the scene in time. Specifically, this stage: Clears stored contact, trigger, and joint break events. Updates all vehicles forward in time. Advances the physics scene forward in time. Invokes the Physics.ContactModifyEvent . Reads and stores contact...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9186a501bea0
unity_docs
rendering
What is `Gizmos.exposure` in Unity? Explain its purpose and usage.
Gizmos.exposure public static Texture exposure ; Description Set a texture that contains the exposure correction for LightProbe gizmos. The value is sampled from the red channel in the middle of the texture.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4f5db154bea
unity_docs
scripting
What is `Component.GetComponentInChildren` in Unity? Explain its purpose and usage.
Component.GetComponentInChildren Declaration public T GetComponentInChildren (bool includeInactive = false); Parameters Parameter Description includeInactive Whether to include inactive child GameObjects in the search. Returns T A Component of the matching type T , otherwise null if no Component is f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b901a01a94d
unity_docs
scripting
What is `WebGLClientBrowserType` in Unity? Explain its purpose and usage.
WebGLClientBrowserType enumeration Description An enum containing the supported client web browsers. This enum is used within the WebGL platform to determine which browser to load the web application on. Properties Property Description Default The system's default browser will be launched for the web applicati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91214a18d050
unity_docs
rendering
What is `Mesh.GetTriangles` in Unity? Explain its purpose and usage.
Mesh.GetTriangles Declaration public int[] GetTriangles (int submesh ); Declaration public int[] GetTriangles (int submesh , bool applyBaseVertex = true); Declaration public void GetTriangles (List<int> triangles , int submesh , bool applyBaseVertex = true); Declaration public void GetTriangles ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80fca25fa1b0
unity_docs
scripting
Give me an overview of the `ModelImporterAvatarSetup` class in Unity.
ModelImporterAvatarSetup enumeration Description Set the Avatar generation mode for ModelImporter . Additional resources: ModelImporter.avatarSetup . Properties Property Description NoAvatar Disable Avatar creation for this model. CreateFromThisModel Create the Avatar from this model and save it as a sub-as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b28576c0226
unity_docs
physics
What is `ParticleSystemForceField.multiplyDragByParticleSize` in Unity? Explain its purpose and usage.
ParticleSystemForceField.multiplyDragByParticleSize public bool multiplyDragByParticleSize ; Description When using Drag, the drag strength will be multiplied by the size of the particles if this toggle is enabled. Enabling this value results in a more physically accurate drag simulation. Additional resources:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a9cd967f418
unity_docs
scripting
What is `Experimental.GraphView.ClickSelector.RegisterCallbacksOnTarget` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ClickSelector.RegisterCallbacksOnTarget Declaration protected void RegisterCallbacksOnTarget (); Description Called to register click event callbacks on the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fd0cf6e3acc
unity_docs
rendering
What is `Display.requiresBlitToBackbuffer` in Unity? Explain its purpose and usage.
Display.requiresBlitToBackbuffer public bool requiresBlitToBackbuffer ; Description True when the back buffer requires an intermediate texture to render. This property indicates whether the back buffer requires an intermediate render texture and a blit to render. For example, when you are using linear color spa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_983cb9579222_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
If true, we do not destroy the instance on scene loads. Signature: ```csharp protected static bool PersistOnSceneLoad = true; ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_10430c91e359
unity_docs
performance
In Unity's 'Bucket allocator example', what is 'Development and release build comparison' and how does it work?
Bucket allocators produce different usage reports for a development build and a release build because in a development build each allocation has an additional 40 byte header. The following diagram demonstrates the difference between development and release builds for 16 byte and 64 byte allocations: The header is the r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_389f5c6f70b3
unity_docs
performance
What is `Profiling.Profiler.SetCategoryEnabled` in Unity? Explain its purpose and usage.
Profiler.SetCategoryEnabled Declaration public static void SetCategoryEnabled ( Unity.Profiling.ProfilerCategory category , bool enabled ); Parameters Parameter Description category The category you want to enable or disable. enabled Enable or disable the collection of data for this category. Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70e133d7e65d
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchColumnProviderAttribute`.
SearchColumnProviderAttribute class in UnityEditor.Search Description The search column provider attribute is used to define new formats for a given column. Search column formats are equivalent to formats in a spreadsheet application. They define how the data in a column cell is manipulated and displayed. ```csh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b757a06274c2
unity_docs
editor
Show me a Unity C# example demonstrating `AssetImporter.importSettingsMissing`.
AssetImporter.importSettingsMissing public bool importSettingsMissing ; Description The value is true when no meta file is provided with the imported asset. ```csharp using UnityEngine; using UnityEditor;public class ImportSettingsMissingExample : MonoBehaviour { [MenuItem("Tools/ImportSettingsMissingExample")...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e4bc47a7145
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetCacheServerEnableDownload`.
AssetDatabase.GetCacheServerEnableDownload Declaration public static bool GetCacheServerEnableDownload (); Returns bool Returns true when Download from the Cache Server is enabled. Returns false otherwise. Description Gets the Cache Server Download option from Editor Settings. ```csharp using UnityEngine;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_47d1c3a3f948
unity_docs
rendering
Show me a Unity code example for 'Set the color channels the GPU renders to'.
s (RGBA). For some effects you might want to leave certain channels unmodified; for example, you can disable color rendering to render uncolored shadows. Another common use case is to disable color writes completely so that you can populate one buffer with data without writing to others; for example, you might want to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_483feb2a001b
unity_docs
rendering
What is `ReflectionProbe.backgroundColor` in Unity? Explain its purpose and usage.
ReflectionProbe.backgroundColor public Color backgroundColor ; Description The color with which the texture of reflection probe will be cleared. Only used if clearFlags are set to CameraClearFlags.SolidColor (or CameraClearFlags.Skybox but the skybox is not set up). Additional resources: Camera.clearF...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_339a2fd8219e
unity_docs
scripting
What is `UIElements.DragPerformEvent` in Unity? Explain its purpose and usage.
DragPerformEvent class in UnityEngine.UIElements / Inherits from: UIElements.DragAndDropEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description The event sent to an element when another element is dragged and dropped on the element. Inherited Members Properties Property Description bubbles...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_82881c755f74
github
scripting
Write a Unity C# MonoBehaviour script called Method Data
```csharp // // Copyright (c) Sandro Figo // using System.Collections.Generic; using System.Reflection; using UnityEngine; namespace DebugMenu { public class MethodData { public MonoBehaviour monoBehaviour = null; public readonly List<MethodInfo> methods = new List<MethodInfo>(); } } ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_4eb9c90cf08b
unity_docs
rendering
What is `TerrainTools.PaintContext.CreateRenderTargets` in Unity? Explain its purpose and usage.
PaintContext.CreateRenderTargets Declaration public void CreateRenderTargets ( RenderTextureFormat colorFormat ); Parameters Parameter Description colorFormat Render Texture format. Description Creates the sourceRenderTexture and destinationRenderTexture . The render textures are created at a resolut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b016d2f58643
github
scripting
Write a Unity C# script called Player Rigid Force
```csharp using UnityEngine; namespace ExPresSXR.Movement { /// <summary> /// Applies a impulses on the player while still allowing teleportation, climbing, other movement. The applied impulse will be reduced over time. /// </summary> public class PlayerRigidForce : PlayerForceBase { /// <s...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f4cd4e037c81
unity_docs
math
What is `TreeInstance.position` in Unity? Explain its purpose and usage.
TreeInstance.position public Vector3 position ; Description The position of the tree in the local space of the terrain. The value is a Vector3 clamped to 0-1, and describes a percentage of the terrain width, length, and height.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e47f1d622f63
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.LongestReadSubsystem` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.LongestReadSubsystem public Unity.IO.LowLevel.Unsafe.AssetLoadingSubsystem LongestReadSubsystem ; Description The Subsystem tag for the longest read included in the summary calculation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c72cf25076a4
unity_docs
physics
Explain 'Collision detection' in Unity.
Collision detection is the physics engine ’s process for detecting when a physics body (Rigidbody or ArticulationBody) comes into contact with a collider . Unity provides different collision detection algorithms for different situations, so that you can choose the most efficient approach for each individual physics bod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_da0986f5d221
unity_docs
editor
In Unity's 'Enable Unity Editor installation by standard users (Windows)', what is 'Before you begin' and how does it work?
Make sure you have write access to the C:\ProgramData\Unity\config folder. Be sure to follow these practices when editing JSON files: Use straight double quotes ("") and not curly quotes (“”). Separate key:value pairs with a comma. Check the syntax of the JSON with a validator. You can use the Get-Content and ConvertFr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_49a6b2623885
unity_docs
performance
In Unity's 'Memory in Unity Web', what is 'Unity heap' and how does it work?
Unity uses a memory heap to store all Unity engine runtime objects. These include managed and native objects, loaded Assets, Scenes , and shaders . This is like the memory that Unity Players use on any other platform. The Unity heap is a contiguous block of allocated memory. Unity supports automatic resizing for the he...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0507e279de7
unity_docs
editor
What is `SerializedProperty.prefabOverride` in Unity? Explain its purpose and usage.
SerializedProperty.prefabOverride public bool prefabOverride ; Description Allows you to check whether a property's value is overriden (i.e. different to the Prefab it belongs to). Additional resources: isInstantiatedPrefab .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55473ff60d82
unity_docs
math
What is `Quaternion.SetFromToRotation` in Unity? Explain its purpose and usage.
Quaternion.SetFromToRotation Declaration public void SetFromToRotation ( Vector3 fromDirection , Vector3 toDirection ); Description Creates a rotation which rotates from fromDirection to toDirection . Use this to create a rotation which starts at the first Vector (fromDirection) and rotates to the seco...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed7d5e816f18
unity_docs
performance
What is `Rendering.CommandBuffer.BeginSample` in Unity? Explain its purpose and usage.
CommandBuffer.BeginSample Declaration public void BeginSample (string name ); Declaration public void BeginSample ( Profiling.CustomSampler sampler ); Declaration public void BeginSample ( Unity.Profiling.ProfilerMarker marker ); Parameters Parameter Description name Name of the profile informati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6612458a7a2
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.Instantiate`.
InstantiateParameters struct, allowing to pass any combination of parameters like parent, target scene or world space positions. These methods do not create a prefab connection to the new instantiated object. Creating objects with a prefab connection can be achieved using PrefabUtility.InstantiatePrefab . Additional ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbd9a641d9da
unity_docs
performance
What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.ResetJobWorkerCount` in Unity? Explain its purpose and usage.
JobsUtility.ResetJobWorkerCount Declaration public static void ResetJobWorkerCount (); Description Reset JobWorkerCount to the Unity adjusted value. Sets JobWorkerCount to the Unity adjusted value. By default, this is JobWorkerMaximumCount. Also re-enables the Unity automatic adjustment mode for JobWorkerCount...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_20430e91cc19
unity_docs
rendering
In Unity's 'Get the current framebuffer with the GrabPass command in the Built-In Render Pipeline', what is 'Examples' and how does it work?
This example for the Built-in Render Pipeline demonstrates using GrabPass to invert the colors of the render target. Note that this is not an efficient way to achieve this effect, and is intended only to demonstrate the use of GrabPass; the same effect could be achieved more efficiently using an invert blend mode. ``` ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f364e6a08540
unity_docs
input
What is `UIElements.Experimental.PointerOutLinkTagEvent` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PointerOutLinkTagEvent class in UnityEngine.UIElements.Experimental / Inherits from: UIElements.PointerEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description This event is sent when a pointer exits a link t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c7c4a7b7dd1
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddRemotePackageReferenceAtVersionUpToNextMinor`.
ration public string AddRemotePackageReferenceAtVersionUpToNextMinor (string url , string version ); Parameters Parameter Description url The URL of the repository. version The version to use. Returns string Returns the GUID of the remote package reference. Description Adds a reference to the remote...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2899497f86ff
unity_docs
scripting
What is `MonoBehaviour.Awake` in Unity? Explain its purpose and usage.
MonoBehaviour.Awake() Description Unity calls Awake when loading an instance of a script component. Unity calls Awake on MonoBehaviour script components in the following scenarios: The GameObject the script is attached to is active in the Hierarchy ( GameObject.activeInHierarchy == true ) and initializes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_afce2c733499
unity_docs
editor
What is `Overlays.OverlayAttribute.ctor` in Unity? Explain its purpose and usage.
OverlayAttribute Constructor Declaration public OverlayAttribute (Type editorWindowType , string id , string displayName , string ussName , bool defaultDisplay ); Declaration public OverlayAttribute (Type editorWindowType , string id , string displayName , bool defaultDisplay ); Declaration public O...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35a9ee5ed109
unity_docs
editor
What are the parameters of `AssetDatabase.LoadAllAssetsAtPath` in Unity?
Returns Object[] Returns an array of all assets at assetPath . Description Obtains an array of all assets at assetPath . Some asset files might contain multiple sub assets (such as a Maya file which may contain multiple Meshes and GameObjects). All paths are relative to the project folder, for example: "Assets/MyTextur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1a143caea82
unity_docs
rendering
What is `Experimental.Lightmapping.SetCustomBakeInputs` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Lightmapping.SetCustomBakeInputs Declaration public static void SetCustomBakeInputs (Vector4[] inputData , int sampleCount ); Declaration public static void SetCustomBakeInputs (ReadOnlySpan<Vector4> inputData , int sampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33a187d4465e
unity_docs
ui
What is `CursorLockMode.Confined` in Unity? Explain its purpose and usage.
CursorLockMode.Confined Description Confine cursor to the game window. Note that confined cursor lock mode is only supported on the standalone player platform on Windows and Linux. Confined cursor lock mode is not supported on MacOS or Android. ```csharp //This script makes Buttons that control the Cursor's lock s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62a8beaf29d7
unity_docs
physics
In Unity's 'Build a player from the command line', what is 'Recommended arguments' and how does it work?
The following arguments are optional but recommended for command line builds: -batchmode : Runs Unity in batch mode without the graphical user interface. -logFile <pathname> : Saves the Editor log to a specific file for easier debugging and monitoring. -buildTarget or -activeBuildProfile : Ensures that Unity starts wit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f64b7a07218f
github
scripting
Write a Unity Editor script for Vision OS Preprocess Build
```csharp // // /*=============================================================================== // // Copyright (C) 2024 PhantomsXR Ltd. All Rights Reserved. // // // // This file is part of the Phantom.XRMOD.VisionOSModule.Editor. // // // // The VisionOSPlatform cannot be copied, distributed, or made available to /...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_dee3719d3241
unity_docs
scripting
Give me an overview of the `AndroidJavaRunnable` class in Unity.
AndroidJavaRunnable Declaration public delegate void AndroidJavaRunnable (); Description AndroidJavaRunnable is the Unity representation of a java.lang.Runnable object. Note that this is a delegate. As such, a new java.lang.reflect.Proxy object is created every time it is passed as an argument to Java. This mea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e14c4ff61ffa
unity_docs
physics
Show me a Unity C# example demonstrating `MonoBehaviour.InvokeRepeating`.
epeatRate parameters depend on Time.timeScale . For example, a Time.timeScale of 2 effectively halves the real-time values of time and repeatRate , while a Time.timeScale of 0.5 doubles them. If Time.timeScale is 0, then the method is never invoked. You can't change the value of the repeatRate interval w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_7
github
scripting
What does `SetTextureCompression` do in this Unity script? Explain its purpose and signature.
Sets the Default Texture Compression Format.See source . Signature: ```csharp public static void SetTextureCompression(BuildTargetGroup buildTargetGroup, string label) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3736d65a7f4f
unity_docs
scripting
What is `Rendering.VertexAttributeFormat.UInt8` in Unity? Explain its purpose and usage.
VertexAttributeFormat.UInt8 Description 8-bit unsigned integer. This format matches the @byte@ data type in C#, with values ranging from 0 to 255. Additional resources: Mesh class, VertexAttribute enum, Mesh.GetVertexAttributeFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_634a81b594df
unity_docs
physics
What is `Physics.queriesHitBackfaces` in Unity? Explain its purpose and usage.
Physics.queriesHitBackfaces public static bool queriesHitBackfaces ; Description Whether physics queries should hit back-face triangles. By default, all physics queries such as a raycast or a shape sweep (e.g. SphereCastAll) won't detect hits with back-face triangles.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b579ef4b3a9
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.strengthZMultiplier`.
ParticleSystem.NoiseModule.strengthZMultiplier public float strengthZMultiplier ; Description z-axis strength multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall strength multiplier. Additional resources: ParticleSystem.NoiseModule.stren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1812958a150
unity_docs
rendering
What is `ScaleMode.ScaleAndCrop` in Unity? Explain its purpose and usage.
ScaleMode.ScaleAndCrop Description Scales the texture, maintaining aspect ratio, so it completely covers the position rectangle passed to GUI.DrawTexture. If the texture is being draw to a rectangle with a different aspect ratio than the original, the image is cropped.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac4475661729_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can try to independently acquire its own dependencies and initialize itself when requested. Signature: ```csharp public interface IInitializable ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa91e9d3121b
unity_docs
rendering
What is `LightingSettings.bakedGI` in Unity? Explain its purpose and usage.
LightingSettings.bakedGI public bool bakedGI ; Description Whether to enable the Baked Global Illumination system for this Scene. When this is set to true , this Scene uses the Baked Global Illumination system. This means that you are able to generate baked lightmaps, Light Probes and Reflection Probes for th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91e89424da53
unity_docs
math
What is `BoundsInt.Contains` in Unity? Explain its purpose and usage.
BoundsInt.Contains Declaration public bool Contains ( Vector3Int position ); Parameters Parameter Description position Point to check. Returns bool Is point contained in the bounding box? Description Is point contained in the bounding box? A point is contained in the bounding box if its x, y an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05e16ba3c247
unity_docs
rendering
What is `ComputeBufferType.Structured` in Unity? Explain its purpose and usage.
ComputeBufferType.Structured Description ComputeBuffer that you can use as a structured buffer. This is otherwise identical to ComputeBufferType.Default except that if any other ComputeBufferType flags are used, the resulting ComputeBuffer will not be able to be bound as a structured buffer unless ComputeBuff...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2af927fdf2a1
unity_docs
performance
Show me a Unity C# example demonstrating `Awaitable.NextFrameAsync`.
Awaitable.NextFrameAsync Declaration public static Awaitable NextFrameAsync (CancellationToken cancellationToken ); Parameters Parameter Description cancellationToken Optional cancellation token. Description Resumes execution on the next frame. Note: This method can only be called from the main thread ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59cb80a7a83d
unity_docs
scripting
What is `Tilemaps.Tilemap.SetTiles` in Unity? Explain its purpose and usage.
Tilemap.SetTiles Declaration public void SetTiles (Vector3Int[] positionArray , TileBase[] tileArray ); Parameters Parameter Description positionArray An array of positions of Tiles on the Tilemap . tileArray An array of Tile s to be placed. Description Sets an array of Tile s at the given XYZ coordi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b22b1bd5dcac
unity_docs
editor
What are the parameters of `SceneManagement.EditorSceneManager.NewScene` in Unity?
Returns Scene A reference to the new Scene. Description Create a new Scene. The setup parameter allows you to select whether or not the default set of GameObjects should be added to the new Scene. See NewSceneSetup for more information about the options. The mode parameter allows you to select how to open the new Scene...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d60e9c55db85
unity_docs
scripting
What is `Progress.SetRemainingTime` in Unity? Explain its purpose and usage.
Progress.SetRemainingTime Declaration public static void SetRemainingTime (int id , long seconds ); Parameters Parameter Description id The progress indicator's unique ID. seconds The progress indicator's remaining time, in seconds. Description Sets the progress indicator's remaining time, in seconds. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10a832aacc07
unity_docs
math
What is `Matrix4x4.decomposeProjection` in Unity? Explain its purpose and usage.
Matrix4x4.decomposeProjection public FrustumPlanes decomposeProjection ; Description This property takes a projection matrix and returns the six plane coordinates that define a projection frustum. It works with both perspective projection matrices and orthographic projection matrices.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf821c8de088
unity_docs
rendering
What is `EditorGUILayout.ColorField` in Unity? Explain its purpose and usage.
EditorGUILayout.ColorField Declaration public static Color ColorField ( Color value , params GUILayoutOption[] options ); Declaration public static Color ColorField (string label , Color value , params GUILayoutOption[] options ); Declaration public static Color ColorField ( GUIContent label ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5998fac5457
unity_docs
rendering
What is `TextureImporterSettings.sRGBTexture` in Unity? Explain its purpose and usage.
TextureImporterSettings.sRGBTexture public bool sRGBTexture ; Description Whether this texture stores data in sRGB (also called gamma) color space. This setting is only relevant when your project uses Linear color space . It determines whether the GPU converts data from sRGB color space to linear color space w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c665827bacee
unity_docs
animation
In Unity's 'Platform and mesh considerations', what is 'Avoid mesh tessellation' and how does it work?
It’s computationally expensive to build mesh tessellation for visual elements . Any time the size (width/height) of the element changes, its geometry re-builds, which can be an issue with animations or frequent resizing. Generally speaking, transforms and texture aren’t good choices in terms of flexibility and re-use.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e2c16893b71
unity_docs
math
What is `Quaternion.normalized` in Unity? Explain its purpose and usage.
Quaternion.normalized public Quaternion normalized ; Description Returns this quaternion with a magnitude of 1 (Read Only). When normalized, a quaternion keeps the same orientation but its magnitude is 1.0. Note that the current quaternion is unchanged and a new normalized quaternion is returned. If you want...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e8124406914
unity_docs
math
What is `HandleUtility.ClosestPointToArc` in Unity? Explain its purpose and usage.
HandleUtility.ClosestPointToArc Declaration public static Vector3 ClosestPointToArc ( Vector3 center , Vector3 normal , Vector3 from , float angle , float radius ); Description Get the point on an arc (in 3D space) which is closest to the current mouse position. This function takes the arc defined b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3224adad7131
unity_docs
rendering
What is `ShaderUtil.GetPropertyType` in Unity? Explain its purpose and usage.
ShaderUtil.GetPropertyType Declaration public static ShaderUtil.ShaderPropertyType GetPropertyType ( Shader s , int propertyIdx ); Parameters Parameter Description s The shader to check against. propertyIdx The property index to use. Description Get the ShaderProperyType of the shader propery at inde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b22cf39787f5
unity_docs
input
In Unity's 'Unity Library Manifest', what is 'Settings' and how does it work?
A Unity Library Manifest declares: The Unity activity . The theme that the Unity activity uses. The application’s category (App Category) Permissions. VR modes. VR performance. Whether to allow the user to resize the application window. This is useful for VR. The maximum aspect ratio . How to react to configuration cha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09a993724d69
unity_docs
rendering
What is `Texture.streamingTexturePendingLoadCount` in Unity? Explain its purpose and usage.
Texture.streamingTexturePendingLoadCount public static ulong streamingTexturePendingLoadCount ; Description Number of streaming Textures with outstanding mipmaps to be loaded. When adding a new camera it can take a few frames to detect which new Textures need to be loaded. Therefore this value can't be relied u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e880d523e70e
unity_docs
rendering
What is `Rendering.ShadowCastingMode.On` in Unity? Explain its purpose and usage.
ShadowCastingMode.On Description Shadows are cast from this object. Shadow rendering will use the same culling mode as specified in the object's shader. Typically this means that single-sided objects (like a Plane or a Quad) do not cast shadows if the light is behind them. Use ShadowCastingMode.TwoSided to treat ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87665d29bf10
unity_docs
scripting
Show me a Unity C# example demonstrating `Component.GetComponents`.
eObject (or any component attached to that GameObject). You can then call GetComponents on that reference. See the Component and GameObject class reference pages for the other variations of the GetComponent family of methods. The following example gets a reference to all hinge joint components on the specified...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f5224d666d79
unity_docs
rendering
Explain 'Introduction to prefabs' in Unity.
You can use prefabs to reuse GameObject configurations in multiple places in a scene or across different scenes in your project. The prefab system keeps all copies of a GameObject in sync, so when you make changes to a prefab asset, Unity updates all instances of that prefab automatically. This allows you to update mul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3206d70edd10
unity_docs
scripting
What is `UIElements.Experimental.StyleValues.flexGrow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StyleValues.flexGrow public float flexGrow ; Description Specifies how much the item will grow relative to the rest of the flexible items inside the same container.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca539317ba95
unity_docs
xr
What is `ComputeBuffer.GetData` in Unity? Explain its purpose and usage.
ComputeBuffer.GetData Declaration public void GetData (Array data ); Parameters Parameter Description data An array to receive the data. Description Read data values from the buffer into an array. The array can only use blittable types. The retrieved data will follow the data layout rules of the graphic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aae027469298
unity_docs
ui
What is `UIElements.BaseSlider_1.inverted` in Unity? Explain its purpose and usage.
BaseSlider<T0>.inverted public bool inverted ; Description This indicates whether or not this slider is inverted. For an inverted horizontal slider, high value is located to the left, low value is located to the right For an inverted vertical slider, high value is located to the bottom, low value is located t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46fc896e0175
unity_docs
editor
What is `AssetDatabase.GetImporterType` in Unity? Explain its purpose and usage.
AssetDatabase.GetImporterType Declaration public static Type GetImporterType (GUID guid ); Parameters Parameter Description guid GUID of the asset to get the importer type from. Returns Type Returns the type of the importer associated with the given asset. Description Returns the type of importer ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82713d7c6a22
unity_docs
rendering
Show me a Unity C# example demonstrating `Camera.CopyFrom`.
ill copy all camera's variables (field of view, clear flags, culling mask, ...) from the other camera. It will also set this camera's transform to match the other camera, as well as this camera's layer to match the layer of the other camera. This can be useful if you want one camera to match the other camera's setup, w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cadb338458f9
unity_docs
scripting
Show me a Unity C# example demonstrating `Gizmos.DrawCube`.
Gizmos.DrawCube Declaration public static void DrawCube ( Vector3 center , Vector3 size ); Description Draw a solid box at center with size . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void OnDrawGizmosSelected() { // Draw a semitransparent red c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35bbc5f5afe5
unity_docs
xr
What is `Networking.UnityWebRequest.GetResponseHeaders` in Unity? Explain its purpose and usage.
UnityWebRequest.GetResponseHeaders Declaration public Dictionary<string,string> GetResponseHeaders (); Returns Dictionary<string,string> A dictionary containing all the response headers received in the latest HTTP response. If no responses have been received, returns null . Description Retrieves a diction...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3da342cbb3e6
unity_docs
rendering
Give me an overview of the `Cursor` class in Unity.
Cursor class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Cursor API for setting the cursor (mouse pointer). Supports hardware cursors on macOS, Windows and Linux. Falls back to software cursors on unsupported platforms. Windows Store Apps : Supports only one hardware cursor, set via Pla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f50d33fba68b
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchExpression`.
nguage to express complex queries that cross-reference multiple providers, for example, to search for all objects in a scene that use a shader that doesn’t compile. Search expressions can be chained together to transform or perform set manipulations on Search Items. The manual contains example on How to use Search Exp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c3ee33450f54
unity_docs
rendering
Show me a Unity code example for 'Single-pass instanced rendering and custom shaders'.
be updated. For more information about supporting instanced rendering in your shaders, see GPU Instancing . The information in this section specifically talks about stereo rendering and might not include all changes you need to make to support instanced rendering in general. ## Update the vertex input attributes struc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e49fbc18a951
unity_docs
ui
In Unity's 'Create a custom control with two attributes', what is 'Create the example' and how does it work?
To create a new custom control class in C#, inherit it from the VisualElement class. This allows you to create and use this element in C#, but won’t automatically expose it in UXML and UI Builder. To expose it, add the UxmlElement attribute. To expose the attributes, add the UxmlAttribute attribute to each property tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32e2a86a4503
unity_docs
scripting
What is `UIElements.ScrollViewMode.Vertical` in Unity? Explain its purpose and usage.
ScrollViewMode.Vertical Description Configure ScrollView for vertical scrolling. Requires elements with the height property explicitly defined. A ScrollView configured with this mode has the ScrollView.verticalVariantUssClassName class in its class list.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d1e0dc6c8ad
unity_docs
scripting
What is `Experimental.GraphView.StackNode.CollectElements` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StackNode.CollectElements Declaration public void CollectElements (HashSet<GraphElement> collectedElementSet , Func<GraphElement,bool> conditionFunc ); Parameters Parameter Description collectedElementSet The set of matc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_817699143baf
unity_docs
ui
What is `UIElements.ToggleButtonGroupState.CompareTo` in Unity? Explain its purpose and usage.
ToggleButtonGroupState.CompareTo Declaration public int CompareTo ( UIElements.ToggleButtonGroupState other ); Parameters Parameter Description other The option set to be compared against. Returns int True if both option sets are the same, otherwise returns false. Description Compares two ToggleBut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff7f92547822
unity_docs
editor
What is `VersionControl.ISettingsInspectorExtension` in Unity? Explain its purpose and usage.
ISettingsInspectorExtension interface in UnityEditor.VersionControl Description Version control system extension that allows extending Version Control settings inspector. Additional resources: VersionControlObject . Public Methods Method Description OnInspectorGUI Allows you to add custom GUI controls to the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90595813de49
unity_docs
rendering
What is `Rendering.MeshUpdateFlags` in Unity? Explain its purpose and usage.
MeshUpdateFlags enumeration Description Mesh data update flags. Some advanced Mesh functions like SetVertexBufferData , SetIndexBufferData , SetSubMesh take an optional flags parameter that controls behavior of these functions. In particular, these flags allow you to control what happens when a Mesh's data...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c1cf2249407
unity_docs
scripting
What is `IMGUI.Controls.TreeView.FindRows` in Unity? Explain its purpose and usage.
TreeView.FindRows Declaration protected IList<TreeViewItem> FindRows (IList<int> ids ); Parameters Parameter Description ids TreeViewItem IDs. Returns IList<TreeViewItem> TreeViewItems. Description Useful for converting from TreeViewItem IDs to TreeViewItems using the current rows.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11e94969332c
unity_docs
scripting
What is `Caching.MoveCacheBefore` in Unity? Explain its purpose and usage.
Caching.MoveCacheBefore Declaration public static void MoveCacheBefore ( Cache src , Cache dst ); Parameters Parameter Description src The Cache to move. dst The Cache which should come after the source Cache in the cache list. Description Moves the source Cache before the destination Cache in the ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b079e678033a
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.GetBlockHeight` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.GetBlockHeight Declaration public static uint GetBlockHeight ( Experimental.Rendering.GraphicsFormat format ); Declaration public static uint GetBlockHeight ( TextureFormat format ); Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b2e4c2fb3b3
unity_docs
rendering
What is `LightTransport.BufferID.ctor` in Unity? Explain its purpose and usage.
BufferID Constructor Declaration public BufferID (ulong value ); Parameters Parameter Description value The value to construct the BufferID. Description Create a new BufferID. Creates a BufferID from a raw value. This constructor can be used to create BufferIDs from handles or pointers. The value is imple...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_75b54c1dcbf4
unity_docs
rendering
In Unity's 'View mesh data visualizations', what is 'Interact with the Preview window' and how does it work?
Use the Mesh asset Inspector Preview to preview different elements of a Mesh. You can use the following mouse and keyboard controls to navigate the mesh view: Rotate the view: left-click and drag. Rotate the light source: right-click and drag. A light source is present only in the “Shaded” and “Blendshapes” views. Pan ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_02d1affd57a1
unity_docs
scripting
In Unity's 'Types of Light component', what is 'Directional Lights' and how does it work?
Directional Lights are useful for creating effects such as sunlight in your scenes. Behaving in many ways like the sun, directional lights can be thought of as distant light sources which exist infinitely far away. A Directional Light doesn’t have any identifiable source position and so the light object can be placed a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_936a5b3d626e
unity_docs
editor
What is `IMGUI.Controls.TreeView.getNewSelectionOverride` in Unity? Explain its purpose and usage.
TreeView.getNewSelectionOverride protected IMGUI.Controls.TreeView.GetNewSelectionFunction getNewSelectionOverride ; Description Register a callback to this field to override how the TreeView handles selection changes in response to keys and mouse clicks. Additional resources: GetNewSelectionFunction .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6969ca30e4c
unity_docs
editor
Show me a Unity C# example demonstrating `StaticEditorFlags.NavigationStatic`.
StaticEditorFlags.NavigationStatic Obsolete Enum member StaticEditorFlags.NavigationStatic has been deprecated. The precise selection of the objects is now done using NavMeshBuilder.CollectSources() and NavMeshBuildMarkup. Description Include the GameObject when precomputing navigation data. For more information...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12271cba06f8
unity_docs
rendering
What is `IconKind` in Unity? Explain its purpose and usage.
IconKind enumeration Description Icon kind. This enum is used when modifying and inspecting the role an icon has within an application in PlayerSettings. Properties Property Description Any This icon can be used for any purpose in an application. Application This icon is used for the main application icons. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84a722ea09fa
unity_docs
scripting
What is `FilePathAttribute.Location` in Unity? Explain its purpose and usage.
Location enumeration Description Specifies the folder location that Unity uses together with the relative path provided in the FilePathAttribute constructor. Properties Property Description PreferencesFolder Use this location to save a file relative to the preferences folder. Useful for per-user files that ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a668c90ac9cf
unity_docs
physics
What is `EdgeCollider2D.adjacentEndPoint` in Unity? Explain its purpose and usage.
EdgeCollider2D.adjacentEndPoint public Vector2 adjacentEndPoint ; Description Defines the position of a virtual point adjacent to the end point of the EdgeCollider2D. An EdgeCollider2D is made up of contiguous edges defined by a set of points adjacent to each other. When a collision occurs with a point along ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f6055f60aefe
unity_docs
physics
In Unity's 'Introduction to Terrain colliders', what is 'Construction of a Terrain collider' and how does it work?
Unlike primitive colliders and Mesh colliders , Terrain colliders are heightmap-based. PhysX generates Terrain colliders from the heightmap data of the corresponding Terrain, rather than from a pre-defined shape or a Mesh . For detailed information on heightmap-based colliders in PhysX, see the Nvidia PhysX documentati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_db9dad2df23f
unity_docs
ui
In Unity's 'Test conditional compilation', what is 'Sample code' and how does it work?
```csharp using UnityEngine; using System.Collections; public class PlatformDefines : MonoBehaviour { void Start () { #if UNITY_EDITOR Debug.Log("Unity Editor"); #endif #if UNITY_IOS Debug.Log("Unity iOS"); #endif #if UNITY_STANDALONE_OSX Debug.Log("Standalone OSX"); #endif #if UNITY_STANDALONE_WIN De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a92163a3fdde
unity_docs
animation
What is `Animations.LookAtConstraint.SetSource` in Unity? Explain its purpose and usage.
LookAtConstraint.SetSource Declaration public void SetSource (int index , Animations.ConstraintSource source ); Parameters Parameter Description index The index of the source to set. source The source object and its weight. Description Sets a source at a specified index. Throws ArgumentOutOfRangeExce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.