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_eb81037f6a55
unity_docs
rendering
What is `TextureFormat.R8` in Unity? Explain its purpose and usage.
TextureFormat.R8 Description Single channel (R) texture format, 8-bits unsigned integer. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check. Additional resources: Texture2D.format , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76d853e4e50a
unity_docs
scripting
What is `ChangeAssetObjectPropertiesEventArgs.scene` in Unity? Explain its purpose and usage.
ChangeAssetObjectPropertiesEventArgs.scene public SceneManagement.Scene scene ; Description The Scene that contains the modified asset. This is usually an invalid scene unless the asset is explicitly associated in a scene (e.g. RenderSettings ).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de066537ceae
unity_docs
physics
What is `Collider2D.GetShapeBounds` in Unity? Explain its purpose and usage.
Collider2D.GetShapeBounds Declaration public Bounds GetShapeBounds (List<Bounds> bounds , bool useRadii , bool useWorldSpace ); Parameters Parameter Description bounds The list used to store the returned Bounds . useRadii Whether the radius of each PhysicsShape2D should be used to calculate the Bou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d25cfe4d52f3
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.IsStackable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.IsStackable Declaration public bool IsStackable (); Returns bool Returns true if the GraphElement is stackable. Returns false otherwise. Description Checks whether the GraphElement is stackable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_17ca276e268c
unity_docs
scripting
In Unity's 'Custom Unity Editor tools', what is 'Tool context' and how does it work?
The EditorToolContext API changes what the Editor’s built-in Transform tools affect. The default tool context is GameObject . A tool with the GameObject tool context affects the Transform values of a GameObject. Other contexts can affect different elements. For example, the Spline tool context makes it so the Move , Ro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c6dff633d08
unity_docs
editor
In Unity's 'Set a layerMask', what is 'Convert from a layer' and how does it work?
If you want to convert a layer to a layermask in a script at runtime, use the binary left-shift operator to left-shift 1 by the layer. The result is a layermask that represents the single layer. ```csharp using UnityEngine; public class LayerExample : MonoBehaviour { [SerializeField] private int layer = 10; private ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2ad717c2d6a
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.reorderable` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.reorderable public bool reorderable ; Description Gets or sets a value that indicates whether the user can drag list items to reorder them. The default value is false which allows the user to drag items to and from other views when you implement canStartDrag, setupDragAndDrop, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26bfd08fb043
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime.ctor` in Unity? Explain its purpose and usage.
DiscreteTime Constructor Declaration public DiscreteTime ( Unity.IntegerTime.DiscreteTime x ); Declaration public DiscreteTime (float v ); Declaration public DiscreteTime (double v ); Declaration public DiscreteTime (long v ); Declaration public DiscreteTime (int v ); Parameters Parameter ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbcd9a3253f8
unity_docs
editor
What is `ModelImporter.preserveHierarchy` in Unity? Explain its purpose and usage.
ModelImporter.preserveHierarchy public bool preserveHierarchy ; Description If true, always create an explicit Prefab root. Otherwise, if the model has a single root, it is reused as the Prefab root.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd12939d939f
unity_docs
input
Explain 'Create a custom control' in Unity.
A good custom control is abstract, self-contained, and recurring. A Slide Toggle is a good example of a custom control: It’s abstract. You can use it to adjust settings, such as volume, brightness, scale, and power. It’s self-contained. You give it a label and an initial value. A Slide Toggle triggers an event when its...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d6c4bed6418
unity_docs
math
What is `AndroidJNI.GetArrayLength` in Unity? Explain its purpose and usage.
AndroidJNI.GetArrayLength Declaration public static int GetArrayLength (IntPtr array ); Description Returns the number of elements in the array. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db0370405149
unity_docs
performance
What is `Unity.Jobs.IJobFor` in Unity? Explain its purpose and usage.
IJobFor interface in Unity.Jobs Description An interface that represents a job that performs the same independent operation for each element of a native container or for a fixed number of iterations. This job type has the following options to schedule work: IJobForExtensions.Run runs the job on the main thread ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ed4be0f57b1
unity_docs
scripting
What is `AndroidJNI.GetShortField` in Unity? Explain its purpose and usage.
AndroidJNI.GetShortField Declaration public static short GetShortField (IntPtr obj , IntPtr fieldID ); Description Returns the value of an instance (nonstatic) field of an object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c7d037a3793
unity_docs
rendering
Give me an overview of the `Texture2DArray` class in Unity.
Texture2DArray class in UnityEngine / Inherits from: Texture / Implemented in: UnityEngine.CoreModule Description Class for handling 2D texture arrays. Modern graphics APIs (e.g. D3D10 and later, OpenGL ES 3.0 and later, Metal etc.) support "texture arrays", which is an array of same size & format textures. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cc91ddf9a80
unity_docs
scripting
Give me an overview of the `ComputeBufferMode` class in Unity.
ComputeBufferMode enumeration Description Intended usage of the buffer. Use this enum to convey the intended usage of the buffer to the engine, so that Unity can decide where and how to store the buffer contents. Properties Property Description Immutable Static buffer, only initial upload allowed by the CPU D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d7ed80dcb5e
unity_docs
animation
What is `Animations.AimConstraint.rotationAxis` in Unity? Explain its purpose and usage.
AimConstraint.rotationAxis public Animations.Axis rotationAxis ; Description The axes affected by the AimConstraint. Use this property to restrict the effect of the constraint on a particular axis. ```csharp using UnityEngine.Animations;public class ConstraintAxis { public void ConstrainOnlyOnXY(AimConstrai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60aa5b7da102
unity_docs
physics
What are the parameters of `Collider2D.OnCollisionExit2D` in Unity?
Description Sent when a collider on another object stops touching this object's collider (2D physics only). Further information about the objects involved is reported in the Collision2D parameter passed during the call. Notes: Collision events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in res...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad342360f07b
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingTest.shadowCastingModeMask` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingTest.shadowCastingModeMask public int shadowCastingModeMask ; Description A value that indicates which ShadowCastingMode values are acccepted by this testing configuration. If a Renderer's ShadowCastingMode is not matching this mask then the test fails. If all ShadowCastingMode va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c9af21d0d4bb
unity_docs
rendering
Explain 'Use Animation curves' in Unity.
This topic discusses the Property list, Animation curves and its keys, adding and modifying keyframes, and rotation interpolation types. ## The Property list In an Animation Clip , if an animatable property has Animation Curve , this means that the value of the property changes over time. In the property list area of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa566c407f67
unity_docs
scripting
Show me a Unity C# example demonstrating `WaitWhile`.
dInstruction / Implemented in: UnityEngine.CoreModule Description Suspends the coroutine execution until the supplied delegate evaluates to false . WaitWhile can only be used with a yield statement in coroutines. The supplied delegate is executed each frame after MonoBehaviour.Update and before MonoBehavio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa72835531e0
unity_docs
scripting
What is `Search.SearchUtils.GetObjectPath` in Unity? Explain its purpose and usage.
SearchUtils.GetObjectPath Declaration public static string GetObjectPath ( Object obj ); Parameters Parameter Description obj Object to obtain a path from. Returns string Returns the path of an object. Description Get the path of a Unity Object. If it is a GameObject or a Component it is the <see cr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_976ebfebe4f0
github
scripting
Write a Unity Editor script for Color Space Setup Step
```csharp #region using System; using MagicLeap.SetupTool.Editor.Interfaces; using MagicLeap.SetupTool.Editor.Utilities; using UnityEditor; using UnityEngine; #endregion namespace MagicLeap.SetupTool.Editor.Setup { /// <summary> /// Switches the Color Space to Linear /// </summary> public class Colo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd6efdda8d5b
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.itemIndexChanged` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.itemIndexChanged Description Called when an item is moved in the itemsSource. This callback receives two IDs, the first being the ID being moved, the second being the destination ID. In the case of a tree, the destination is the parent ID.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44bd2671316f
unity_docs
scripting
What is `Unity.IntegerTime.RationalTimeExtensions.Multiply` in Unity? Explain its purpose and usage.
RationalTimeExtensions.Multiply Declaration public static Unity.IntegerTime.RationalTime Multiply ( Unity.IntegerTime.RationalTime lhs , Unity.IntegerTime.RationalTime rhs ); Parameters Parameter Description t The left hand side. r The right hand side. Returns RationalTime A new instance that is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d6befc111beb
unity_docs
xr
In Unity's 'Develop for Meta Quest workflow', what is 'Meta packages' and how does it work?
Meta also provides packages to develop for Meta Quest in Unity. Refer to Meta’s Import XR packages documentation to learn about the packages Meta provides. Note: These packages and related documentation are maintained by Meta.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65e0a6e6210f
unity_docs
scripting
What is `Cache.maximumAvailableStorageSpace` in Unity? Explain its purpose and usage.
Cache.maximumAvailableStorageSpace public long maximumAvailableStorageSpace ; Description Allows you to specify the total number of bytes that can be allocated for the cache. This value can be set to a smaller number in order to limit the amount of storage space used by cached AssetBundles. PC/Mac Standalone ap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_334283193ad8
unity_docs
scripting
What are the parameters of `Transform.LookAt` in Unity?
Description Rotates the transform so the forward vector points at /target/'s current position. Then it rotates the transform to point its up direction vector in the direction determined by the worldUp parameter. If you leave out the worldUp parameter, the function will use the world y axis. The up vector of the rotatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_05d8917f9a5a
unity_docs
ui
In Unity's 'Bind to multiple properties with runtime binding', what is 'Create a data source asset' and how does it work?
Create a data source asset that contains the properties you want to bind to. Create a project in Unity with any template. In the Assets folder of your project, create a C# script named ExampleMultiPropertiesObject.cs with the following content: ```csharp using Unity.Properties; using UnityEngine; using UnityEngine.UIEl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a016a9ece53
unity_docs
scripting
Show me a Unity C# example demonstrating `RectTransform.anchoredPosition`.
ransform taking into consideration the anchor reference point. The anchor reference point is the position of the anchors. If the anchors are not together, Unity estimates the four anchor positions using the pivot placement as a reference. Note : The Inspector changes which properties are exposed based on which anchor p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1b8435088cb3
github
scripting
Write a Unity Editor script for Timeline Window_Time Cursor
```csharp using System; using UnityEngine; using UnityEngine.Timeline; using UnityEngine.Playables; namespace UnityEditor.Timeline { partial class TimelineWindow { TimeAreaItem m_PlayHead; void TimeCursorGUI(TimelineItemArea area) { DrawTimeOnSlider(); if (!CanD...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_8e80339c305a
github
scripting
Write a Unity C# MonoBehaviour script called Wobble
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; // Run this in editor [ExecuteInEditMode] public class Wobble : MonoBehaviour { private Renderer rend; private Vector3 lastPos; private Vector3 velocity; private Vector3 lastRot; private Vector3 a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1483b807a4f
unity_docs
scripting
What are the parameters of `UIElements.RuntimePanelUtils.ScreenToPanel` in Unity?
Returns Vector2 A position in panel coordinates that corresponds to the provided screen position. Description Transforms a screen absolute position to its equivalent local coordinate on given panel. The following example converts the mouse position from screen coordinates to UI Toolkit panel coordinates: ```csharp usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_39f8ad676d07
unity_docs
xr
Explain 'Set up your Apache server configuration for Web builds' in Unity.
Set up your Apache server configuration file to use the Apache server with Unity Web builds. Apache is an open source, cross-platform web server that you can use to serve applications you create with Unity Web. For more information about Apache and how to install and use it, refer to the Apache documentation . ## Choo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_677f31f4d080
unity_docs
scripting
Explain 'Debugging and diagnostics' in Unity.
Unity supports a range of tools for debugging and diagnosing issues in your project code. Topic Description Debug C# code in Unity Track down bugs in your scripts by attaching external debuggers and stepping through your project code as it executes. The Debug class Use the Debug class in your project code to write mess...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_662d9287bbfc
github
scripting
Write a Unity C# ScriptableObject for Pool Service Play Mode Tests
```csharp using System.Collections; using NUnit.Framework; using Pool.Runtime; using UnityEngine; using UnityEngine.TestTools; namespace Pool.Tests.PlayMode { public sealed class PoolServicePlayModeTests { private PoolConfig _poolConfig; [SetUp] public void SetUp() { ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_6bc4ee9483fb
unity_docs
rendering
What are the parameters of `Build.IPreprocessComputeShaders.OnProcessComputeShader` in Unity?
Description Implement this interface to receive a callback before Unity compiles a compute shader kernel into a build. Use this callback to examine the compute shader variants that Unity is about to compile into your build, and exclude any variant that you do not want. Excluding unwanted shader variants can reduce buil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b9b8b79e98e6
unity_docs
scripting
Explain 'Introduction to asynchronous programming with Awaitable' in Unity.
The Awaitable class is a custom Unity type that can be awaited and used as an async return type in the C# asynchronous programming model. Most of Unity’s asynchronous APIs support the async and await pattern, including: Unity coroutines: NextFrameAsync , WaitForSecondsAsync , EndOfFrameAsync , FixedUpdateAsync Switchin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e44ea842669a
unity_docs
xr
Show me a Unity code example for 'Set up your Apache server configuration for Web builds'.
s in Apache using one of the two methods: Virtual host in httpd.conf . Virtual host in.htaccess . The recommended best practice is to configure a virtual host in Apache’s httpd.conf , if you have access to that configuration. ## Use the virtual host inhttpd.confmethod To configure Web builds using the virtual host in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfab2e7c4e4f
unity_docs
rendering
Show me a Unity C# example demonstrating `Random.ColorHSV`.
Max Maximum saturation [0..1]. valueMin Minimum value [0..1]. valueMax Maximum value [0..1]. alphaMin Minimum alpha [0..1]. alphaMax Maximum alpha [0..1]. Returns Color A random color with HSV and alpha values in the (inclusive) input ranges. Values for each component are derived via linear interpolation o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_868f4ece001d
unity_docs
networking
What is `Networking.PlayerConnection.PlayerConnection.Send` in Unity? Explain its purpose and usage.
PlayerConnection.Send Declaration public void Send (Guid messageId , byte[] data ); Parameters Parameter Description messageId The type ID of the message that is sent to the Editor. Description Sends data to the Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5b6053c1e4b
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.detectCollisions`.
n detection be enabled? (By default always enabled). Disabling collision detections is useful when you have a ragdoll which is setup to be kinematic and you want to avoid heavy collision detection calculations on that rigidbody. detectCollisions is not serialized. This means it doesn't show up in the Inspector and w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cce60605f3b0
unity_docs
editor
What is `VersionControl.Task.description` in Unity? Explain its purpose and usage.
Task.description public string description ; Description A short description of the current task. Not all tasks have a description, currently only the longer running task where progress is showed in the Editor UI.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e61885ed278
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Package` in Unity? Explain its purpose and usage.
Package class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <package> Android Manifest element. For more information about the element, see Android's documentation: Package element Properties Property Description Attribu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d762f0a0b722
unity_docs
scripting
What is `AnimationEvent.messageOptions` in Unity? Explain its purpose and usage.
AnimationEvent.messageOptions public SendMessageOptions messageOptions ; Description Function call options. If options are set to SendMessageOptions.RequireReceiver (default), an error is printed when the message is not picked up by any component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40b0d4563f16
unity_docs
physics
What is `ContactPairPoint` in Unity? Explain its purpose and usage.
ContactPairPoint struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description A readonly struct describing a contact point between two Collider s. Properties Property Description impulse The impulse applied to this contact pair to resolve the collision. normal Normal of the contact point. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_140dc58adbc1
unity_docs
scripting
Explain 'Position GameObjects' in Unity.
To alter the Transform component of the GameObject , use the mouse to manipulate any Gizmo axis, or type values directly into the number fields of the Transform component in the Inspector . Alternatively, you can select each of the five Transform modes from the Scene view’s Tools Overlay or with a hotkey: W for Move E ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9bc95886e7e0
unity_docs
physics
In Unity's 'Delivering to Google Play', what is 'Android App Bundle' and how does it work?
Google Play requires new apps to be an Android App Bundle (AAB) instead of an APK . For information on why, refer to The future of Android App Bundles is here . To configure an application to be an AAB: Open the Build Profiles window (menu: File > Build Profiles ). From the list of platforms in the Platforms panel, sel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8e41ade3b29
unity_docs
animation
What is `Animations.AnimatorStateMachine.anyStateTransitions` in Unity? Explain its purpose and usage.
AnimatorStateMachine.anyStateTransitions public AnimatorStateTransition[] anyStateTransitions ; Description The list of AnyState transitions. Its important that AnyStateTransitions are added to the root state machine.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71facc9eaa68
unity_docs
scripting
Show me a Unity C# example demonstrating `SpriteRenderer.size`.
SpriteRenderer.size public Vector2 size ; Description Property to set or get the size to render when the SpriteRenderer.drawMode is set to SpriteDrawMode.Sliced or SpriteDrawMode.Tiled . Assigning a Sprite to SpriteRenderer.sprite when it is null will also set the SpriteRenderer.size value to the Spr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_70b8741a3735
unity_docs
scripting
In Unity's 'Creating scene templates', what is 'Creating a template from the current scene' and how does it work?
To create a scene template from the current scene, from the menu, select File > Save As Scene Template . If you have unsaved changes, Unity prompts you to save the scene before it saves the template. After you create a template from the current scene, you might want to edit its properties to specify which of its depend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5403acf91f3
unity_docs
editor
What are the parameters of `Debug.DrawLine` in Unity?
Description Draws a line between specified start and end points. The line will be drawn in the Game view of the editor when the game is running and the gizmo drawing is enabled. The line will also be drawn in the Scene when it is visible in the Game view. Leave the game running and showing the line. Switch to the Sce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bada867b6619
unity_docs
rendering
What is `Experimental.GlobalIllumination.RectangleLight` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RectangleLight struct in UnityEngine.Experimental.GlobalIllumination / Implemented in: UnityEngine.CoreModule Description A helper structure used to initialize a LightDataGI structure as a rectangle light. Properties Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7d41aa0cc958
unity_docs
ui
In Unity's 'USS transition', what is 'Starting of a transition' and how does it work?
A transition triggers if you set a transition duration on the style and the style value changes. You can use pseudo-classes, C# methods, or events to trigger the transition. Note : A transition animation on a frame is triggered when the property’s current state is different from the previous state. The first frame in a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_694b2fdbaef0
unity_docs
editor
Explain 'Simulate hitches for testing' in Unity.
Introducing deliberate hitches is a common technique to test how your game handles performance issues like lag spikes, frame drops, stuttering, or degraded UI responsiveness under stress. The following is a simple MonoBehaviour script that you can attach to any GameObject in your scene . It causes the main thread to ha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_825303a1ac44
unity_docs
physics
In Unity's 'Sweep-based CCD', what is 'Understand sweep-based CCD' and how does it work?
Sweep-based CCD uses a Time-Of-Impact (TOI) algorithm to compute potential collisions. To do this, the algorithm “sweeps” or detects along the object’s forward trajectory at the object’s current velocity. In the above image: A: Object at starting position B: Predicted area that the object will pass through between now ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6efb4b4bc89a
unity_docs
scripting
What is `SystemInfo.maxGraphicsBufferSize` in Unity? Explain its purpose and usage.
SystemInfo.maxGraphicsBufferSize public static long maxGraphicsBufferSize ; Description The maximum size of a graphics buffer ( GraphicsBuffer , ComputeBuffer , vertex/index buffer, etc.) in bytes (Read Only). Any GPU buffer ( GraphicsBuffer , ComputeBuffer or a vertex/index buffer used by a Mesh ) can not ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_929d02f83509
unity_docs
rendering
What is `TextureMipmapLimitGroups.RemoveGroup` in Unity? Explain its purpose and usage.
TextureMipmapLimitGroups.RemoveGroup Declaration public static void RemoveGroup (string groupName ); Parameters Parameter Description groupName Name of the texture mipmap limit group to remove. Description (Editor Only) Attempts to remove a texture mipmap limit group with the indicated groupName . This o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_86065fdc4a41
unity_docs
rendering
In Unity's 'Get frame timing data', what is 'Use the FrameTiming API' and how does it work?
Use the FrameTiming API to access timestamp information. In each variable, FrameTimingManager records the time a specific event happens during a frame. The following table contains the values available through the API, in the order that Unity executes them during a frame: Property Description frameStartTimestamp The CP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da1e3aff6638
unity_docs
rendering
Give me an overview of the `ParticleSystemBakeMeshOptions` class in Unity.
ParticleSystemBakeMeshOptions enumeration Description Configure how a Particle System is baked into a mesh. Properties Property Description BakeRotationAndScale Bake the Transform rotation and scale into the mesh. BakePosition Bake the Transform position into the mesh. Default The default baking options.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69d26c4e8810
unity_docs
scripting
What is `PrefabUtility.HasManagedReferencesWithMissingTypes` in Unity? Explain its purpose and usage.
PrefabUtility.HasManagedReferencesWithMissingTypes Declaration public static bool HasManagedReferencesWithMissingTypes ( Object assetComponentOrGameObject ); Parameters Parameter Description componentOrGameObject An object which is part of a Prefab asset. Returns bool Returns true if there are missing S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5a97cc670c2e
unity_docs
scripting
Explain 'Create or delete a package draft' in Unity.
A package draft is the version of an asset package that exists on the Publisher Portal before you submit it to the Asset Store . At a minimum, a draft represents the information on the Create a package page, but it can also include the assets from your project. ## Create a package draft To create a new package draft:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd4315ec6ff7
unity_docs
rendering
What is `ShaderData.Pass.FindTagValue` in Unity? Explain its purpose and usage.
ShaderData.Pass.FindTagValue Declaration public Rendering.ShaderTagId FindTagValue ( Rendering.ShaderTagId tagName ); Parameters Parameter Description tagName The name of the tag. Description Searches for the tag specified by tagName on this SubShader and returns the value of the tag.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c3ad1f576924
unity_docs
editor
In Unity's 'Manage Asset Store packages in the Editor', what is 'Location of downloaded asset package files' and how does it work?
Note : This information applies only to asset packages (.unitypackage ) you get from the Asset Store. It doesn’t apply to UPM packages you get from the Asset Store. You can use the Package Manager window to manage your Asset Store packages within your project. However, if you need to access files from an asset package ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2795f43c7793
unity_docs
rendering
In Unity's 'Graphics', what is 'Shader loading' and how does it work?
These properties allow you to configure how Unity prewarms shader variant collections in your application. For information on prewarming, including important information about graphics API support, refer to Shader loading: Prewarming shader variants . Property Function Renderer Light Probe Selection Choose the type of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d56d8239f005
unity_docs
rendering
In Unity's 'Reducing the file size of a build', what is 'Suggestions for reducing build size' and how does it work?
The following settings and features impact the size of a build: Feature Resolution Compressed texture formats Refer to Choose a GPU texture format by platform . Compressed meshes Refer to Configure mesh compression . Compressed animation clips Refer to Animation properties . Strip unreferenced code Refer to Configure m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_81fff89ea291
unity_docs
rendering
Show me a Unity code example for 'Assembly definition and packages'.
and runtime scripts: Tests/Editor/<company-name>.<package-name>.Editor.Tests.asmdef Tests/Runtime/<company-name>.<package-name>.Tests.asmdef To get a more general view of a recommended package folder layout, refer to Package layout . ## Example file In this example, the assembly definition file uses references to its...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b7521a3ecde
unity_docs
rendering
In Unity's 'Transparent Cutout Specular', what is 'Transparent Cutout Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. Cutout shader is an alternative way of displaying transparent objects. Differences between Cutout and regular Transparent shaders are: This shader cannot have partially transparent areas. Everything will be either fully opaque or fully transparent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5975bc4e7090
unity_docs
xr
What is `HDROutputSettings.HDRModeChangeRequested` in Unity? Explain its purpose and usage.
HDROutputSettings.HDRModeChangeRequested public bool HDRModeChangeRequested ; Description Describes whether the user has requested to change the HDR Output Mode. It is true if this is the case, and false otherwise. Accessing this member results in an exception if HDR is not available on the display. Use HD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb882844f04a
unity_docs
editor
What is `SceneManagement.PrefabStage.prefabStageDirtied` in Unity? Explain its purpose and usage.
PrefabStage.prefabStageDirtied Description Callback that's invoked whenever a Prefab stage changes from unmodified to modified. Note that every Save of the prefab stage marks it unmodified, and the next user modification of the prefab will invoke the callback again. This also applies to Auto-Save functionality.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b5411011481
unity_docs
rendering
Show me a Unity C# example demonstrating `WebCamTexture.Play`.
WebCamTexture.Play Declaration public void Play (); Description Starts the camera. Call Application.RequestUserAuthorization before creating a WebCamTexture. ```csharp // Starts the default camera and assigns the texture to the current renderer using UnityEngine; using System.Collections;public class Example...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a63e024e48e3
unity_docs
physics
Explain 'Conditional compilation in Unity' in Unity.
Unity’s support for the C# language includes the use of directives , which allow you to selectively include or exclude code from compilation, based on whether certain scripting symbols are defined. For more information on how these directives work in C#, refer to Microsoft’s documentation on C# preprocessor directives ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f4f27bbbf76
unity_docs
rendering
What is `Rendering.CommandBuffer.DispatchCompute` in Unity? Explain its purpose and usage.
CommandBuffer.DispatchCompute Declaration public void DispatchCompute ( ComputeShader computeShader , int kernelIndex , int threadGroupsX , int threadGroupsY , int threadGroupsZ ); Declaration public void DispatchCompute ( ComputeShader computeShader , int kernelIndex , ComputeBuffer indirectBuffer ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23fdf7ff73f9
unity_docs
rendering
What is `Rendering.ShadowSplitData.cullingPlaneCount` in Unity? Explain its purpose and usage.
ShadowSplitData.cullingPlaneCount public int cullingPlaneCount ; Description The number of culling planes. Additional resources: maximumCullingPlaneCount GetCullingPlane SetCullingPlane .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bdc02761c3f4
unity_docs
physics
What is `ArticulationDrive.forceLimit` in Unity? Explain its purpose and usage.
ArticulationDrive.forceLimit public float forceLimit ; Description The maximum force this drive can apply to a body. Units of measurement - N (newtons) for linear and Nm (newton-meters) for angular motion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_898faadf7cfc
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.CollisionModule.dampen`.
ParticleSystem.CollisionModule.dampen public ParticleSystem.MinMaxCurve dampen ; Description How much speed does each particle lose after a collision. Additional resources: ParticleSystem.collision , MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSyste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0d93c46b71a
unity_docs
scripting
What is `Unity.Collections.NativeSlice_1.Index_operator` in Unity? Explain its purpose and usage.
NativeSlice<T0>.this[int] public T this[int] ; Description Accesses NativeSlice<T0> elements by index. Structs are returned by value and not by reference. This property also takes the NativeSlice's stride into account.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2f56f9dbbfec
unity_docs
ui
Explain 'Referencing assemblies' in Unity.
Any assembly that contains types (such as classes or structs) that depend on types in another assembly must have a reference to the other assembly. You can control the references between assemblies by configuring Assembly Definition properties in the Inspector window. For more information, refer to Assembly Definition ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3fdf3b4d498
unity_docs
xr
What is `XR.XRSettings.eyeTextureResolutionScale` in Unity? Explain its purpose and usage.
XRSettings.eyeTextureResolutionScale public static float eyeTextureResolutionScale ; Description Controls the actual size of eye textures as a multiplier of the device's default resolution. A value of 1.0 will use the default eye texture resolution specified by the XR device. Values less than 1.0 will use lower...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_38d574e9e348
unity_docs
rendering
Explain 'Optimizing draw calls in URP' in Unity.
Techniques for speeding up rendering by reducing the number of drawing commands the CPU sends to the GPU, in the Universal Render Pipeline (URP). For more information about techniques for optimizing draw calls, refer to choose a method for optimizing draw calls . Page Description Scriptable Render Pipeline Batcher Reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_056494366f3a
unity_docs
rendering
What is `SpeedTreeImporter.defaultShader` in Unity? Explain its purpose and usage.
SpeedTreeImporter.defaultShader public Shader defaultShader ; Description Returns the default SpeedTree shader for the active render pipeline (either v7 or v8 according to the asset version).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b11710e817d5
github
scripting
Write a Unity C# MonoBehaviour script called App
```csharp using UnityEngine; namespace Fiftytwo { public class App : MonoBehaviour { public static App Instance; [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] private static void RuntimeInitializeOnLoad() { var instance = Ins...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_82cbb7b94e37
unity_docs
scripting
What is `ParticleSystem.limitVelocityOverLifetime` in Unity? Explain its purpose and usage.
ParticleSystem.limitVelocityOverLifetime public ParticleSystem.LimitVelocityOverLifetimeModule limitVelocityOverLifetime ; Description Script interface for the LimitVelocityOverLifetimeModule of a Particle System. . This module reduces particle velocities by either applying drag or simply reducing velocity o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e943dcec0a14
unity_docs
scripting
What is `Accessibility.AccessibilityNode.hint` in Unity? Explain its purpose and usage.
AccessibilityNode.hint public string hint ; Description Provides additional information about the accessibility node. For example, the result of performing an action on the node. For Android, this requires at least API level 26.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67dc3c085bca
unity_docs
animation
What is `Animations.GenericBindingUtility.BindProperties` in Unity? Explain its purpose and usage.
GenericBindingUtility.BindProperties Declaration public static void BindProperties ( GameObject rootGameObject , NativeArray<GenericBinding> genericBindings , out NativeArray<BoundProperty> floatProperties , out NativeArray<BoundProperty> discreteProperties , Unity.Collections.Allocator allocator ); Param...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ade2c2691d92
unity_docs
editor
What is `EditorTools.ToolManager.SetActiveContext` in Unity? Explain its purpose and usage.
ToolManager.SetActiveContext Declaration public static void SetActiveContext (Type context ); Declaration public static void SetActiveContext (); Parameters Parameter Description context The EditorToolContext type to be set as the active tool. Description Sets the active EditorToolContext . To rest...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d7effe5327f0
unity_docs
scripting
Explain 'Style sheets' in Unity.
If you want to reuse a style, create a custom style sheet for it, and apply it to text through the <style> rich text tag . A custom style can include opening and closing rich text tags, and leading and trailing text. For example, you might want headings in your text to be big, red, bold, with an asterisk to either side...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_418816c70c40
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.showBorder` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.showBorder public bool showBorder ; Description Enable this property to display a border around the collection view. If set to true, a border appears around the ScrollView that the collection view uses internally.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_95e938830e9a
unity_docs
rendering
Explain 'Post-processing' in Unity.
Unity provides a variety of post-processing effects and full-screen effects to control and alter the visual output of a project. Page Description Introduction to post-processing Understand Unity’s systems for post-processing and full-screen effects. Post-processing effect availability reference Explore Unity’s post-pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3a596adde10f
unity_docs
rendering
In Unity's 'Size by Speed module reference', what is 'Properties' and how does it work?
For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Separate Axes Control the particle size independently on each axis. Size A curve defining the particle’s size over a speed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54694b6e1421
unity_docs
rendering
What is `DepthTextureMode.Depth` in Unity? Explain its purpose and usage.
DepthTextureMode.Depth Description Generate a depth texture. Will generate a screen-space depth texture as seen from this camera. Texture will be in RenderTextureFormat.Depth format and will be set as _CameraDepthTexture global shader property. Additional resources: Using camera's depth textures , Camera.dept...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c0233f0d04af
unity_docs
scripting
Show me a Unity code example for 'Install Unity Accelerator with Docker Hub'.
et CERT_HOSTNAME but don’t set CERT_PEM , <persist_dir>/cert.pem will be assumed. KEY_PEM The path to a key.pem to use for TLS support. If you set CERT_HOSTNAME but don’t set KEY_PEM , <persist_dir>/key.pem will be assumed. ## Configure security and TLS To configure TLS settings, ensure the cert.pem and key.pem is in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97338b1c3f81
unity_docs
scripting
What is `Search.QueryEngineFilterAttribute.overridesStringComparison` in Unity? Explain its purpose and usage.
QueryEngineFilterAttribute.overridesStringComparison public bool overridesStringComparison ; Description Flag indicating if the filter overrides the global string comparison options. Set to true when the comparisonOptions are used.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80d8abaa4fee
unity_docs
physics
In Unity's 'Import Activity window reference', what is 'Toolbar' and how does it work?
At the top of the window, you can select from the following options which change how the data is displayed: Option Description Show Overview Select this option to display the Import Activity Overview panel . Options Adjust the information displayed in the Import Activity window. Choose from the following options: Use r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c20cf1721227
unity_docs
editor
What are the parameters of `EditorGUI.Slider` in Unity?
Returns float The value that has been set by the user. Description Makes a slider the user can drag to change a value between a min and a max. Slider in an Editor Window. ```csharp using UnityEngine; using UnityEditor;// Editor script that lets you scale the selected GameObject between 1 and 100class EditorGUISlider : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5cac6c998471
unity_docs
editor
Explain 'Trademarks and terms of use' in Unity.
“Unity”, Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here ). Other names or brands are trademarks of their respective owners. Code snippets in the Unity Editor Manual and Scripting Reference are licensed und...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ef6962f0f8f3
unity_docs
physics
Explain 'Enable or disable asynchronous shader compilation' in Unity.
Asynchronous shader compilation is enabled by default. To enable or disable asynchronous shader compilation: Go to Edit > Project Settings > Editor . At the bottom of the Editor settings, under Shader Compilation , check or uncheck the Asynchronous Shader Compilation checkbox. Note: Enabling and disabling asynchronous ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_161cb003b26c
unity_docs
xr
In Unity's 'Search for packages', what is 'Actions' and how does it work?
The context menu for the Packages search provider includes the following actions: Action Description Open Opens the package in the Package Manager window. This is the default double-click action. To change the default action, refer to Preferences . Install Install the package; the Unity Editor requests confirmation bef...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1aca60df7ed
unity_docs
rendering
Give me an overview of the `RenderPickingArgs` class in Unity.
RenderPickingArgs struct in UnityEditor Description Provides information about what is expected to render during the current picking rendering callback. Properties Property Description pickingIndex Specifies the picking index value that the first pickable object uses to write to the picking render texture. re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a33d9b12b31e
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.DownloadHandlerTexture`.
ve frame time when loading large textures. DownloadHandlerTexture only allocates managed memory when finally creating the Texture itself, which eliminates the garbage collection overhead associated with performing the byte-to-texture conversion in script. For use cases where you wish to download an image via HTTP and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f33f401b1457
unity_docs
scripting
What is `Rendering.FormatSwizzle.FormatSwizzleA` in Unity? Explain its purpose and usage.
FormatSwizzle.FormatSwizzleA Description The channel specified contains alpha. When querying a specific channel for a graphics format, returns this enum when the channel contains alpha. Additional resources: GraphicsFormatUtility.GetSwizzleA .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.