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
gh_02684d03ddec
github
scripting
Write a Unity C# XR/VR script for Drop Down Desc N Move UI Script
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DropDownDescNMoveUIScript : MonoBehaviour { //The duriation for the UI pop-up to appear/disappear via movement. [Tooltip("Input the speed in (s) for how fast the UI moves.")] public f...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_42a49e021b1c
unity_docs
editor
In Unity's 'Install Unity from the command line', what is 'Uninstall the Unity Editor' and how does it work?
To perform a silent uninstall, run Uninstall.exe /S from the command line or a script. Note : Although the process finishes right away, there’s a delay before the files are actually removed. This is because the process copies the uninstaller to a temporary location so it can remove itself. Make sure that the working di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135ed3db4fe3
unity_docs
xr
What is `Experimental.GraphView.SearchWindowContext.requestedWidth` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SearchWindowContext.requestedWidth public float requestedWidth ; Description Requested width of the window. Set to 0.0f to use the default width.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b5c6ec1afd8
unity_docs
ui
Show me a Unity C# example demonstrating `AssetPostprocessorStaticVariableIgnoreAttribute`.
c variables in AssetPostprocessor or ScriptedImporter classes can lead to unexpected behavior because their values are not shared across the different domains in the Main Editor and Asset Import Workers. When you modify a static variable in the Main Editor and expect the value to be reflected in the worker on its own d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9026a0f6aa3
unity_docs
xr
What is `GraphicsBuffer.GetData` in Unity? Explain its purpose and usage.
GraphicsBuffer.GetData Declaration public void GetData (Array data ); Declaration public void GetData (Array data , int managedBufferStartIndex , int computeBufferStartIndex , int count ); Parameters Parameter Description data An array to receive the data. managedBufferStartIndex The first element ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_217ecd72cca0
github
scripting
Write a Unity C# MonoBehaviour script called Mb Example
```csharp using UnityEngine; using Attributes; namespace Examples { public class MbExample: MonoBehaviour { [SerializeReference,SelectableImpl] private IFloatValueProvider source1; [SerializeReference,SelectableImpl] private IVectorValueProvider source2; [SerializeReference,SelectableImpl] private IBoolValueP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4223ff4018bb
unity_docs
performance
What is `Unity.Profiling.ProfilerRecorder.Valid` in Unity? Explain its purpose and usage.
ProfilerRecorder.Valid public bool Valid ; Description Indicates whether ProfilerRecorder is associated with a valid Profiler marker or counter. Returns true if ProfilerRecorder is associated with a valid Profiler marker or counter. False is returned if a ProfilerMarker or ProfilerCounter hasn't been created ye...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67a1c49a8ae0
unity_docs
math
What is `UIElements.BaseListView.showFoldoutHeader` in Unity? Explain its purpose and usage.
BaseListView.showFoldoutHeader public bool showFoldoutHeader ; Description This property controls whether the list view displays a header, in the form of a foldout that can be expanded or collapsed. The default value is false . When this property is set to true , Unity adds a foldout in the hierarchy of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5324dac1edc5
unity_docs
scripting
What is `Experimental.GraphView.Blackboard` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Blackboard class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.GraphElement Implements interfaces: ISelection Description GraphElement that enables user to dynamically define members of a Grap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79af22e8451c
unity_docs
editor
What is `PrefabUtility.RemoveUnusedOverrides` in Unity? Explain its purpose and usage.
PrefabUtility.RemoveUnusedOverrides Declaration public static void RemoveUnusedOverrides (GameObject[] prefabInstances , InteractionMode action ); Parameters Parameter Description prefabInstances List of Prefab instances to remove unused overrides from. action UserAction will record undo and write resul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b571e23a3863
unity_docs
physics
What is `ParticleSystem.CollisionModule.sendCollisionMessages` in Unity? Explain its purpose and usage.
ParticleSystem.CollisionModule.sendCollisionMessages public bool sendCollisionMessages ; Description Send collision callback messages. Additional resources: ParticleSystem.collision , MonoBehaviour.OnParticleCollision .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea3615e86858
unity_docs
ui
What is `Input.GetLastPenContactEvent` in Unity? Explain its purpose and usage.
Input.GetLastPenContactEvent Declaration public static PenData GetLastPenContactEvent (); Returns PenData Pen event details in the struct. Description Returns the PenData for the last stored pen up or down event. Note : This API is part of the legacy Input Manager. The recommended best practice is tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e802b9a5333a
unity_docs
ui
What is `GUILayout.EndArea` in Unity? Explain its purpose and usage.
GUILayout.EndArea Declaration public static void EndArea (); Description Close a GUILayout block started with BeginArea. Explained Area of the example. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void OnGUI() { GUILayout.BeginArea(new Rect(10, 10, 100, 100)); GUILayout.Button("...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16719664684d
unity_docs
scripting
What are the parameters of `GameObjectUtility.DuplicateGameObject` in Unity?
Returns GameObject The duplicated GameObject. Description Duplicates a single GameObject and returns the new GameObject. Duplicates a GameObject within a Scene. The duplicated GameObject will be on the same level in the hierarchy as the original GameObject, and they will share the same parent. If there are any children...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c55fb725616a
unity_docs
ui
What is `UIElements.ToggleButtonGroupState.ToggleAllOptions` in Unity? Explain its purpose and usage.
ToggleButtonGroupState.ToggleAllOptions Declaration public void ToggleAllOptions (); Description Toggles all the available options' state. Calling this method will make all the active toggle buttons to be inactive and all the inactive toggle buttons to be active.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_043abc1acdbd
unity_docs
rendering
Explain 'Introduction to surface normals' in Unity.
To really explain how normal mapping works, we will first describe what a “ normal ” is, and how it is used in real-time lighting. Perhaps the most basic example would be a model where each surface polygon is lit simply according to the surface angles relative to the light. The surface angle can be represented as a lin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_162f81e649af
unity_docs
networking
Explain 'Collect performance data on a target platform' in Unity.
Record performance data with the Unity Profiler on a target platform. You can record the performance of your application on your chosen release platform to discover realistic performance metrics about your application. The Profiler can connect to your application when it’s running on a target device in the following wa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4a1a7e92f5e
unity_docs
physics
What is `MonoBehaviour.OnParticleUpdateJobScheduled` in Unity? Explain its purpose and usage.
MonoBehaviour.OnParticleUpdateJobScheduled() Description OnParticleUpdateJobScheduled is called when a Particle System's built-in update job has been scheduled. This can be used to attach custom managed jobs to run after the default particle update. ```csharp using UnityEngine; using UnityEngine.ParticleSystemJob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_37e7a1ce3bc2
unity_docs
scripting
Explain 'Build and distribute a Web application' in Unity.
Learn how to build, optimize, and distribute Unity projects for Web. Page Description Web build settings Change the build settings for your Web application. Web Build folder Understand the contents of the folder Unity creates when you build a Web application. AssetBundles in Web Use AssetBundles to reduce load times of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dc557064a64
unity_docs
math
What is `Rigidbody.ClosestPointOnBounds` in Unity? Explain its purpose and usage.
Rigidbody.ClosestPointOnBounds Declaration public Vector3 ClosestPointOnBounds ( Vector3 position ); Description The closest point to the bounding box of the attached colliders. ```csharp // Subtract damage from a character's hit points when an // explosion occurs.using UnityEngine; using System.Collection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7cccd2ca009f
unity_docs
rendering
What is `Tools.handleRectRotation` in Unity? Explain its purpose and usage.
Tools.handleRectRotation public static Quaternion handleRectRotation ; Description The rotation of the rect tool handle in world space. This rotation can change based on the current Scene View camera angle.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_74fc56c7f25a
github
scripting
Write a Unity Editor script for Prefab Brush
```csharp using System; using UnityEngine; using Object = UnityEngine.Object; namespace UnityEditor.Tilemaps { /// <summary> /// This Brush instances and places a randomly selected Prefabs onto the targeted location and parents the instanced object to the paint target. Use this as an example to quickly place a...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b965588f3c4d
unity_docs
rendering
What is `Camera.nonJitteredProjectionMatrix` in Unity? Explain its purpose and usage.
Camera.nonJitteredProjectionMatrix public Matrix4x4 nonJitteredProjectionMatrix ; Description Get or set the raw projection matrix with no camera offset (no jittering). For many temporal image effects, the camera that is currently rendering needs to be slightly offset from the default projection (that is, th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7521d620e6d
unity_docs
scripting
Show me a Unity C# example demonstrating `Bounds.center`.
Bounds.center public Vector3 center ; Description The center of the bounding box. ```csharp using UnityEngine;public class ColliderBounds : MonoBehaviour { Collider m_Collider; Vector3 m_Center; Vector3 m_Size, m_Min, m_Max; void Start() { //Fetch the Collider from the GameObject m_Collider = GetCompone...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_126963af00a8
unity_docs
scripting
What is `iOS.Xcode.XcScheme.SetBuildConfiguration` in Unity? Explain its purpose and usage.
XcScheme.SetBuildConfiguration Declaration public void SetBuildConfiguration (string buildConfigName ); Parameters Parameter Description buildConfigName Build configuration name. Description Sets the build configuration to be used for running.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d688ca16bce
unity_docs
animation
What is `Animations.AnimatorJobExtensions.ResolveAllStreamHandles` in Unity? Explain its purpose and usage.
AnimatorJobExtensions.ResolveAllStreamHandles Declaration public static void ResolveAllStreamHandles ( Animator animator ); Parameters Parameter Description animator The Animator instance that calls this method. Description Newly created handles are always resolved lazily on the next access when the job...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_222923c9bb70
unity_docs
math
What are the parameters of `Quaternion.Lerp` in Unity?
Returns Quaternion A unit quaternion interpolated between quaternions a and b . Description Interpolates between a and b by t and normalizes the result afterwards. This is faster than Slerp but the angular velocity will not be constant if the rotations are far apart. ```csharp // Interpolates rotation between the rotat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2756053b17db
unity_docs
audio
In Unity's 'Introduction to the Audio Source component', what is 'Output method of the audio source' and how does it work?
In the Audio Source component, the Output property specifies where the audio source will send the audio signal in the audio processing pipeline. This property accepts an Audio Mixer Group . The Audio Mixer is a tool that lets you post-process the audio with effects. You can then assign your Audio Mixer to the property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_624d22a31f90
unity_docs
editor
What is `ArrayUtility` in Unity? Explain its purpose and usage.
ArrayUtility class in UnityEditor Description Helpers for builtin arrays. Static Methods Method Description Add Appends item to the end of array. AddRange Appends items to the end of array. ArrayEquals Compares two arrays. ArrayReferenceEquals Compares two array references. Clear Clears the array. Contain...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52f9ca40a51c
unity_docs
xr
What is `Android.AndroidAssetPackError.PackUnavailable` in Unity? Explain its purpose and usage.
AndroidAssetPackError.PackUnavailable Description Indicates that the requested Android asset pack is not available in the Google Play Store. One possible cause of this is that the Android App Bundle file you uploaded to the store does not include the specified Android asset pack. Additional resources: AndroidAsset...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15e494647faf
unity_docs
rendering
What is `Material.passCount` in Unity? Explain its purpose and usage.
Material.passCount public int passCount ; Description How many passes are in this material (Read Only). This returns the number of passes made such as in direct drawing code. For example, drawing 3D primitives with GL.Begin , GL.End , and also drawing meshes using Graphics.DrawMeshNow . Additional resources...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1659ba305941
unity_docs
input
What is `Unity.IntegerTime.DiscreteTimeTimeExtensions.Abs` in Unity? Explain its purpose and usage.
DiscreteTimeTimeExtensions.Abs Declaration public static Unity.IntegerTime.DiscreteTime Abs ( Unity.IntegerTime.DiscreteTime lhs ); Parameters Parameter Description lhs The DiscreteTime input. Returns DiscreteTime The absolute value of the input. Description Returns the absolute value of a time va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a8a6528b27a
unity_docs
scripting
What is `Unity.Properties.Property_2.AddAttribute` in Unity? Explain its purpose and usage.
Property<T0,T1>.AddAttribute Declaration protected void AddAttribute (Attribute attribute ); Parameters Parameter Description attribute The attribute to add. Description Adds an attribute to the property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5eccb00d49bd
unity_docs
rendering
What is `ParticleSystem.MainModule.startSizeZ` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startSizeZ public ParticleSystem.MinMaxCurve startSizeZ ; Description The initial size of particles along the z-axis when the Particle System first spawns them. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(Parti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d685b5c6c66
unity_docs
scripting
What is `TestTools.CoveredSequencePoint` in Unity? Explain its purpose and usage.
CoveredSequencePoint struct in UnityEngine.TestTools / Implemented in: UnityEngine.CoreModule Description Describes a covered sequence point used by Coverage . For an example of typical usage, see Coverage.GetSequencePointsFor . Properties Property Description column The column number of the line of the fi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_49fbf63a17d4
unity_docs
rendering
Explain 'GPU texture formats reference' in Unity.
## Texture formats, by quality The table below shows each format available in Unity, and their quality details. Texture format Description Channels Quality Bits per pixel Size of 1024x1024 texture, in MB Alpha 8 Uncompressed single channel (A) A High 8 1 R 8 Uncompressed single channel (R) R High 8 1 R 16 bit Uncompre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6edb6ad97d2d
unity_docs
scripting
What is `AndroidJNI.GetObjectField` in Unity? Explain its purpose and usage.
AndroidJNI.GetObjectField Declaration public static IntPtr GetObjectField (IntPtr obj , IntPtr fieldID ); Description Returns the value of an instance (nonstatic) field of an object. The result is a reference to a java.lang.Object , or a subclass thereof. Additional resources: Java Native Interface Specific...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd86ab8c7db1
unity_docs
physics
What is `ArticulationBody.ResetCenterOfMass` in Unity? Explain its purpose and usage.
ArticulationBody.ResetCenterOfMass Declaration public void ResetCenterOfMass (); Description Resets the center of mass of the articulation body. Computes the actual center of mass of the articulation body from all the attached colliders and stores it. When you call this function, the center of mass is automati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b64a882fcd99
unity_docs
scripting
What is `ParticleSystem.MinMaxCurve` in Unity? Explain its purpose and usage.
MinMaxCurve struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for a Min-Max Curve. Min-Max Curve. describes functions which take a value between a minimum and maximum limit and return a value based on ParticleSystem.MinMaxCurve.mode . Depending on the mode, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc14cb0bcac3
unity_docs
scripting
Explain 'Device Simulator' in Unity.
This section of the documentation contains information about Unity’s Device Simulator. Page Description Device Simulator introduction Introduces the Device Simulator and its capabilities. The Simulator view Explains how to use the window that the Device Simulator uses to display the simulation. Simulated classes Contai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d225b288dc91
unity_docs
scripting
What is `FindObjectsSortMode` in Unity? Explain its purpose and usage.
FindObjectsSortMode enumeration Description Options to specify if and how to sort objects returned by a function. Properties Property Description None Don't sort the objects. InstanceID Sort the objects by InstanceID in ascending order.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1c79ebe7760
unity_docs
scripting
What is `Rendering.IRenderPipelineGraphicsSettings.Reset` in Unity? Explain its purpose and usage.
IRenderPipelineGraphicsSettings.Reset Declaration public void Reset (); Description Optional method to perform custom reset logic. This method is invoked when the setting is created for the first time, or reset from the UI context menu.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dd77601fc3da_doc_5
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The maximum distance from this transform that the can move when is . Signature: ```csharp public float maxDistance ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_011f5a9ad335
unity_docs
physics
Explain 'Enable conservative rasterization in a shader' in Unity.
Rasterization is a rendering technique that converts vector data (triangle projections) to pixel data (render target) by determining which pixels are covered by triangles. Normally, a GPU determines whether or not to rasterize a pixel by sampling points within the pixel to determine whether they are covered by the tria...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a5a2b35fbd5
unity_docs
physics
What is `RaycastHit.articulationBody` in Unity? Explain its purpose and usage.
RaycastHit.articulationBody public ArticulationBody articulationBody ; Description The ArticulationBody of the collider that was hit. If the collider is not attached to an articulation body then it is null . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Apply a force to a clicked a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5903567a252
unity_docs
editor
Explain 'Create a pop-up window' in Unity.
This example demonstrates how to use UnityEditor.PopupWindow to create a pop-up window. ## Example overview This example creates a pop-up window that’s displayed through a button in a custom Editor window. The pop-up window has three toggles and closes when it isn’t in focus. You can find the completed files that thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0d0bdbf59065
unity_docs
editor
Explain 'Command-line interface' in Unity.
You can run the Unity Editor and Players from command-line interfaces to change and customize how they run at launch time. Topic Description Run Unity from a command-line interface Understand how to launch Unity from the command line and execute scripts . Unity Editor command-line arguments reference A list of argument...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_616a2ebd591b
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture.width`.
the width of the Texture at full resolution. At run time, if PlayerSettings.mipStripping is disabled, this returns the width of the Texture at full resolution. If PlayerSettings.mipStripping is enabled, this returns the width of the Texture at the highest resolution that has not been stripped. Additional resourc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_11
github
scripting
What does `GeographicToScreenPoint` do in this Unity script? Explain its purpose and signature.
Transforms the supplied geographical coordinates into screen space, using the supplied camera (if specified) or the camera previously set via SetControlledCamera if not.The geographical coordinates of the position to transform to screen space.The camera for which to perform the transform. If this is left out, any camer...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_4f71241d20aa
unity_docs
scripting
What is `Caching.GetCacheAt` in Unity? Explain its purpose and usage.
Caching.GetCacheAt Declaration public static Cache GetCacheAt (int cacheIndex ); Parameters Parameter Description cacheIndex Index of the cache to get. Returns Cache A reference to the Cache at the index specified. Description Returns the Cache at the given position in the cache list. ```csharp us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6abe02356eb9
unity_docs
scripting
What is `ArticulationBody.SetDriveTargetVelocity` in Unity? Explain its purpose and usage.
ArticulationBody.SetDriveTargetVelocity Declaration public void SetDriveTargetVelocity ( ArticulationDriveAxis axis , float value ); Parameters Parameter Description axis The drive axis. value The value to set the target velocity to. Description Sets the target velocity value of the specified drive. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0418fccad70e
unity_docs
rendering
What is `WebCamTexture.videoRotationAngle` in Unity? Explain its purpose and usage.
WebCamTexture.videoRotationAngle public int videoRotationAngle ; Description Returns an clockwise angle (in degrees), which can be used to rotate a polygon so camera contents are shown in correct orientation. Call Application.RequestUserAuthorization before creating a WebCamTexture. ```csharp // Starts a cam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c49dd8b05b3
unity_docs
scripting
What is `UIElements.CallbackEventHandler.HandleEventTrickleDown` in Unity? Explain its purpose and usage.
CallbackEventHandler.HandleEventTrickleDown Declaration protected void HandleEventTrickleDown ( UIElements.EventBase evt ); Parameters Parameter Description evt The event instance. Description Executes logic on this element during the TrickleDown phase, immediately after this element's TrickleDown callb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ff6552f9e75
unity_docs
physics
Give me an overview of the `ParticleSystemCollisionQuality` class in Unity.
ParticleSystemCollisionQuality enumeration Description Quality of world collisions. Medium and low quality are approximate and may leak particles. Properties Property Description High The most accurate world collisions. Medium Approximate world collisions. Low Fastest and most approximate world collisions.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_029dfd7ab787
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Jobs.LowLevel.Unsafe.JobsUtility.MaxJobThreadCount`.
han logical CPU cores on the target hardware. This value is useful for compile time constants, however when used for creating buffers it might be larger than what you need. If you want to allocate a buffer that can be subdivided evenly between job worker threads, use the runtime constant that JobsUtility.ThreadIndex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_18c80a317983_doc_3
github
scripting
What does `InitInternal` do in this Unity script? Explain its purpose and signature.
Identical to , but non-virtual, so slightly faster. Signature: ```csharp internal void InitInternal(TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_54f0bf57e195
unity_docs
scripting
What is `SystemLanguage.Japanese` in Unity? Explain its purpose and usage.
SystemLanguage.Japanese Description Japanese. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Japanese language if (Application.systemLanguage == SystemLanguage.Japanese) { //Outputs into console that the system is J...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d36269db675
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.SaveBytes`.
SearchIndexer.SaveBytes Declaration public byte[] SaveBytes (); Returns byte[] Bytes representation of the index. Description Get the bytes representation of this index. See SearchIndexer.Write . ```csharp using System.IO; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Exam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4f52595a9f8
unity_docs
physics
What is `RigidbodyConstraints2D` in Unity? Explain its purpose and usage.
RigidbodyConstraints2D enumeration Description Use these flags to constrain motion of the Rigidbody2D . Additional resources: Rigidbody2D.constraints . Properties Property Description None No constraints. FreezePositionX Freeze motion along the X-axis. FreezePositionY Freeze motion along the Y-axis. Freez...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d64372e4ece
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.DisposeSentinel` in Unity? Explain its purpose and usage.
DisposeSentinel class in Unity.Collections.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Contains methods that automatically detect memory leaks. The methods in DisposeSentinel are used by NativeContainer instances to automatically track memory leaks, and report them to you. However, yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fbac59f27289
unity_docs
editor
What is `EditorGUI.BeginProperty` in Unity? Explain its purpose and usage.
EditorGUI.BeginProperty Declaration public static GUIContent BeginProperty ( Rect totalPosition , GUIContent label , SerializedProperty property ); Parameters Parameter Description totalPosition Rectangle on the screen to use for the control, including label if applicable. label Optional label in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a03c03e90731
unity_docs
math
What is `Unwrapping.GeneratePerTriangleUV` in Unity? Explain its purpose and usage.
Unwrapping.GeneratePerTriangleUV Declaration public static Vector2[] GeneratePerTriangleUV ( Mesh src ); Parameters Parameter Description src The source mesh to generate UVs for. Returns Vector2[] The list of UVs generated. Description Will generate per-triangle uv (3 UVs for each triangle) with def...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ce7e8c2a5c4
unity_docs
rendering
What is `ShaderMessage.Equals` in Unity? Explain its purpose and usage.
ShaderMessage.Equals Declaration public bool Equals ( ShaderMessage other ); Declaration public bool Equals (object obj ); Returns bool True if all fields of the message are equal, otherwise false. Description Compares two ShaderMessage on an element-by-element basis.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52104abc7edb
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsEACFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsEACFormat Declaration public static bool IsEACFormat ( Experimental.Rendering.GraphicsFormat format ); Declaration public static bool IsEACFormat ( TextureFormat format ); Description Returns t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fee0041831b2
unity_docs
scripting
Explain 'Getting started with iOS' in Unity.
This section of the User Manual explains how to set up a project for iOS development and introduces iOS-specific tools and settings. Topic Description iOS environment setup Set up a Unity project for iOS development. iOS Player Settings Reference documentation for iOS Player Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64c2537af776
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.WriteToFile`.
PBXProject.WriteToFile Declaration public void WriteToFile (string path ); Parameters Parameter Description path Path to write the project contents to. Description Writes the project contents to the specified file. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEdito...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_261cde6007ce
unity_docs
scripting
What is `Progress.Item.stepLabel` in Unity? Explain its purpose and usage.
Progress.Item.stepLabel public string stepLabel ; Description Returns the label that displays the progress indicator's steps. Additional resources: Progress.Item.SetStepLabel , Progress.Item.currentStep , Progress.Item.totalSteps , Progress.SetStepLabel , Progress.GetStepLabel .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2952d0be58f5
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.sampleFramesOverflow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.sampleFramesOverflow Parameters Parameter Description value The number of sample frames that were dropped due to the overflow. Description Invoked when the number of available sample frames goes beyond th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3fde9f72b7e
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.GetCurrentGroup`.
rentGroup Declaration public static int GetCurrentGroup (); Returns int The index of the current undo group. Description Unity automatically groups undo operations by the current group index. The current group index is automatically increased on mouse down, clicking on menu items and other operations. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61c31ae8bc80
unity_docs
scripting
Show me a Unity C# example demonstrating `TextAreaAttribute`.
a height-flexible and scrollable text area. You can specify the minimum and maximum lines for the TextArea, and the field will expand according to the size of the text. A scrollbar will appear if the text is bigger than the area available. Note: The maximum lines refers to the maximum size of the TextArea. There is n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2968e87faf81
unity_docs
scripting
In Unity's 'Visual query builder reference', what is 'Build a query' and how does it work?
To build a query: Select the + dropdown menu in the search field. If you want to limit your search to a specific search provider rather than use the default providers, or if you want to use a search provider that must be manually invoked (such as the Asset Store provider), select the search provider from the dropdown m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d6e266a3d1c
unity_docs
physics
Show me a Unity C# example demonstrating `PrefabUtility.MergePrefabInstance`.
ever, as shown in the example below, there are some rare cases where editing a Prefab instance from script requires you to force merge the instance to get immediate updates. If you do not call MergePrefabInstance in those rare cases the re-merge will happen automatically at the end of the current frame, but if you need...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d851f2abb962
unity_docs
scripting
What is `AndroidJNI.GetDoubleField` in Unity? Explain its purpose and usage.
AndroidJNI.GetDoubleField Declaration public static double GetDoubleField (IntPtr obj , IntPtr fieldID ); Description Returns the value of an instance (nonstatic) field of an object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfbe0d9e2eae
unity_docs
scripting
Give me an overview of the `EventModifiers` class in Unity.
EventModifiers enumeration Description Types of modifier key that can be active during a keystroke event. Additional resources: Event , GUI Scripting Guide . Properties Property Description None No modifier key pressed during a keystroke event. Shift Shift key. Control Control key. Alt Alt key. Command C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd2f86e2ccd6
unity_docs
editor
What is `SearchService.AdvancedObjectSelectorValidatorAttribute` in Unity? Explain its purpose and usage.
AdvancedObjectSelectorValidatorAttribute class in UnityEditor.SearchService Description This attribute lets you register a custom advanced object selector validator. An advanced object selector is an object selector that can be customized programatically to be opened on specific object fields, without modifying t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9e7d6e19132
unity_docs
editor
Give me an overview of the `CloudProjectSettingsEventManager` class in Unity.
CloudProjectSettingsEventManager class in UnityEditor Description Manages the events related to the project state. Static Properties Property Description instance The instance of the Cloud Project Settings event manager. Events Event Description projectRefreshed The event fired when the user the state of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0a392a7c47a3
unity_docs
physics
Explain 'Create functional layers in Unity' in Unity.
Layers can help to organize the GameObjects in your scene . If you create a layer and assign GameObjects to it, you can edit how your GameObjects interact with other GameObjects, dependent on the layer. ## Add a new layer There are two ways you can create a new layer: Select the Tags and Layers window (main menu: Edi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e55423399b76
unity_docs
scripting
What is `UIElements.IStyle.borderBottomRightRadius` in Unity? Explain its purpose and usage.
IStyle.borderBottomRightRadius public UIElements.StyleLength borderBottomRightRadius ; Description The radius of the bottom-right corner when a rounded rectangle is drawn in the element's box.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_84444308113a
unity_docs
ui
In Unity's 'GroupBox', what is 'Create a GroupBox with C# script' and how does it work?
The following C# code snippets create a GroupBox and add three radio buttons to it so that they’re logically grouped. ``` var group = new GroupBox("Group Example"); // Must register change events on each radio button. var choice1 = new RadioButton("First Choice"); choice1.RegisterValueChangedCallback(v => Debug.Log("Ch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7d45302c2ff
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.ReadFromStream`.
PBXProject.ReadFromStream Declaration public void ReadFromStream (TextReader sr ); Parameters Parameter Description sr The project contents. Description Reads the project from the given text reader. Current contents of the project are discarded. ```csharp using UnityEditor; using System.IO; using UnityEd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a9368603b301_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Links one event from broadcaster GameObject to one method from listener GameObject's MoonoBehaviour. Signature: ```csharp public class EventLink<T1, T2, T3> : EventLinkBase ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_850cada6982b
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryEngine_1.AddOperatorHandler`.
dler is a function that is executed for a particular operator (for example "=") with specific type requirements. The operator handler is chosen by the return value of the filter handler (see AddFilter ) that is identified when parsing the query, and the type of the filter value. This function can be used to add operat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b5c6b2f70df
unity_docs
scripting
What is `ParticleSystem.LimitVelocityOverLifetimeModule.limitXMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.LimitVelocityOverLifetimeModule.limitXMultiplier public float limitXMultiplier ; Description Change the limit multiplier on the x-axis. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall limit multiplier. ```csharp using UnityEngine;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c101d81bd22b
unity_docs
math
What is `Rendering.ShaderConstantType` in Unity? Explain its purpose and usage.
ShaderConstantType enumeration Description Options for the shader constant value type. Properties Property Description Vector The shader constant is a vector or a scalar (a vector with one column). The related ConstantInfo stores the number of columns. Matrix The shader constant is a matrix. The related Consta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec5a64c64837
unity_docs
performance
What is `Unity.Profiling.ProfilerMarker.ctor` in Unity? Explain its purpose and usage.
ProfilerMarker Constructor Declaration public ProfilerMarker (string name ); Declaration public ProfilerMarker ( Unity.Profiling.ProfilerCategory category , string name ); Declaration public ProfilerMarker ( Unity.Profiling.ProfilerCategory category , char* name , int nameLen ); Declaration public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d22fa889528
unity_docs
scripting
What is `PlayerSettings.SplashScreenLogo.Create` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreenLogo.Create Declaration public static PlayerSettings.SplashScreenLogo Create (float duration = k_MinLogoTime, Sprite logo = null); Parameters Parameter Description duration The total time in seconds that the logo will be shown. Note minimum time is 2 seconds. logo The log...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5db69c66856
unity_docs
rendering
What is `Rendering.VideoShadersIncludeMode` in Unity? Explain its purpose and usage.
VideoShadersIncludeMode enumeration Description Video shaders mode used by GraphicsSettings . Additional resources: GraphicsSettings.videoShadersIncludeMode . Properties Property Description Never Exclude video shaders from builds. This effectively disables video functionality. Referenced Include video shad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_805a3886a1ba
github
scripting
Write a Unity C# script called Test Behaviour0
```csharp using UnityEngine; namespace E { [AutoInstantiate, ExecuteAlways] internal class TestBehaviour0 : GlobalBehaviour { protected override bool IsActive => true; private Transform trans; protected override void OnAwake() { GameObject obj = GameObject.Fin...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_a838b457166e
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.strengthZ`.
ParticleSystem.NoiseModule.strengthZ public ParticleSystem.MinMaxCurve strengthZ ; Description Define the strength of the effect on the z-axis, when using the ParticleSystem.NoiseModule.separateAxes option. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[Require...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb656bfb6a7b
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.Android.enableArmv9SecurityFeatures`.
PlayerSettings.Android.enableArmv9SecurityFeatures public static bool enableArmv9SecurityFeatures ; Description Enable Armv9 security features, including Pointer Authentication (PAuth, PAC) and Branch Target Identification (BTI) for Arm64 builds. ```csharp using UnityEngine; using UnityEditor; using UnityEdito...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a12073612a62
unity_docs
rendering
What is `Shader.GetPropertyDefaultIntValue` in Unity? Explain its purpose and usage.
Shader.GetPropertyDefaultIntValue Declaration public int GetPropertyDefaultIntValue (int propertyIndex ); Parameters Parameter Description propertyIndex The index of the shader property. Description Returns the default int value of the shader property at the specified index. The shader property declarati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d59126109c2
unity_docs
rendering
What is `SpeedTreeImporter.SearchAndRemapMaterials` in Unity? Explain its purpose and usage.
SpeedTreeImporter.SearchAndRemapMaterials Declaration public bool SearchAndRemapMaterials (string materialFolderPath ); Parameters Parameter Description materialFolderPath The path to search for matching materials. Returns bool Returns true if any materials have been remapped, otherwise false. Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f59da78c00e6
unity_docs
rendering
What is `GUILayout.HorizontalScope.ctor` in Unity? Explain its purpose and usage.
GUILayout.HorizontalScope Constructor Declaration public GUILayout.HorizontalScope (params GUILayoutOption[] options ); Declaration public GUILayout.HorizontalScope ( GUIStyle style , params GUILayoutOption[] options ); Declaration public GUILayout.HorizontalScope (string text , GUIStyle style , para...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eff86fc12fb4
unity_docs
scripting
What is `Graphics.activeColorBuffer` in Unity? Explain its purpose and usage.
Graphics.activeColorBuffer public static RenderBuffer activeColorBuffer ; Description Currently active color buffer (Read Only). Additional resources: RenderBuffer , Graphics.activeDepthBuffer , Graphics.SetRenderTarget , Graphics.Blit .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f63c0dc97881
unity_docs
editor
What are the parameters of `Profiling.FrameDataView.GetUnityObjectInfo` in Unity?
Returns bool Returns true if instanceId exists in the frame and object information is available. Description Gets the UnityEngine.Object information for a given Instance ID. Obtains information about the UnityEngine.Object instance in the profiler capture. The Profiler sample can be associated with an instance of an ob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4506f47e1360
unity_docs
editor
In Unity's 'Check the consistency of the import process', what is 'Run consistency checks with the command-line' and how does it work?
If you open Unity with the command-line, you can use the -consistencyCheck command line argument to perform a check on all assets and importers in the project. Unity then logs any inconsistencies found during startup to the Console, and the Editor log file. You can also use the -consistencyCheckSourceMode argument to c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8991ca9738ee
unity_docs
physics
Explain 'UnityYAML' in Unity.
Unity uses a custom-optimized YAML library called UnityYAML. The UnityYAML library does not support the full YAML specification . This documentation outlines which parts of the YAML spec UnityYAML supports. You cannot externally produce or edit UnityYAML files. ## Supported features Feature Support Mappings UnityYAML...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a50d899ee74e
unity_docs
math
What is `HandleUtility.ClosestPointToPolyLine` in Unity? Explain its purpose and usage.
HandleUtility.ClosestPointToPolyLine Declaration public static Vector3 ClosestPointToPolyLine (params Vector3[] vertices ); Description Get the point on a polyline (in 3D space) which is closest to the current mouse position. A polyline is simply a zigzag line defined by a set of points connected in sequence...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90cbc6e4308d
unity_docs
rendering
What is `ParticleSystemJobs.IJobParticleSystemParallelFor` in Unity? Explain its purpose and usage.
IJobParticleSystemParallelFor interface in UnityEngine.ParticleSystemJobs Description Inherit from this interface to implement a Particle System job. Additional resources: IJobParticleSystemParallelFor.Execute . Public Methods Method Description Execute Implement this method to access and modify particle pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a12b7fcb70c0
unity_docs
xr
Show me a Unity C# example demonstrating `Scripting.RequireDerivedAttribute`.
RequireDerivedAttribute class in UnityEngine.Scripting / Implemented in: UnityEngine.CoreModule Description When the type is marked, all types derived from that type will also be marked. ```csharp using System; using UnityEngine; using UnityEngine.Scripting;public class NewBehaviourScript : MonoBehaviour { voi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.