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_87269ebbeff6
unity_docs
scripting
What is `SortingLayer.IDToName` in Unity? Explain its purpose and usage.
SortingLayer.IDToName Declaration public static string IDToName (int id ); Parameters Parameter Description id The unique id of the layer. Returns string The name of the layer with id or "<unknown layer>" for invalid id. Description Returns the unique id of the layer. Will return "<unknown layer>" ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b548e5ce458a
unity_docs
scripting
What is `Rendering.AsyncGPUReadback.RequestIntoNativeSlice` in Unity? Explain its purpose and usage.
AsyncGPUReadback.RequestIntoNativeSlice Declaration public static Rendering.AsyncGPUReadbackRequest RequestIntoNativeSlice (ref NativeSlice<T> output , Texture src , int mipIndex , Action<AsyncGPUReadbackRequest> callback ); Declaration public static Rendering.AsyncGPUReadbackRequest RequestIntoNativeS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26d5df0712e8
unity_docs
editor
What is `ScriptableWizard.helpString` in Unity? Explain its purpose and usage.
ScriptableWizard.helpString public string helpString ; Description Allows you to set the help text of the wizard. Additional resources: ScriptableWizard.OnWizardUpdate Help string on a ScriptableWizard window. ```csharp // Creates a simple Wizard window and prints the HelpString // in the Wizard window.using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd26f669c9e0
unity_docs
scripting
What is `Assertions.Comparers.FloatComparer.AreEqualRelative` in Unity? Explain its purpose and usage.
FloatComparer.AreEqualRelative Declaration public static bool AreEqualRelative (float expected , float actual , float error ); Parameters Parameter Description expected Expected value. actual Actual value. error Comparison error. Returns bool Result of the comparison. Description Performs equal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27f1b7bb5ab1
unity_docs
rendering
What is `ParticleSystemRenderer.trailMaterial` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.trailMaterial public Material trailMaterial ; Description Set the Material that the TrailModule uses to attach trails to particles. Additional resources: ParticleSystem.trails . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public cla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5541d6c82540
unity_docs
physics
Explain 'Joint and Ragdoll stability' in Unity.
This page provides tips for improving Joint and Ragdoll stability. Avoid small Joint angles of Angular Y Limit and Angular Z Limit . Depending on your setup, the minimum angles should be around 5 to 15 degrees in order to be stable. Instead of using a small angle, try setting the angle to zero. This locks the axis and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_693289006331
unity_docs
scripting
What is `ObjectChangeEventStream.Builder.ToStream` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.Builder.ToStream Declaration public ObjectChangeEventStream ToStream ( Unity.Collections.Allocator allocator ); Parameters Parameter Description allocator The allocator to use for the new stream. Returns ObjectChangeEventStream A new stream that contains all events recorded in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62e861e62cb8
unity_docs
physics
In Unity's 'Cloth', what is 'Edit Constraints Tool' and how does it work?
You can apply constraints to specific vertices of the cloth to give them more or less freedom of movement. In the Inspector , select Edit cloth constraints (top-left button) in the Cloth component. When the tool is active, small spheres appear in the Scene view on all vertices of the mesh. They represent the cloth part...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02698f0afe54
unity_docs
rendering
What is `Camera.StereoscopicEye` in Unity? Explain its purpose and usage.
StereoscopicEye enumeration Description Enum used to specify either the left or the right eye of a stereoscopic camera. Properties Property Description Left Specifies the target to be the left eye. Right Specifies the target to be the right eye.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70c982b25dc0
unity_docs
rendering
What is `Rendering.ShadowCastersCullingInfos.perLightInfos` in Unity? Explain its purpose and usage.
ShadowCastersCullingInfos.perLightInfos public NativeArray<LightShadowCasterCullingInfo> perLightInfos ; Description An array of LightShadowCasterCullingInfo . Each entry in this array is associated with the VisibleLight at the same position in the array CullingResults.visibleLights . Therefore, both arrays...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfb53e39167e
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerRequestMetric.AssetTypeId` in Unity? Explain its purpose and usage.
AsyncReadManagerRequestMetric.AssetTypeId public ulong AssetTypeId ; Description The type ID of the asset being read in the read request. Note: This will often be empty, due to many reads not being directly relatable to assets, or subsystems that are unable to get contextual information of the read.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_937d311432e5
unity_docs
scripting
What is `IMGUI.Controls.TreeView.GetFirstAndLastVisibleRows` in Unity? Explain its purpose and usage.
TreeView.GetFirstAndLastVisibleRows Declaration protected void GetFirstAndLastVisibleRows (out int firstRowVisible , out int lastRowVisible ); Parameters Parameter Description firstRowVisible First row visible. lastRowVisible Last row visible. Description Returns the first and the last indices of the ro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbcabae95272
unity_docs
editor
What is `EnterPlayModeOptions` in Unity? Explain its purpose and usage.
EnterPlayModeOptions enumeration Description Determines the flags for the Enter Play Mode Options in the Unity Editor. Properties Property Description None This makes Unity reload the .NET Application Domain and entire Scene when entering Play Mode. DisableDomainReload When Domain Reload is disabled, scripts a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4bdfca960fc7
unity_docs
scripting
Explain 'Data binding' in Unity.
Data binding synchronizes properties of non-UI objects, such as a string property on a MonoBehaviour , with properties of UI objects, such as the value property of a TextField. A binding refers to the link between the property and the visual control that modifies it. Use bindings to synchronize values between a propert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac07255f0415
unity_docs
editor
What is `EditorUserBuildSettings.windowsBuildAndRunDeployTarget` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.windowsBuildAndRunDeployTarget public static WindowsBuildAndRunDeployTarget windowsBuildAndRunDeployTarget ; Description Sets and gets the Windows device to launch the Windows app when using Build and Run.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_195312bd14e6
unity_docs
scripting
Give me an overview of the `Caching` class in Unity.
Caching class in UnityEngine / Implemented in: UnityEngine.CoreModule Description The Caching class lets you manage cached AssetBundles, downloaded using UnityWebRequestAssetBundle.GetAssetBundle . Note: The Cache API is not supported in WebGL because AssetBundles are stored in the browser cache for the WebGL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cf46f97d441
unity_docs
editor
What is `iOS.Xcode.PBXProject.WriteToStream` in Unity? Explain its purpose and usage.
PBXProject.WriteToStream Declaration public void WriteToStream (TextWriter sw ); Parameters Parameter Description sw Text writer to write to. Description Writes the project contents to the specified text writer. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e68484c7b07a
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckWriteAndBumpSecondaryVersion` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.CheckWriteAndBumpSecondaryVersion Declaration public static void CheckWriteAndBumpSecondaryVersion ( Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle ); Parameters Parameter Description handle The AtomicSafetyHandle to check. Description Check whether the referenced native co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8e2fe16e30b
unity_docs
scripting
What is `Sprite.AddScriptableObject` in Unity? Explain its purpose and usage.
Sprite.AddScriptableObject Declaration public bool AddScriptableObject ( ScriptableObject obj ); Parameters Parameter Description obj The ScriptableObject reference to add. Returns bool Returns true if the reference is added. Returns false if the sprite is already referencing the ScriptableObject ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_86214195ac5b
unity_docs
editor
Explain 'Conditional compilation' in Unity.
This section covers the use of preprocessor directives and scripting symbols to conditionally compile sections of your C# code. Topic Description Conditional compilation in Unity An overview of how and when to use conditional compilation in your Unity scripts . Unity scripting symbol reference A reference of the predef...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5aa45767c9ab
unity_docs
editor
Give me an overview of the `AssetDatabaseLoadOperation` class in Unity.
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_246c5582c813
unity_docs
animation
In Unity's 'Event examples', what is 'Transition' and how does it work?
Topics Description Create a simple transition with UI Builder and C# scripts Create a custom Editor window with three labels that rotate and scale when you hover over them. Create a transition event Create a custom Editor window with a button and color palette. Create looping transitions Create a Yo-yo and a A-to-B loo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3fc186c84eea_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The AR ray interactor that determines where to spawn the object. Signature: ```csharp public XRRayInteractor arInteractor ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_e60d6079af52
unity_docs
math
What is `AndroidJNI.GetSByteArrayElement` in Unity? Explain its purpose and usage.
AndroidJNI.GetSByteArrayElement Declaration public static sbyte GetSByteArrayElement (IntPtr array , int index ); Description Returns the value of one element of a primitive array. This function is a special case of GetByteArrayRegion(), called with region size set to 1. Additional resources: Java Native Int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bce1f57d08bb
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.z`.
Vector3.z public float z ; Description Z component of the vector. ```csharp // Attach this script to a GameObject // Create two Input Fields in the Scene (Create>UI>Input Field) // Click on the GameObject and attach both Input Fields in the Inspector windowusing UnityEngine; using UnityEngine.UI;public class Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36b5f0feb7d2
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Profileable` in Unity? Explain its purpose and usage.
Profileable class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <profileable> Android Manifest element. For more information about the element, see Android's documentation: Profileable element Properties Property Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7daad15229f
unity_docs
rendering
In Unity's 'Xcode frame debugger Unity integration', what is 'Capture a frame from your application' and how does it work?
To use the Xcode frame debugger to capture a frame from do one of the following: Launch your application from Xcode and either use the Xcode UI or the FrameCapture API to request frame captures. You can analyze the frame captures in Xcode immediately, or save them to disk. This workflow is supported on all platforms th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_484ab81392be
unity_docs
rendering
What is `Rendering.RenderPipeline.BeginCameraRendering` in Unity? Explain its purpose and usage.
RenderPipeline.BeginCameraRendering Declaration protected static void BeginCameraRendering ( Rendering.ScriptableRenderContext context , Camera camera ); Description Calls the RenderPipelineManager.beginCameraRendering delegate. In the Universal Render Pipeline (URP) and the High Definition Render Pipeli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f510bd5bc0c2
unity_docs
audio
What is `AudioSource.pitch` in Unity? Explain its purpose and usage.
AudioSource.pitch public float pitch ; Description The pitch of the audio source. Pitch makes a melody go higher or lower. For example, if you play an audio clip with pitch set to one, increasing the pitch as the clip plays will make the clip sound higher. Similarly, decreasing the pitch to less than one makes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd76c932bd15
unity_docs
input
What is `Unity.IntegerTime.DiscreteTimeTimeExtensions.Clamp` in Unity? Explain its purpose and usage.
DiscreteTimeTimeExtensions.Clamp Declaration public static Unity.IntegerTime.DiscreteTime Clamp ( Unity.IntegerTime.DiscreteTime x , Unity.IntegerTime.DiscreteTime a , Unity.IntegerTime.DiscreteTime b ); Parameters Parameter Description x The input value. a The lower bound. b The upper bound. R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_643d3667efd0
unity_docs
scripting
What is `TerrainTools.TerrainPaintTool_1.OnEnable` in Unity? Explain its purpose and usage.
TerrainPaintTool<T0>.OnEnable Declaration public void OnEnable (); Description Called when the tool is created. Unity calls this method when the tool is created. Additional resources: ScriptableObject.OnEnable .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8ba7a6fb30f
unity_docs
physics
What is `Physics2D.bounceThreshold` in Unity? Explain its purpose and usage.
Physics2D.bounceThreshold public static float bounceThreshold ; Description Any collisions with a relative linear velocity below this threshold will be treated as inelastic so no bounce will occur.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdd946bbc0d9
unity_docs
math
What is `CullingGroup.QueryIndices` in Unity? Explain its purpose and usage.
CullingGroup.QueryIndices Declaration public int QueryIndices (bool visible , int[] result , int firstIndex ); Declaration public int QueryIndices (int distanceIndex , int[] result , int firstIndex ); Declaration public int QueryIndices (bool visible , int distanceIndex , int[] result , int firstIn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdffd32db054
unity_docs
ui
Show me a Unity C# example demonstrating `EditorWindow.ShowPopup`.
ion Shows an Editor window using popup-style framing. This means the window has no frame, and is not draggable. It is intended for showing something like a popup menu within an existing window. Opening a window using this method will not give it the functionality of a popup window, only the styling. For full popup fu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4f0937a2a003
unity_docs
rendering
In Unity's 'Support for proprietary model file formats', what is 'Application-specific issues' and how does it work?
You import files in the same way, regardless of whether they are generic or proprietary files. However, there are some differences between which features are supported. For more information on the limitations with a specific 3D application, see: Importing objects from Autodesk® Maya® Importing objects from Autodesk® 3d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f85b7cc87699
unity_docs
rendering
What is `TrailRenderer.numCornerVertices` in Unity? Explain its purpose and usage.
TrailRenderer.numCornerVertices public int numCornerVertices ; Description Set this to a value greater than 0, to get rounded corners between each segment of the trail. The value controls how many vertices are added to each joint, where a higher value will give a smoother result. ```csharp using UnityEngine; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_330d9c705816
unity_docs
physics
What is `CharacterJoint.lowTwistLimit` in Unity? Explain its purpose and usage.
CharacterJoint.lowTwistLimit public SoftJointLimit lowTwistLimit ; Description The lower limit around the primary axis of the character joint. The limit is relative to the angle the two rigidbodies started the simulation out with.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ea07d41bad7
unity_docs
editor
Show me a Unity C# example demonstrating `EditorPrefs.DeleteAll`.
EditorPrefs.DeleteAll Declaration public static void DeleteAll (); Description Removes all keys and values from the preferences. Use with caution. Clears all editor prefs keys. ```csharp // Clear all the editor prefs keys. // // Warning: this will also remove editor preferences as the opened projects, etc.usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4a9d0795979e
unity_docs
xr
In Unity's 'Graphics tiers in the Built-In Render Pipeline', what is 'Graphics tiers and shader variants' and how does it work?
In the Built-in Render Pipeline, Unity can generate shader variants that correspond to graphics tiers. Note: These tier shader variants work differently to regular shader variants. At runtime, when Unity loads a Shader object into CPU memory, it only loads the variants for the active tier; it does not load the variants...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_babf53058ff3
unity_docs
rendering
Show me a Unity C# example demonstrating `WebCamTexture.deviceName`.
t this to specify the name of the device to use. This only has an effect when set while the camera is not running. Note: if you want to use WebCamTexture to get the camera stream from device connected through Unity Remote, then you must initalize it through the constructor. It's not possible to change device using We...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80365df4af04
unity_docs
rendering
What is `Device.SystemInfo.supportsRayTracingShaders` in Unity? Explain its purpose and usage.
SystemInfo.supportsRayTracingShaders public static bool supportsRayTracingShaders ; Description This has the same functionality as SystemInfo.supportsRayTracingShaders 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_b6d711fe143a
unity_docs
math
What is `TerrainTools.PaintDetailsToolUtility.DrawClampedDetailPatchGUI` in Unity? Explain its purpose and usage.
PaintDetailsToolUtility.DrawClampedDetailPatchGUI Declaration public static void DrawClampedDetailPatchGUI (int mouseOnPatchIndex , List<Vector4> clampedDetailPatchIconScreenPositions , Vector2 detailMinMaxHeight , Terrain terrain , TerrainTools.IOnSceneGUI editContext ); Parameters Parameter Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c141208e600
unity_docs
math
What is `AI.NavMeshPath.GetCornersNonAlloc` in Unity? Explain its purpose and usage.
NavMeshPath.GetCornersNonAlloc Declaration public int GetCornersNonAlloc (out Vector3[] results ); Parameters Parameter Description results Array to store path corners. Returns int The number of corners along the path - including start and end points. Description Calculate the corners for the path. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f1b4e090020
unity_docs
scripting
Give me an overview of the `LogType` class in Unity.
LogType enumeration Description The type of the log message in Debug.unityLogger.Log or delegate registered with Application.RegisterLogCallback. Additional resources: Logger , ILogger , Debug.unityLogger , Application.RegisterLogCallback. Properties Property Description Error LogType used for Errors. Ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60461479b4ea
unity_docs
scripting
Show me a Unity C# example demonstrating `Rendering.RenderPipelineManager.activeRenderPipelineAssetChanged`.
en the current RenderPipelineAsset has changed between frames. The first argument will be the previous RenderPipelineAsset, and the second argument will be the current RenderPipelineAsset. The one used to create the current RenderPipeline used to render the last frame. Description Delegate that you can use to invok...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fff6a11d32bc
unity_docs
editor
What are the parameters of `EditorGUI.TextArea` in Unity?
Returns string The text entered by the user. Description Makes a text area. This works just like GUI.TextArea , but correctly responds to select all, copy, paste etc. in the editor. Text Area in an Editor Window. ```csharp using UnityEngine; using UnityEditor;// Create a window where you can have notes // This doesnt p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90841c5c645f
unity_docs
rendering
Give me an overview of the `ParticleSystemCullingMode` class in Unity.
ParticleSystemCullingMode enumeration Description The action to perform when the Particle System is offscreen. Properties Property Description Automatic For looping effects, the simulation is paused when offscreen, and for one-shot effects, the simulation will continue playing. PauseAndCatchup Pause the Partic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fddd4e5ef893
unity_docs
math
What are the parameters of `HumanTrait.GetMuscleDefaultMin` in Unity?
Description Get the default minimum value of rotation for a muscle in degrees. The default minimum applies to all three axes of rotation for the muscle. The indexing order for the muscles is the same as that of the MuscleName array. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59724e82fc21
unity_docs
rendering
What is `ShaderImporter.SetNonModifiableTextures` in Unity? Explain its purpose and usage.
ShaderImporter.SetNonModifiableTextures Declaration public void SetNonModifiableTextures (string[] name , Texture[] textures ); Description Sets the non-modifiable textures for each texture material property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aebff93ed5d6
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.ShapeModule.texture`.
etches the Texture over the shape you specify. Then, when the system emits a particle from a point on the shape, the Shape module uses the color of the Texture at that location as the particle color. To see how the Texture stretches over the shape, select the Particle System in the Hierarchy view and expand the Shape m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5710c472b9d3
unity_docs
scripting
What is `Android.AndroidProjectFilesModifierContext.Outputs` in Unity? Explain its purpose and usage.
AndroidProjectFilesModifierContext.Outputs public Android.AndroidProjectFilesModifierContext.AdditionalOutputs Outputs ; Description Represents a container that you can use to specify additional files that will be created in AndroidProjectFilesModifier.OnModifyAndroidProjectFiles .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c0e11ffc2db
unity_docs
scripting
What is `EditorTools.EditorTool.PopulateMenu` in Unity? Explain its purpose and usage.
EditorTool.PopulateMenu Declaration public void PopulateMenu ( UIElements.DropdownMenu menu ); Parameters Parameter Description menu The Scene view context menu to add menu items to. Description Adds menu items to Scene view context menu. Refer to MenuUtility for utility functions that add menu items to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_598dc3ea82aa
unity_docs
editor
What is `EditorGUI.DropShadowLabel` in Unity? Explain its purpose and usage.
EditorGUI.DropShadowLabel Declaration public static void DropShadowLabel ( Rect position , string text ); Declaration public static void DropShadowLabel ( Rect position , GUIContent content ); Declaration public static void DropShadowLabel ( Rect position , string text , GUIStyle style ); De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7550c484b734
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.FileInfoResult.FileSize` in Unity? Explain its purpose and usage.
FileInfoResult.FileSize public long FileSize ; Description Indicates the size of the file in bytes. If the file exists, this member reports the size of the file in bytes. If the file was not found, the file size is reported as zero.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4537818d0785_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Range of scaling. If either the min or max scale is unbound, infinity will be returned. Signature: ```csharp public float ScaleRange ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_a6cdb65dd8e0
unity_docs
physics
What is `EdgeCollider2D` in Unity? Explain its purpose and usage.
EdgeCollider2D class in UnityEngine / Inherits from: Collider2D / Implemented in: UnityEngine.Physics2DModule Description Collider for 2D physics representing an arbitrary set of connected edges (lines) defined by its vertices. Additional resources: BoxCollider2D , CircleCollider2D , PolygonCollider2D . P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcdc465dacb3
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.undoRedoPerformed`.
Undo.undoRedoPerformed public static Undo.UndoRedoCallback undoRedoPerformed ; Description Callback that is triggered after an undo or a redo was executed. For more information on whether the callback was called from an undo or a redo, use undoRedoEvent instead. ```csharp using UnityEditor; using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9f8e643bd80
unity_docs
physics
What is `SimulationMode2D.FixedUpdate` in Unity? Explain its purpose and usage.
SimulationMode2D.FixedUpdate Description Use this enumeration to specify to Unity that it should execute the physics simulation immediately after the MonoBehaviour.FixedUpdate . Executing the physics simulation during MonoBehaviour.FixedUpdate provides the most stable physics simulation however, Unity may render...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6d1f17b6ee0
unity_docs
rendering
What is `DynamicGI.UpdateMaterials` in Unity? Explain its purpose and usage.
DynamicGI.UpdateMaterials Obsolete DynamicGI.UpdateMaterials(Renderer) is deprecated; instead, use extension method from RendererExtensions: 'renderer.UpdateGIMaterials()'. Declaration public static void UpdateMaterials ( Renderer renderer ); Parameters Parameter Description renderer The Renderer to us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0181a66a3c4
unity_docs
scripting
What is `SubsystemsImplementation.SubsystemDescriptorStore` in Unity? Explain its purpose and usage.
SubsystemDescriptorStore class in UnityEngine.SubsystemsImplementation / Implemented in: UnityEngine.SubsystemsModule Description Registration entry point for subsystems to register their descriptor. This is typically for use in platform-support packages.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_022099cfb1e8
unity_docs
performance
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.GetNestedContainer` in Unity? Explain its purpose and usage.
AtomicSafetyHandle.GetNestedContainer Declaration public static bool GetNestedContainer ( Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle ); Parameters Parameter Description handle The AtomicSafetyHandle to check. Returns bool true if the given AtomicSafetyHandle is marked as a nested contai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9a23950b35d5
unity_docs
rendering
Explain 'Color gradients' in Unity.
You can apply gradients of up to four colors to text. When you add a color gradient, TextCore applies gradient colors to each character in a text string. Use the <gradient> rich text tags to apply color gradient presets to text objects. A gradient preset overrides the text’s local gradient type and colors. ## Create a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7823768caf40
unity_docs
ui
Show me a Unity C# example demonstrating `UIElements.VisualElement.style`.
yles, such as the final height and width of a VisualElement. To access these fully resolved styles, use resolvedStyle. For information about how to use this property and all the supported USS properties, refer to the Apply styles in C# scripts and USS properties reference manual pages. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_50f6fd442999
unity_docs
rendering
In Unity's 'Android App Manifest', what is 'Permissions' and how does it work?
Unity automatically adds the necessary permissions to the manifest based on the Android Player Settings and Unity APIs that your application calls from C# scripts . For example: The following classes, packages, and Player setting add the INTERNET permission. Setting Internet Access to Require in Android Player settings...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4f771bb5c18f
unity_docs
rendering
In Unity's 'Introduction to lightmaps and baking', what is 'The Progressive Lightmapper' and how does it work?
The Progressive Lightmapper is a fast path-tracing-based lightmapper system that provides baked lightmaps and Light Probes with progressive updates in the Editor. It requires non-overlapping UV charts with small area and angle errors, and sufficient margin between UV charts. The Progressive Lightmapper takes a short pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7714c930f049
unity_docs
rendering
What are the parameters of `Material.SetMatrix` in Unity?
Description Sets a named matrix for the shader. This is mostly used with custom shaders that need extra matrix parameters. Matrix parameters are not exposed in the material inspector, but can be set and queried with SetMatrix and GetMatrix from scripts. Additional resources: GetMatrix , Materials , ShaderLab documentat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19975e800264
unity_docs
scripting
What is `Playables.Notification.ctor` in Unity? Explain its purpose and usage.
Notification Constructor Declaration public Notification (string name ); Parameters Parameter Description name The name that identifies this notifications. Description Creates a new notification with the name specified in the argument.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f48b13a83712
github
scripting
Write a Unity C# script called Curve Renderer
```csharp using UnityEngine; namespace CurvePickerTool { internal interface CurveRenderer { void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, Color wrapColor); AnimationCurve GetCurve(); Bounds GetBounds(float start, float end); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3097c6390f1
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.id` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.id public uint id ; Description Unique identifier for this instance. This is the id that is expected when invoking the native function pointer Experimental.Audio.AudioAudioSampleProvider.consumeSampleFram...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9bfdb4d7893
unity_docs
editor
What are the parameters of `AssetDatabase.GetSubFolders` in Unity?
Returns string[] Returns an array of the folder's subdirectories. Description Obtains the subdirectories of a given directory in the Assets folder. ```csharp using UnityEditor; using UnityEngine;public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Get Folder List")] static void SubFolde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3f4c527044c1
unity_docs
scripting
Show me a Unity code example for 'TextElement'.
The TextElement displays text in a UI. If you create a custom control for displaying text, you can inherit it from a TextElement . ## Create a TextElement You can create a TextElement with UXML or C#. The following C# example creates a TextElement with a text value and some styles: ``` var textElement = new TextEleme...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1e59162d5d7
unity_docs
scripting
What are the parameters of `Tilemaps.Tilemap.SwapTile` in Unity?
Description Swaps all existing Tile s of changeTile to newTile and refreshes all the swapped Tile s. ```csharp // Change all occurences of tileA into tileB using UnityEngine; using UnityEngine.Tilemaps;public class ExampleClass : MonoBehaviour { public TileBase tileA; public TileBase tileB; void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_103f810388d2
github
scripting
Write a Unity C# script called Addressable Prefab Pool
```csharp #if HAVE_ADDRESSABLES using System; using Gilzoide.PrefabPool.Internal; using UnityEngine; using UnityEngine.AddressableAssets; using Object = UnityEngine.Object; namespace Gilzoide.PrefabPool { [Serializable] public class AddressablePrefabPool<T> : APrefabPool<T> where T : Object { ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_c16e1c2dfb9f
unity_docs
scripting
Explain 'Avoid C# reflection overhead' in Unity.
Both the Mono and IL2CPP scripting backends internally cache all C# System.Reflection objects and Unity doesn’t garbage collect them. This means the garbage collector continuously scans the cached C# reflection objects during the lifetime of your application, which causes unnecessary and potentially significant garbage...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fae496fda528
unity_docs
editor
In Unity's 'Web native plug-ins for Emscripten', what is 'Compile native plug-ins with Emscripten' and how does it work?
If you’re creating native C/C++ plug-ins for your Unity application, you can either bundle the C/C++ code with your project (see Native plug-ins ) or build the native code to a plug-in archive ahead of time with the Emscripten compiler toolchain. If you choose to build plug-in code in advance, you should use the Emscri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ecf718947587
unity_docs
rendering
Explain 'Tags and Layers' in Unity.
The Tags and Layers settings (main menu: Edit > Project Settings , then select the Tags and Layers category) allows you to set up Tags , Sorting Layers and Layers . ## Tags Tags are marker values that you can use to identify objects in your Project (see documentation on Tags for further details). To add a new Tag, cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36bb2e94fa35
unity_docs
editor
What is `GradientUsageAttribute.ctor` in Unity? Explain its purpose and usage.
GradientUsageAttribute Constructor Declaration public GradientUsageAttribute (bool hdr ); Declaration public GradientUsageAttribute (bool hdr , ColorSpace colorSpace ); Parameters Parameter Description hdr Set to true if the colors should be treated as HDR colors (default value: false). colorSpace ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_425f9b0c493a
unity_docs
scripting
Show me a Unity C# example demonstrating `ContextMenu`.
s the context menu, the function executes. This is most useful for automatically setting up Scene data from the script. The function has to be non-static. If you want to create a context menu when you right-click a property in the Inspector, use EditorApplication.contextualPropertyMenu . If you want to create a menu ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9beb3daa8394
unity_docs
physics
What is `Rigidbody` in Unity? Explain its purpose and usage.
Rigidbody class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.PhysicsModule Description Control of an object's position through physics simulation. Adding a Rigidbody component to an object will put its motion under the control of Unity's physics engine. Even without adding any code...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf634664aabc
unity_docs
input
What is `Playables.PlayableExtensions.DisconnectInput` in Unity? Explain its purpose and usage.
PlayableExtensions.DisconnectInput Declaration public static void DisconnectInput (U playable , int inputPort ); Parameters Parameter Description playable The Playable used by this operation. inputPort The input port index. Description Disconnect the input port of a Playable . This method is a simp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e15383343bde
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetParent` in Unity? Explain its purpose and usage.
Hierarchy.GetParent Declaration public Unity.Hierarchy.HierarchyNode GetParent (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node. Returns HierarchyNode A hierarchy node. Description Gets the parent of a hierarchy node.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a8582467229
unity_docs
rendering
What is `AssetDatabase.WriteImportSettingsIfDirty` in Unity? Explain its purpose and usage.
AssetDatabase.WriteImportSettingsIfDirty Declaration public static bool WriteImportSettingsIfDirty (string path ); Parameters Parameter Description path The path to write the import settings to. Returns bool Returns true if the operation was successful. Description Writes the import settings to disk....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe4cec21a18f
unity_docs
rendering
What is `LightTransport.EventID.ctor` in Unity? Explain its purpose and usage.
EventID Constructor Declaration public EventID (ulong value ); Parameters Parameter Description value The value is used by the implementation and can be interpreted as a memory pointer or other implementation specific data. Description Construct a new EventID object. Creates an EventID from a raw value. T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c82da8a3b1df
unity_docs
xr
What is `Networking.UnityWebRequest.isDone` in Unity? Explain its purpose and usage.
UnityWebRequest.isDone public bool isDone ; Description Returns true after the UnityWebRequest has finished communicating with the remote server. (Read Only) This property will return true both when the UnityWebRequest finishes successfully, or when it encounters a system error. All post-download proces...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_166c0b76f093
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.TimestampConversionRatio` in Unity? Explain its purpose and usage.
TimestampConversionRatio struct in Unity.Profiling.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Fraction that converts the Profiler timestamp to nanoseconds. Use to convert the Profiler timestamp value obtained with GetTimestamp to nanoseconds. ```csharp using Unity.Profiling.LowLevel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_849e9f6c5702
unity_docs
editor
What is `Compilation.AssemblyFlags` in Unity? Explain its purpose and usage.
AssemblyFlags enumeration Description Flags for Assembly . Properties Property Description None None value. Default. EditorAssembly Indicates whether this assembly is an editor only assembly.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81e9a22810b3
unity_docs
xr
What is `DynamicGI.UpdateEnvironment` in Unity? Explain its purpose and usage.
DynamicGI.UpdateEnvironment Declaration public static void UpdateEnvironment (); Description Schedules an update of the environment cubemap. When you use this signature, Unity schedules an update of the environment cubemap. Query SystemInfo.supportsAsyncGPUReadback to determine if the system currently runni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6b945cbccb82_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Calls the methods in its invocation list when the system gesture ends.This behavior postpones ending the system gesture until the user has turned their hand around.In other words, it isn't purely based on the being cleared from the aim flags in order to better replicate the native visual feedback in the Meta Home menu....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95fdd4d1ae5b
unity_docs
rendering
What is `Rendering.CameraEvent.AfterGBuffer` in Unity? Explain its purpose and usage.
CameraEvent.AfterGBuffer Description After deferred rendering G-buffer is rendered. Will be called immediately after all objects are rendered into G-buffer. The G-buffer render target(s) will be active, however they will not be set up as shader properties yet. Generally the BeforeLighting event is probably a bett...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3c2f467a2ab
unity_docs
scripting
What is `PlayerSettings.GetNormalMapEncoding` in Unity? Explain its purpose and usage.
PlayerSettings.GetNormalMapEncoding Declaration public static NormalMapEncoding GetNormalMapEncoding ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description buildTarget The NamedBuildTarget . Description Gets the NormalMapEncoding for the build target you select. Obsolete Use Get...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dde3ef766e97
unity_docs
physics
What is `Cloth.GetVirtualParticleIndices` in Unity? Explain its purpose and usage.
Cloth.GetVirtualParticleIndices Declaration public void GetVirtualParticleIndices (List<uint> indicesOutList ); Parameters Parameter Description indices List to be populated with virtual particle indices. Description Get list of indices to be used when generating virtual particles. Virtual particles prov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1074a1c55a90
unity_docs
editor
What is `Build.Content.ContentBuildInterface.CalculatePlayerSerializationHashForType` in Unity? Explain its purpose and usage.
ContentBuildInterface.CalculatePlayerSerializationHashForType Declaration public static Hash128 CalculatePlayerSerializationHashForType (Type type , Build.Player.TypeDB typeDB ); Parameters Parameter Description type The type of the object. typeDB The user script TypeDB for the player. Returns Hash1...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c218094720ca
unity_docs
scripting
What is `UIElements.IStyle.backgroundSize` in Unity? Explain its purpose and usage.
IStyle.backgroundSize public UIElements.StyleBackgroundSize backgroundSize ; Description Background image size value. Transitions are fully supported only when using size in pixels or percentages, such as pixel-to-pixel or percentage-to-percentage transitions.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5417828c6759
unity_docs
physics
What is `LightRenderMode` in Unity? Explain its purpose and usage.
LightRenderMode enumeration Description How the Light is rendered. Additional resources: light component . Properties Property Description Auto Automatically choose the render mode. ForcePixel Force the Light to be a pixel light. ForceVertex Force the Light to be a vertex light.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56f29ee9bbb2
unity_docs
rendering
Give me an overview of the `LineRenderer` class in Unity.
LineRenderer class in UnityEngine / Inherits from: Renderer / Implemented in: UnityEngine.CoreModule Description The line renderer is used to draw free-floating lines in 3D space. This class is a script interface for a line renderer component. Properties Property Description alignment Select whether th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_98ebcbee83d7
github
scripting
Write a Unity C# ScriptableObject for Singleton Test Editor GUI
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using UnityEngine.SceneManagement; public class SingletonTestEditorGUI : EditorWindow { SingletonTestGUI testGUI; // Add menu named "My Window" to the Window menu [MenuItem("Window/Singletons/SingletonTestE...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_dc9a5b973652
unity_docs
networking
Explain 'Unity Transport' in Unity.
com.unity.transport ## Description Unity network transport layer - the low-level interface for connecting and sending data through a network ## Released for Unity Package version 2.7.2 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_719c0c758cd1
unity_docs
performance
What are the parameters of `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.SetMarkerMetadata` in Unity?
Description Set Profiler marker metadata name and type. Use to add additional usage context to the Profiler sample metadata parameter. ```csharp using Unity.Collections.LowLevel.Unsafe; using Unity.Profiling; using Unity.Profiling.LowLevel; using Unity.Profiling.LowLevel.Unsafe; using System;class Example { static ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_01f7d88ca3ae
unity_docs
rendering
Explain 'Loading texture and mesh data asynchronously' in Unity.
Strategies and resources for uploading texture and mesh data to the GPU asynchronously, to improve performance. Topic Description Uploading texture and mesh data to the GPU Understand the difference between the synchronous and asynchronous upload pipelines, and what makes a mesh eligible for asynchronous upload. Check ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7d8482ef620d
github
scripting
Write a Unity C# script called MBT Node
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using System; namespace MBT { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] public class MBTNode : Attribute { public string name; public int order; public...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.