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_b12be3cdd153
unity_docs
rendering
What is `Rendering.RenderPipelineAsset.autodeskInteractiveTransparentShader` in Unity? Explain its purpose and usage.
RenderPipelineAsset.autodeskInteractiveTransparentShader public Shader autodeskInteractiveTransparentShader ; Returns Shader Returns the default shader. Description Retrieves the default Autodesk Interactive transparent Shader for this pipeline. This method is called whenever a model with Autodesk Int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8d86c6a9b37
unity_docs
scripting
What is `UIElements.UxmlLongAttributeDescription` in Unity? Explain its purpose and usage.
UxmlLongAttributeDescription class in UnityEngine.UIElements / Inherits from: UIElements.TypedUxmlAttributeDescription_1 / Implemented in: UnityEngine.UIElementsModule Description Describes a UXML long attribute. Properties Property Description defaultValueAsString The default value for the attribut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72a8bba0bd3e
unity_docs
rendering
Show me a Unity C# example demonstrating `LightTransport.RadeonRaysProbeIntegrator.SetProgressReporter`.
gressReporter Declaration public void SetProgressReporter ( LightTransport.BakeProgressState progress ); Parameters Parameter Description progress BakeProgressState tracker to set on the probe integrator. Description Set progress tracker. Set a BakeProgressState on the integrator. The integrator will ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57b0495d3a57
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Profiler.AddFramesFromFile`.
Profiler.AddFramesFromFile Declaration public static void AddFramesFromFile (string file ); Parameters Parameter Description file The name of the file containing the frame data, including extension. Description Displays the recorded profile data in the profiler. The Profiler appends the loaded data after ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b59578674cd3
unity_docs
editor
What are the parameters of `VersionControl.Provider.Delete` in Unity?
Description Starts a task to delete an Asset or a list of Assets from the disk and from the version control system. Once the task has completed the resultCode of the task will tell if the assets were successfully deleted. Note that after this operation is completed, Asset Database is not refreshed automatically. It can...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e1ed9dec8f8
unity_docs
rendering
Give me an overview of the `ParticleSystemTrailMode` class in Unity.
ParticleSystemTrailMode enumeration Description Choose how Particle Trails are generated. Properties Property Description PerParticle Makes a trail behind each particle as the particle moves. Ribbon Draws a line between each particle, connecting the youngest particle to the oldest.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d0782d558059
github
scripting
Write a Unity C# script called XR Lever
```csharp using UnityEngine; using UnityEngine.Events; using UnityEngine.XR.Interaction.Toolkit; /// <summary> /// An interactable lever that snaps into an on or off position by a direct interactor /// </summary> public class XRLever : XRBaseInteractable { [Tooltip("The object that's grabbed and manipulated")] ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_e508c0bd3e0d
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startSize3D`.
ParticleSystem.MainModule.startSize3D public bool startSize3D ; Description A flag to enable specifying particle size individually for each axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : Mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5a25d065eab
unity_docs
scripting
What is `IMGUI.Controls.TreeViewItem.ctor` in Unity? Explain its purpose and usage.
TreeViewItem Constructor Declaration public TreeViewItem (int id ); Declaration public TreeViewItem (int id , int depth ); Declaration public TreeViewItem (int id , int depth , string displayName ); Parameters Parameter Description id Unique ID to identify this TreeViewItem with among all TreeVi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0592d55ede81
unity_docs
math
What are the parameters of `Gizmos.DrawLineList` in Unity?
Description Draws multiple lines between pairs of points. This function provides a more efficient way to draw multiple lines than repeatedly calling the Gizmos.DrawLine function for each one. Each pair of points from the points span represents the start and end of each line, so Unity draws the first line from points[0]...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c903bfd06e3
unity_docs
rendering
What is `Handles.DrawCamera` in Unity? Explain its purpose and usage.
Handles.DrawCamera Declaration public static void DrawCamera ( Rect position , Camera camera ); Declaration public static void DrawCamera ( Rect position , Camera camera , DrawCameraMode drawMode = UnityEditor.DrawCameraMode.Normal); Parameters Parameter Description position The area to draw...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_792bd278ad27
unity_docs
animation
What is `Experimental.Animations.AnimationPlayableOutputExtensions.GetAnimationStreamSource` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AnimationPlayableOutputExtensions.GetAnimationStreamSource Declaration public static Experimental.Animations.AnimationStreamSource GetAnimationStreamSource ( Animations.AnimationPlayableOutput output ); Parameters Paramet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3a02c19313e0
github
scripting
Write a Unity C# MonoBehaviour script called Fade Material
```csharp using System.Collections; using UnityEngine; public class FadeMaterial : MonoBehaviour { // attached game object for fading public GameObject Environment; // fade speed length public float fadeSpeed; Coroutine m_FadeCoroutine; public void FadeSkybox(bool visible) { if (...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_3a788360ee84
unity_docs
ui
Explain 'Create a pie chart in the Editor and runtime UI' in Unity.
Version : 2023.2+ This example demonstrates how to use the Vector API to create graphs in the Editor and runtime UI. ## Example overview This example generates a pie chart onto a VisualElement , and displays it in the Editor and runtime UI. You can find the completed files that this example creates in this GitHub rep...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_35f8fb3212ea_doc_12
github
scripting
What does `WaitCoroutine` do in this Unity script? Explain its purpose and signature.
Utility coroutine for delayed execution. Used for the interactable patch workaround.Time to wait in seconds.Function to call after waiting (parameter is always false). Signature: ```csharp public static IEnumerator WaitCoroutine(float waitingTime, Action<bool> callback) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_37764eb47e80
unity_docs
scripting
What is `ChangeGameObjectParentEventArgs` in Unity? Explain its purpose and usage.
ChangeGameObjectParentEventArgs struct in UnityEditor Description A change of this type indicates that the parent of a GameObject has changed. This happens when Undo.SetTransformParent or SceneManager.MoveGameObjectToScene is used. Properties Property Description instanceId The instance ID of the GameObj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4ee77af3dffe_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Even m_TimerControl is set to false, we may still need to use timer because no controller connected. Signature: ```csharp private bool useTimer = false; ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_c493d658e481
unity_docs
editor
What is `EditorGUILayout.Slider` in Unity? Explain its purpose and usage.
EditorGUILayout.Slider Declaration public static float Slider (float value , float leftValue , float rightValue , params GUILayoutOption[] options ); Declaration public static float Slider (string label , float value , float leftValue , float rightValue , params GUILayoutOption[] options ); Declarati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4dfb6f1f185b
unity_docs
editor
What are the parameters of `Search.SearchExpressionEvaluatorAttribute.ctor` in Unity?
Description Use this attribute to register a static C# function as a new evaluator. SearchExpressionEvaluator when use within a SearchExpression can have a signature that is validated against the passed parameters. Here is an example using a Variadic paramater. ```csharp [SearchExpressionEvaluator(SearchExpressionType....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_86a806969c87_doc_0
github
scripting
What does `GetLength` do in this Unity script? Explain its purpose and signature.
/ ---------------------------------------------------------------------------------------/ IBlendTreeElement : BEGIN/ --------------------------------------------------------------------------------------- Signature: ```csharp public float GetLength() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1bb177bdba16
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.NumberOfInProgressRequests` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.NumberOfInProgressRequests public int NumberOfInProgressRequests ; Description The total number of in progress requests in the metrics included in the summary calculation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab7b4ddfe14c
unity_docs
scripting
What is `ResourceRequest` in Unity? Explain its purpose and usage.
ResourceRequest class in UnityEngine / Inherits from: AsyncOperation / Implemented in: UnityEngine.CoreModule Description Asynchronous load request from the Resources bundle. Additional resources: Resources.LoadAsync , AsyncOperation . Properties Property Description asset Asset object being loaded (Rea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2388e7402a8e
github
scripting
Write a Unity C# script called Input Controller
```csharp using RMC.Core.Architectures.Umvcs.Controller; using RMC.Core.Architectures.Umvcs.Model; using RMC.Core.Architectures.Umvcs.Samples.MyBouncyBallExample.Umvcs.Controller.Commands; using RMC.Core.Architectures.Umvcs.Service; using RMC.Core.Architectures.Umvcs.View; using UnityEngine; namespace RMC.Core.Archit...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_f1f091e08e9b
unity_docs
physics
What is `CharacterJoint` in Unity? Explain its purpose and usage.
CharacterJoint class in UnityEngine / Inherits from: Joint / Implemented in: UnityEngine.PhysicsModule Description Character Joints are mainly used for Ragdoll effects. They are an extended ball-socket joint which allows you to limit the joint on each axis. Properties Property Description enableProjectio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a039096269e2
github
scripting
Write a Unity C# script called Player Loop Helper
```csharp using System; using UnityEngine.LowLevel; namespace UnityPlayerLooper { public static class PlayerLoopHelper { public enum InsertPosition { Before = 0, After = 1, } public static PlayerLoopSystem CreateLoopSystem<T>(PlayerLoopSystem.UpdateFunct...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_4f84a730409a
unity_docs
scripting
What is `SceneManagement.SceneManager.UnloadSceneAsync` in Unity? Explain its purpose and usage.
SceneManager.UnloadSceneAsync Declaration public static AsyncOperation UnloadSceneAsync (int sceneBuildIndex ); Declaration public static AsyncOperation UnloadSceneAsync (string sceneName ); Declaration public static AsyncOperation UnloadSceneAsync ( SceneManagement.Scene scene ); Declaration pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77886b51eb36
unity_docs
scripting
What is `GridBrushBase.Rotate` in Unity? Explain its purpose and usage.
GridBrushBase.Rotate Declaration public void Rotate ( GridBrushBase.RotationDirection direction , GridLayout.CellLayout layout ); Parameters Parameter Description direction Direction to rotate by. layout CellLayout for rotating. Description Rotates all tiles on the grid brush with the given Rotation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6629da937a27
unity_docs
rendering
What are the parameters of `Rendering.CommandBuffer.BeginRenderPass` in Unity?
Description Begin a new native render pass. The render pass allows multiple subpasses within the same renderpass, where the pixel shaders have a read access to the current pixel value within the renderpass. This allows for efficient implementation of various rendering methods on tile-based GPUs, such as deferred rende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_567e765694d1
unity_docs
physics
In Unity's 'Use components', what is 'Edit components' and how does it work?
When you attach a component to a GameObject, the component’s properties contain default values. You can edit these values in the Editor while you build a game, or in scripts when you run the game. There are two main types of properties: values and references. You can edit value properties in the Inspector. There are va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1fced1c8462f
unity_docs
rendering
Explain 'Content output of a build' in Unity.
When you create a build of your Unity project, the Data folder (or equivalent on target platforms) contains the serialized files that make up the content of your application. The primary files in the build’s Data folder related to asset loading are: globalgamemanager : Contains core engine data, global project settings...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb01aab55ddb
unity_docs
ui
Show me a Unity C# example demonstrating `EditorGUILayout.IntSlider`.
le . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns int The value that has been set by the user. Description Make a slider the user can drag to chan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed779ee6dd78
unity_docs
scripting
What is `Camera.ViewportPointToRay` in Unity? Explain its purpose and usage.
Camera.ViewportPointToRay Declaration public Ray ViewportPointToRay ( Vector3 pos ); Declaration public Ray ViewportPointToRay ( Vector3 pos , Camera.MonoOrStereoscopicEye eye ); Parameters Parameter Description eye Optional argument that can be used to specify which eye transform to use. Defa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d62fd9ef6d56
unity_docs
scripting
In Unity's 'Naming scripts', what is 'Limitation for multiple namespaces' and how does it work?
Unity has a specific limitation relating to namespaces and MonoBehaviour or ScriptableObject classes. If your file contains a definition for a MonoBehaviour or ScriptableObject class, you can’t use multiple namespaces within that file. Unity gives the following warning in the console: ``` Class MyClass can not exist in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f003b2f4701
unity_docs
rendering
What is `TextureImporterSettings.swizzleA` in Unity? Explain its purpose and usage.
TextureImporterSettings.swizzleA public TextureImporterSwizzle swizzleA ; Description Specifies the source for the texture's alpha color channel data. By default, values for the imported texture's alpha channel come from the source image's alpha channel. To reorder or invert color channels at import time, cha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7c811b90a3f
unity_docs
ui
What is `UIElements.IDebugPanelChangeReceiver` in Unity? Explain its purpose and usage.
IDebugPanelChangeReceiver interface in UnityEngine.UIElements Description Implement this to receive callbacks for visual element changes. This interface is exclusively available in development builds and the Editor, as it serves as a debug feature that complements the profiling of an application. Related To ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e905876a756a
unity_docs
rendering
What is `Highlighter` in Unity? Explain its purpose and usage.
Highlighter class in UnityEditor Description Use this class to highlight elements in the editor for use in in-editor tutorials and similar. Static Properties Property Description active Is there currently an active highlight? activeRect The rect in screenspace of the current active highlight. activeText The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cecd536dd92c
unity_docs
rendering
Explain 'Search query operators' in Unity.
The Scene, Asset, Objects, and Resource providers use a QueryEngine ( Scene , Asset , Objects and Resource providers) to parse and resolve their queries. They support a basic set of Query Operators that allow for more complex queries using Boolean operators and parentheses grouping. The table on this page lists the sup...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2ee8baf3f90
unity_docs
rendering
What is `PlayerSettings.SplashScreen.UnityLogoStyle` in Unity? Explain its purpose and usage.
UnityLogoStyle enumeration Description The style to use for the Unity logo during the Splash Screen. Properties Property Description DarkOnLight A dark Unity logo with a light background. LightOnDark A white Unity logo with a dark background.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f2cf847780b
unity_docs
xr
What is `Search.SearchFlags.None` in Unity? Explain its purpose and usage.
SearchFlags.None Description No specific search options. Result will be unsorted. ```csharp using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; public class SearchFlags_None { [MenuItem("Examples/SearchFlags/None")] public static void Reques...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_819dd4c3e2e3
unity_docs
input
In Unity's 'FloatField', what is 'Create a FloatField' and how does it work?
You can create a FloatField with UI Builder, UXML, and C#. The following C# example creates a FloatField with a value change callback: ``` FloatField myElement = new FloatField("Label text"); // Align the float field with the other fields. myElement.AddToClassList("unity-base-field__aligned"); myElement.value = 0.5f; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50600b4aac55
unity_docs
rendering
What is `Profiling.FrameDataView.GetMarkerCategoryIndex` in Unity? Explain its purpose and usage.
FrameDataView.GetMarkerCategoryIndex Declaration public ushort GetMarkerCategoryIndex (int markerId ); Parameters Parameter Description markerId Marker identifier. Returns ushort Returns Profiler category index. Description Gets Profiler marker category for the specific marker identifier. Use to fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a27f09ac9235
unity_docs
editor
Give me an overview of the `SerializationUtility` class in Unity.
SerializationUtility class in UnityEditor Description Utility functions related to Serialization. Additional resources: ManagedReferenceUtility , SerializeReference , SerializedProperty . Static Methods Method Description ClearAllManagedReferencesWithMissingTypes Removes all managed references that are mi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b61c4824c74b
unity_docs
scripting
What is `MonoBehaviour.StartCoroutine` in Unity? Explain its purpose and usage.
MonoBehaviour.StartCoroutine Declaration public Coroutine StartCoroutine (IEnumerator routine ); Description Starts a coroutine. The execution of a coroutine can be paused at any point using the yield statement. When a yield statement is used, the coroutine pauses execution and automatically resumes at ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49d25d242ce3
unity_docs
scripting
Show me a Unity C# example demonstrating `Logger.ctor`.
Logger Constructor Declaration public Logger ( ILogHandler logHandler ); Parameters Parameter Description logHandler Pass in default log handler or custom log handler. Description Create a custom Logger. Additional resources: ILogHandler , Debug.unityLogger . ```csharp using UnityEngine; using System....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73f24daa4650
unity_docs
scripting
Show me a Unity C# example demonstrating `Events.UnityEvent_4`.
UnityEvent<T0,T1,T2,T3> class in UnityEngine.Events / Inherits from: Events.UnityEventBase / Implemented in: UnityEngine.CoreModule Description Four argument version of UnityEvent . Generics are supported, specify type parameters on initialization as shown in the example. Refer to Configure callbacks in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0dfd1eb9db05
unity_docs
scripting
In Unity's 'Use deep linking on UWP', what is 'Enable deep linking for UWP applications' and how does it work?
Before you can process deep links, you need to configure your application to react to them by adding a custom URI scheme. To add a custom URI scheme, perform the following steps: Go to Edit > Project Settings > Player Settings . Select UWP to open the UWP Player Settings window. Select Publishing Settings > Protocol . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9ae20dd2a7c
unity_docs
editor
What is `Application.wantsToQuit` in Unity? Explain its purpose and usage.
Application.wantsToQuit Description Unity raises this event when the Player application wants to quit. Add an event handler to this event to receive a notification that application is attempting to quit. When this event is raised the quit process has started but can be cancelled. This means the player is not guaran...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3fddf0c924b2
unity_docs
math
Explain 'Debug generated C++ code' in Unity.
You can debug generated C++ code for your Universal Windows Platform (UWP) application using Visual Studio. ## IL2CPP classes IL2CPP classes follow the format of <ClassName>_t#number , where: <ClassName> is the class name The optional #number is a unique type number Example IL2CPP classes: String_t - String class Obj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_060b0dd05d4d
unity_docs
rendering
What is `ImageConversion.EncodeNativeArrayToTGA` in Unity? Explain its purpose and usage.
ImageConversion.EncodeNativeArrayToTGA Declaration public static NativeArray<byte> EncodeNativeArrayToTGA (NativeArray<T> input , Experimental.Rendering.GraphicsFormat format , uint width , uint height , uint rowBytes ); Parameters Parameter Description input The native array to convert. format The p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7567fe3e8a18
unity_docs
rendering
Show me a Unity C# example demonstrating `Editor.OnInteractivePreviewGUI`.
. The overidden method should use the rectangle passed in and render a preview of the asset. The default implementation is a no-op. Note: Inspector previews are limited to the primary editor of persistent objects (assets). For example, GameObjectInspector, MaterialEditor, TextureInspector, and so on. This means that i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e402ece1bd4
unity_docs
physics
Explain 'Constant Force component reference' in Unity.
Constant Force adds constant forces to a Rigidbody . This is useful for GameObject movement that accelerates over time. If you add a Constant Force component to a GameObject that does not have a Rigidbody, Unity automatically creates and adds a Rigidbody to the same GameObject. For more details, see Apply constant forc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_933acb969811
unity_docs
ui
Explain 'RadioButton' in Unity.
A RadioButton lets users select a single choice when used along with other RadioButtons in a group. You can use a GroupBox to group RadioButtons. Otherwise, the panel acts as the default group. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f15cdb645b63
unity_docs
math
What is `Vector2.ClampMagnitude` in Unity? Explain its purpose and usage.
Vector2.ClampMagnitude Declaration public static Vector2 ClampMagnitude ( Vector2 vector , float maxLength ); Description Returns a copy of vector with its magnitude clamped to maxLength .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5889bb29b1c_doc_37
github
scripting
What does `OnPaintInspectorGUI` do in this Unity script? Explain its purpose and signature.
Callback for painting the inspector GUI for the GameObjectBrush in the tilemap palette.The GameObjectBrush Editor overrides this to show the usage of this Brush. Signature: ```csharp public override void OnPaintInspectorGUI() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_a8534436a1ec
unity_docs
scripting
What is `Experimental.GraphView.RectUtils.Inflate` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RectUtils.Inflate Declaration public static Rect Inflate ( Rect a , float left , float top , float right , float bottom ); Parameters Parameter Description a The original rectangle. left The amount to inflate the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135aecc57359
unity_docs
scripting
What is `Build.Content.ObjectIdentifier.operator_eq` in Unity? Explain its purpose and usage.
ObjectIdentifier.operator == public static bool operator == ( Build.Content.ObjectIdentifier a , Build.Content.ObjectIdentifier b ); Description Returns true if the ObjectIdentifiers are the same. Internal use only. See ObjectIdentifier .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebb329823d46
unity_docs
rendering
What are the parameters of `SceneView.AddCameraMode` in Unity?
Returns CameraMode A CameraMode with the provided name and section. Description Add a custom camera mode to the Scene view camera mode list. When a user-defined mode is selected, the Scene view will render as though the "shaded" mode is selected. ```csharp using System.Collections.Generic; using UnityEditor; using Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa6c1c6eee85
unity_docs
scripting
What is `MeshFilter.mesh` in Unity? Explain its purpose and usage.
MeshFilter.mesh public Mesh mesh ; Description Returns either a new mesh or a duplicate of the existing mesh, and assigns it to the mesh filter. If no mesh is assigned to the mesh filter a new mesh will be created and assigned. If a mesh is assigned to the mesh filter already, then the first query of mesh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b95646d639c
unity_docs
scripting
What is `Unity.Properties.PropertyPath.FromIndex` in Unity? Explain its purpose and usage.
PropertyPath.FromIndex Declaration public static Unity.Properties.PropertyPath FromIndex (int index ); Parameters Parameter Description index The index of the <see cref="PropertyPathPart" />. Returns PropertyPath A new PropertyPath Description Returns a new PropertyPath from the provided index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6276b1c3409
unity_docs
editor
What is `Device.SystemInfo.supportsLocationService` in Unity? Explain its purpose and usage.
SystemInfo.supportsLocationService public static bool supportsLocationService ; Description This has the same functionality as SystemInfo.supportsLocationService and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd75f8d142d3
unity_docs
scripting
What is `ComputeBufferMode` in Unity? Explain its purpose and usage.
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_man_feeb9e7a0046
unity_docs
input
Explain 'Input in Web' in Unity.
Unity Web supports various types of input from different devices, including gamepads, joysticks, touchscreens, keyboards, and movement sensors. Gamepad and Joystick support Touch support Keyboard input and focus handling Mobile sensor support Lock your cursor Full-screen mode ## Gamepad and Joystick support Web suppo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4aa463a5ff1c
unity_docs
math
Show me a Unity C# example demonstrating `HumanPoseHandler.ctor`.
list of joint paths. Specify an avatar and a root transform to create a human pose from the skeleton hierarchy (avatar). Specify an avatar and a list of joint paths to create a human pose handler that is not bound to a skeleton transform hierarchy. You can use a human pose handler created from joint paths to con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ea9cad4dea6b
unity_docs
editor
Explain 'Integrated development environment (IDE) support' in Unity.
An integrated development environment (IDE) is an application that combines a range of tools for developing software, typically including a code editor, code completion, code analysis and diagnostics, running tests, and debugging. Unity supports the following C# IDEs: Visual Studio Visual Studio Code JetBrains Rider Ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f77c5cef0313
unity_docs
physics
What is `Rigidbody.maxDepenetrationVelocity` in Unity? Explain its purpose and usage.
Rigidbody.maxDepenetrationVelocity public float maxDepenetrationVelocity ; Description Maximum velocity of a rigidbody when moving out of penetrating state. Use this property when you want to make your bodies move out of colliding state in a more smooth way than by default.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cc1ea2b9429
unity_docs
scripting
What is `SortingLayer.IsValid` in Unity? Explain its purpose and usage.
SortingLayer.IsValid Declaration public static bool IsValid (int id ); Parameters Parameter Description id The unique id of a layer. Returns bool True if the id provided is valid and assigned to a layer. Description Returns true if the id provided is a valid layer id.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_801b10f5f7c4
unity_docs
rendering
What is `TextureFormat.RGBA64_SIGNED` in Unity? Explain its purpose and usage.
TextureFormat.RGBA64_SIGNED Description Four channel (RGBA) texture format, 16-bits signed integer per channel. Import textures of this format in .DDS files. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check. Additional resources: Texture2D.format , text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd6091785701
unity_docs
scripting
What is `AssetImporter.SourceAssetIdentifier.ctor` in Unity? Explain its purpose and usage.
AssetImporter.SourceAssetIdentifier Constructor Declaration public AssetImporter.SourceAssetIdentifier ( Object asset ); Declaration public AssetImporter.SourceAssetIdentifier (Type type , string name ); Parameters Parameter Description asset The the sub-asset embedded in the imported Asset. type Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ed06386b570
unity_docs
scripting
What is `ApplicationSandboxType` in Unity? Explain its purpose and usage.
ApplicationSandboxType enumeration Description Application sandbox type. Properties Property Description Unknown Application sandbox type is unknown. NotSandboxed Application not running in a sandbox. Sandboxed Application is running in a sandbox. SandboxBroken Application is running in broken sandbox.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4c8625bc8465
unity_docs
performance
In Unity's 'Memory in Unity Web', what is 'Asset data' and how does it work?
When you create a Unity Web build, Unity generates a.data file. This contains all the Scenes and Assets the application needs to launch. Because Unity Web doesn’t have access to the real file system, it creates a virtual memory file system, and the browser unpacks the.data file here. The Emscripten framework (JavaScrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_be8317c0d631
github
scripting
Write a Unity Editor script for Bloom And Flares Editor
```csharp using System; using UnityEditor; using UnityEngine; namespace UnityStandardAssets.ImageEffects { [CustomEditor (typeof(BloomAndFlares))] class BloomAndFlaresEditor : Editor { SerializedProperty tweakMode; SerializedProperty screenBlendMode; SerializedObject se...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_8406765ae0d5
unity_docs
networking
In Unity's 'Package manifest file', what is 'Recommended properties' and how does it work?
The Package Manager can install packages in a project even if the recommended properties are missing or have invalid values. However, the recommended best practice is to assign values for these properties to make sure that your package is discoverable and to offer a better experience for users. Property JSON Type Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0a08ed2afc81
unity_docs
rendering
In Unity's 'Create your first project', what is 'Continue learning' and how does it work?
To build your skills, complete the Unity Essentials in-Editor Tutorials pathway . These tutorials teach 2D and 3D development fundamentals, such as programming, audio, cameras , and publishing. As you use these resources, you can also: Use the Key concepts page as reference to some Unity Editor concepts. Browse topics ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1724f442d80c_doc_19
github
scripting
What does `ChangeBasisNonUniformScale` do in this Unity script? Explain its purpose and signature.
Returns a matrix:- with units converted by the scale specified in the payload- with basis changed by the axis convention in the payload- with the scene transform subtracted out (so, converts from room to scene), but only if the app is running.This version also handles non-uniform scale (but stemming from what? the sce...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_3a1fd808dad8
unity_docs
xr
What are the parameters of `XR.InputDevices.GetDevicesWithCharacteristics` in Unity?
Description Gets the list of active XR input devices that match the specified InputDeviceCharacteristics . This function finds any input devices available to the XR Subsystem that match the specified InputDeviceCharacteristics bitmask exactly and inserts them into the inputDevices list. The function does not include de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05cb21d0d25a
unity_docs
editor
What are the parameters of `EditorGUILayout.GradientField` in Unity?
Returns Gradient The gradient edited by the user. Description Make a field for editing a Gradient . ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor;public class EditorGUIGradientField : EditorWindow { Gradient gradient = new Gradient(); [MenuItem("Exampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9143a6d2b47a
unity_docs
scripting
What is `Event.numeric` in Unity? Explain its purpose and usage.
Event.numeric public bool numeric ; Description Is the current keypress on the numeric keyboard? (Read Only) Use this flag to destinguish between main & numeric keys. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Creates a Label and prints Numeric Key pad is on/off // depending on the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d33b8651691d
unity_docs
rendering
What is `Rendering.GraphicsTextureDescriptor.width` in Unity? Explain its purpose and usage.
GraphicsTextureDescriptor.width public int width ; Description The width of the GraphicsTexture in pixels when Unity uploads it to the GPU. Additional resources: GraphicsTextureDescriptor.height , GraphicsTextureDescriptor.depth .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd43c7c65999
unity_docs
scripting
What is `Experimental.GraphView.GraphView.CollectElements` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.CollectElements Declaration public static void CollectElements (IEnumerable<GraphElement> elements , HashSet<GraphElement> collectedElementSet , Func<GraphElement,bool> conditionFunc ); Parameters Parameter Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4aea95f2324
unity_docs
input
What is `GUI` in Unity? Explain its purpose and usage.
GUI class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description The GUI class is the interface for Unity's GUI with manual positioning. Additional resources: GUI tutorial . Static Properties Property Description backgroundColor Global tinting color for all background elements rendered by the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e428c1314396
unity_docs
rendering
What is `Experimental.Rendering.RayTracingMode.DynamicTransform` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RayTracingMode.DynamicTransform Description Renderers with this mode update their Transform, but not their Mesh .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d47e0f54591
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetCacheServerNamespacePrefix`.
Returns string Returns the Namespace prefix for the Cache Server. Description Gets the Cache Server Namespace prefix set in Editor Settings. Note: If you set a new value for the Namespace prefix your new settings are not applied until you call AssetDatabase.RefreshSettings(). However, this method will return th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc8564b579fb
unity_docs
scripting
Show me a Unity code example for 'Use Vector API to create a radial progress indicator'.
the radial progress control and its custom mesh Create a C# script to define a RadialProgress visual element and a C# script to define the custom mesh . Style the visual element with a USS file. Create a Unity project with any template. Create a folder named radial-progress to store your files. In the radial-progress ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0b33c63bf874
github
scripting
Write a Unity C# physics script for Interactable
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Rigidbody))] public class Interactable : MonoBehaviour { public enum InteractableType { Grabable, Climbable, JointManipulator, JustEvents //Use this when you just c...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_66d922902b94
unity_docs
scripting
What is `Search.SearchColumnProviderAttribute.provider` in Unity? Explain its purpose and usage.
SearchColumnProviderAttribute.provider public string provider ; Description Unique name of the search column provider. This name is also used to build a contextual menu when selecting the format for a search column.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_980a8398c666
unity_docs
editor
Show me a Unity C# example demonstrating `HelpURLAttribute`.
HelpURLAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provide a custom documentation URL for a class. The provided URL is expected to be an absolute path. If no file is found at the URL, the path is resolved relative to the Unity documentation, which can be either the manual...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a30814c036c4
unity_docs
xr
What is `XR.InputDevices.GetDevicesWithRole` in Unity? Explain its purpose and usage.
Method group is Obsolete InputDevices.GetDevicesWithRole Obsolete This API has been marked as deprecated and will be removed in future versions. Please use InputDevices.GetDevicesWithCharacteristics instead. Declaration public static void GetDevicesWithRole ( XR.InputDeviceRole role , List<InputDevice> inputD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57c78f3b685d
unity_docs
networking
In Unity's 'Licensing overview', what is 'Floating licensing' and how does it work?
Floating licensing is a concurrency-based model designed for complex projects or larger organizations that need to support multiple users at the same time. With this model, your organization sets up an on-premises licensing server, and buys a pool of licenses large enough to accommodate its members who use Unity concur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be07f8071992
unity_docs
math
What is `Plane.Translate` in Unity? Explain its purpose and usage.
Plane.Translate Declaration public static Plane Translate ( Plane plane , Vector3 translation ); Parameters Parameter Description plane The plane to move in space. translation The offset in space to move the plane with. Returns Plane The translated plane. Description Returns a copy of the giv...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c77e6ccd910f
unity_docs
audio
Show me a Unity C# example demonstrating `Experimental.Audio.AudioSampleProvider.ConsumeSampleFramesNativeFunction`.
e provider. See AudioSampleProvider.id . interleavedSampleFrames Pointer to the sample frames buffer to fill. The actual C type is float*. sampleFrameCount Number of sample frames that can be written into interleavedSampleFrames. Description Type that represents the native function pointer for consuming sample f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3aafec97fa62
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerMarker.AutoScope`.
AutoScope struct in Unity.Profiling / Implemented in: UnityEngine.CoreModule Description Helper IDisposable struct for use with ProfilerMarker.Auto . Use ProfilerMarker.Auto to enclose a piece of code you want to profile in using statement. Constructor of AutoScope calls ProfilerMarker.Begin and Dispo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db28c065eb75
unity_docs
rendering
Show me a Unity C# example demonstrating `WebCamTexture.didUpdateThisFrame`.
eThisFrame public bool didUpdateThisFrame ; Description Did the video buffer update this frame? Use this to check if the video buffer has changed since the last frame. When setting a low frame rate, it is likely that the video will update slower than the game. Since it would not make sense to do expensive video...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fe2ba60a91f
unity_docs
scripting
What is `PlayerSettings.SplashScreen.DrawMode.UnityLogoBelow` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.DrawMode.UnityLogoBelow Description The Unity logo is drawn in the lower portion of the screen for the duration of the Splash Screen, while the PlayerSettings.SplashScreen.logos are shown in the centre.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_803fd9f3cb25
unity_docs
rendering
Explain 'Create a Profiler module detail panel' in Unity.
The module details panel appears in the bottom of the Profiler window when you select a module. You can customize this section to display additional details relevant to your module or to display a custom visualization of your performance data. To create a module details panel for your Profiler module: Create a module d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f08b493b7e01
unity_docs
editor
Show me a Unity C# example demonstrating `Application.isBatchMode`.
Application.isBatchMode public static bool isBatchMode ; Description Returns true when Unity is launched with the -batchmode flag from the command line (Read Only). In batch mode, Unity runs from the command line without user interaction, typically used for automation (builds, tests, CI). For details, refer t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2760dc96bc4d
unity_docs
scripting
What is `U2D.SpriteAtlasExtensions.GetPackables` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.GetPackables Declaration public static Object[] GetPackables ( U2D.SpriteAtlas spriteAtlas ); Description Return all the current packed packable objects in the atlas. Additional resources: SpriteAtlasExtensions.Add .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b7b2c264083c
unity_docs
scripting
Explain 'Add a user to a publisher profile' in Unity.
Multiple users can access a single publisher profile to publish packages on the Asset Store . This is useful when you work as part of a team to create Asset Store packages. Any user you add to the a publisher profile gets access to all the information on that profile and can make the same changes as the creator of that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_686b7db3fad9
unity_docs
editor
What is `AssetDatabaseLoadOperation` in Unity? Explain its purpose and usage.
AssetDatabaseLoadOperation class in UnityEditor / Inherits from: AsyncOperation Description This operation allows you to track the progress and access the result of an asynchronus AssetDatabase load operation. Properties Property Description LoadedObject The resulting Object of the asynchronus load operation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_db4860baa0ce
unity_docs
editor
Explain 'Device Simulator for iOS' in Unity.
Unity’s Device Simulator can simulate the appearance and behavior of a variety of iOS devices. This helps you test basic interactions and view the layout of your application on iOS devices. This reduces costs, because you don’t need to own a device to simulate it, and helps you to improve device coverage. Additionally,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ca641c7a338
unity_docs
scripting
What is `UIElements.Experimental.PointerDownLinkTagEvent.Init` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PointerDownLinkTagEvent.Init Declaration protected void Init (); Description Resets the event members to their initial values.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.