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_20ea48d8130e
unity_docs
rendering
Explain 'Gradle for Android' in Unity.
Gradle is a build system that automates build processes and prevents many common build errors. Unity uses Gradle for all Android builds. You can either build the output package . apk , or .aab file in Unity or export a Gradle project from Unity and build it with an external tool such as Android Studio. Topic Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4cdd63563321
unity_docs
scripting
In Unity's 'EnumFlagsField', what is 'Create an EnumFlagsField' and how does it work?
You can create an EnumField with UXML and C#. Assume you have the following enumeration: ``` [Flags] enum MyEnum { None = 0, First = 1, Second = 2, Third = 4 } ``` The following C# example creates an EnumFlagsField with the MyEnum enumeration and selects the first and second values: ``` var myEnumFlagsField = new E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fb727995ad7e
unity_docs
ui
Explain 'Use arrays' in Unity.
An array is a collection of values or references of the same type. You can add, remove, and reorder elements in an array, and edit their values. You can add and remove elements one at a time with the + and - buttons. Some arrays have a Size field. You can use this field to add or remove multiple elements at once: To ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_114c931bd4f2
unity_docs
scripting
What is `UIElements.RepeatButton` in Unity? Explain its purpose and usage.
RepeatButton class in UnityEngine.UIElements / Inherits from: UIElements.TextElement / Implemented in: UnityEngine.UIElementsModule Description A button that executes an action repeatedly while it is pressed. For more information, refer to UXML element RepeatButton . Static Properties Property Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0b6dadb079b
unity_docs
rendering
What is `Rendering.DistanceMetric.CustomAxis` in Unity? Explain its purpose and usage.
DistanceMetric.CustomAxis Description Sort objects based on distance along a custom axis. Objects are sorted based on distance along a custom axis. For example, you could specify this mode and the axis to be (0.0f, 1.0f, 0.0f). This will effectively make renderers sorted to the back as they go up in Y. This is a co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3e3222cdb53f_doc_4
github
scripting
What does `ScaleToHeight` do in this Unity script? Explain its purpose and signature.
Scaling function to scale to a specific height while retaining aspect.The to height.Height in pixels. Signature: ```csharp public static ScalingFunction ScaleToHeight(int heightInPixels) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_84d8bf19e5dc
unity_docs
audio
Show me a Unity C# example demonstrating `AudioImporterSampleSettings`.
structure contains a collection of settings used to define how an AudioClip should be imported. Unity uses this structure with the AudioImporter to define how to import and load the AudioClip within the Scene. This is useful if you want to change the import settings of a group of audio clips to the same settings p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_728d1215066d
unity_docs
editor
Explain 'Tooltip event' in Unity.
The Tooltip event is sent to check if a visual element underneath the pointer is able to display a tooltip. This is an Editor-only event. Tooltips are usually set using the tooltip property. You can also respond to the Tooltip event to set tooltips. You can handle the Tooltip event in two ways: Set a callback to the To...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e9cc410f87f
unity_docs
scripting
What is `UIElements.LineJoin` in Unity? Explain its purpose and usage.
LineJoin enumeration Description Join types connecting two sub-paths (see Painter2D.lineJoin ). Properties Property Description Miter Joins the sub-paths with a sharp corner. The join converts to a beveled join when the Painter2D.miterLimit ratio is reached. Bevel Joins the sub-paths with a beveled co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa7898b7742b
unity_docs
physics
What is `UIElements.Experimental.ITransitionAnimations` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ITransitionAnimations interface in UnityEngine.UIElements.Experimental Description Provides helper methods to create transition animations for VisualElement style values Public Methods Method Description Layout Trigger...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f7a3d7a0f57
unity_docs
scripting
What is `Quaternion.identity` in Unity? Explain its purpose and usage.
Quaternion.identity public static Quaternion identity ; Description The identity rotation (Read Only). This property represents zero rotation. For example, if you assign Quaternion.identity to a transform's world coordinates, the transform's axis ( right , up , forward ) aligns with the world axis ( x , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22f4cfdc7b68
unity_docs
math
Show me a Unity C# example demonstrating `AI.NavMesh.FindClosestEdge`.
fying which NavMesh areas can be passed when finding the nearest edge. Returns bool True if the nearest edge is found. Description Locate the closest NavMesh edge from a point on the NavMesh. The returned NavMeshHit object contains the position and details of the nearest point on the nearest edge of the navm...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ed3d198a33a
unity_docs
math
What is `Rendering.RayTracingGeometryInstanceConfig.layer` in Unity? Explain its purpose and usage.
RayTracingGeometryInstanceConfig.layer public int layer ; Description The Layer used by the ray tracing instance. When you manually add ray tracing instances to a RayTracingAccelerationStructure , RayTracingAccelerationStructure.AddInstance filters instances based on the acceleration structure's Layer Mask...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135dfc1562b4
unity_docs
math
What is `Mathf.FloatToHalf` in Unity? Explain its purpose and usage.
Mathf.FloatToHalf Declaration public static ushort FloatToHalf (float val ); Parameters Parameter Description val The floating point value to convert. Returns ushort The converted half-precision float, stored in a 16-bit unsigned integer. Description Encode a floating point value into a 16-bit repre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9bda3722c536
unity_docs
scripting
What is `Event.command` in Unity? Explain its purpose and usage.
Event.command public bool command ; Description Is Command/Windows key held down? (Read Only) On Windows, this returns true if any Windows key is held down. On Mac, this returns true if any Command key is held down. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints Command/Windows...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_faba4c10eed7
unity_docs
scripting
What are the parameters of `Vector3Int.ctor` in Unity?
Description Initializes and returns an instance of a new Vector3Int with x, y, z components. ```csharp // Attach this script to a GameObject. // Attach a Tilemap component to the GameObject (Click Add Component button in the Inspector window and go to 2D<Tilemap) // This script sets a Tile at a Vector3Int position usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_536941e64f52
unity_docs
scripting
What is `Playables.PlayableExtensions.GetGraph` in Unity? Explain its purpose and usage.
PlayableExtensions.GetGraph Declaration public static Playables.PlayableGraph GetGraph (U playable ); Parameters Parameter Description playable The Playable used by this operation. Returns PlayableGraph The PlayableGraph associated with the current Playable . Description Returns the PlayableG...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_356b9aedc607
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.ctor` in Unity? Explain its purpose and usage.
DictationRecognizer Constructor Declaration public DictationRecognizer (); Declaration public DictationRecognizer ( Windows.Speech.ConfidenceLevel confidenceLevel ); Declaration public DictationRecognizer ( Windows.Speech.DictationTopicConstraint topic ); Declaration public DictationRecognizer ( Wind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d3aaa78fd9f
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.SetMarkerMetadata`.
r marker handle. index Metadata parameter index. name Metadata parameter name. type Metadata type. Must be one of ProfilerMarkerDataType values. unit Metadata unit. Must be one of ProfilerMarkerDataUnit values. nameLen Metadata parameter name length. Description Set Profiler marker metadata name and type. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c9ff93c6e91
unity_docs
rendering
What is `CanvasRenderer.SetColor` in Unity? Explain its purpose and usage.
CanvasRenderer.SetColor Declaration public void SetColor ( Color color ); Parameters Parameter Description color Renderer multiply color. Description Set the color of the renderer. Will be multiplied with the UIVertex color and the Canvas color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d71af93974de
unity_docs
ui
What is `ParticleSystem.MainModule.startDelay` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startDelay public ParticleSystem.MinMaxCurve startDelay ; Description Start delay in seconds. Use this to delay when the playback starts on the system. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0036c367c561
unity_docs
scripting
In Unity's 'Button', what is 'Create a Button' and how does it work?
You can create a Button with UI Builder, UXML, or C#. The following C# example creates a Button with a label: ``` var button = new Button(() => { Debug.Log("Button clicked"); }) { text = "Click me" }; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_907795638a14
unity_docs
animation
What is `Playables.PlayableOutputExtensions.GetWeight` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.GetWeight Declaration public static float GetWeight (U output ); Parameters Parameter Description output The PlayableOutput used by this operation. Returns float The weight of the connection to the source playable. Description Returns the weight of the connection from the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6af79253e6da
unity_docs
rendering
Explain 'World building' in Unity.
Unity provides a selection of tools that let you create environmental features such as landforms and vegetation. In this section, you can find information on: Topic Description Sky Use skyboxes in your project. Terrain Information on Unity’s built-in Terrain features. These consist of tools that let you create and modi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_928b664de391
unity_docs
scripting
What is `Object.FindObjectsByType` in Unity? Explain its purpose and usage.
Object.FindObjectsByType Declaration public static Object[] FindObjectsByType (Type type , FindObjectsSortMode sortMode ); Declaration public static Object[] FindObjectsByType (Type type , FindObjectsInactive findObjectsInactive , FindObjectsSortMode sortMode ); Declaration public static T[] Find...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_034ed4ba53f1
unity_docs
rendering
In Unity's 'Custom Render Texture Inspector window reference', what is 'Render Texture:' and how does it work?
Property: Function: Dimension Dimension of the Render Texture. 2D Makes the Render Texture two-dimensional. Cube Makes the Render Texture a cube map. 3D Makes the Render Texture three-dimensional. Size The size of the Render Texture in pixels . Color Format The format of the Render Texture. sRGB (Color Render Texture) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e6bab2120a2
unity_docs
scripting
What is `Playables.INotification` in Unity? Explain its purpose and usage.
INotification interface in UnityEngine.Playables Description The base interface for all notifications sent through the playable system. Properties Property Description id The identifier is a name that identifies this notifications, or class of notifications.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57cbdc3ff756
unity_docs
scripting
What is `Experimental.GlobalIllumination.LinearColor.Black` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LinearColor.Black Declaration public static Experimental.GlobalIllumination.LinearColor Black (); Returns LinearColor Returns a black color. Description Returns a black color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_759c34272699
unity_docs
xr
What is `HDROutputSettings.active` in Unity? Explain its purpose and usage.
HDROutputSettings.active public bool active ; Description Describes whether HDR output is currently active on the display. It is true if this is the case, and @@false@ otherwise. The value of this poperty can change at runtime as a consequence of calling HDROutputSettings.RequestHDRModeChange . It is also po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6aa45fe487b5
unity_docs
input
Show me a Unity C# example demonstrating `Rendering.OnDemandRendering.renderFrameInterval`.
OnDemandRendering.renderFrameInterval public static int renderFrameInterval ; Description Get or set the current frame rate interval. To restore rendering back to the value of Application.targetFrameRate or QualitySettings.vSyncCount set this to 0 or 1. ```csharp using UnityEngine; using UnityEngine.Renderi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86852482025e
unity_docs
scripting
What is `ReflectionProbe.defaultReflectionTexture` in Unity? Explain its purpose and usage.
ReflectionProbe.defaultReflectionTexture Description Adds a delegate to get notifications when the default specular Cubemap is changed. Additional resources: ReflectionProbe . ```csharp using UnityEngine; using UnityEngine.Rendering;public class ReflectionProbeManager : MonoBehaviour { private static void OnSet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d2247421a99
unity_docs
audio
What is `Video.VideoPlayer.canSetDirectAudioVolume` in Unity? Explain its purpose and usage.
VideoPlayer.canSetDirectAudioVolume public bool canSetDirectAudioVolume ; Description Whether direct-output volume controls are supported for the current platform and video format. (Read Only) This value is only valid after the movie has been prepared. See VideoPlayer.Prepare .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0187663b6488
unity_docs
scripting
Explain 'Script compilation' in Unity.
This section contains information on how Unity compiles your scripts and in what order. Topic Description Scripting back ends Understand the different options Unity provides for compiling and running your scripts, and how each affects your project. Conditional compilation Use and define preprocessor directives to selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85e7359feadb
unity_docs
physics
What is `Rendering.RenderingThreadingMode.LegacyJobified` in Unity? Explain its purpose and usage.
RenderingThreadingMode.LegacyJobified Description Generates intermediate graphics commands via several worker threads. A single render thread then converts them into low-level platform API graphics commands. In this mode, several job worker threads process the application's high-level code and issue an intermediate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd7098344467
unity_docs
scripting
In Unity's 'Rect Transform', what is 'Details' and how does it work?
Note that some RectTransform calculations are performed at the end of a frame, just before calculating UI vertices, in order to ensure that they are up to date with all the latest changes performed throughout the frame. This means that they haven't yet been calculated for the first time in the Start callback and first ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2b47ebdd8fc
unity_docs
rendering
Show me a Unity C# example demonstrating `EditorUtility.CompressCubemapTexture`.
s method to explicitly compress a cubemap texture into the specified format. Unity does not support the compression of textures into signed EAC formats. Additionally, only the following formats are supported if the texture to compress uses non-power of two (NPOT) dimensions and has a mipmap: Crunch formats BC4 BC5 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43c709b8b299
unity_docs
rendering
Give me an overview of the `TextureResizeAlgorithm` class in Unity.
TextureResizeAlgorithm enumeration Description For Texture to be scaled down choose resize algorithm. ( Applyed only when Texture dimension is bigger than Max Size ). Properties Property Description Mitchell Default high quality resize algorithm. Bilinear Might provide better result than Mitchell for some nois...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27ef8e715898
unity_docs
editor
What is `Analytics.AnalyticsSettings.OnRequireInBuildHandler` in Unity? Explain its purpose and usage.
AnalyticsSettings.OnRequireInBuildHandler Description Dispatches whenever a platform build starts. Use this event to enable Analytics in a platform build. ```csharp using UnityEditor;[InitializeOnLoad] internal class SomeNewServiceRequiresAnalyticsDeviceStats { static SomeNewServiceRequiresAnalyticsDeviceStats() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9167709454d8
unity_docs
rendering
What is `TextureImporterCubemapConvolution` in Unity? Explain its purpose and usage.
TextureImporterCubemapConvolution enumeration Description Defines Cubemap convolution mode. This is useful if you need to pre-compute a diffuse or glossy specular reflections in the texture. Additional resources: TextureImporterSettings.cubemapConvolution . Properties Property Description None No convolutio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a89070e9870b
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.GetSwizzleG` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.GetSwizzleG Declaration public static Rendering.FormatSwizzle GetSwizzleG ( Experimental.Rendering.GraphicsFormat format ); Declaration public static Rendering.FormatSwizzle GetSwizzleG ( TextureFo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a36e919cc9d
unity_docs
audio
Give me an overview of the `AudioCompressionFormat` class in Unity.
AudioCompressionFormat enumeration Description An enum containing different compression types. This enum is used within the AudioImporter to define what type of compression will be used for an imported AudioClip. Properties Property Description PCM Uncompressed pulse-code modulation. Vorbis Vorbis compression...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da8e39ae4d4e
unity_docs
rendering
What is `ModelImporter.importLights` in Unity? Explain its purpose and usage.
ModelImporter.importLights public bool importLights ; Description Controls import of lights. Note that because light are defined differently in DCC tools, some light types or properties may not be exported. Basic properties like color and intensity can be animated.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80fa3543d696
unity_docs
rendering
What is `Rendering.SupportedRenderingFeatures.lightmapBakeTypes` in Unity? Explain its purpose and usage.
SupportedRenderingFeatures.lightmapBakeTypes public LightmapBakeType lightmapBakeTypes ; Description What baking types are supported. The unsupported ones will be hidden from the UI. See LightmapBakeType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b3adc99ca19
unity_docs
input
What is `FocusType` in Unity? Explain its purpose and usage.
FocusType enumeration Description Used by GUIUtility.GetControlID to inform the IMGUI system if a given control can get keyboard focus. This allows the IMGUI system to give focus appropriately when a user presses tab for cycling between controls. Properties Property Description Keyboard This control can receive...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c3c6b319f15
unity_docs
rendering
What is `LightingSettings.maxBounces` in Unity? Explain its purpose and usage.
LightingSettings.maxBounces public int maxBounces ; Description Stores the maximum number of bounces the Progressive Lightmapper computes for indirect lighting. (Editor only) To reduce the computational load and improve performance during bakes, the Progressive Lightmapper terminates light paths that contribut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7f05de0e11f
unity_docs
scripting
What is `AssetImporters.ImportLogFlags` in Unity? Explain its purpose and usage.
ImportLogFlags enumeration Description A value indicating the severity of an import log. Properties Property Description None Unknown severity. Error The imported asset encountered an issue that should be addressed. Warning The imported asset encountered a non-critical issue.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_438b9416cfd2
unity_docs
editor
What is `Callbacks.RunBeforeAssemblyAttribute.ctor` in Unity? Explain its purpose and usage.
RunBeforeAssemblyAttribute Constructor Declaration public RunBeforeAssemblyAttribute (string assemblyName ); Parameters Parameter Description assemblyName The name of the assembly that should be called after this callback. Description Add this attribute to a callback method to indicate that this callback m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cce96aa346aa
unity_docs
scripting
What is `Search.SearchExpression.IsKeyword` in Unity? Explain its purpose and usage.
SearchExpression.IsKeyword Declaration public bool IsKeyword ( Search.SearchExpressionKeyword keyword ); Parameters Parameter Description keyword Builtin keyword to check the expression against. Returns bool Returns if the expression is a builtin Search Expression keyword. Description Check if the i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3f60a6e382e1_doc_2
github
scripting
What does `CreateSystemManagerObserver` do in this Unity script? Explain its purpose and signature.
The method creates a new GameObject which is a representation of ISystemManager within Unity3D's sceneA name of a game object that will have SystemManagerObserver componentThe extension method returns a new allocated observer of ISystemManager type Signature: ```csharp public static SystemManagerObserver CreateSystemM...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_1cc971dfcd35
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUIUtility.whiteTexture`.
EditorGUIUtility.whiteTexture public static Texture2D whiteTexture ; Description Get a white texture. White texture in an Editor Window. ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor;public class EditorGUITextures : EditorWindow { Texture2D textur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2fcb6145c97
unity_docs
scripting
What is `Unity.Android.Gradle.IncludeList` in Unity? Explain its purpose and usage.
IncludeList class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description The C# definition of a list of include element in a gradle file. Constructors Constructor Description IncludeList Element constructor. Public Methods Method Description AddPluginByName Adds a plugin in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_42ee10493583
unity_docs
ui
In Unity's 'Bind a custom control', what is 'Create and style a custom control' and how does it work?
Create a custom control with C# that represents a reference to a 2D texture asset, and style it with USS. In that folder, create a folder named Editor . In the Editor folder, create a C# script named TexturePreviewElement.cs . Replace the contents of TexturePreviewElement.cs with the following: ```csharp using System; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4870ad4e008d
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.Reflect`.
a vector off the plane defined by a normal vector. This method calculates the reflection vector using the following formula: B = A − 2 × N × A ⋅ N where A is the incoming vector and N defines the normal (perpendicular) vector of the reflection plane. The returned value is a vector of equal magnitude to inDire...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c7a4e9cccbf
unity_docs
rendering
What is `Light.lightmapBakeType` in Unity? Explain its purpose and usage.
Light.lightmapBakeType public LightmapBakeType lightmapBakeType ; Description This property describes what part of a light's contribution can be baked (Editor only). If this setting is LightmapBakeType.Realtime , realtime indirect GI can be precomputed, and then updated at runtime. If this setting is Light...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bc4c191af06
unity_docs
xr
What is `Experimental.GraphView.NodeCreationContext` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. NodeCreationContext struct in UnityEditor.Experimental.GraphView Description This struct represents the context when the user initiates creating a graph node. Properties Property Description index The index where the create...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_404ea3809f42_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
struct TViewComponentThe structure contains a reference to a view which is linked to the entity Signature: ```csharp public struct TViewComponent: IComponent ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fde69e2b2358
unity_docs
animation
What is `Animations.AnimationStreamHandleUtility.ReadFloats` in Unity? Explain its purpose and usage.
AnimationStreamHandleUtility.ReadFloats Declaration public static void ReadFloats ( Animations.AnimationStream stream , NativeArray<PropertyStreamHandle> handles , NativeArray<float> buffer ); Parameters Parameter Description stream The animation stream. handles The PropertyStreamHandle array to read fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5644ad4dcb6f
unity_docs
xr
Explain 'OpenXR Plugin' in Unity.
com.unity.xr.openxr ## Description OpenXR is an open, royalty-free standard developed by Khronos that aims to simplify AR/VR development by allowing developers to target a wide range of AR/VR devices. Use this plug-in to enable OpenXR in XR Plug-in Management. ## Released for Unity Package version 1.16.1 is release...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7b15d4d1b2d
unity_docs
rendering
What is `Rendering.RayTracingAABBsInstanceConfig.opaqueMaterial` in Unity? Explain its purpose and usage.
RayTracingAABBsInstanceConfig.opaqueMaterial public bool opaqueMaterial ; Description Determines whether Unity considers the material opaque. If you use ray tracing shaders, Unity disables any hit shaders for opaque materials so the GPU doesn't execute them.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0e8b7118c14
unity_docs
scripting
What are the parameters of `Handles.FreeMoveHandle` in Unity?
Returns Vector3 The new value modified by the user's interaction with the handle. If the user has not moved the handle, it will return the same value as you passed into the function. Description Make an unconstrained movement handle. This handle can move freely in all directions. Hold down Ctrl (Cmd on macOS) to snap t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_237fef106e08
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.IsBuildable`.
t.IsBuildable Declaration public static bool IsBuildable (string ext ); Parameters Parameter Description ext The file extension. Note : A leading . is not necessary but is accepted. Returns bool Returns true if the file can be built. Description Checks if a file with the given extension can be bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3df414ceff0b
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.GetBuildPropertyForConfig` in Unity?
Returns string The specified build property value. Description Gets a build property value for the given name in the specified build configuration(s). If a property has multiple values they are delimited by a space. Duplicate build properties are ignored. Values for names LIBRARY_SEARCH_PATHS and FRAMEWORK_SEARCH_PATHS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14779c5d0bf9
unity_docs
animation
Show me a Unity C# example demonstrating `ModelImporter.clipAnimations`.
public ModelImporterClipAnimation[] clipAnimations ; Description Animation clips to split animation into. Additional resources: ModelImporterClipAnimation . When you import a file for the first time clipAnimations will be always empty. If you need to populate clipAnimations before the first import you can use an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c72c1c3ced26
unity_docs
editor
What is `EditorGUILayout.PasswordField` in Unity? Explain its purpose and usage.
EditorGUILayout.PasswordField Declaration public static string PasswordField (string password , params GUILayoutOption[] options ); Declaration public static string PasswordField (string password , GUIStyle style , params GUILayoutOption[] options ); Declaration public static string PasswordField (str...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d937ca14bbc2
unity_docs
editor
What is `Profiling.Profiler.areaCount` in Unity? Explain its purpose and usage.
Profiler.areaCount public static int areaCount ; Description The number of Profiler Areas that you can profile. This number is build constant right now, as ProfilerArea is an enum. Try not to rely on it staying the same throughout the lifetime of the editor instance though, as this is prone to change in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bcbbd17bd563
unity_docs
physics
What is `AnisotropicFiltering` in Unity? Explain its purpose and usage.
AnisotropicFiltering enumeration Description Anisotropic filtering mode. Additional resources: QualitySettings.anisotropicFiltering . Properties Property Description Disable Disable anisotropic filtering for all textures. Enable Enable anisotropic filtering, as set for each texture. ForceEnable Enable aniso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe588d32dc1e
unity_docs
ui
What is `PopupWindowContent.CreateGUI` in Unity? Explain its purpose and usage.
PopupWindowContent.CreateGUI Declaration public UIElements.VisualElement CreateGUI (); Returns VisualElement The element containing the custom GUI. Description Creates custom GUI with UI Toolkit for the popup.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_202b620cf8a9
unity_docs
rendering
What is `ParticleSystem.CustomDataModule.GetVector` in Unity? Explain its purpose and usage.
ParticleSystem.CustomDataModule.GetVector Declaration public ParticleSystem.MinMaxCurve GetVector ( ParticleSystemCustomData stream , int component ); Parameters Parameter Description stream The name of the custom data stream to retrieve the curve from. component The component index to retrieve the cu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10674a094237
unity_docs
rendering
What are the parameters of `Shader.EnableKeyword` in Unity?
Description Enables a global shader keyword. Shader keywords determine which shader variants Unity uses. For information on working with local shader keywords and global shader keywords and how they interact, see Using shader keywords with C# scripts . If you pass a string and a GlobalKeyword with the given name does n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf13715f9a5b
unity_docs
scripting
What is `tvOS.Device.SetNoBackupFlag` in Unity? Explain its purpose and usage.
Device.SetNoBackupFlag Declaration public static void SetNoBackupFlag (string path ); Description Set file flag to be excluded from iCloud/iTunes backup. As a side-effect, if it was located in Caches folder, it won't be deleted by OS.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7f7d8f9e7ca0
unity_docs
editor
Explain 'Play mode and Editor profile samples' in Unity.
When you profile the Unity Editor or Play mode, Unity groups their relevant timings into two sample groups that have the following markers : PlayerLoop : Timings related to Play mode EditorLoop : Timings related to the Editor ## Play mode samples When you profile Play mode, the Profiler only collects timing samples t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_126f0e3a4ca9
unity_docs
ui
Explain 'Install Unity using installer files' in Unity.
The installer files are executable programs that you can use to install the Unity Editor and other components. The components provide target platform build support for the installed Unity Editor version. You must download separate installer files for the Unity Editor and other components. The installation process invol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fceccf76eda1
unity_docs
networking
What is `Application.internetReachability` in Unity? Explain its purpose and usage.
Application.internetReachability public static NetworkReachability internetReachability ; Description Returns the type of internet reachability currently possible on the device. This property is mostly useful on handhelds to distinguish fast and cheap WiFi connection from carrier networking. Note : Do not use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84f6a117071a
unity_docs
rendering
What is `Renderer.SetPropertyBlock` in Unity? Explain its purpose and usage.
Renderer.SetPropertyBlock Declaration public void SetPropertyBlock ( MaterialPropertyBlock properties ); Declaration public void SetPropertyBlock ( MaterialPropertyBlock properties , int materialIndex ); Parameters Parameter Description properties Property block with values you want to override. mat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_846b5fd87643
unity_docs
scripting
What is `UIElements.BaseTreeViewController.CollapseItemByIndex` in Unity? Explain its purpose and usage.
BaseTreeViewController.CollapseItemByIndex Declaration public void CollapseItemByIndex (int index , bool collapseAllChildren , bool refresh ); Parameters Parameter Description index The item index. collapseAllChildren Whether the whole hierarchy under that item will be collapsed. refresh Whether to ref...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c45ce3246c51
unity_docs
physics
What is `CustomRenderTexture.Update` in Unity? Explain its purpose and usage.
CustomRenderTexture.Update Declaration public void Update (int count ); Parameters Parameter Description count Number of upate pass to perform. The default value of this count parameter is 1. Description Triggers an update of the Custom Render Texture.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f35f4278df82
unity_docs
math
Show me a Unity C# example demonstrating `Rendering.SphericalHarmonicsL2.Evaluate`.
, Color[] results ); Parameters Parameter Description directions Array of normalized directions in which to evaluate the spherical harmonics. results Output array for the evaluated values. The order of the results is the same as the directions array. Description Evaluates the spherical harmonics for each gi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea5a63d1fdb5
unity_docs
editor
What is `VersionControl.Provider.UnlockIsValid` in Unity? Explain its purpose and usage.
Provider.UnlockIsValid Declaration public static bool UnlockIsValid ( VersionControl.AssetList assets ); Declaration public static bool UnlockIsValid ( VersionControl.Asset asset ); Parameters Parameter Description assets The asset list to test. asset The asset to test. Description Returns true if...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27c7a07c803a
unity_docs
rendering
What is `TextureFormat.DXT1Crunched` in Unity? Explain its purpose and usage.
TextureFormat.DXT1Crunched Description Compressed color texture format with Crunch compression for smaller storage sizes. The DXT1Crunched format is similar to the DXT1 format but with additional JPEG-like lossy compression for storage size reduction. Textures are transcoded into the DXT1 format at load time. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27c0ac5026ba
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.IsGroupable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.IsGroupable Declaration public bool IsGroupable (); Returns bool Returns true if the GraphElement is groupable. Returns false otherwise. Description Checks whether the GraphElement is groupable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d65c1ec34ddd
unity_docs
rendering
Show me a Unity C# example demonstrating `ComputeShader.SetRayTracingAccelerationStructure`.
ructure to be used for Inline Ray Tracing (Ray Queries). Use SystemInfo.supportsInlineRayTracing to check at runtime if Inline Ray Tracing is supported by the system. In compute shaders, ray queries can be used to perform acceleration structure traversal and geometry intersection tests. To access this functionality...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa9326a053b9
unity_docs
rendering
In Unity's 'Importing a model', what is 'Importing materials' and how does it work?
If your file contains materials and textures, you can define how you want to deal with them: Select a model file from the Project window. In the Inspector, select the Materials tab . Use the Material Creation Mode drop-down menu to choose how you want to import the materials from the FBX file.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7aae05b08e5c
unity_docs
scripting
What is `PackageManager.LogLevel.Silly` in Unity? Explain its purpose and usage.
LogLevel.Silly Description Extremely detailed messages are reported, in addition to anything from the LogLevel.Debug level. Most detailed level of information. Note that using this level may quickly result in a very large upm.log file.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d82910bdfffd
unity_docs
rendering
What is `Texture.streamingTextureLoadingCount` in Unity? Explain its purpose and usage.
Texture.streamingTextureLoadingCount public static ulong streamingTextureLoadingCount ; Description Number of streaming Textures with mipmaps currently loading. 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 upon immediately...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a981602ffb9
unity_docs
scripting
What is `Camera.OnPreRender` in Unity? Explain its purpose and usage.
Camera.OnPreRender() Description Event function that Unity calls before a Camera renders the scene. In the Built-in Render Pipeline, Unity calls OnPreRender on MonoBehaviours that are attached to the same GameObject as an enabled Camera component, just before that Camera renders the scene. For a full descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48e01a9ee0e2
unity_docs
physics
What is `Diagnostics.Utils` in Unity? Explain its purpose and usage.
Utils class in UnityEngine.Diagnostics / Implemented in: UnityEngine.CoreModule Description A utility class that you can use for diagnostic purposes. Static Methods Method Description ForceCrash Manually causes an application crash in the specified category. NativeAssert Manually causes an assert that outpu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93865a79e9d1
unity_docs
performance
What is `Profiling.ProfilerTimeSampleSelection.threadGroupName` in Unity? Explain its purpose and usage.
ProfilerTimeSampleSelection.threadGroupName public string threadGroupName ; Description The name of the group of the thread this sample resides in. When the thread is not part of a thread group, this value is string.empty.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_25b039f265ab
unity_docs
rendering
In Unity's 'Self-Illuminated Specular', what is 'Self-Illuminated Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the object that “emit” light by themselves, even when no light is shining on it. In the alpha channel, black is zer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00e3af80376d
unity_docs
physics
What is `WheelJoint2D.GetMotorTorque` in Unity? Explain its purpose and usage.
WheelJoint2D.GetMotorTorque Declaration public float GetMotorTorque (float timeStep ); Parameters Parameter Description timeStep The time to calculate the motor torque for. Description Gets the motor torque of the joint given the specified timestep .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05afa9a5ddb6
unity_docs
rendering
What is `ComputeBuffer.BeginWrite` in Unity? Explain its purpose and usage.
ComputeBuffer.BeginWrite Declaration public NativeArray<T> BeginWrite (int computeBufferStartIndex , int count ); Parameters Parameter Description computeBufferStartIndex Offset in number of elements to which the write operation will occur count Maximum number of elements which will be written Returns N...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e0e659ca958
unity_docs
rendering
What is `GL.wireframe` in Unity? Explain its purpose and usage.
GL.wireframe public static bool wireframe ; Description Should rendering be done in wireframe? Turning on wireframe mode will affect all objects rendered after the call, until you turn wireframe back off. In the Unity editor, wireframe mode is always turned off before repainting any window. Note that some platf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aaf854682a18
unity_docs
math
What is `Overlays.Overlay.minSize` in Unity? Explain its purpose and usage.
Overlay.minSize public Vector2 minSize ; Description Minimum size of the Overlay. Overlays can be resized. The minSize variable is the minimum width and height that the Overlay can be resized. This is typically a Vector2(4000,4000). If the axis of both the minSize and maxSize are set to 0, resizing is disable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cfb5f540006f
unity_docs
ui
In Unity's 'ListView', what is 'Refresh the collection view' and how does it work?
To refresh the collection view, you can call either RefreshItems / RefreshItem or Rebuild . In general, call the RefreshItems or RefreshItem method—these methods only refresh the collection view and are less expensive. If you call Rebuild , the collection view is completely rebuilt, which can be expensive. However, you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec4e75696282
unity_docs
rendering
What is `Rendering.RenderPipeline.SubmitRenderRequest` in Unity? Explain its purpose and usage.
RenderPipeline.SubmitRenderRequest Declaration public static void SubmitRenderRequest ( Camera camera , RequestData data ); Description Submit a renderRequest. This triggers a pipeline render determined by the RequestData type. Use ScriptableRenderer.SupportsRenderRequest to check if the active RenderPipelin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fbd35a92c304
unity_docs
physics
Explain 'Line Renderer Scene Tools panel reference' in Unity.
The properties in the Scene Tools panel change depending on whether the Line Renderer Scene Editing Mode is set to None , Edit Points , or Create Points . To set the current Scene Editing Mode, use the Edit Points and Create Points buttons. ## Scene Editing Mode: None By default, there is no Scene Editing Mode set. C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53135b26e9da
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.velocityOverLifetime`.
ParticleSystem.velocityOverLifetime public ParticleSystem.VelocityOverLifetimeModule velocityOverLifetime ; Description Script interface for the VelocityOverLifetimeModule of a Particle System. This module sets the velocity of particles during their lifetime. Particle System modules do not need to be reassig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7bc6adc2500
unity_docs
rendering
What is `EditorSettings.enableTextureStreamingInPlayMode` in Unity? Explain its purpose and usage.
EditorSettings.enableTextureStreamingInPlayMode public static bool enableTextureStreamingInPlayMode ; Description Enable texture mipmap streaming system when in Play Mode. Texture mipmap streaming only loads the texture mipmaps required by active cameras in the Scene. During Play mode, some mipmaps will be disc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85c915492576
unity_docs
math
What is `Quaternion.Lerp` in Unity? Explain its purpose and usage.
Quaternion.Lerp Declaration public static Quaternion Lerp ( Quaternion a , Quaternion b , float t ); Parameters Parameter Description a Start unit quaternion value, returned when t = 0. b End unit quaternion value, returned when t = 1. t Interpolation ratio. The value is clamped to the range [0, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_db9ac48586a8
unity_docs
physics
Explain 'Create a compound collider' in Unity.
A compound collider is a collection of collider GameObjects on the same parent Rigidbody GameObject . For details on when and why you might use a compound collider, see Introduction to compound colliders . A compound collider is made up of a parent GameObject which has a Rigidbody component, and child GameObjects that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b6420156a45
unity_docs
animation
Explain 'Animator Controller' in Unity.
Use an Animator Controller to arrange and maintain a set of Animation Clips and associated Animation Transitions for a character or an animated GameObject . In most situations, it’s normal to have multiple animations and transition between them when certain game conditions occur. For example, you could transition from ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.