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_54b01fa23fb0
unity_docs
scripting
What is `Transform.root` in Unity? Explain its purpose and usage.
Transform.root public Transform root ; Description Returns the topmost transform in the hierarchy. (This never returns null, if this Transform doesn't have a parent it returns itself.) ```csharp using UnityEngine;public class Example : MonoBehaviour { // Is a collision between two objects with different ro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d1b6ab6b7615
unity_docs
scripting
Explain 'Share your package' in Unity.
When you have finished developing your package, you can share it with other users. Choose from the following methods to share your package: Type Description Compressed file You can distribute a zip file to other Unity users. That way, they can decompress the zip file to a local folder on their own computer and install ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5f0d0eab34ee
unity_docs
ui
Show me a Unity code example for 'Introduction to UXML'.
L format is inspired by HTML , XAML , and XML . If you’ve worked with these formats before, you’ll find similarities in UXML. However, the UXML format includes small differences to provide an efficient way to work with Unity. This page introduces the format of UXML by an example. The following is an example UXML file. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_710cff126406
unity_docs
scripting
What is `AI.NavMeshObstacle.velocity` in Unity? Explain its purpose and usage.
NavMeshObstacle.velocity public Vector3 velocity ; Description Velocity at which the obstacle moves around the NavMesh. ```csharp // Name this file (ManualObstacleVelocityUpdater.cs) to match the class name. using System; using UnityEngine; using UnityEngine.AI; /// <summary> /// Update the current GameOb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_afbcc52b5ad7
unity_docs
scripting
What is `UIElements.BaseListView.listViewWithHeaderUssClassName` in Unity? Explain its purpose and usage.
BaseListView.listViewWithHeaderUssClassName public static string listViewWithHeaderUssClassName ; Description The USS class name for ListView when foldout header is enabled. Unity adds this USS class to ListView when showFoldoutHeader is set to true . Any styling applied to this class affects every list l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5c63a2e4024
unity_docs
networking
What is `Networking.PlayerConnection.PlayerConnection.Register` in Unity? Explain its purpose and usage.
PlayerConnection.Register Declaration public void Register (Guid messageId , UnityAction<MessageEventArgs> callback ); Parameters Parameter Description messageId The message ID that should cause the Action callback to be executed when received. callback Action that is executed when a message with ID me...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a560ce9d3b5
unity_docs
editor
What is `Help` in Unity? Explain its purpose and usage.
Help class in UnityEditor Description Helper class to access Unity documentation. Static Methods Method Description BrowseURL Open url in the default web browser. GetHelpURLForObject Get the URL for this object's documentation. HasHelpForObject Is there a help page for this object? ShowHelpForObject Show he...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e48d8762bb3
unity_docs
ui
Explain 'Issue an Asset Store voucher' in Unity.
Use a voucher to give a customer one of your paid packages for free. You can create up to 16 vouchers a year for each Asset Store package. A customer can redeem a voucher in the Asset Store cart or the redeem a voucher page. Note: You can only give vouchers away for free. You can’t sell or exchange them. To issue a vou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f4075692587
unity_docs
physics
What is `ArticulationBody.GetDenseJacobian` in Unity? Explain its purpose and usage.
ArticulationBody.GetDenseJacobian Declaration public int GetDenseJacobian (ref ArticulationJacobian jacobian ); Parameters Parameter Description jacobian Supplied struct to read back and store Jacobian matrix values. Returns int Number of elements in Jacobian matrix. Description Calculates and wr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a03131b03403
unity_docs
scripting
What is `Event.shift` in Unity? Explain its purpose and usage.
Event.shift public bool shift ; Description Is Shift held down? (Read Only) Returns true if any Shift key is held down. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Detects if the shift key was pressed void OnGUI() { Event e = Event.current; if (e.shift) { Debug.Log("Shift was p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c0ca3fce97d
unity_docs
scripting
What is `TextMesh.offsetZ` in Unity? Explain its purpose and usage.
TextMesh.offsetZ public float offsetZ ; Description How far should the text be offset from the transform.position.z when drawing. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { GetComponent<TextMesh>().offsetZ = 5; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b851fea56581
unity_docs
audio
In Unity's 'Search the Unity Asset Store', what is 'Query syntax' and how does it work?
Provider token: store: Note: You can’t implicitly use this search provider as part of a default search . You must explicitly use its search token or its visual query filter. Query example: Search for 3D character assets with a price of less than $100 and a minimum rating of 5. ``` store: price=100 min_rating=5 category...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_100b3fbdff4b
unity_docs
scripting
Show me a Unity code example for 'MultiColumnTreeView'.
play tabular or grid-like data with multiple columns. Use a MultiColumnTreeView to present data in a structured format, where each row represents an item or entry, and each column represents a specific attribute or property of that item. ## Create a MultiColumnTreeView You can create a MultiColumnTreeView with UXML a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d4ef79eefa7
unity_docs
editor
What is `Editor.RenderStaticPreview` in Unity? Explain its purpose and usage.
Editor.RenderStaticPreview Declaration public Texture2D RenderStaticPreview (string assetPath , Object[] subAssets , int width , int height ); Parameters Parameter Description assetPath The asset to operate on. subAssets An array of all Assets at assetPath. width Width of the created texture. heigh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c417a2f5c8aa
unity_docs
xr
What is `AudioSpeakerMode.Stereo` in Unity? Explain its purpose and usage.
AudioSpeakerMode.Stereo Description The speakers are stereo and contain two channels. The Stereo speaker mode has two output channels: left and right. This means you can send different audio to each channel, so in headphones, each ear can hear different content. This mode is the standard for most devices (speakers,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e275a16bdb53
unity_docs
scripting
Show me a Unity C# example demonstrating `Rendering.RenderPipelineManager.activeRenderPipelineCreated`.
ne or QualitySettings.renderPipeline . Unity only instantiate a new RenderPipeline instance the first time any Camera renders after you set a new RenderPipelineAsset . You can subscribe to this event to know that RenderPipeline is created. To access the current pipeline object you can rely on RenderPipelineMa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f1ff4cebf463
unity_docs
editor
In Unity's 'Assign assets to an AssetBundle', what is 'Assign assets to AssetBundles with a script' and how does it work?
To assign assets to AssetBundles in your code, use the BuildPipeline.BuildAssetBundles method with an array of AssetBundleBuild structures. This approach overrides any AssetBundle assignments made in the Inspector. If you want your script to respect AssetBundle assignments made in the Inspector, use AssetDatabase.GetAl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7e941b09d22
unity_docs
scripting
What is `Event.type` in Unity? Explain its purpose and usage.
Event.type public EventType type ; Description The type of event. Additional resources: EventType , GUI Scripting Guide . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints the current event detected. void OnGUI() { Debug.Log("Current event detected: " + Event.current.type); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5f0b829e1ef
unity_docs
rendering
What is `TextureFormat.RG32_SIGNED` in Unity? Explain its purpose and usage.
TextureFormat.RG32_SIGNED Description Two channel (RG) texture format, 16-bits signed integer per channel. Import textures of this format in .DDS files. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check. Additional resources: Texture2D.format , texture a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e47118a318d8
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSettings.dspTime`.
AudioSettings.dspTime public static double dspTime ; Description Returns the current time of the audio system. This is a value specified in seconds and based on the actual number of samples the audio system processes and is therefore much more precise than the time obtained via the Time.time property. ```cs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87f696be4a36
unity_docs
scripting
What is `MPE.ChannelService.RegisterMessageHandler` in Unity? Explain its purpose and usage.
ChannelService.RegisterMessageHandler Declaration public static Unity.Android.Gradle.Manifest.Action RegisterMessageHandler (string channelName , Action<int,byte[]> handler ); Parameters Parameter Description channelName The name of the channel. handler The handler that processes messages. Returns Act...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_946c04d4ec49
unity_docs
rendering
What is `SystemInfo.SupportsBlendingOnRenderTextureFormat` in Unity? Explain its purpose and usage.
SystemInfo.SupportsBlendingOnRenderTextureFormat Declaration public static bool SupportsBlendingOnRenderTextureFormat ( RenderTextureFormat format ); Parameters Parameter Description format The format to look up. Returns bool True if blending is supported on the given format. Description Is blending...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a8c82fc45a2b
github
scripting
Write a Unity C# physics script for Fantasy Portal Camera Orbit
```csharp using UnityEngine; using System.Collections; namespace PortalFX { public class FantasyPortalCameraOrbit : MonoBehaviour { public Transform target; public float distance = 5.0f; public float xSpeed = 120.0f; public float ySpeed = 120.0f; public float yMinLimit = -20f; public float yM...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_d469198e5841
unity_docs
scripting
In Unity's 'VisualElement', what is 'Member UXML attributes' and how does it work?
This element has the following member attributes: Name Type Description content-container string Logical container where child elements are added. If a child is added to this element, the child is added to this element’s content container instead. When iterating over the VisualElement.Children of an element, the elemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f8b2eed7ba3
unity_docs
editor
Show me a Unity C# example demonstrating `PrefabUtility.ApplyRemovedGameObject`.
y in the Editor, as described in the Apply overrides to the prefab asset documentation. For more information, refer to Override prefab instances . Additional resources: PrefabUtility.ApplyAddedComponent , PrefabUtility.ApplyAddedGameObject , PrefabUtility.ApplyObjectOverride , PrefabUtility.ApplyPrefabInstance ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49c2de5b7032
unity_docs
rendering
What is `Rendering.GraphicsTextureState.Initializing` in Unity? Explain its purpose and usage.
GraphicsTextureState.Initializing Description The descriptor is initialized and the work to create the GraphicsTexture has been queued on the render thread. If threaded texture creation is allowed, then the GraphicsTexture will first be created on a worker thread before transferring to the render thread. Additional...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89733942f369
unity_docs
ui
Show me a Unity C# example demonstrating `VersionControl.VersionControlObject.isConnected`.
ed to an underlying version control system. There are various reasons why your VersionControlObject may not be connected. For example: Your VCS might need to be configured before establishing connection. OnActivate might start a background thread that takes some time to connect. The connection might get broken bec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_cf08572685a5
github
scripting
Write a Unity C# MonoBehaviour script called Base Sample Searchable Mono Behaviour
```csharp using UnityEngine; namespace FieldSearch.Samples { /// <summary> /// Base class for <see cref="SampleSearchableMonoBehaviour"/> /// </summary> public class BaseSampleSearchableMonoBehaviour : MonoBehaviour { [SerializeField] private Transform[] Receiver2; [SerializeField]...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_f3c0f6cd3984
unity_docs
editor
In Unity's 'LiveOps Building Blocks prerequisites', what is 'Set up deployment' and how does it work?
To deploy assets in the LiveOps Building Blocks to the cloud, set up deployment in your scene : Go to Services > General Settings > Services . In the Project Settings window that appears, follow the instructions to select an organization and a cloud project.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71a69b1bae6b
unity_docs
rendering
What are the parameters of `MaterialEditor.RangeProperty` in Unity?
Description Draw a range slider for a range shader property. To create a custom material editor, first you need to create the custom editor class and save it in the Assets/Editor folder, then reference the class name in your shader. For example: ``` CustomEditor "MaterialRangePropertyExample" ``` Here is an example sho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c93ec21ca3e
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.IsNativeContainerType` in Unity? Explain its purpose and usage.
UnsafeUtility.IsNativeContainerType Declaration public static bool IsNativeContainerType (); Returns bool True if the struct is a NativeContainer type, otherwise false. Description Checks whether a struct or type is a NativeContainer. A NativeContainer type uses the NativeContainerAttribute attribute.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7869357b02d
unity_docs
scripting
What is `UIElements.MouseLeaveWindowEvent` in Unity? Explain its purpose and usage.
MouseLeaveWindowEvent class in UnityEngine.UIElements / Inherits from: UIElements.MouseEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent when the mouse pointer exits a window. The event bubbles up but does not trickle down. Constructors Constructor Description MouseLeave...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d118942a90d
unity_docs
scripting
What is `ObjectChangeEventStream` in Unity? Explain its purpose and usage.
ObjectChangeEventStream struct in UnityEditor Description Represents a stream of events that describes the changes applied to objects in memory over the course of a frame. Properties Property Description isCreated Indicates whether the ObjectChangeEventStream has an allocated memory buffer. length The number ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b57a2e3d531
unity_docs
scripting
What is `Search.StringView.StartsWith` in Unity? Explain its purpose and usage.
StringView.StartsWith Declaration public bool StartsWith (char c , stringComparison stringComparison ); Parameters Parameter Description c A character. stringComparison A string comparison option. Returns bool True if the StringView starts with c , otherwise false. Description Checks if the St...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_755ac4af8d5c
unity_docs
editor
What is `AssetDatabase.AssetPathToGUID` in Unity? Explain its purpose and usage.
AssetDatabase.AssetPathToGUID Declaration public static string AssetPathToGUID (string path ); Declaration public static string AssetPathToGUID (string path , AssetPathToGUIDOptions options = AssetPathToGUIDOptions.IncludeRecentlyDeletedAssets); Parameters Parameter Description path Project relative...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f650ba2a7cfa
unity_docs
editor
Explain 'USS custom properties (variables)' in Unity.
USS variables, also called custom properties, define values that you can reuse in other USS rules. You can create variables for any type of USS property. Topic Description Create USS variables Learn how to create, use, and specify default values for USS variables. Introduction to USS built-in variables Understand built...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_27e8c9e5dfff_doc_1
github
scripting
What does `OnCreated` do in this Unity script? Explain its purpose and signature.
Called when the object is created and added to the pool.This method must be implemented by the derived class to specify custom behavior on creation. Signature: ```csharp public abstract void OnCreated(); ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_ba51859fe398
unity_docs
scripting
What is `PivotMode` in Unity? Explain its purpose and usage.
PivotMode enumeration Description Where is the tool handle placed. Properties Property Description Center The tool handle is at the graphical center of the selection. Pivot The tool handle is on the pivot point of the active object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb5faa483d83
unity_docs
scripting
What are the parameters of `Quaternion.Equals` in Unity?
Returns bool true if the quaternion components (x, y, z, w) are exactly equal. Description Performs exact binary comparison of each Quaternion component (x, y, z, w). The key comparison characteristics: Exact copies: Returns true when quaternions are identical copies. Floating-point precision: Returns false even for ti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3f5cd6af3da3
unity_docs
editor
In Unity's 'Add tests to a package', what is 'Assembly definition files for tests' and how does it work?
Use the Test Framework package to create or edit your assembly definition files. For more information, refer to Creating test assemblies . Although you can choose to edit assembly definition files directly, you need to make sure to add the following references: Attribute Type Description name String The name of the ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d46a3174cc3
unity_docs
scripting
What is `GUILayoutUtility.GetLastRect` in Unity? Explain its purpose and usage.
GUILayoutUtility.GetLastRect Declaration public static Rect GetLastRect (); Returns Rect The last used rectangle. Description Get the rectangle last used by GUILayout for a control. Note that this only works during the Repaint event. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_818c2f5c037a
unity_docs
scripting
What are the parameters of `Unity.Properties.PropertyContainer.TrySetValue` in Unity?
Returns bool true if the value was set correctly; false otherwise. Description Tries to set the value of a property at the given path to the given value. This method is NOT thread safe. Declaration public static bool TrySetValue (TContainer container , ref Unity.Properties.PropertyPath path , TValue value ); Parameters...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d274211404de
unity_docs
physics
What is `LowLevelPhysics.CapsuleGeometry.ctor` in Unity? Explain its purpose and usage.
CapsuleGeometry Constructor Declaration public CapsuleGeometry (float radius , float halfLength ); Parameters Parameter Description radius The radius of the capsule's end caps. halfLength The distance from the center of the capsule to the center of the end point sphere. Description Create a capsule shap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_569d823bc298
unity_docs
networking
What is `Networking.PlayerConnection.ConnectionTarget` in Unity? Explain its purpose and usage.
ConnectionTarget enumeration Description The type of the connected target. Used in IConnectionState . For example, this is used to signify whether the Editor is connected to a Player, or to an Editor. When the Editor is connected to another Editor or itself, it also picks up the PlayMode Player. If the Editor is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aefbfaecdffe
unity_docs
scripting
What is `Overlays.Overlay.collapsedChanged` in Unity? Explain its purpose and usage.
Overlay.collapsedChanged Parameters Parameter Description value Invoked with true value when Overlay enters collapsed state, false when exiting collapsed state. Description Invoked when Overlay.collapsed value is changed. Value is true when Overlay is entering a collapsed state, false when exiting.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_308dc17c99c8
github
scripting
Write a Unity C# XR/VR script for Splat Rotator
```csharp // SPDX-License-Identifier: MIT using System.Collections.Generic; using UnityEngine; using UnityEngine.XR; /// <summary> /// Runtime rotation control for the GaussianSplat GameObject. /// /// Attach this to the same GameObject that has GaussianSplatRenderer. /// /// Desktop controls: /// Q / E ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_547a0481212b
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.UpdateBuildPropertyForConfig` in Unity?
Description Adds and removes values from a build property in the given build configuration. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_UpdateBuildPropertyForConfig { [PostProcessBuild] public static void OnPostprocessBuild(BuildTa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a80b1f12899
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.limitZMultiplier`.
ParticleSystem.LimitVelocityOverLifetimeModule.limitZMultiplier public float limitZMultiplier ; Description Change the limit multiplier on the z-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_man_c5e31ac6fb3e
unity_docs
ui
Explain 'Find visual elements with UQuery' in Unity.
You can use UQuery to find elements from a visual tree . UQuery was inspired by JQuery and Linq, and is designed to limit dynamic memory allocation. This allows for optimal performance on mobile platforms. ## Query methods You can use UQuery through the following extension methods: Q Query Internally, the Q and Query...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_732294e64390
unity_docs
scripting
What is `Undo.CollapseUndoOperations` in Unity? Explain its purpose and usage.
Undo.CollapseUndoOperations Declaration public static void CollapseUndoOperations (int groupIndex ); Parameters Parameter Description groupIndex The group index to collapse undo operations to. Description Collapses all undo operations down to group index together into one step. The current group index aut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_967b0ac65384
unity_docs
editor
What is `VersionControl.Provider.Status` in Unity? Explain its purpose and usage.
Provider.Status Declaration public static VersionControl.Task Status ( VersionControl.AssetList assets ); Declaration public static VersionControl.Task Status ( VersionControl.Asset asset ); Declaration public static VersionControl.Task Status ( VersionControl.AssetList assets , bool recursively...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed9598086064
unity_docs
xr
What are the parameters of `Search.PropertyDatabase.IsPersistableType` in Unity?
Returns bool True if the type can be persisted in the file, false otherwise. Description Returns a boolean indicating if a type can be persisted into the backing file. Only certain types can be persisted in the backing file to survive a domain reload and quitting Unity. However, any type can be stored without backing i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42ba83de5ede
unity_docs
editor
What is `EditorUtility.SaveFilePanelInProject` in Unity? Explain its purpose and usage.
EditorUtility.SaveFilePanelInProject Declaration public static string SaveFilePanelInProject (string title , string defaultName , string extension , string message ); Declaration public static string SaveFilePanelInProject (string title , string defaultName , string extension , string message , string p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4782ef3305bb
unity_docs
scripting
What are the parameters of `ParticleSystem.CollisionModule.SetPlane` in Unity?
Description Set a collision plane to use with this Particle System. If the index is greater than the number of planes currently assigned to the Particle System, Unity adds empty entries to ensure the list is large enough. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04234e4d910a
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_ASTC10X10_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_ASTC10X10_SRGB Description A four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding appli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67f87696cc67
unity_docs
scripting
Give me an overview of the `RenderPickingType` class in Unity.
RenderPickingType enumeration Description Specifies the type of a render picking callback. Additional resources: RenderPickingArgs.renderPickingType . Properties Property Description RenderFromIgnoreSet The render picking callback is expected to render all GameObjects except for those contained in the ignore ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f18c08b8428
unity_docs
input
What is `Experimental.GraphView.EdgeDragHelper.HandleMouseUp` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper.HandleMouseUp Declaration public void HandleMouseUp ( UIElements.MouseUpEvent evt ); Parameters Parameter Description evt The event. Description Handle mouse up event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b42227486600
unity_docs
rendering
What is `RenderTextureFormat.ARGB4444` in Unity? Explain its purpose and usage.
RenderTextureFormat.ARGB4444 Description Color render texture format, 4 bit per channel. Note that not all graphics cards support 16 bit textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5192b8cc5291
unity_docs
scripting
Give me an overview of the `ThreadPriority` class in Unity.
ThreadPriority enumeration Description Priority of a thread. Lower priority means a background operation will run less often and will take up less time, but will progress more slowly. Additional resources: Application.backgroundLoadingPriority . Properties Property Description Low Lowest thread priority. Bel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c80744f5eb8
unity_docs
math
What is `Mathf.Pow` in Unity? Explain its purpose and usage.
Mathf.Pow Declaration public static float Pow (float f , float p ); Description Returns f raised to power p . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { print(Mathf.Pow(6, 1.8f)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e913f440d131
unity_docs
math
What is `AI.NavMeshBuildSettings.ValidationReport` in Unity? Explain its purpose and usage.
NavMeshBuildSettings.ValidationReport Declaration public string[] ValidationReport ( Bounds buildBounds ); Parameters Parameter Description buildBounds Describes the volume to build NavMesh for. Returns string[] The list of violated constraints. Description Validates the properties of NavMeshBuildSe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f614f76d1804
unity_docs
scripting
What are the parameters of `Animator.SetInteger` in Unity?
Description Sets the value of the given integer parameter. Use this as a way to trigger transitions between Animator states. One way of using Integers instead of Floats or Booleans is to use it for something that has multiple states, for example directions (turn left, turn right etc.). Each direction could correspond t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cab7ffc4de6
unity_docs
scripting
What is `UIElements.ToolbarButton` in Unity? Explain its purpose and usage.
ToolbarButton class in UnityEditor.UIElements / Inherits from: UIElements.Button Description A button for the toolbar. For more information, refer to UXML element ToolbarButton . Static Properties Property Description ussClassName USS class name of elements of this type. Constructors Constructor D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d6731326c17
unity_docs
math
Show me a Unity C# example demonstrating `LineRenderer.Simplify`.
a simpler line (less points). A positive value close to zero results in a line with little to no reduction. A value of zero or less has no effect. Description Generates a simplified version of the original line by removing points that fall within the specified tolerance. Uses LineUtility.Simplify to perform the li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ae6471b5399
unity_docs
editor
What is `AssetDatabase.ImportAsset` in Unity? Explain its purpose and usage.
AssetDatabase.ImportAsset Declaration public static void ImportAsset (string path , ImportAssetOptions options = ImportAssetOptions.Default); Parameters Parameter Description path The path of the asset to import. Description Import asset at path. Import an asset at the specified path. Calling this met...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97843f747fb7
unity_docs
rendering
What is `ParticleSystem.LightsModule.rangeMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.LightsModule.rangeMultiplier public float rangeMultiplier ; Description Range multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall range multiplier. Additional resources: ParticleSystem.LightsModule.range . ```csharp using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_14c9af6981be
unity_docs
xr
In Unity's 'Apple visionOS XR Plugin', what is 'Description' and how does it work?
Provides support for Apple visionOS XR features. This includes build post-processing code and the following subsystem implementations: - XRSessionSubsystem - XRDisplaySubsystem - XRInputSubsystem - XRMeshSubsystem - XRPlaneSubsystem - XRImageTrackingSubsystem - XRAnchorSubsystem - XRHandSubsystem Unity PolySpatial and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5585c0f75a8c
unity_docs
scripting
What is `CharacterController.minMoveDistance` in Unity? Explain its purpose and usage.
CharacterController.minMoveDistance public float minMoveDistance ; Description Gets or sets the minimum move distance of the character controller. If the character tries to move less than this distance, it will not move at all. This can be used to reduce jitter. In most situations this value should be left at ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c49a7c2d1ee
unity_docs
ui
Explain 'Focus order of elements' in Unity.
Each panel has a focus ring that defines the focus order of elements. By default, a depth-first search (DFS) on the visual tree defines the focus order of elements. For example, the focus order for the tree depicted below is F, B, A, D, C, E, G, I, H. Some events use the focus order to define which element holds the fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c6f89cd707f9
unity_docs
editor
In Unity's 'Search the Asset Database', what is 'Query syntax' and how does it work?
Provider token: adb Query example: Find all light assets with low in their name. ``` adb: t:light low ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdae4256aef8
unity_docs
rendering
Show me a Unity C# example demonstrating `ComputeShader.EnableKeyword`.
lKeyword struct, cache it, and use that. Note: A LocalKeyword is specific to a single Shader or ComputeShader instance. You cannot use it with other Shader or ComputeShader instances, even if they declare keywords with the same name. The following example creates a LocalKeyword struct with the name EXAMP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3e7fb3a29f89
unity_docs
scripting
Show me a Unity code example for 'Vector2Field'.
or2Field lets users enter a Vector2 value. Note : To align a Vector2Field with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a Vector2Field You can create a Vector2Field with UI Builder, UXML, and C#. The following...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fb0db5087a2b
github
scripting
Write a Unity C# script called Toggle
```csharp using System; using shadcnui.GUIComponents.Core.Base; using shadcnui.GUIComponents.Core.Styling; using shadcnui.GUIComponents.Core.Utils; using UnityEngine; #if IL2CPP_MELONLOADER_PRE57 using UnhollowerBaseLib; #endif namespace shadcnui.GUIComponents.Controls { public class Toggle : BaseComponent { ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_dc6eccd6d647
unity_docs
scripting
What is `IMGUI.Controls.TreeView.BeginRename` in Unity? Explain its purpose and usage.
TreeView.BeginRename Declaration public bool BeginRename ( IMGUI.Controls.TreeViewItem item ); Declaration public bool BeginRename ( IMGUI.Controls.TreeViewItem item , float delay ); Parameters Parameter Description item Item to rename. delay Delay in seconds until the rename overlay shows. Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4547c1b4a38
unity_docs
performance
Show me a Unity C# example demonstrating `LightTransport.IDeviceContext`.
GPU. It enables implementation-agnostic code while providing access to device-specific optimizations. Unity provides concrete implementations of this interface including: - UnityEngine.LightTransport.RadeonRaysContext for GPU-accelerated operations using OpenCL 1.2. The interface manages buffer allocation, asynchronous...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_618b13259fbe
unity_docs
scripting
What are the parameters of `Collider.Raycast` in Unity?
Returns bool True when the ray intersects the collider, otherwise false. Description Casts a Ray that ignores all Colliders except this one. Additional resources: RaycastHit . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public Collider coll; void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa443e89a12d
unity_docs
ui
What is `GUIContent.tooltip` in Unity? Explain its purpose and usage.
GUIContent.tooltip public string tooltip ; Description The tooltip of this element. The tooltip associated with this content. Read GUItooltip to get the tooltip of the gui element the user is currently over. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void OnGUI() { GUI.Button(n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c42289f97a99
unity_docs
scripting
What is `SearchService.SceneSearchContext.requiredTypes` in Unity? Explain its purpose and usage.
SceneSearchContext.requiredTypes public IEnumerable<Type> requiredTypes ; Description An IEnumerable of types that contains the type constraints for this search. This IEnumerable can be null or empty. If it is not empty, but contains null values, you can find the required type for the search in the SearchServic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d593ea5ff690
unity_docs
physics
What is `Object.operator_eq` in Unity? Explain its purpose and usage.
Object.operator == public static bool operator == ( Object x , Object y ); Parameters Parameter Description x The first Object. y The Object to compare against the first. Description Compares two object references to see if they refer to the same object. When comparing with null , Unity's implemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_af0fb78a7b93
github
scripting
Write a Unity C# MonoBehaviour script called Dependency Injector
```csharp using System; using TinyECSUnityIntegration.Interfaces; using UnityEngine; namespace TinyECSUnityIntegration.Impls { /// <summary> /// class DependencyInjector /// /// The class is a utility class that injects reference to IWorldContext /// </summary> public class DependencyInjec...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_cc78027c0779
unity_docs
physics
What are the parameters of `PhysicsShapeGroup2D.AddCapsule` in Unity?
Returns int Returns the shape index the shape was added to in the PhysicsShapeGroup2D . This index is used as the main reference when retrieving a shape. Description Adds a capsule shape ( PhysicsShapeType2D.Capsule ) to the shape group. A capsule shape is comprised of a single edge shape defined by two vertices ( vert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38a248201fa3
unity_docs
scripting
What is `Rendering.ScriptableRenderContext.HasInvokeOnRenderObjectCallbacks` in Unity? Explain its purpose and usage.
ScriptableRenderContext.HasInvokeOnRenderObjectCallbacks Declaration public bool HasInvokeOnRenderObjectCallbacks (); Returns bool True if there are OnRenderObject callbacks false if none. Description Check if any objects in the scene have OnRenderObject callbacks registered. You can use this function to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_152961326a72
unity_docs
animation
What are the parameters of `Animations.GenericBindingUtility.SetValues` in Unity?
Description Sets the float or integer value for each [[BoundProperty]. This method throws an ArgumentException if the NativeArray is not yet created. This method throws an ArgumentException if the indices list does not match the length of the boundProperties list. Declaration public static void SetValues (NativeArray<B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8b5c1911849
unity_docs
rendering
What is `Rendering.BatchRendererGroup.GetConstantBufferMaxWindowSize` in Unity? Explain its purpose and usage.
BatchRendererGroup.GetConstantBufferMaxWindowSize Declaration public static int GetConstantBufferMaxWindowSize (); Returns int The maximum window size in bytes. Description Defines the maxiumum amount (in bytes) the BatchRendererGroup constant buffer window size is visible from the shader. The BatchRender...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a363909c3eb1
unity_docs
scripting
What is `BuildPipeline.GetPlayerConnectionInitiateMode` in Unity? Explain its purpose and usage.
BuildPipeline.GetPlayerConnectionInitiateMode Declaration public static PlayerConnectionInitiateMode GetPlayerConnectionInitiateMode ( BuildTarget targetPlatform , BuildOptions buildOptions ); Description Returns the mode currently used by players to initiate a connect to the host.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_55b7ccaaadb9
unity_docs
rendering
Explain 'Particle System custom vertex streams in the Built-In Render Pipeline' in Unity.
If you are comfortable writing your own Shaders , you can use the Renderer Module ’s Custom Vertex Streams feature to configure your Particle Systems to pass a wider range of data into your custom Shaders. There are a number of built-in data streams to choose from, such as velocity, size and center position. Aside from...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6892c096ee5
unity_docs
scripting
Show me a Unity C# example demonstrating `ControllerColliderHit.transform`.
ControllerColliderHit.transform public Transform transform ; Description The transform that was hit by the controller. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Print the transform's name that collided with this ControllerCollider void OnControllerColliderHit(ControllerColliderHi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b189330e13d
unity_docs
physics
What is `UIElements.BaseVerticalCollectionView.SetSelectionWithoutNotify` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.SetSelectionWithoutNotify Declaration public void SetSelectionWithoutNotify (IEnumerable<int> indices ); Parameters Parameter Description indices The collection of items to be selected. Description Sets a collection of selected items without triggering a selection change callbac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_63644feaaae9
unity_docs
editor
In Unity's 'Get started with UI Toolkit', what is 'Use UI Builder to add UI controls' and how does it work?
To visually add UI controls to your window, use UI Builder . The following steps add a button and a toggle into your custom Editor window in addition to the default label. In the Editor folder, double-click SimpleCustomEditor.uxml to open the UI Builder. In the UI Builder, drag Button and Toggle from Library > Controls...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b27586cd4da9
unity_docs
editor
In Unity's 'In-App Purchasing', what is 'Description' and how does it work?
Unity In-App Purchasing (IAP) allows you to sell digital content within your application. This package provides a unified API for handling in-app purchases across multiple platforms, including the Apple App Store and Google Play Store. Unity IAP simplifies implementing and managing purchases for different stores. Featu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0b973bbbe09a_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The softness to apply to the horizontal and vertical axis. Signature: ```csharp public Vector2Int softness ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_6a29f9a24252
unity_docs
physics
What is `Physics2D.defaultContactOffset` in Unity? Explain its purpose and usage.
Physics2D.defaultContactOffset public static float defaultContactOffset ; Description The default contact offset of the newly created Colliders. Colliders whose distance is less than the sum of their contactOffset values will generate contacts. The contact offset must be positive. Contact offset allows the coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c3d02d119a6
unity_docs
editor
What is `AndroidSdkVersions` in Unity? Explain its purpose and usage.
AndroidSdkVersions enumeration Description The Android API levels to specify in scripts. Note : The lowest API level listed here strictly corresponds to the lowest supported API level. However, do not use these values to determine the highest supported API level. The following code example demonstrates how you ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b14447ccfe7
unity_docs
math
What are the parameters of `Handles.ScaleValueHandle` in Unity?
Returns float The new value modified by the user's interaction with the handle. If the user has not moved the handle, it will return the same value as you passed into the function. Description Make a 3D handle that scales a single float. This method will draw a 3D-draggable handle on the screen. The handle does not mov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a49c8a00fcd0
unity_docs
rendering
What is `SparseTexture.isCreated` in Unity? Explain its purpose and usage.
SparseTexture.isCreated public bool isCreated ; Description Is the sparse texture actually created? (Read Only) Sparse texture contents can become "lost", mostly on graphics device change or active color space switch. When that happens, isCreated will start returning false - meaning you should recreate all the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3dffe90d9445
unity_docs
scripting
In Unity's 'Auto Layout', what is 'Layout Element Component' and how does it work?
If you want to override the minimum, preferred, or flexible size, you can do that by adding a Layout Element component to the Game Object. The Layout Element component lets you override the values for one or more of the layout properties. Enable the checkbox for a property you want to override and then specify the valu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce717dd925af
unity_docs
scripting
Give me an overview of the `AudioDataLoadState` class in Unity.
AudioDataLoadState enumeration Description Value describes the current load state of the audio data associated with an AudioClip . This enumeration is useful if you want to: Only load audio data if the data isn’t already loaded. Perform actions while the audio data loads. Track progress and failures of the lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_088e2194f1e9
unity_docs
rendering
What is `Texture2DArray.SetPixels32` in Unity? Explain its purpose and usage.
Texture2DArray.SetPixels32 Declaration public void SetPixels32 (Color32[] colors , int arrayElement , int miplevel ); Declaration public void SetPixels32 (Color32[] colors , int arrayElement ); Parameters Parameter Description colors The array of pixel colours to use. This is a 2D image flattened to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_053751e9e996
unity_docs
rendering
Show me a Unity C# example demonstrating `GUILayout.Toolbar`.
defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . buttonSize Determines how toolbar button size is calculated. Returns int The index of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb2be6c3a777
unity_docs
math
What is `Rendering.RayTracingMeshInstanceConfig.layer` in Unity? Explain its purpose and usage.
RayTracingMeshInstanceConfig.layer public int layer ; Description The Layer used by the ray tracing instance. When you manually add ray tracing instances to a RayTracingAccelerationStructure , RayTracingAccelerationStructure.AddInstance filters instances based on the acceleration structure's Layer Mask.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.