id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_2fb7c978b065
unity_docs
physics
Explain 'Articulation Body component reference' in Unity.
Articulation Bodies enable you to build physics articulations such as robotic arms or kinematic chains with GameObjects that are hierarchically organized. They help you get realistic physics behaviors in the context of simulation for industrial applications. ## Properties An Articulation Body allows you to define in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f1cbf0e60ec9
github
scripting
Write a Unity C# MonoBehaviour script called Quit
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class Quit : MonoBehaviour { public void QuitGame() { Debug.Log("Quit Game"); Application.Quit(); #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_23f0b74ad734
unity_docs
scripting
What are the parameters of `HashUnsafeUtilities.ComputeHash128` in Unity?
Description Compute a 128 bit hash based on a data. ```csharp using UnityEngine;public class HashUtilitiesSample { public void ComputeHash128_ToULong() { unsafe { ulong* message = stackalloc ulong[2]; message[0] = 0x73BC2A67F; message[1] = 0x54B1A5C2C; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2c2f5fecd29
unity_docs
math
What is `Rendering.SubPassDescriptor.inputs` in Unity? Explain its purpose and usage.
SubPassDescriptor.inputs public Rendering.AttachmentIndexArray inputs ; Description Array of attachment indices to be used as input attachments in this sub pass. These are specificed as indices into the attachment array passed to CommandBuffer.BeginRenderPass .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f7ee683902d
unity_docs
rendering
Explain 'GPU instancing' in Unity.
Render multiple copies of the same mesh at the same time. Page Description Introduction to GPU instancing Learn about the GPU drawing multiple copies of a mesh at the same time, for example to draw multiple trees or bushes. Enable GPU instancing Make sure meshes and shaders are compatible with GPU instancing. Troublesh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf77def25861
unity_docs
scripting
Show me a Unity C# example demonstrating `SerializeReference`.
ScriptedImporter. When types referred to by SerializeReference are no longer available when deserializing, Unity replaces the instance with null, but the serialized information is preserved. for more information see SerializationUtility.HasManagedReferencesWithMissingTypes See Also: SerializedProperty.managedRefere...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84c55dfb4218
unity_docs
scripting
Show me a Unity C# example demonstrating `HandleUtility.DistanceToCone`.
the cone. Returns float Distance from mouse to cone in pixels. Description Returns the distance in pixels from the mouse pointer to a cone. Calculates the screen space distance from the mouse pointer to a cone at given world space position with the given rotation and size . Returns zero when mouse pointer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_034861c30b6f
unity_docs
scripting
What is `PrefabUtility.GetAddedComponents` in Unity? Explain its purpose and usage.
PrefabUtility.GetAddedComponents Declaration public static List<AddedComponent> GetAddedComponents ( GameObject prefabInstance ); Parameters Parameter Description prefabInstance The Prefab instance to get information about. Returns List<AddedComponent> List of objects with information about added compon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1b40c02f23da_doc_3
github
scripting
What does `OnFixedUpdate` do in this Unity script? Explain its purpose and signature.
Called in response to the lifecycle managerfix update event function being called, if this subsystem is running. Signature: ```csharp protected virtual void OnFixedUpdate() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_0770f4404148
unity_docs
scripting
Show me a Unity C# example demonstrating `Rigidbody.MovePosition`.
Rigidbody.MovePosition moves a Rigidbody and complies with the interpolation settings. When Rigidbody interpolation is enabled, Rigidbody.MovePosition creates a smooth transition between frames. Unity moves a Rigidbody in each FixedUpdate call. The position occurs in world space. To teleport a Rigidbody from...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_96a526bf7491
github
scripting
Write a Unity C# script called Persistant Mono Singleton
```csharp using UnityEngine; namespace GrimTools.Runtime.Core { public class PersistantMonoSingleton<T> : MonoSingleton<T> where T : MonoSingleton<T> { [SerializeField] private bool UnparentOnAwake = true; #region Protected Methods protected override void OnInitializing() { ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_187abb0017d5
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.WindowSoftInputMode` in Unity? Explain its purpose and usage.
WindowSoftInputMode enumeration Description Mirrors the WindowSoftInputMode enum. For more information about the attribute, see Android's documentation: WindowSoftInputMode attribute Properties Property Description Null Attribute is not set and will not appear in the element. StateUnspecified Mirrors and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39e2f0bf8643
unity_docs
editor
What are the parameters of `AssetDatabase.GetDependencies` in Unity?
Returns string[] The paths of all assets that the input depends on. Description Returns an array of all the assets that are dependencies of the asset at the specified pathName . Note: GetDependencies () gets the Assets that are referenced by other Assets. For example, a Scene could contain many GameObjects with a Mater...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7142d8640349
unity_docs
rendering
What is `Rendering.LightProbeOutsideHullStrategy` in Unity? Explain its purpose and usage.
LightProbeOutsideHullStrategy enumeration Description Defines the way Unity chooses a probe to light a Renderer that is lit by Light Probes but positioned outside the bounds of the Light Probe tetrahedral hull. When a Renderer that is lit by Light Probes is positioned outside the bounds of a Light Probe tetrahedra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_571f283a3f30
unity_docs
scripting
What is `Search.SearchItem.Equals` in Unity? Explain its purpose and usage.
SearchItem.Equals Declaration public bool Equals (object other ); Declaration public bool Equals ( Search.SearchItem other ); Parameters Parameter Description other AnotherSearchItem to compare. Returns bool Returns true if SearchItems have the same ID. Description Check if two SearchItems have...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ea8dc478514
unity_docs
math
What is `Grid.InverseSwizzle` in Unity? Explain its purpose and usage.
Grid.InverseSwizzle Declaration public static Vector3 InverseSwizzle ( GridLayout.CellSwizzle swizzle , Vector3 position ); Parameters Parameter Description swizzle Determines the rearrangement order for the inverse swizzle. position Position to inverse swizzle. Returns Vector3 The inversed swizz...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e96b91b65867
unity_docs
scripting
What is `UIElements.EventBase.PostDispatch` in Unity? Explain its purpose and usage.
EventBase.PostDispatch Declaration protected void PostDispatch ( UIElements.IPanel panel ); Parameters Parameter Description panel The panel where the event has been dispatched. Description Allows subclasses to perform custom logic after the event has been dispatched.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_570773e7b918
unity_docs
rendering
What is `LightingDataAsset.ctor` in Unity? Explain its purpose and usage.
LightingDataAsset Constructor Declaration public LightingDataAsset ( SceneManagement.Scene scene ); Parameters Parameter Description scene The scene to associate the LightingDataAsset with. Description Constructs an empty LightingDataAsset associated with specific scene.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_556710351afa
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.DictationError` in Unity? Explain its purpose and usage.
DictationRecognizer.DictationError Parameters Parameter Description value Delegate that is to be invoked on DictationError event. Description Event that is triggered when the recognizer session encouters an error.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2841ea93b09
unity_docs
xr
What is `Networking.UnityWebRequest.isHttpError` in Unity? Explain its purpose and usage.
Method group is Obsolete Description Returns true after this UnityWebRequest receives an HTTP response code indicating an error. (Read Only) True on response codes greater than or equal to 400.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49bc2affe317
unity_docs
scripting
What are the parameters of `AssetBundle.LoadFromMemoryAsync` in Unity?
Returns AssetBundleCreateRequest Asynchronous load request for an AssetBundle. Use assetBundle property to get an AssetBundle once it is loaded. Description Asynchronously load an AssetBundle from a memory region. Use this method to load an AssetBundle from an array of bytes asynchronously. This is useful when you have...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b814e25c046f
unity_docs
scripting
In Unity's 'Java and Kotlin source plug-ins', what is 'Edit Java or Kotlin files in an exported Android Studio project' and how does it work?
By default, when you export a Unity project for Android , Unity copies any Java/Kotlin files over to the Android Studio project. If you edit these files in Android Studio, the changes aren’t reflected in the original files in the Unity project. If you export the Unity project again, the export process overwrites your c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10ea891c9aa3
unity_docs
rendering
What is `ParticleSystem.ShapeModule.meshShapeType` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.meshShapeType public ParticleSystemMeshShapeType meshShapeType ; Description Where on the Mesh to emit particles from. Additional resources: ParticleSystem.ShapeModule.shapeType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d60f95a0aef
unity_docs
scripting
What is `CullingGroup.StateChanged` in Unity? Explain its purpose and usage.
CullingGroup.StateChanged Declaration public delegate void StateChanged ( CullingGroupEvent sphere ); Parameters Parameter Description sphere A CullingGroupEvent that provides information about the sphere that has changed. Description This delegate is used for recieving a callback when a sphere's distan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6516baff8578
unity_docs
scripting
Give me an overview of the `EditorBuildSettings` class in Unity.
EditorBuildSettings class in UnityEditor / Inherits from: Object Description This class allows you to modify the Editor Build Settings via script. See EditorBuildSettings.scenes for an example of how to use this class. Additional resources: EditorBuildSettingsScene , EditorUserBuildSettings , BuildPlayer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8106b34c8bd6
unity_docs
rendering
What is `LightTransport.InputExtraction` in Unity? Explain its purpose and usage.
InputExtraction class in UnityEngine.LightTransport Description Provides methods for extracting scene data and populating integration worlds for use in light transport calculations. The InputExtraction class serves as the primary interface for converting Unity scene data into formats suitable for light transport ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4091f4462a28
github
scripting
Write a Unity C# MonoBehaviour script called Load Scene
```csharp using UnityEngine; using UnityEngine.SceneManagement; /// <summary> /// Load scene using name, or reload the active scene /// </summary> public class LoadScene : MonoBehaviour { public void LoadSceneUsingName(string sceneName) { SceneManager.LoadScene(sceneName); } public void Reloa...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_3cbec954d868
unity_docs
math
What is `BoundsInt.max` in Unity? Explain its purpose and usage.
BoundsInt.max public Vector3Int max ; Description The maximal point of the box. This point is not contained in the box. Sets the maximum value of the BoundsInt . If you enter a maximum value that is less than the current minimum value, then the entered value becomes the new minimum value and the previous mi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a06e02407fa
unity_docs
physics
What are the parameters of `PhysicsScene2D.OverlapCollider` in Unity?
Returns int The list to receive results. Description Checks a Collider against Colliders in the PhysicsScene2D, returning all intersections. An "OverlapCollider" is conceptually like looking at the Scene through a Collider shape to determine what can be seen. Any Collider2D seen can be detected and reported. The intege...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3640667d55ee
unity_docs
scripting
What is `Keyframe.outTangent` in Unity? Explain its purpose and usage.
Keyframe.outTangent public float outTangent ; Description Sets the outgoing tangent for this key. The outgoing tangent affects the slope of the curve from this key to the next key. The outgoing tangent matches the outgoing slope of the curve. A positive value for inTangent results in an upward tangent, while ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c432ad8ecf0f
github
scripting
Write a Unity C# script called Navigation
```csharp using System; using shadcnui.GUIComponents.Core.Base; using shadcnui.GUIComponents.Core.Styling; using shadcnui.GUIComponents.Core.Theming; using shadcnui.GUIComponents.Core.Utils; using UnityEngine; namespace shadcnui.GUIComponents.Layout { public class Navigation : BaseComponent { private c...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_29226ae99f08
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.clip`.
AudioSource.clip public AudioClip clip ; Description The default AudioClip to play. AudioSource clip determines the audio clip that should play next. When you assign a new audio clip to clip , the old clip it replaces (if any) stops and is replaced by the new one. However, the new clip doesn't automati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52fd9d4d47f0
unity_docs
animation
What is `Animations.AnimationLayerMixerPlayable.SetLayerAdditive` in Unity? Explain its purpose and usage.
AnimationLayerMixerPlayable.SetLayerAdditive Declaration public void SetLayerAdditive (uint layerIndex , bool value ); Parameters Parameter Description layerIndex The layer index. value Whether the layer is additive or not. Set to true for an additive blend, or false for a regular blend. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e36b23f850dd
unity_docs
scripting
What is `MonoImporter.GetDefaultReference` in Unity? Explain its purpose and usage.
MonoImporter.GetDefaultReference Declaration public Object GetDefaultReference (string name ); Parameters Parameter Description name The name of a public field in the imported MonoScript . Returns Object The Unity object to use as a default value for the given reference field. Description Gets the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76122485f76d
unity_docs
editor
What is `PackageManager.PackageRegistrationEventArgs` in Unity? Explain its purpose and usage.
PackageRegistrationEventArgs class in UnityEditor.PackageManager Description Structure describing the PackageInfo entries to register or unregister during the Package Manager registration process. Note: The changedFrom and changedTo collections are guaranteed to match in length and ordering. Properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c5774df0daf
unity_docs
scripting
Show me a Unity C# example demonstrating `DeviceType`.
DeviceType enumeration Description Enumeration for SystemInfo.deviceType , denotes a coarse grouping of kinds of devices. Universal Windows Platform : tablets are treated as desktop machines, thus DeviceType.Handheld will only be returned for Windows Phones and IoT family devices. ```csharp //Attach this scrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43abad250712
unity_docs
scripting
What is `WSA.Tile.PeriodicUpdate` in Unity? Explain its purpose and usage.
Tile.PeriodicUpdate Declaration public void PeriodicUpdate (string uri , float interval ); Parameters Parameter Description uri a remote location fromwhere to retrieve tile update interval a time interval in minutes, will be rounded to a value, supported by the system Description Starts periodic update ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_490004ee0950
unity_docs
editor
What is `SelectionBaseAttribute` in Unity? Explain its purpose and usage.
SelectionBaseAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Add this attribute to a script class to mark its GameObject as a selection base object for Scene View picking. In the Unity Scene View, when clicking to select objects, Unity will try to figure out the best object t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c4d66b4c09c
unity_docs
editor
What is `Unity.Profiling.Editor.ProfilerModule.DisplayName` in Unity? Explain its purpose and usage.
ProfilerModule.DisplayName public string DisplayName ; Description The module’s display name. The module’s ProfilerModuleMetadataAttribute.DisplayName specifies the module’s display name. A string. Read-only.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_38929eca39b3
unity_docs
audio
In Unity's 'An overview of the concepts and Audio Mixer', what is 'Audio Mixer View' and how does it work?
The Asset - Containing all AudioGroups and AudioSnapshots as sub-assets. The Hierarchy view - This contains the entire mixing hierarchy of AudioGroups within the Audio Mixer. The Mixer Views - This is a list of cached visibility settings of the mixer. Each view only shows a sub-set of the entire hierarchy in the main m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4d564059b1d8
unity_docs
ui
Explain 'UI Document component' in Unity.
A UI Document component references a UXML document and a Panel Settings asset. It serves as a bridge between the Scene and a UXML document. The UXML document specifies the UI structure, while the Panel Settings asset handles rendering. ## Create a UI Document component To create a UI Document component, do one of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7eb754c39799
unity_docs
xr
Explain 'Notarize with Xcode and command-line tools' in Unity.
You must notarize your application to distribute it outside of the Mac App Store. The process verifies your application, ensuring it has a Developer ID code signature and doesn’t contain malicious content. You can notarize your application with Xcode, Xcode command-line tools, or Unity Build Automation . Unity can crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4020df01650
unity_docs
scripting
What is `Experimental.GraphView.GraphView.ViewTransformChanged` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.ViewTransformChanged Declaration public delegate void ViewTransformChanged ( Experimental.GraphView.GraphView graphView ); Parameters Parameter Description graphView GraphView reference. Description View tran...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f21b6672ac9
unity_docs
input
What is `UIElements.MouseCaptureEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
MouseCaptureEventBase<T0>.GetPooled Declaration public static T GetPooled ( UIElements.IEventHandler target , UIElements.IEventHandler relatedTarget ); Parameters Parameter Description target The handler taking or releasing the mouse capture. relatedTarget The related target. Returns T An initializ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_011d23593c06
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.noise`.
apply turbulence to the movement of your particles. Use the low quality settings to create computationally efficient Noise, or simulate smoother, richer Noise with the higher quality settings. You can also choose to define the behavior of the Noise individually for each axis. Particle System modules do not need to be r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_28132f7838b2
unity_docs
xr
Explain 'AssetBundle platform considerations' in Unity.
AssetBundles are platform specific, meaning at runtime you can only load AssetBundles built for the target platform. This is because AssetBundles contain platform-specific asset formats, which leads to unexpected behavior if loaded on other platforms. This restriction prevents the accidental delivery of incorrect conte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21b2ada06b80
unity_docs
rendering
What are the parameters of `MaterialPropertyBlock.CopyProbeOcclusionArrayFrom` in Unity?
Description This function copies the entire source array into a Vector4 property array named unity_ProbesOcclusion for use with instanced Shadowmask rendering. If the array property doesn't exist on the MaterialPropertyBlock, it will be created with the length of the source array. Call LightProbes.CalculateInterpolated...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0e7451ec6a79
github
scripting
Write a Unity C# UI script for Old GUI Examples CS
```csharp using UnityEngine; using System.Collections; using DentedPixel; public class OldGUIExamplesCS : MonoBehaviour { public Texture2D grumpy; public Texture2D beauty; private float w; private float h; private LTRect buttonRect1; private LTRect buttonRect2; private LTRect buttonRect3; private LTRect butt...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_a34067272977
unity_docs
rendering
What is `Rendering.ShadowSplitData.GetCullingPlane` in Unity? Explain its purpose and usage.
ShadowSplitData.GetCullingPlane Declaration public Plane GetCullingPlane (int index ); Parameters Parameter Description index The culling plane index. Returns Plane The culling plane. Description Gets a culling plane.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_06d2882d2bd1
unity_docs
audio
Explain 'Video file compatibility with target platforms' in Unity.
The Video Player component uses the native audio and video decoding libraries of your Unity Editor platform to play video files in the Editor . You need to check that the files meet the system requirements for the target build platform. ## Recommendations for codec support Follow the vendor recommendations for your p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e53c10d49d94
unity_docs
physics
What is `PhysicsVisualizationSettings.QueryFilter.Box` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.QueryFilter.Box Description Whether the filter includes box shaped queries. For example, box shaped queries include Physics.BoxCast , Physics.CheckBox , and Physics.OverlapBox .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38dcc9eff2a3
unity_docs
input
What is `UnityEngine.InputLegacyModule` in Unity? Explain its purpose and usage.
UnityEngine.InputLegacyModule Description The InputLegacy module implements the Input class used to read player Input. Classes Class Description AndroidInput AndroidInput provides support for off-screen touch input, such as a touchpad. Compass Interface into compass functionality. Gyroscope Interface into th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ed9e43a73109
unity_docs
rendering
Explain 'Act on search results' in Unity.
After you search, you can perform actions on the items Search returns in the Preview Inspector pane or through More Options (⋮) . The actions you can perform depend on the type of item. For example, if Search returns a package, you can install/uninstall it. If Search returns an Asset, you can select, open, or highlight...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c0cce52340e
unity_docs
scripting
What is `AudioImporter` in Unity? Explain its purpose and usage.
AudioImporter class in UnityEditor / Inherits from: AssetImporter Description Use this class to modify AudioClip import settings from editor scripts. Use these settings to ensure all or a subset of your audio files have the same import settings. You can also edit these settings in the Audio Clip Inspector. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d43e7e519f2
unity_docs
animation
What is `ModelImporterAvatarSetup.NoAvatar` in Unity? Explain its purpose and usage.
ModelImporterAvatarSetup.NoAvatar Description Disable Avatar creation for this model. No Avatar sub-asset is copied or created, and no Animator component is added. Additional resources: ModelImporter.avatarSetup .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27311b93b9b1
unity_docs
animation
What is `Animations.ScaleConstraint.RemoveSource` in Unity? Explain its purpose and usage.
ScaleConstraint.RemoveSource Declaration public void RemoveSource (int index ); Parameters Parameter Description index The index of the source to remove. Description Removes a source from the component. Throws InvalidOperationException, if the list of sources is empty. Throws ArgumentOutOfRangeException, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcd7a0106fb4
unity_docs
math
What is `Mathf.Log` in Unity? Explain its purpose and usage.
Mathf.Log Declaration public static float Log (float f , float p ); Description Returns the logarithm of a specified number in a specified base. ```csharp using UnityEngine;public class ScriptExample : MonoBehaviour { void Start() { // logarithm of 6 in base 2 // prints 2.584963 Debug.Log(Mathf.Log(6, 2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0ed31338ff7
unity_docs
animation
What is `Animations.AnimationClipPlayable` in Unity? Explain its purpose and usage.
AnimationClipPlayable struct in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Implements interfaces: IPlayable Description A Playable that controls an AnimationClip . NOTE: You can use PlayableExtensions methods with AnimationClipPlayable objects. Public Methods Method Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_139710d76f91
unity_docs
scripting
Give me an overview of the `ClosestPointCommand` class in Unity.
ClosestPointCommand struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Struct used to set up a closest point command to be performed asynchronously during a job. When you use this struct to schedule a batch of closest commands, they are performed asynchronously and in parallel to each ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64174c2c6d7b
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RG_BC5_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RG_BC5_UNorm Description A two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7505a393681a
unity_docs
physics
What is `PhysicsShapeGroup2D.localToWorldMatrix` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D.localToWorldMatrix public Matrix4x4 localToWorldMatrix ; Description Gets or sets a matrix that transforms the PhysicsShapeGroup2D vertices from local space into world space. When retrieving a PhysicsShapeGroup2D via Rigidbody2D.GetShapes or Collider2D.GetShapes , this matrix will b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_081baa3e9ec2
unity_docs
xr
Show me a Unity C# example demonstrating `LightTransport.IProbeIntegrator.SetProgressReporter`.
ntegration operations. The integrator updates the progress state during execution, allowing external systems to display progress information and handle cancellation requests. The progress reporter provides: Completion percentage (0.0 to 1.0). Ability to cancel operations. Work step tracking for detailed progress. A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_8
github
scripting
What does `GeographicToViewportPoint` do in this Unity script? Explain its purpose and signature.
Transforms the supplied geographical coordinates into viewport space, using the supplied camera (if specified) or the camera previously set via SetControlledCamera if not.The geographical coordinates of the position to transform to viewport space.The camera for which to perform the transform. If this is left out, any c...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_c7e20d6b1662
unity_docs
ui
In Unity's 'TemplateContainer', what is 'Inherited UXML attributes' and how does it work?
This element inherits the following attributes from its base class: Name Type Description binding-path string Path of the target property to be bound. focusable boolean If false, this prevents the element from being focused. The element can only be focused if its canGrabFocus property is true. tabindex int An integer u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df044a92fb8c
unity_docs
editor
What is `EditorGUIUtility.AddCursorRect` in Unity? Explain its purpose and usage.
EditorGUIUtility.AddCursorRect Declaration public static void AddCursorRect ( Rect position , MouseCursor mouse ); Declaration public static void AddCursorRect ( Rect position , MouseCursor mouse , int controlID ); Parameters Parameter Description position The rectangle the control should be sh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5096b21e79af
unity_docs
editor
What is `AssetDatabase.IsCacheServerEnabled` in Unity? Explain its purpose and usage.
AssetDatabase.IsCacheServerEnabled Declaration public static bool IsCacheServerEnabled (); Returns bool Returns true when the Cache Server is enabled. Returns false otherwise. Description Checks whether the Cache Server is enabled in Project Settings. ```csharp using UnityEngine; using UnityEditor;public ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_562892759ccc
github
scripting
Write a Unity C# script called Open XR Node Record
```csharp namespace Tilia.CameraRigs.OpenXR { using UnityEngine; using UnityEngine.XR; using Zinnia.Extension; using Zinnia.Tracking.CameraRig; /// <summary> /// Provides the description for an OpenXR CameraRig node element. /// </summary> public class OpenXRNodeRecord : BaseDeviceDetai...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_47e792931f79
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchExpression.Execute`.
ssion. c SearchExpressionContext that will encapsulate all information relative to expression evaluation. Returns void Returns an enumerable list of SearchItem. Description Execute a SearchEXpression givent a certain SearchContext Depending on flags the expression might be valuated in a worker thread (by de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac206c8ea189
github
scripting
Write a Unity Editor script for Value Range Interactable Editor
```csharp using UnityEngine; using UnityEditor; using ExPresSXR.Interaction.ValueRangeInteractable; using UnityEditor.XR.Interaction.Toolkit; namespace ExPresSXR.Editor.Editors { /// <summary> /// This class describes the default editor for all ValueRangeInteractables without their own editor /// and can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f85a83ef795f
unity_docs
editor
What is `EditorGUI.TextField` in Unity? Explain its purpose and usage.
EditorGUI.TextField Declaration public static string TextField ( Rect position , string text , GUIStyle style = EditorStyles.textField); Declaration public static string TextField ( Rect position , string label , string text , GUIStyle style = EditorStyles.textField); Declaration public static ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8dbae1e71924
unity_docs
physics
What is `ArticulationBody.solverVelocityIterations` in Unity? Explain its purpose and usage.
ArticulationBody.solverVelocityIterations public int solverVelocityIterations ; Description The solverVelocityIterations affects how accurately articulation body joints and collision contacts are resolved during bounce. Increasing this value will result in higher accuracy of the resulting exit velocity after a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59dc6eb0bdac
unity_docs
animation
What is `AnimationUtility.GetFloatValue` in Unity? Explain its purpose and usage.
AnimationUtility.GetFloatValue Declaration public static bool GetFloatValue ( GameObject root , EditorCurveBinding binding , out float data ); Parameters Parameter Description root The root GameObject of the animated hierarchy. binding The binding that defines the path and the properties of the value....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3be3a0c8b26b
github
scripting
Write a Unity C# XR/VR script for CSV Example
```csharp using System; using System.Collections.Generic; using TinyCSV; using UnityEngine; namespace GameUtil.Config.Example { [ExecuteAlways] public class CSVExample : MonoBehaviour { public void CSVReadAndWriteTest() { //Support List<> data type. Deb...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_a05e2df03391
unity_docs
scripting
What is `ShortcutManagement.IShortcutManager.GetAvailableProfileIds` in Unity? Explain its purpose and usage.
IShortcutManager.GetAvailableProfileIds Declaration public IEnumerable<string> GetAvailableProfileIds (); Returns IEnumerable<string> Enumerable of available profile IDs. Description Returns an enumeration of all of avaliable profile IDs. Profiles loaded from disk or created using CreateProfile are avai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb6c9730207c
unity_docs
rendering
What is `Shader.GetPropertyDefaultVectorValue` in Unity? Explain its purpose and usage.
Shader.GetPropertyDefaultVectorValue Declaration public Vector4 GetPropertyDefaultVectorValue (int propertyIndex ); Parameters Parameter Description propertyIndex The index of the shader property. Description Returns the default Vector4 value of the shader property at the specified index. The shader pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4901dfb2db6
unity_docs
scripting
What is `Rendering.AttachmentDescriptor` in Unity? Explain its purpose and usage.
AttachmentDescriptor struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description A declaration of a single color or depth rendering surface to be attached into a RenderPass. A AttachmentDescriptor object identifies a single color or depth rendering surface that can be used with a Render...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5e9c1c64b4f
unity_docs
rendering
What is `Material.HasTexture` in Unity? Explain its purpose and usage.
Material.HasTexture Declaration public bool HasTexture (string name ); Declaration public bool HasTexture (int nameID ); Parameters Parameter Description nameID The name ID of the property. Use Shader.PropertyToID to get this ID. name The name of the property. Returns bool Returns true if the S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22c48f5220c8
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer.name`.
SearchIndexer.name public string name ; Description Name of the index. Generally this name is set by a user from SearchDatabase.Settings. ```csharp using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; /// <summary> /// The index name can be used t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43c866691b7a
unity_docs
physics
What are the parameters of `VersionControl.Provider.Checkout` in Unity?
Description Checkout an asset or a list of assets from the version control system. Some version control systems like Perforce or Plastic SCM require an asset to be checked out before it can be edited. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.VersionControl; using UnityEngine;publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00006346df1d
unity_docs
rendering
What is `LightmapParameters.resolution` in Unity? Explain its purpose and usage.
LightmapParameters.resolution public float resolution ; Description The texel resolution per meter used for real-time lightmaps. This value is multiplied by LightingSettings.indirectResolution .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75f77a5d95fa
unity_docs
editor
What is `HandleUtility.niceMouseDelta` in Unity? Explain its purpose and usage.
HandleUtility.niceMouseDelta public static float niceMouseDelta ; Description Get nice mouse delta to use for dragging a float value (Read Only). This will autodetect the users preference for X / Y axis dragging and give you back a float that is measured accordingly. This also handles modifier keys correctly, i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac4475661729_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can be initialized using two arguments.-derived classes that implement this interface can be instantiated with arguments using the function.-derived classes that implement this interface can be added to a with arguments using the GameObject.AddComponent function.These functions can automatica...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_f2c0782553f8
unity_docs
math
Show me a Unity C# example demonstrating `BoundsInt.allPositionsWithin`.
BoundsInt.allPositionsWithin public BoundsInt.PositionEnumerator allPositionsWithin ; Description A BoundsInt.PositionCollection that contains all positions within the BoundsInt . Positions within the BoundsInt are not inclusive of the positions on the upper limits of the BoundsInt. This iterator will only r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_36b8b9ff13ba_doc_4
github
scripting
What does `SetPreloadBudgetFraction` do in this Unity script? Explain its purpose and signature.
Set the RAM budget for preloading, as a fraction of total system RAM.E.g. 0.3 means 30% of system RAM. Pass 0 to disable budget limit. Signature: ```csharp public void SetPreloadBudgetFraction(float fraction) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_99899aa350cd
unity_docs
rendering
What is `AssetDatabase.GetTypeFromPathAndFileID` in Unity? Explain its purpose and usage.
AssetDatabase.GetTypeFromPathAndFileID Declaration public static Type GetTypeFromPathAndFileID (string assetPath , long localIdentifierInFile ); Parameters Parameter Description assetPath The Asset's path. localIdentifierInFile The object's local file identifier. Returns Type The object's type. Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5fbbf4f8f57
unity_docs
animation
What is `Animator.GetIKPositionWeight` in Unity? Explain its purpose and usage.
Animator.GetIKPositionWeight Declaration public float GetIKPositionWeight ( AvatarIKGoal goal ); Parameters Parameter Description goal The AvatarIKGoal that is queried. Description Gets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal). An IK goal is a targe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_accc4f570525
unity_docs
physics
In Unity's 'Distribution size and code stripping', what is 'Code stripping' and how does it work?
Unity removes all unused code from your build by default. You can change this via the Player settings (menu: Edit > Project Settings , then select the Player category): Select the Other Settings panel to access the Strip Engine Code option. It is better to build with stripping enabled. With code stripping, Unity scans ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90c7a3ed9969
unity_docs
performance
Show me a Unity C# example demonstrating `Screen.dpi`.
ning a range of DPI values rather than providing an exact value. Alternatively, you can calculate the DPI value using an average of xdpi and ydpi as shown in the following code example. While this approach might provide more accurate DPI value, some Android devices might report incorrect xdpi and ydpi values. I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_115147e6ff47
unity_docs
rendering
Show me a Unity C# example demonstrating `Material.shader`.
Material.shader public Shader shader ; Description The shader used by the material. Additional resources: Shader.Find method, Materials , ShaderLab documentation . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Toggle between Diffuse and Transparent/Diffuse shaders // when space...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab3426950a56
unity_docs
math
What is `Rendering.SubMeshDescriptor.firstVertex` in Unity? Explain its purpose and usage.
SubMeshDescriptor.firstVertex public int firstVertex ; Description First vertex in the index buffer for this sub-mesh. Together with vertexCount , this defines the range of vertices that are possibly used by this sub-mesh. These values are important for any CPU-based mesh processing that would be done, for exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90f30eb2923a
unity_docs
scripting
What is `Playables.PlayableGraph.DestroyPlayable` in Unity? Explain its purpose and usage.
PlayableGraph.DestroyPlayable Declaration public void DestroyPlayable (U playable ); Parameters Parameter Description playable The playable to destroy. Description Destroys the Playable. Playables connected to the destroyed Playable output ports are orphaned. These orphaned Playables still exist in the Pl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b36f8f8fc415
unity_docs
math
What is `Mesh.normals` in Unity? Explain its purpose and usage.
Mesh.normals public Vector3[] normals ; Description The normals of the Mesh. If the Mesh contains no normals, an empty array is returned. ```csharp // Rotate the normals by speed every frameusing UnityEngine;public class ExampleClass : MonoBehaviour { float speed = 100.0f; // Update is called once per frame ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_18
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive seven arguments as part of its initialization process.Base interface of . Signature: ```csharp public interface ISevenArguments ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_0a212619fc54_doc_10
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Destroys all objects in the MonoBehaviour-based pool.The type of MonoBehaviour objects to destroy. Signature: ```csharp public static void DestroyAllMono<T>() where T : MonoBehaviour, IPoolable => _poolService.DestroyAllMono<T>(); ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_84ac972bb986
unity_docs
editor
What is `Search.SearchIndexer.skipEntryHandler` in Unity? Explain its purpose and usage.
SearchIndexer.skipEntryHandler public Func<string,bool> skipEntryHandler ; Description Handler used to skip entries. ```csharp using System; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_SearchIndexer_skipEntryHandler { [MenuItem("Examples/SearchIndexer/skipEntryHandler"...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0cef42f93ea
unity_docs
rendering
What are the parameters of `GUI.RepeatButton` in Unity?
Returns bool True when the users clicks the button. Description Make a button that is active as long as the user holds it down. ```csharp // Draws 2 buttons, one with an image, and other with a text // Prints a message when they get clicked.// Prints a message when they get clicked.using UnityEngine; using System.Colle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a0f1065625d4
unity_docs
input
Show me a Unity code example for 'Synthesize and send events'.
ct from the pool of events. Fill in the event properties. Enclose the event in a using block to ensure it’s returned to the event pool. Pass the event to panel.visualTree.SendEvent() . You can send operating system events, such as keyboard and pointer events. To do so, use a UnityEngine.Event to initialize the UI Toolk...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_958f0e0d4585
unity_docs
audio
Explain 'Audio Distortion Effect' in Unity.
The Distortion Effect distorts the sound from an AudioMixer group. ## Properties Property: Function: Distortion Distortion value. 0.0 to 1.0. Default = 0.5. ## Details Apply the Distortion Effect to simulate the sound of a low quality radio transmission.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9cd8aae42cd0
unity_docs
scripting
What is `UIElements.BaseTreeView.AddItem` in Unity? Explain its purpose and usage.
BaseTreeView.AddItem Declaration public void AddItem (TreeViewItemData<T> item , int parentId , int childIndex , bool rebuildTree ); Parameters Parameter Description item Item to add. parentId The parent id for the item. childIndex The child index in the parent's children list. rebuildTree Whether w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_515356085bcb
unity_docs
animation
What is `Animations.AimConstraint.AddSource` in Unity? Explain its purpose and usage.
AimConstraint.AddSource Declaration public int AddSource ( Animations.ConstraintSource source ); Parameters Parameter Description source The source object and its weight. Returns int Returns the index of the added source. Description Adds a constraint source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.