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_8c7e4f8be6aa
unity_docs
math
What is `LightProbesQuery.CalculateInterpolatedLightAndOcclusionProbes` in Unity? Explain its purpose and usage.
LightProbesQuery.CalculateInterpolatedLightAndOcclusionProbes Declaration public void CalculateInterpolatedLightAndOcclusionProbes (NativeArray<Vector3> positions , NativeArray<int> tetrahedronIndices , NativeArray<SphericalHarmonicsL2> lightProbes , NativeArray<Vector4> occlusionProbes ); Parameters Paramet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00485c5b68ad
unity_docs
scripting
What is `XR.XRInputSubsystem.trackingOriginUpdated` in Unity? Explain its purpose and usage.
XRInputSubsystem.trackingOriginUpdated Parameters Parameter Description value Unity calls this delegate when the TrackingOriginFlags changes. Description An event that takes the delegate instance that the XRInputSubsystem calls when it changes the origin it reports devices at. This can be due to a change in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_444761827d9a
github
scripting
Write a Unity C# script called Write Keyboard Input
```csharp using RollABall.Components; using starikcetin.Joy.Core; using UnityEngine; namespace RollABall.Systems { public class WriteKeyboardInput : ISystem { public Filter[] Filters { get; } = { Filter }; private static readonly Filter Filter = new Filter().AllOf(t...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_179957ce09fd
unity_docs
scripting
What is `UnityEngine.ScreenCaptureModule` in Unity? Explain its purpose and usage.
UnityEngine.ScreenCaptureModule Description The ScreenCapture module provides functionality to take screen shots using the ScreenCapture class. Classes Class Description ScreenCapture Provides methods to take screenshots.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_821bd534d199
unity_docs
scripting
What are the parameters of `ParticleSystem.ExternalForcesModule.AddInfluence` in Unity?
Description Adds a ParticleSystemForceField to the influencers list. When influenceFilter is set to ParticleSystemGameObjectFilter.List then only Force Fields in the influencers list affect the Particle System. ```csharp using UnityEngine;public class Example : MonoBehaviour { ParticleSystem.ExternalForcesModule ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03401b6b41dd
unity_docs
rendering
What is `Rendering.ShaderTagId.ctor` in Unity? Explain its purpose and usage.
ShaderTagId Constructor Declaration public ShaderTagId (string name ); Parameters Parameter Description name The name to represent with the shader tag id. Description Gets or creates a shader tag id representing the given name. Additional resources: DrawingSettings , ScriptableRenderContext.DrawRenderers...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c4cd7f58817c
unity_docs
networking
In Unity's 'Create callbacks between Unity C#, JavaScript, and C/C++/C# code', what is 'Javascript plug-in code' and how does it work?
The following code is an example of a.jslib file that schedules a timeout and invokes a callback. ``` mergeInto(LibraryManager.library, { JsSetTimeout: function (message, timeout, callback) { // Create copy of message because it might be deleted before callback is run var stringMessage = UTF8ToString(message); var ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b07331e182ba
unity_docs
rendering
Explain 'Introduction to mipmap streaming' in Unity.
Use mipmap streaming to limit the size of textures in GPU memory. ## How mipmap streaming works For each texture in the camera view, Unity automatically calculates and loads mipmap levels only up to a specific level, instead of loading all of them. This means that Unity only transfers some mipmap levels per texture f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8773b4397f66
unity_docs
scripting
In Unity's 'The Debug class', what is 'Using the Debug class' and how does it work?
The Debug class has two methods for drawing lines in the Scene view and Game view. These are DrawLine and DrawRay . In this example, a script has been added to every Sphere GameObject in the scene, which uses Debug.DrawLine to indicate its vertical distance from the plane where Y equals zero. Note that the last paramet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce9350165ec8
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetLabels`.
AssetDatabase.GetLabels Declaration public static string[] GetLabels ( Object obj ); Parameters Parameter Description obj The asset object to check. Returns string[] Returns all labels attached to a given asset. Description Obtains all labels of a given asset. ```csharp using System.Linq; using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_29dbfd64186c
github
scripting
Write a Unity Editor script for Number Condition Editor
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using MBT; namespace MBTEditor { [CustomEditor(typeof(NumberCondition))] public class NumberConditionEditor : Editor { SerializedProperty titleProp; SerializedProperty abortProp; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb3a1b708a83
unity_docs
animation
What is `Playables.PlayableGraph.Connect` in Unity? Explain its purpose and usage.
PlayableGraph.Connect Declaration public bool Connect (U source , int sourceOutputPort , V destination , int destinationInputPort ); Parameters Parameter Description source The source playable or its handle. sourceOutputPort The port used in the source playable. destination The destination playable or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab86f134cd05
unity_docs
rendering
What is `CustomRenderTexture` in Unity? Explain its purpose and usage.
CustomRenderTexture class in UnityEngine / Inherits from: RenderTexture / Implemented in: UnityEngine.CoreModule Description Custom Render Textures are an extension to Render Textures that allow you to render directly to the Texture using a Shader. Custom Render Textures are an extension to Render Textures t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3355a28bcd9
unity_docs
scripting
What is `Experimental.GraphView.StickyNote.GetPosition` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StickyNote.GetPosition Declaration public Rect GetPosition (); Returns Rect Returns the [StickyNote] position as a xy position relative to the [GraphView]. Description Gets the position of the [StickyNote].
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_72ebece545ef
unity_docs
scripting
Explain 'Vertical Layout Group' in Unity.
The Vertical Layout Group component places its child layout elements on top of each other. Their heights are determined by their respective minimum, preferred, and flexible heights according to the following model: The minimum heights of all the child layout elements are added together and the spacing between them is a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6d50f2647d7
unity_docs
scripting
What is `UIElements.StyleRotate.ctor` in Unity? Explain its purpose and usage.
StyleRotate Constructor Declaration public StyleRotate ( UIElements.Rotate v ); Description Creates a StyleRotate from either a Rotate or a StyleKeyword . Declaration public StyleRotate ( UIElements.StyleKeyword keyword ); Description Creates a StyleRotate from either a Rotate or a StyleKeywo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_359872dc419a
unity_docs
rendering
What is `GL.MultiTexCoord2` in Unity? Explain its purpose and usage.
GL.MultiTexCoord2 Declaration public static void MultiTexCoord2 (int unit , float x , float y ); Description Sets current texture coordinate (x,y) for the actual texture unit . In OpenGL this matches glMultiTexCoord for the given texture unit if multi-texturing is available. On other graphics APIs the sam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e0182a468bea
unity_docs
xr
In Unity's 'Configure your network for Package Manager', what is 'Custom certificate authority' and how does it work?
In some organizations, users can only access the internet through a proxy server. Some proxies unpack the HTTPS content and repack it with their own SSL certificate. Unity Package Manager’s underlying HTTPS layer sometimes rejects these certificates because it doesn’t recognize the certificate authority that emitted th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_291a68d269db
unity_docs
scripting
What is `ParticleSystem.Stop` in Unity? Explain its purpose and usage.
ParticleSystem.Stop Declaration public void Stop (); Declaration public void Stop (bool withChildren = true); Declaration public void Stop (bool withChildren = true, ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting); Parameters Parameter Description withChildre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8398fbf72e5b
unity_docs
animation
Give me an overview of the `AnimationCurve` class in Unity.
AnimationCurve class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Store a collection of Keyframes that can be evaluated over time. Properties Property Description keys All keys defined in the animation curve. length The number of keys in the curve. (Read Only) postWrapMode The behavi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0ff35e845c5
unity_docs
scripting
What is `Quaternion.eulerAngles` in Unity? Explain its purpose and usage.
Quaternion.eulerAngles public Vector3 eulerAngles ; Description Returns or sets the euler angle representation of the rotation in degrees. Euler angles can represent a three dimensional rotation by performing three separate rotations around individual axes. In Unity these rotations are performed around the Z...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0e9ecdba4eb
unity_docs
scripting
What is `Experimental.GraphView.Resizer` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Resizer class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.VisualElement Description Resizer manipulator element. Properties Property Description activateButton Mouse button to activate the resizer. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0d2ace758d7
unity_docs
editor
What is `UIElements.Clickable.ctor` in Unity? Explain its purpose and usage.
Clickable.ctor(System.Action,long,long) Parameters Parameter Description delay Determines when the event begins. Value is defined in milliseconds. Applies if delay is greater than 0 . interval Determines the time delta between event repetition. Value is defined in milliseconds. Applies if interval is greater t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27d2e1920dfc
unity_docs
editor
What is `iOS.Xcode.PBXProject.ReadFromStream` in Unity? Explain its purpose and usage.
PBXProject.ReadFromStream Declaration public void ReadFromStream (TextReader sr ); Parameters Parameter Description sr The project contents. Description Reads the project from the given text reader. Current contents of the project are discarded. ```csharp using UnityEditor; using System.IO; using UnityEd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_262a8f01c1f9
unity_docs
rendering
What is `LightProbeProxyVolume.ResolutionMode` in Unity? Explain its purpose and usage.
ResolutionMode enumeration Description The resolution mode for generating a grid of interpolated Light Probes. Additional resources: Light Probes , Light Probe Proxy Volume . Properties Property Description Automatic The automatic mode uses a number of interpolated Light Probes per unit area, and uses the b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d659ab7a7bb
unity_docs
scripting
What is `UIElements.BaseTreeView.itemUssClassName` in Unity? Explain its purpose and usage.
BaseTreeView.itemUssClassName public static string itemUssClassName ; Description The USS class name for TreeView item elements. Unity adds this USS class to every item element of the TreeView. Any styling applied to this class affects every item located beside, or below the stylesheet in the visual tree.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6282a1125213
unity_docs
physics
What is `Physics2D.contactThreshold` in Unity? Explain its purpose and usage.
Physics2D.contactThreshold public static float contactThreshold ; Description A threshold below which a contact is automatically disabled. Colliders placed side-by-side do not form a continuous surface which can result in unwanted contacts (known as "ghost collisions") when moving across these colliders. The ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c2fa3a0ca3c
unity_docs
math
Show me a Unity C# example demonstrating `Color32.Lerp`.
Color32.Lerp Declaration public static Color32 Lerp ( Color32 a , Color32 b , float t ); Description Linearly interpolates between colors a and b by t . t is clamped between 0 and 1. When t is 0 returns a . When t is 1 returns b . ```csharp using UnityEngine;public class Example : MonoBehav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62b7918c78a7
unity_docs
editor
Show me a Unity C# example demonstrating `EditorPrefs.SetInt`.
refs.SetInt Declaration public static void SetInt (string key , int value ); Parameters Parameter Description key Name of key to write integer to. value Value of the integer to write into the storage. Description Sets the value of the preference identified by key as an integer. Sets the value of the p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3ef09f1c28c
unity_docs
rendering
What is `Rendering.BatchCullingOutputDrawCommands.drawCommandPickingInstanceIDs` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands.drawCommandPickingInstanceIDs public int* drawCommandPickingInstanceIDs ; Description The instance IDs that are associated with the draw commands. Unity only uses this command when it renders object-picking or selection data in the Editor, which is when BatchCullingContext.viewTy...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_342ab794ce79
unity_docs
scripting
What is `UIElements.NavigationEventBase_1.ctrlKey` in Unity? Explain its purpose and usage.
NavigationEventBase<T0>.ctrlKey public bool ctrlKey ; Description Gets a boolean value that indicates whether the Ctrl key is pressed. True means the Ctrl key is pressed. False means it isn't.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d0d72d3281e
unity_docs
scripting
Explain 'Details of disabling domain and scene reload' in Unity.
## What Unity skips when domain reload and scene reload is disabled From a high-level perspective, entering Play mode consists of the following main stages: Backup current scenes . This only happens when the Scene has been modified. Allows Unity to revert the Scenes when exiting Play mode to the state they were in bef...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8604c7c98c25
unity_docs
ui
Show me a Unity C# example demonstrating `GUISkin.horizontalSliderThumb`.
GUISkin.horizontalSliderThumb public GUIStyle horizontalSliderThumb ; Description Style used by default for the thumb that is dragged in GUI.HorizontalSlider controls. The padding property is used to determine the size of the thumb. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0da07300285
unity_docs
editor
What is `SpeedTreeImporter.selectedWindQuality` in Unity? Explain its purpose and usage.
SpeedTreeImporter.selectedWindQuality public int selectedWindQuality ; Description Gets and sets an integer corresponding to the SpeedTreeWind enum values. The value is clamped by SpeedTreeImporter.bestWindQuality internally. The possible wind quality values are as follows: 0 - Off 1 - Fastest 2 - Fast ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b94668f03b3d
unity_docs
editor
What are the parameters of `GenericMenu.AddSeparator` in Unity?
Description Add a seperator item to the menu. Additional resources: GenericMenu.AddItem , GenericMenu.AddDisabledItem . ```csharp // This example shows how to create a context menu inside a custom EditorWindow. using UnityEngine; using UnityEditor;public class MyWindow : EditorWindow { [MenuItem("TestContextMenu/Op...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3079350f30c4
unity_docs
scripting
What is `Search.SearchUtils.FrameAssetFromPath` in Unity? Explain its purpose and usage.
SearchUtils.FrameAssetFromPath Declaration public static void FrameAssetFromPath (string path ); Parameters Parameter Description path Asset path. Description Ping an asset in the project browser.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c1ac5190195
unity_docs
editor
What is `Profiling.Profiler.GetAllocatedMemoryForGraphicsDriver` in Unity? Explain its purpose and usage.
Profiler.GetAllocatedMemoryForGraphicsDriver Declaration public static long GetAllocatedMemoryForGraphicsDriver (); Description Returns the amount of allocated memory for the graphics driver, in bytes. Only available in development players and editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3f6d818c62a
unity_docs
scripting
What is `SceneManagement.StageHandle.Contains` in Unity? Explain its purpose and usage.
StageHandle.Contains Declaration public bool Contains ( GameObject gameObject ); Parameters Parameter Description gameObject The GameObject to check. Returns bool True if the stage contains the given GameObject. Description Does the stage contain the given GameObject?
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62059eb0f574
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetPostprocessor.OnPostprocessSprites`.
AssetPostprocessor.OnPostprocessSprites(Texture2D, Sprite[]) Description Add this function to a subclass to get a notification when an texture of sprite(s) has completed importing. For Multiple sprite-mode assets each sprite will be passed in the second argument as an array of sprites. ```csharp using UnityEngine;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8db3962eb33f
unity_docs
editor
What is `AssetDatabase.ForceToDesiredWorkerCount` in Unity? Explain its purpose and usage.
AssetDatabase.ForceToDesiredWorkerCount Declaration public static void ForceToDesiredWorkerCount (); Description Forces the Editor to use the desired amount of worker processes. Unity will either spawn new worker processes or shut down idle worker processes to reach the desired number.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e88aa342a4c2_doc_7
github
scripting
What does `JoinVoiceChannel` do in this Unity script? Explain its purpose and signature.
Join voice channel by channel namewill join channel's nameThe channel type is indicated by the method used to initiate the channel join.JoinEchoChannelAsync joins an echo channel, JoinGroupChannelAsyc joins a group channel,and JoinPositionalChannelAsync joins a positional channel. Signature: ```csharp public void Join...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_815849472a9f
unity_docs
performance
In Unity's 'Android thread configuration', what is 'Thread affinity aliases' and how does it work?
Unity provides the following aliases that you can use as the thread affinity value: any : Allows the thread to run on any core. little : Allows the thread to run on any little core. big : Allows the thread to run on any big core. You can also use hexadecimal and binary values to specify thread affinity. In binary, the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_335826b16019
unity_docs
ui
In Unity's 'Slider', what is 'Set page size' and how does it work?
The Slider control has a page-size property that controls how much the thumb moves, and how much the value changes, when you click the track to either side of the thumb. If the page size value is 0 , clicking the track moves the thumb to the cursor or pointer position, and updates the value accordingly. If the page siz...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_677bbaa82ee6_doc_1
github
scripting
What does `GetMethodData` do in this Unity script? Explain its purpose and signature.
Returns a list of from active s in the scene. Signature: ```csharp public static IEnumerable<MethodData> GetMethodData() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d565d0690afb
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.strengthMultiplier`.
ParticleSystem.NoiseModule.strengthMultiplier public float strengthMultiplier ; Description Strength multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall strength multiplier. Additional resources: ParticleSystem.NoiseModule.strength . ``...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78be0d8ddf99
unity_docs
scripting
What are the parameters of `Animator.SetIKRotation` in Unity?
Description Sets the rotation of an IK goal. An IK goal is a specified target position and rotation for a specific body part. Unity calculates how to move the body part towards this target from a starting point. This starting point could be, for example, the current position and rotation obtained from an animation. Thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_32d0de1a2aca
unity_docs
rendering
In Unity's 'Transparent Diffuse', what is 'Transparent Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is completely transparent while 255 (white) is completely opaque. If your main texture does not have an alp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_618a04cb0444
unity_docs
physics
What is `TargetJoint2D.anchor` in Unity? Explain its purpose and usage.
TargetJoint2D.anchor public Vector2 anchor ; Description The local-space anchor on the rigid-body the joint is attached to. The local-space anchor position is where the joint will apply forces to move the body to the specified target position.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecf73033070b
unity_docs
rendering
What is `Mesh.RecalculateUVDistributionMetrics` in Unity? Explain its purpose and usage.
Mesh.RecalculateUVDistributionMetrics Declaration public void RecalculateUVDistributionMetrics (float uvAreaThreshold ); Parameters Parameter Description uvAreaThreshold The minimum UV area to consider. The default value is 1e-9f. Description Recalculates the UV distribution metrics of the Mesh from the v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_900c6a1e75bd
unity_docs
editor
What is `Build.Profile.BuildProfile.GetActiveBuildProfile` in Unity? Explain its purpose and usage.
BuildProfile.GetActiveBuildProfile Declaration public static Build.Profile.BuildProfile GetActiveBuildProfile (); Returns BuildProfile The active build profile. Returns null when a platform profile is active. Description Gets the active build profile. Additional resources: Platform profile . ```csharp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe264ca2622a
unity_docs
scripting
What is `Transform.SetAsFirstSibling` in Unity? Explain its purpose and usage.
Transform.SetAsFirstSibling Declaration public void SetAsFirstSibling (); Description Move the transform to the start of the local transform list. ```csharp using UnityEngine; using System.Collections; using UnityEngine.UI; //Required when using UI Elements. using UnityEngine.EventSystems; // Required when usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_730a4226931a
unity_docs
input
Explain 'Troubleshooting common cross-platform issues' in Unity.
Most of Unity’s API and project structure is identical for all supported platforms and sometimes a project can be rebuilt to run on different devices. However, fundamental differences in the hardware and deployment methods mean that parts of a project may not port between platforms without change. This page lists some ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e986ee4af9c6
unity_docs
rendering
What is `Rendering.LightEvent` in Unity? Explain its purpose and usage.
LightEvent enumeration Description Defines a place in light's rendering to attach CommandBuffer objects to. Unity's rendering loop can be extended by adding so called "command buffers" at various points in light rendering; mostly related to shadows. For example, you could do custom processing of the shadow map a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92919154f258
unity_docs
scripting
What is `IMGUI.Controls.TreeView.RowGUIArgs.rowRect` in Unity? Explain its purpose and usage.
TreeView.RowGUIArgs.rowRect public Rect rowRect ; Description Row rect for the current row being handled. This rect is limited to the visible width of the scroll view. If the TreeView is using a MultiColumnHeader then the total width of all the columns can be found by MultiColumnHeaderState.widthOfAllVisib...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63f89beb7d49
unity_docs
physics
What is `Rendering.RenderingThreadingMode.MultiThreaded` in Unity? Explain its purpose and usage.
RenderingThreadingMode.MultiThreaded Description Generates intermediate graphics commands via the main thread. The render thread converts them into low-level platform API graphics commands. In this mode, the main thread processes the application's high-level code through an internal class GfxDeviceClient that iss...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26f888591820
unity_docs
scripting
What is `Camera.depth` in Unity? Explain its purpose and usage.
Camera.depth public float depth ; Description Camera's depth in the camera rendering order. Cameras with lower depth are rendered before cameras with higher depth. Use this to control the order in which cameras are drawn if you have multiple cameras and some of them don't cover the full screen. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2fb25a1f6d2
unity_docs
rendering
What is `BuildOptions.DetailedBuildReport` in Unity? Explain its purpose and usage.
BuildOptions.DetailedBuildReport Description Generates detailed information in the BuildReport . The BuildReport object returned by BuildPipeline.BuildPlayer will contain additional data about build times and contents. This might lead to slightly longer build time, typically by a few percents. The following scri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05e879b1ec4b
unity_docs
physics
What is `UnityEngine.PhysicsModule` in Unity? Explain its purpose and usage.
UnityEngine.PhysicsModule Description The Physics module implements 3D physics in Unity. Classes Class Description ArticulationBody A body that forms part of a Physics articulation. BoxCollider A box-shaped primitive collider. CapsuleCollider A capsule-shaped primitive collider. CharacterController A Characte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_51dd74c33dcd
github
scripting
Write a Unity C# MonoBehaviour script called Parent Object Test8
```csharp using System.Collections; using UnityEngine; public class ParentObjectTest8 : MonoBehaviourExtended, ITest { [Parent("Nonexisting go", Optional = true)] private GameObject go; private void Start() { if (!Test()) { Debug.LogError("Test failed: " + this); }...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_2c13b579f238
unity_docs
rendering
What is `Rendering.RenderPipeline.EndContextRendering` in Unity? Explain its purpose and usage.
RenderPipeline.EndContextRendering Declaration protected static void EndContextRendering ( Rendering.ScriptableRenderContext context , List<Camera> cameras ); Description Calls the RenderPipelineManager.endContextRendering and RenderPipelineManager.endFrameRendering delegates. Use the delegates that this...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e06484b9e025
unity_docs
physics
What are the parameters of `Rigidbody.GetAccumulatedTorque` in Unity?
Returns Vector3 Accumulated torque expressed in ForceMode.Force . Description Returns the torque that the Rigidbody has accumulated before the simulation step. The accumulated torque is reset during each physics simulation step. ```csharp using UnityEngine;public class AddTorqueScript : MonoBehaviour { private Rigi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_cb6178f8e7b1
github
scripting
Write a Unity C# MonoBehaviour script called Ginjector
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using UnityEngine; namespace GrimTools.Runtime { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property)] public sealed class GinjectAttribute : PropertyAttribute { } ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_be2cd74c2cf9
unity_docs
math
Show me a Unity C# example demonstrating `Vector3.RotateTowards`.
xactly on the target rather than overshoot. If the magnitudes of current and target are different, then the magnitude of the result will be linearly interpolated during the rotation. If a negative value is used for maxRadiansDelta , the vector will rotate away from target/ until it is pointing in exactly the opp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d4ca2fead47a
unity_docs
ui
In Unity's 'USS transition', what is 'Match the value units' and how does it work?
For properties that you set with a value and unit, make sure the units match. Pay special attention to transitions to or from default values. For example, the default value of the translate attribute is 0px . If you try to transition from this value to a percentage value, the transition doesn’t work. The following tran...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc12785d0e02
unity_docs
animation
Show me a Unity C# example demonstrating `Playables.PlayableGraph.Connect`.
input count is reset to 0, meaning that it has no children Playables attached. Outputs behave a little differently—every Playable has a default output created when first created. You connect Playables together using the method PlayableGraph.Connect , and you can disconnect them from each other using PlayableGraph.Di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62bf145ec9ef
unity_docs
audio
Explain 'Audio Echo Filter' in Unity.
The Audio Echo Filter repeats a sound after a given Delay , attenuating the repetitions based on the Decay Ratio . ## Properties Property: Function: Delay Echo delay in ms. 10 to 5000. Default = 500. Decay Ratio Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (ie simple 1 line delay). Default = 0.5.L ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_58037aa7e22e
unity_docs
editor
Explain 'Instantiating prefabs at runtime' in Unity.
You can use prefabs to instantiate complicated GameObjects or collections of GameObjects at runtime. Topic Description Introduction to instantiating prefabs Introductory context and common scenarios in which instantiating prefabs is useful. Build a structure with prefabs Use prefabs to instantiate several copies of a b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c1d93fbcde1
unity_docs
editor
Show me a Unity code example for 'Search performance trackers'.
alysis > Performance Markers . In the Search window, using a visual or textual query with the provider token. However, the recommended best practice is using the dedicated window for performance trackers, as it provides a better experience. ## Query syntax Provider token: perf: Query example: Searches the performance...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b64361726f34
unity_docs
animation
What is `ModelImporterGenerateAnimations.GenerateAnimations` in Unity? Explain its purpose and usage.
ModelImporterGenerateAnimations.GenerateAnimations Description Default animation import mode (All animations are stored in the root object). Additional resources: ModelImporter.generateAnimations .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_31abe86e3fb2
unity_docs
scripting
In Unity's 'Supported dependency versions', what is 'NDK' and how does it work?
The following table shows the NDK version that each Unity version supports: Unity version NDK version 6000.0.38f1+ r27c (27.2.12479018) 6000.0.0f1 - 6000.0.37f1 r23b (23.1.7779620) 2022.3 LTS r23b (23.1.7779620) 2021.3 LTS r21d (21.3.6528147)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a417a82c383
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.damping`.
ParticleSystem.NoiseModule.damping public bool damping ; Description Higher frequency noise reduces the strength by a proportional amount, if enabled. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSy...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa6f2e4d57c8
unity_docs
physics
What is `ConfigurableJoint.angularXDrive` in Unity? Explain its purpose and usage.
ConfigurableJoint.angularXDrive public JointDrive angularXDrive ; Description Definition of how the joint's rotation will behave around its local X axis. Only used if Rotation Drive Mode is Swing & Twist.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2bf0b971e60
unity_docs
scripting
What is `Compilation.CompilationPipeline.GetPrecompiledAssemblyNames` in Unity? Explain its purpose and usage.
CompilationPipeline.GetPrecompiledAssemblyNames Declaration public static string[] GetPrecompiledAssemblyNames (); Returns string[] Precompiled assembly names. Description Get all precompiled assembly names.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_503fd69ed28a
unity_docs
scripting
In Unity's 'BindableElement', what is 'Create a BindableElement' and how does it work?
You can create a BindableElement with UXML or C#. The following C# example creates a BindableElement: ``` var bindableElement = new BindableElement(); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4fb42dabb53
unity_docs
editor
What is `EditorUtility.IsPersistent` in Unity? Explain its purpose and usage.
EditorUtility.IsPersistent Declaration public static bool IsPersistent ( Object target ); Description Determines if an object is stored on disk. Typically assets like Prefabs, textures, audio clips, animation clips, materials are stored on disk. Returns false if the object lives in the Scene. Typically this i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1686493ceee8
github
scripting
Write a Unity Editor script for TTS Wit Inspector
```csharp /* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ using System.Linq; using System.Collections.Generic; using UnityEditor; using UnityEngine; using M...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_1ecd653e1b06
unity_docs
scripting
What is `PlayerSettings.iOS.SetiPadLaunchScreenType` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.SetiPadLaunchScreenType Declaration public static void SetiPadLaunchScreenType ( iOSLaunchScreenType type ); Description Sets the mode which will be used to generate the app's launch screen Interface Builder (.xib) file for iPad. The launch screen image defaults to an default colored image...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_981782d15bef
unity_docs
scripting
What is `Playables.PlayableBinding.sourceObject` in Unity? Explain its purpose and usage.
PlayableBinding.sourceObject public Object sourceObject ; Description A reference to a UnityEngine.Object that acts a key for this binding. In Timeline, the track for this binding is assigned.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9fe643fcc5b
unity_docs
input
Show me a Unity C# example demonstrating `KeyCode`.
ys" is enabled in Input Manager settings , these map directly to a physical key on the keyboard. If "Use Physical Keys" is disabled these map to language dependent mapping, different for every platform and cannot be guaranteed to work. "Use Physical Keys" is enabled by default from 2022.1 Key codes can be used to det...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8a7251b0bd3
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.loop`.
AudioSource.loop public bool loop ; Description Checks if the audio clip is looping Return or set whether the audio clip replays after it finishes playing. Disable looping on a playing AudioSource to stop the sound after the end of the current loop. Use the checkbox in the AudioSource component to enable or di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e3fe0f5bf4f
unity_docs
rendering
What is `QualitySettings.streamingMipmapsRenderersPerFrame` in Unity? Explain its purpose and usage.
QualitySettings.streamingMipmapsRenderersPerFrame public static int streamingMipmapsRenderersPerFrame ; Description The number of renderer instances that are processed each frame when calculating which texture mipmap levels should be streamed. If the number of renderers exceeds this limit, the mipmap levels of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ccc32688d1a
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.RotationBySpeedModule.z`.
ParticleSystem.RotationBySpeedModule.z public ParticleSystem.MinMaxCurve z ; Description Rotation by speed curve for the z-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a429a66a264
unity_docs
rendering
What is `CanvasRenderer.clippingSoftness` in Unity? Explain its purpose and usage.
CanvasRenderer.clippingSoftness public Vector2 clippingSoftness ; Description The clipping softness to apply to the renderer. Clipping softness is a linear alpha fade of clippingSoftness pixels. It gets passed to the shader through the _MaskSoftnessX and _MaskSoftnessY properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4674299d0ff3
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsBPTCFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsBPTCFormat Declaration public static bool IsBPTCFormat ( Experimental.Rendering.GraphicsFormat format ); Declaration public static bool IsBPTCFormat ( TextureFormat format ); Description Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a15885d23f8f
unity_docs
rendering
What is `Texture3D.UpdateExternalTexture` in Unity? Explain its purpose and usage.
Texture3D.UpdateExternalTexture Declaration public void UpdateExternalTexture (IntPtr nativeTex ); Parameters Parameter Description nativeTex Native 3D texture object. Description Updates Unity texture to use different native texture object. This function is mostly useful for native code plugins that c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7cf820dd417
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchExpressionContext.args`.
SearchExpressionContext.args public SearchExpression[] args ; Description Arguments of passed to the SearchExpression being evaluated. ```csharp [SearchExpressionEvaluator(SearchExpressionType.Iterable | SearchExpressionType.Variadic)] [SearchExpressionEvaluatorSignatureOverload(SearchExpressionType.Number, S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87192a5e418b
unity_docs
physics
What is `ParticleCollisionEvent.intersection` in Unity? Explain its purpose and usage.
ParticleCollisionEvent.intersection public Vector3 intersection ; Description Intersection point of the collision in world coordinates. The intersection point is reported in world coordinates regardless of whether the Particle System is simulated in local coordinates.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_553a2c67e23c
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoPlayer.Play`.
ake playback instant, use VideoPlayer.Prepare and wait for preparation to finish (when VideoPlayer.prepareCompleted fires), before you use this method. If you use VideoPlayer.Prepare and then play the video before preparation finishes, the VideoPlayer will finish preparation and then play the video. Additional r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dab948a8a0d
unity_docs
scripting
Give me an overview of the `ModelImporterNormalSmoothingSource` class in Unity.
ModelImporterNormalSmoothingSource enumeration Description Source of smoothing information for calculation of normals in ModelImporter . Describes how Unity calculates whether edges have hard or smooth normals (from smoothing groups or the angle between faces). By default, Unity uses smoothing groups if they are ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a74dcac3519b
unity_docs
scripting
What is `UIElements.StyleBackground` in Unity? Explain its purpose and usage.
StyleBackground struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IStyleValue<T0> Description Style value that can be either a Background or a StyleKeyword . Properties Property Description keyword The style keyword. value The Background valu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1acf1b8c2e60
unity_docs
physics
What is `Collider2D.GetShapeHash` in Unity? Explain its purpose and usage.
Collider2D.GetShapeHash Declaration public uint GetShapeHash (); Returns uint A hash value that uniquely identifies the configured geometry of the Collider2D . Description Generates a simple hash value based upon the geometry of the Collider2D . The geometry of a Collider2D can be configured by variou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1d077c14e2f
unity_docs
rendering
What is `RenderTextureFormat.RGFloat` in Unity? Explain its purpose and usage.
RenderTextureFormat.RGFloat Description Two color (RG) render texture format, 32 bit floating point per channel. Note that not all graphics cards support floating point render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.Suppor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7519bce7bcfd
unity_docs
scripting
What is `XR.MeshTransform` in Unity? Explain its purpose and usage.
MeshTransform struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description Contains transform information related to a tracked mesh. This struct is used by the XRMeshSubsystem to communication information about a mesh's transform. Additional resources: XRMeshSubsystem.GetUpdatedMeshTransform...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8af84de411f
unity_docs
scripting
What is `Android.AndroidProjectFilesModifierContext.Dependencies` in Unity? Explain its purpose and usage.
AndroidProjectFilesModifierContext.Dependencies public Android.AndroidProjectFilesModifierContext.AdditionalDependencies Dependencies ; Description Represents a container that you can use to specify additional dependencies for the AndroidProjectFilesModifier process depends.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cd9486a2511
unity_docs
xr
What is `Screen.SetResolution` in Unity? Explain its purpose and usage.
Screen.SetResolution Declaration public static void SetResolution (int width , int height , bool fullscreen ); Declaration public static void SetResolution (int width , int height , FullScreenMode fullscreenMode ); Declaration public static void SetResolution (int width , int height , FullScreenMo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_308dc17c99c8_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Runtime rotation control for the GaussianSplat GameObject.Attach this to the same GameObject that has GaussianSplatRenderer.Desktop controls: Q / E → rotate around Y axisLegacy desktop controls are still available: Arrow Left / Right → rotate around Y axis Arrow Up / Down → rotate around X axis...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_392784645c5d
unity_docs
scripting
What is `IMGUI.Controls.TreeView.HandleDragAndDrop` in Unity? Explain its purpose and usage.
TreeView.HandleDragAndDrop Declaration protected DragAndDropVisualMode HandleDragAndDrop ( IMGUI.Controls.TreeView.DragAndDropArgs args ); Parameters Parameter Description args Drag and drop arguments. Description Override this function to control the drag and drop behavior of the TreeView. This functi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47f486fa521e
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.AddForce`.
Force can only be applied to an active Rigidbody. If a GameObject is inactive, AddForce has no effect. Also, the Rigidbody cannot be kinematic. By default the Rigidbody's state is set to awake once a force is applied, unless the force is Vector3.zero . Additional resources: AddForceAtPosition , AddRelativeForce , A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c3abf6db3d44
unity_docs
scripting
In Unity's 'Configurations for embedded platforms', what is 'Verified configurations with Basic Embedded Support plan' and how does it work?
Verified embedded platform configurations are continuously tested and confirmed to run Unity, using a publicly available board support package (BSP) provided by the chipset or OS vendor. These are the only configurations supported through the Basic Embedded Support plan . Vendor Model Verified OS/BSP NVIDIA Jetson TX2 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca17fe783bb4
unity_docs
scripting
What is `SpaceAttribute` in Unity? Explain its purpose and usage.
SpaceAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Use this PropertyAttribute to add some spacing in the Inspector. The spacing is done using a DecoratorDrawer . ```csharp using UnityEngine;public class Example : MonoBehaviour { int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.