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_663bbbe9ab2b
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.GetBlockSize` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.GetBlockSize Declaration public static uint GetBlockSize ( Experimental.Rendering.GraphicsFormat format ); Declaration public static uint GetBlockSize ( TextureFormat format ); Description Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a27ce92aecb4
unity_docs
ui
In Unity's 'Replace deprecated browser interaction code', what is 'Calling a function with no arguments' and how does it work?
When migrating a dynCall that has no arguments, you must add empty parentheses () after the makeDynCall template to invoke the function. For example, change:` ``` dynCall('v', callback, []); ``` to: ``` {{{ makeDynCall('v', 'callback') }}}() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7aab7a5712ef
unity_docs
physics
Give me an overview of the `FixedJoint` class in Unity.
FixedJoint class in UnityEngine / Inherits from: Joint / Implemented in: UnityEngine.PhysicsModule Description The Fixed joint groups together 2 rigidbodies, making them stick together in their bound position. Additional resources: CharacterJoint , HingeJoint , SpringJoint , ConfigurableJoint . Inherite...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c07267974b1e
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchProvider.fetchColumns`.
SearchProvider.fetchColumns public Func<SearchContext,IEnumerable<SearchItem>,IEnumerable<SearchColumn>> fetchColumns ; Description Handler used to enumerate search columns to be used in the Search Table view. See SearchColumnProviderAttribute if you need to define new column formats to display your custom va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_96ea25cd37f4
unity_docs
scripting
In Unity's 'Use Vector API to create a radial progress indicator', what is 'Create the radial progress control and its custom mesh' and how does it work?
Create a C# script to define a RadialProgress visual element and a C# script to define the custom mesh . Style the visual element with a USS file. Create a Unity project with any template. Create a folder named radial-progress to store your files. In the radial-progress folder, create a C# script named RadialProgress.c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c8be2ae95c4
unity_docs
rendering
Show me a Unity code example for 'Code examples: Call JavaScript and C/C++/C# functions in Unity'.
You can use code to perform interactions between plug-ins and your Unity code. The following examples show how to call various types of functions from JavaScript and C/C++/C# code in your Unity project. ## Call JavaScript code in Unity C# example The following code is an example of JavaScript code that your Unity C# ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c8b27fa9d2ec
github
scripting
Write a Unity C# XR/VR script for Handtracking Sample Manager
```csharp /** * @file HandtrackingSampleManager.cs * * @author Geoffrey Marhuenda * * @brief Manage handtracking sample features. */ using UnityEngine; namespace Lynx { public class HandtrackingSampleManager : MonoBehaviour { public void ToggleARVR() { LynxAPI.ToggleAR(); ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_740e810ca221
unity_docs
scripting
What is `LegDof` in Unity? Explain its purpose and usage.
LegDof enumeration Description Enumeration of all the muscles in a leg. These muscles are a sub-part of a human part. Additional resources: HumanPartDof . Properties Property Description UpperLegFrontBack The upper leg front-back muscle. UpperLegInOut The upper leg in-out muscle. UpperLegRollInOut The upper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9b41811ad4e2
unity_docs
physics
In Unity's 'Collider types and performance', what is 'Compound colliders' and how does it work?
Compound colliders are formed by parenting multiple primitive colliders, such as Sphere, Box, and Capsule colliders, to a single GameObject with a Rigidbody component. You can use compound colliders, which are comprised of simple components, to approximate complex shapes. Compound colliders are generally more efficient...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2c99b972d2cc_doc_2
github
scripting
What does `SearchEditorPrefLocation` do in this Unity script? Explain its purpose and signature.
Used if default install directory is not used Signature: ```csharp public static string SearchEditorPrefLocation() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_73707ee8219f
unity_docs
scripting
What is `Transform.RotateAround` in Unity? Explain its purpose and usage.
Transform.RotateAround Declaration public void RotateAround ( Vector3 point , Vector3 axis , float angle ); Description Rotates the transform about axis passing through point in world coordinates by angle degrees. This modifies both the position and the rotation of the transform. ```csharp using U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_482842911ddb
unity_docs
scripting
Explain 'Apply forces to particles' in Unity.
The Particle System Force Field component applies forces to particles in Particle Systems . To attach this component to a Particle System, enable the External Forces Module in the Particle System, and assign either a Layer Mask , or the specific Force Field component. Use the Particle System Force Field component to ap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5e536183d56
unity_docs
physics
What is `Rigidbody2D.useAutoMass` in Unity? Explain its purpose and usage.
Rigidbody2D.useAutoMass public bool useAutoMass ; Description Should the total rigid-body mass be automatically calculated from the [[ Collider2D.density ]] of attached colliders? When false, the explicitly set mass is used for the rigid-body mass. When true, the mass is automatically calculated from all at...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c86c6786b879
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.ReadCommand` in Unity? Explain its purpose and usage.
ReadCommand struct in Unity.IO.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Describes the offset, size, and destination buffer of a single read operation. If the asynchronous file read request results in a ReadStatus.Truncated or ReadStatus.Failed state the Size field will be updat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fe9e47d7b7a
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startRotationZ`.
ParticleSystem.MainModule.startRotationZ public ParticleSystem.MinMaxCurve startRotationZ ; Description The initial rotation of particles around the z-axis when the Particle System first spawns them Note that you should specify the value in radians.. Additional resources: MinMaxCurve . ```csharp using Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52e82d0f59bf
unity_docs
editor
Give me an overview of the `EnterPlayModeOptions` class in Unity.
EnterPlayModeOptions enumeration Description Determines the flags for the Enter Play Mode Options in the Unity Editor. Properties Property Description None This makes Unity reload the .NET Application Domain and entire Scene when entering Play Mode. DisableDomainReload When Domain Reload is disabled, scripts a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bd53eeac69a
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.Angle`.
between the two vectors. Description Calculates the angle between two vectors. The angle returned is the angle of rotation from the first vector to the second, when treating these two vector inputs as directions. Note: The angle returned will always be between 0 and 180 degrees, because the method returns the sma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cae738b81843
unity_docs
scripting
Explain 'State Machine Behaviours' in Unity.
A State Machine Behaviour is a special class of script. In a similar way to attaching regular Unity scripts (MonoBehaviours) to individual GameObjects , you can attach a StateMachineBehaviour script to an individual state within a state machine. This allows you to write code that will execute when the state machine ent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_32b627788483
unity_docs
editor
In Unity's 'Creating assembly assets', what is 'Create an Assembly Definition Reference' and how does it work?
To create an Assembly Definition Reference: In the Project window, locate the folder containing the scripts you want to include in the referenced assembly. Create an Assembly Reference in the folder (menu: Assets > Create > Scripting > Assembly Definition Reference ). Assign a name to the asset. Unity recompiles the sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2554cfc03095
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.CeilToInt`.
Mathf.CeilToInt Declaration public static int CeilToInt (float f ); Description Returns the smallest integer greater to or equal to f . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Start() { // Prints 10 Debug.Log(Mathf.CeilToInt(10.0f)); // Prin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a41099df85b
unity_docs
scripting
What is `Build.Content.BuildUsageTagGlobal.operator_bitwiseor` in Unity? Explain its purpose and usage.
BuildUsageTagGlobal.operator |= public static Build.Content.BuildUsageTagGlobal operator |= ( Build.Content.BuildUsageTagGlobal x , Build.Content.BuildUsageTagGlobal y ); Description Combines the usage data from another BuildUsageTagGlobal with this BuildUsageTagGlobal. Internal use only. See BuildUsage...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a6533fd8b33
unity_docs
editor
What is `AssetPostprocessor.OnPostprocessSpeedTree` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPostprocessSpeedTree(GameObject) Description Add this function to a subclass to get a notification when a SpeedTree asset has completed importing. This function behaves much like OnPostprocessModel where modifications are allowed on the final imported Prefab before being saved on the disk.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4fc9e791a87
unity_docs
rendering
What is `Experimental.Rendering.RayTracingMode.DynamicGeometry` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RayTracingMode.DynamicGeometry Description Renderers with this mode have animated geometry and update their Mesh and Transform.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe139d1a0297
unity_docs
scripting
In Unity's 'Serialization best practices', what is 'Finalizers' and how does it work?
Don’t initiate serialization from finalizer methods. Finalizers don’t run on the main thread. The garbage collector determines when they run and in some circumstances they might not run at all. Attempting to serialize data from a finalizer can lead to unexpected behavior and crashes. For more information, refer to the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Get the asset. If the asset is not loaded, it will be loaded automatically. Signature: ```csharp public T Value ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_b0b42d2b31a9
unity_docs
scripting
What is `Video.VideoPlayer.errorReceived` in Unity? Explain its purpose and usage.
VideoPlayer.errorReceived Parameters Parameter Description value The error message (string) the VideoPlayer reports. Description The VideoPlayer uses this callback to report various types of errors. The types of errors the VideoPlayer reports include: HTTP connection problems. Issues finding the file. Unsu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85a05fce81f7
unity_docs
scripting
Show me a Unity C# example demonstrating `Assertions.Assert.IsTrue`.
Assert.IsTrue Declaration public static void IsTrue (bool condition ); Declaration public static void IsTrue (bool condition , string message ); Parameters Parameter Description message The string used to describe the Assert . condition true or false . Description Asserts that the condition is t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_79fa6bfd2a43
github
scripting
Write a Unity C# script called Yield Instruction Cache
```csharp using UnityEngine; namespace UniRx { internal static class YieldInstructionCache { public static readonly WaitForEndOfFrame WaitForEndOfFrame = new WaitForEndOfFrame(); public static readonly WaitForFixedUpdate WaitForFixedUpdate = new WaitForFixedUpdate(); } } ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_e3a5889eba1d
unity_docs
scripting
What is `Time.timeSinceLevelLoadAsDouble` in Unity? Explain its purpose and usage.
Time.timeSinceLevelLoadAsDouble public static double timeSinceLevelLoadAsDouble ; Description The double precision time in seconds since the last non-additive scene finished loading (Read Only). Double precision version of timeSinceLevelLoad . This offers more precision than a float or single value, particular...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0e014e688841
unity_docs
rendering
Explain 'Optimize Enlighten Realtime Global Illumination' in Unity.
Enlighten Realtime Global Illumination uses a set of lightmaps to store real-time indirect bounces. For this reason, enabling it increases memory requirements, even if you are using it along with Baked Global Illumination. The number of shader calculations needed to generate lighting also increases when you use Enlight...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fda5d3f0f38b
unity_docs
editor
In Unity's 'Log files reference', what is 'Linux' and how does it work?
Log type Log location Editor ~/.config/unity3d/Editor.log Package manager ~/.config/unity3d/upm.log Licensing client ~/.config/unity3d/Unity/Unity.Licensing.Client.log Licensing audits ~/.config/unity3d/Unity/Unity.Entitlements.Audit.log
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_309d0293db7d
unity_docs
physics
What is `Physics.defaultMaxDepenetrationVelocity` in Unity? Explain its purpose and usage.
Physics.defaultMaxDepenetrationVelocity public static float defaultMaxDepenetrationVelocity ; Description The maximum default velocity needed to move a Rigidbody's collider out of another collider's surface penetration. Must be positive. This value is usually changed in Edit->Project Settings->Physics->Setting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd5edce7a3ff
unity_docs
scripting
Give me an overview of the `ObjectMatchMode` class in Unity.
ObjectMatchMode enumeration Description Enum for controlling how e.g. GameObjects and Components are matched. Additional resources: PrefabUtility.ConvertToPrefabInstance , PrefabUtility.ReplacePrefabAssetOfPrefabInstance . Properties Property Description NoMatchingPerformed Disable matching of objects. ByNa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e2dbabac00b
unity_docs
physics
What is `PhysicsVisualizationSettings.GetShowCollisionLayer` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.GetShowCollisionLayer Declaration public static bool GetShowCollisionLayer (int layer ); Description Should the given layer be considered by the display filter. Layers .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d48ab168c36
unity_docs
rendering
In Unity's 'Manage search queries', what is 'Save searches' and how does it work?
Saving searches allows you to keep useful searches to reuse as needed. Save the search to your personal Unity for your own use (User), or to project to save it as an Asset to make the search available to anyone working on the project. To save a search to your personal version of Unity: Create your search. Click the dro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96a264ccc9e5
unity_docs
input
What is `XR.InputDevice.SendHapticBuffer` in Unity? Explain its purpose and usage.
InputDevice.SendHapticBuffer Declaration public bool SendHapticBuffer (uint channel , byte[] buffer ); Parameters Parameter Description channel The channel to receive the data. buffer A raw byte buffer that contains the haptic data to send to the device. Returns bool Returns true if successful. Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e227b6b28a5d
unity_docs
physics
What is `PlatformEffector2D.surfaceArc` in Unity? Explain its purpose and usage.
PlatformEffector2D.surfaceArc public float surfaceArc ; Description The angle of an arc that defines the surface of the platform centered of the local 'up' of the effector. Any collision normal with an angle within this arc is never considered for one-way whereas everything outside this arc is considered for on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57f689c91026
unity_docs
editor
Explain 'Player Accounts Building Block' in Unity.
Use the Player Accounts Unity Building Block to add sign-in functionality to your project, for example, to track and preserve users’ progress in your application. To learn more about PLayer Accounts, refer to the Player Accounts documentation. This Building Block includes a test scene that demonstrates the player authe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ad9d36914368
unity_docs
rendering
Explain 'Control scaling with Dynamic Resolution' in Unity.
You can control the scale through the ScalableBufferManager . The ScalableBufferManager gives you control of the dynamic width and height scale for all render targets you have marked for the dynamic resolution system to scale. As an example, assume your application is running at a desirable frame rate, but under some c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8fc4dd9fd06
unity_docs
rendering
What is `Canvas.sortingOrder` in Unity? Explain its purpose and usage.
Canvas.sortingOrder public int sortingOrder ; Description Canvas' order within a sorting layer. When comparing canvases in the same sorting layer, the one with a higher sorting order is displayed above the one with a lower sorting order. Note : Internally the value is stored as a signed 16-bit integer (short) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61266c9ad787
unity_docs
rendering
What is `RenderTexture.SetGlobalShaderProperty` in Unity? Explain its purpose and usage.
RenderTexture.SetGlobalShaderProperty Declaration public void SetGlobalShaderProperty (string propertyName ); Description Assigns this RenderTexture as a global shader property named propertyName .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_835b7d2cd2b8
unity_docs
scripting
Show me a Unity code example for 'Awaitable code example reference'.
The examples in this reference demonstrate Awaitable solutions to common scenarios encountered when writing asynchronous code. ## Asynchronous tests Unity’s Test Framework doesn’t recognize Awaitable as a valid test return type. However, the following example shows how you can use the Awaitable implementation of IEnu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48d661c5edfc
unity_docs
rendering
What is `LightingSettings.lightmapResolution` in Unity? Explain its purpose and usage.
LightingSettings.lightmapResolution public float lightmapResolution ; Description Defines the number of texels to use per world unit when generating lightmaps. The minimum value is 0.0001. The default value is 40. Increasing this value can improve the quality of baked lighting, but also increases the time it t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e2b1bd8bb4c3
unity_docs
ui
In Unity's 'Change events', what is 'ChangeEvent' and how does it work?
ChangeEvent is a notification event that allows you to react to the value change of a visual element. For example, when you toggle a checkbox to mute music in a game, the game should stop all music. This event applies to all controls that implement the INotifyValueChanged<T> , where <T> is the type of the ChangeEvent ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d167e5edb68
unity_docs
physics
What is `Collider2D.Distance` in Unity? Explain its purpose and usage.
Collider2D.Distance Declaration public ColliderDistance2D Distance ( Collider2D collider ); Parameters Parameter Description collider A collider used to calculate the minimum separation against this collider. Returns ColliderDistance2D The minimum separation of collider and this collider. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69a1d53e8f29
unity_docs
math
What is `Handles.Button` in Unity? Explain its purpose and usage.
Handles.Button Declaration public static bool Button ( Vector3 position , Quaternion direction , float size , float pickSize , Handles.CapFunction capFunction ); Parameters Parameter Description position The position to draw the button in the space of Handles.matrix . direction The rotation of th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8afc562c095c
unity_docs
rendering
What are the parameters of `AssetDatabase.IsSubAsset` in Unity?
Returns bool True if the asset is part of another asset, otherwise false. Description Checks whether the asset is part of another asset. Some assets may form part of another asset (for example, a procedural material can be part of a material package). This method determines whether an asset is subordinated in this way....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f455d8dec472
unity_docs
rendering
Give me an overview of the `ShadowObjectsFilter` class in Unity.
ShadowObjectsFilter enumeration Description The filters that Unity can use when it renders GameObjects in the shadow pass. Properties Property Description AllObjects Renders all GameObjects. DynamicOnly Only renders GameObjects that do not include the Static Shadow Caster tag. StaticOnly Only renders GameObje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d2a3d831d30
unity_docs
rendering
Show me a Unity C# example demonstrating `Video.VideoRenderMode`.
VideoRenderMode enumeration Description Type of destination for the images read by a VideoPlayer. Set this enumeration to determine where and how the VideoPlayer renders the images of a video clip. ```csharp // This script switches between the render modes when you press the Spacebar. // To set up your project f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_653ba6219b77
unity_docs
scripting
What is `TextMesh.fontSize` in Unity? Explain its purpose and usage.
TextMesh.fontSize public int fontSize ; Description The font size to use (for dynamic fonts). If this is set to a non-zero value, the font size specified in the font importer is overriden with a custom size. This is only supported for fonts set to use dynamic font rendering. Other fonts will always use the def...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6839741cf41e
unity_docs
scripting
What is `Progress.Item.totalSteps` in Unity? Explain its purpose and usage.
Progress.Item.totalSteps public int totalSteps ; Description Returns the total number of steps, from start to finish, for this progress indicator. Returns -1 if this indicator does not report progress in steps. To set the type of steps that the progress window displays, use Progress.Item.SetStepLabel . Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f78c1c8d442
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.WriteToFile` in Unity?
Description Writes the project contents to the specified file. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_WriteToFile { [PostProcessBuild] public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2b733c78831e
unity_docs
performance
Explain 'CPU Usage Profiler module' in Unity.
Use the CPU Usage Profiler module to investigate the performance of your application. Topic Description CPU Usage Profiler module introduction Investigate the CPU performance of your application and identify performance bottlenecks. Navigating the CPU Usage Profiler module Navigate the CPU Usage Profiler module to inve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_83934ec234ea
unity_docs
physics
In Unity's 'Distribution size and code stripping', what is 'Issues with code stripping' and how does it work?
Code stripping might cause issues with your project if it strips code which is actually necessary. This can be the case when you load AssetBundles at run time which contain classes that are not included in the main build, and have therefore been stripped from the project. Error messages appear in your browser’s JavaScr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69b202ba14ea
unity_docs
animation
What is `Animations.AnimationScriptPlayable` in Unity? Explain its purpose and usage.
AnimationScriptPlayable struct in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Implements interfaces: IAnimationJobPlayable , IPlayable Description A Playable that can run a custom, multi-threaded animation job. This playable allows to create a custom C# job that will give read and w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90ce58d7b381
unity_docs
rendering
What is `ObjectChangeKind.ChangeAssetObjectProperties` in Unity? Explain its purpose and usage.
ObjectChangeKind.ChangeAssetObjectProperties Description A change of this type indicates that a property of an asset object in memory has changed. This happens for example when Undo.RecordObject is used with an instance of an asset (e.g. Texture ). Note that this only covers changes to asset objects in memory and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e9fb16f31d0a
unity_docs
editor
Explain 'Create and manage overlay configurations' in Unity.
Save overlay configurations as presets that you can reuse and share. ## Save an overlay configuration Saved overlay presets are available in any Unity project on your computer. Overlay configurations are also saved when you save your Editor layout . To save your overlay configuration as a preset: In the Scene view, p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f51f8328b587
unity_docs
audio
Explain 'Find packages and feature sets' in Unity.
The Package Manager window provides several ways to help you find a specific package or feature set : Window control Description Navigation panel (A) Choose a context from the navigation panel to determine which list of packages display. The context might be the source of the package, such as a registry server, the Ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c9dea3c526a
unity_docs
scripting
What is `UIElements.MultiColumnTreeView.ctor` in Unity? Explain its purpose and usage.
MultiColumnTreeView Constructor Declaration public MultiColumnTreeView (); Description Initializes a MultiColumnTreeView with an empty header. Declaration public MultiColumnTreeView ( UIElements.Columns columns ); Parameters Parameter Description columns Column definitions used to initialize the he...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_abb2ba3a7db9
unity_docs
scripting
Show me a Unity code example for 'Inspecting scripts'.
s properties and values in the Inspector window The example code below declares a public field called myName . When you add this script to a GameObject in your scene , the field becomes visible in the Inspector window as a field labelled My Name . The default value of none declared in the script becomes the default val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_924b9d0c143a
unity_docs
math
What is `AndroidJNI.SetIntArrayElement` in Unity? Explain its purpose and usage.
AndroidJNI.SetIntArrayElement Declaration public static void SetIntArrayElement (IntPtr array , int index , int val ); Description Sets the int value of one element in a primitive array. This function is a special case of SetIntArrayRegion(), called with region size set to 1. Additional resources: Java Nati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a1b59ca5901b
unity_docs
ui
In Unity's 'Extending IMGUI', what is 'Static Compound Controls' and how does it work?
By using Static functions, you can create an entire collection of your own Compound Controls that are self-contained. This way, you do not have to declare your function in the same script you want to use it. ```csharp // This script is called CompoundControls using UnityEngine; using System.Collections; public class C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_864180015cf2
unity_docs
rendering
What is `TextureImporterSettings.textureShape` in Unity? Explain its purpose and usage.
TextureImporterSettings.textureShape public TextureImporterShape textureShape ; Description The shape of the imported texture. The default value is Texture2D . The texture can also be imported as a Cubemap , Texture2DArray or a Texture3D . Additional resources: TextureImporterShape , Texture Assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e444954d15c
unity_docs
editor
Show me a Unity C# example demonstrating `Editor.hasUnsavedChanges`.
, and override the EditorWindow.SaveChanges and/or EditorWindow.DiscardChanges methods. When hasUnsavedChanges is enabled, the title bar and docked tabs update to indicate that the user needs to save their work. If the user closes the InspectorWindow, change selection or enters playmode without saving, a message b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bb45740b967
unity_docs
physics
What is `ParticleSystemForceField.length` in Unity? Explain its purpose and usage.
ParticleSystemForceField.length public float length ; Description Describes the length of the Cylinder when using the Cylinder Force Field shape to influence particles. Additional resources: ParticleSystemForceField .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d580c03076b5_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Get the Horizon OS version number on the headset Signature: ```csharp public static int? HorizonOSVersion ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_65c66351df74
github
scripting
Write a Unity C# script called HTTP Get Request
```csharp using System; using System.Net.Http; using System.Threading.Tasks; using UnityEngine; namespace Solid.Examples { public class HTTPGetRequest: HttpRequest { protected override async void OnStart() { var response = await Get(); Result = response; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_5d18facc275b
unity_docs
scripting
Explain 'Editor' in Unity.
Use the Editor settings to apply global settings for working in the Unity Editor. To access the Editor settings, go to Edit > Project Settings then select the Editor category. ## Unity Remote Unity Remote is deprecated. For most use cases, Device Simulator package replaces Unity Remote. Property Description Device Ch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e50d3a7f015
unity_docs
math
What is `AndroidJNI.ToFloatArray` in Unity? Explain its purpose and usage.
AndroidJNI.ToFloatArray Declaration public static IntPtr ToFloatArray (float[] array ); Description Converts a managed array of System.Single to a Java array of float . Additional resources: AndroidJNI.NewFloatArray , AndroidJNI.SetFloatArrayElement .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5988ddc4dfde
unity_docs
rendering
What is `Rendering.RenderBufferLoadAction` in Unity? Explain its purpose and usage.
RenderBufferLoadAction enumeration Description This enum describes what should be done on the render target when it is activated (loaded). When the GPU starts rendering into a render target, this setting specifies the action that should be performed on the existing contents of the surface. Tile-based GPUs may get ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0c54e7bba327
unity_docs
ui
Explain 'ListView' in Unity.
A ListView is a vertically scrollable area that links to and displays a list of items. Note : The horizontal and vertical Scroller elements are standard UI Toolkit Scrollers. ## Create a ListView You can create a ListView with UI Builder, UXML, and C#. The following C# example creates a ListView: ``` var listView = n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d4cef403bfbb
unity_docs
rendering
In Unity's 'IL2CPP managed stack traces', what is 'Script debugging' and how does it work?
To enable Script Debugging , go to File > Build Profiles and then enable the Script Debugging checkbox. When script debugging is enabled, IL2CPP reports the correct managed stack trace with the method, file, and line number. This comes at the expense of a larger program size and decreased performance. Tip : If you only...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12c3b2baab8a
unity_docs
editor
What is `ObjectFactory.CreatePrimitive` in Unity? Explain its purpose and usage.
ObjectFactory.CreatePrimitive Declaration public static GameObject CreatePrimitive ( PrimitiveType type ); Parameters Parameter Description type The type of primitive to create. Description Creates a GameObject primitive with Undo support. The created primitive will have any existing Preset applied to i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c776ab4bee8
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.PlayClipAtPoint`.
ector3 position , float volume = 1.0F); Parameters Parameter Description clip Audio data to play. position Position in world space from which sound originates. volume Playback volume (range from 0.0 - 1.0). Description Plays an AudioClip at a given position in world space. This function creates an aud...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d4af0d2cd92
unity_docs
scripting
What is `Experimental.GraphView.EventPropagation` in Unity? Explain its purpose and usage.
EventPropagation enumeration Description Value that determines if a event handler stops propagation of events or allows it to continue. Properties Property Description Stop Stop event propagation after this handler. Continue Continue event propagation after this handler.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7df84a8f75c
unity_docs
editor
In Unity's 'Tracking garbage collection allocations', what is 'Tracking allocations with the Memory module' and how does it work?
You can use the Memory Profiler module to track garbage collection memory allocations, but it only provides a high-level overview of where Unity allocated memory. For detailed information on memory usage in your application, use the Memory Profiler package . To track garbage collection memory allocations with the Memor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85f2809b2417
unity_docs
math
What is `AndroidJNI.CallObjectMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallObjectMethodUnsafe Declaration public static IntPtr CallObjectMethodUnsafe (IntPtr obj , IntPtr methodID , jvalue* args ); Description Calls a Java instance method defined by methodID , optionally passing an array of arguments ( args ) to the method. This method returns a reference to a java...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ab97cfd4e25
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.ForceReserializeAssets`.
ect. This method allows you to be proactive in a controlled way, deciding exactly which assets you want to upgrade and when. Note: You should only call this method from direct user actions, such as a menu item. You should not call ForceReserializeAssets from a Unity callback (such as OnEnable), because it might be call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9a9acfbe8a2c
unity_docs
scripting
In Unity's 'Use environment variables to identify your web proxy', what is 'Proxy environment variable value for Unity Licensing Server' and how does it work?
If your enterprise uses a Unity Licensing Server, set the NO_PROXY environment variable by assigning the host name or IP address of your licensing server. Make sure you assign only the host name or IP address, omitting any protocol of port number. For example, if your licensing server’s address is http://unitylicense.m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6f03a90227e
unity_docs
math
What is `BoundsInt.SetMinMax` in Unity? Explain its purpose and usage.
BoundsInt.SetMinMax Declaration public void SetMinMax ( Vector3Int minPosition , Vector3Int maxPosition ); Description Sets the bounds to the min and max value of the box. Use this function to set both the minimum and maximum value of the BoundsInt at the same time, faster than setting the values sep...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_988ecf93e98c
unity_docs
rendering
In Unity's 'Sample a texture in HLSL', what is 'Example' and how does it work?
The following example reuses the same sampler for three textures: ``` Shader "Custom/SeparateSamplerExample" { Properties { _MainTex ("Main Texture", 2D) = "white" {} _SecondTex ("Second Texture", 2D) = "white" {} _ThirdTex ("Third Texture", 2D) = "white" {} } SubShader { Pass { HLSLPROGRAM #pragma vertex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d44249a389e6
unity_docs
networking
In Unity's 'Unity Accelerator requirements', what is 'Storage size' and how does it work?
The local host must have enough local storage space to host most of your project’s files. Ideally, the storage space is on a solid-state drive separate from the drive that hosts your operating system. Recommended storage size : The equivalent of one local Library folder for each active development branch on every platf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3f0270b13191
unity_docs
physics
In Unity's 'Cloth', what is 'Properties' and how does it work?
Property Description Stretching Stiffness Stretching stiffness of the cloth. Bending Stiffness Bending stiffness of the cloth. Use Tethers Apply constraints that help to prevent the moving cloth particles from going too far away from the fixed ones. This helps to reduce excess stretchiness. Use Gravity Should gravitati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_055c1360d8e6
unity_docs
rendering
What is `Windows.WebCam.VideoCapture.CreateAsync` in Unity? Explain its purpose and usage.
VideoCapture.CreateAsync Declaration public static void CreateAsync ( Windows.WebCam.VideoCapture.OnVideoCaptureResourceCreatedCallback onCreatedCallback ); Declaration public static void CreateAsync (bool showHolograms , Windows.WebCam.VideoCapture.OnVideoCaptureResourceCreatedCallback onCreatedCallback )...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9be6cea13839
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchExpressionType.Number`.
SearchExpressionType.Number Description Denote a Literal expression of a numerical value. ```csharp [SearchExpressionEvaluator(SearchExpressionType.Iterable | SearchExpressionType.Variadic)] [SearchExpressionEvaluatorSignatureOverload(SearchExpressionType.Number, SearchExpressionType.Iterable | SearchExpressionType...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ae436b3da631
unity_docs
rendering
Show me a Unity code example for 'UI Builder interface overview'.
vas displays a Canvas Size section to change the Canvas size, a Canvas Background section to change the edit-time canvas background, and a Document Settings section for per-document edit-time settings. ## Enable Editor Extension Authoring for UI Documents (UXML) By default, new UI Documents (UXML) created in the UI B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b585a6f3317
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoClip.height`.
VideoClip.height public uint height ; Description The height of the images in the video clip in pixels. (Read Only). You can use this property to help get the dimensions of your video and help display your video properly. Also, you can use it to calculate the image aspect ratio. Additional resources: VideoClip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80c2453d9dfd
unity_docs
rendering
Show me a Unity C# example demonstrating `MonoBehaviour.OnWillRenderObject`.
camera settings here is generally not recommended. If you need to change camera settings before culling, use MonoBehaviour.OnPreCull or MonoBehaviour.OnPreRender instead. Camera.current will be set to the camera that will render the object. Note: OnWillRenderObject has no effect when called from a UI element. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72459270168e
unity_docs
rendering
Give me an overview of the `SpeedTreeImporter` class in Unity.
SpeedTreeImporter class in UnityEditor / Inherits from: AssetImporter Description AssetImporter for importing SpeedTree model assets. Static Properties Property Description windQualityNames Gets an array of name strings for wind quality value. Properties Property Description alphaTestRef Gets and sets a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b1a1a0596e1b
github
scripting
Write a Unity C# XR/VR script for Singleton Persistent
```csharp using UnityEngine; namespace LearnXR.Core { public class SingletonPersistent<T> : MonoBehaviour where T : Component { public static T Instance { get; private set; } public virtual void Awake() { if (Instance == null) { Instance =...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_6675a61665ca
unity_docs
scripting
What is `SystemLanguage.Norwegian` in Unity? Explain its purpose and usage.
SystemLanguage.Norwegian Description Norwegian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Norwegian language if (Application.systemLanguage == SystemLanguage.Norwegian) { //Outputs into console that the system ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1760d1dd91b1
unity_docs
math
Give me an overview of the `TextGenerator` class in Unity.
TextGenerator class in UnityEngine / Implemented in: UnityEngine.TextRenderingModule Description Class that can be used to generate text for rendering. Caches vertices, character info, and line info for memory friendlyness. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79c42fcfbc97
unity_docs
rendering
What is `Renderer.ResetBounds` in Unity? Explain its purpose and usage.
Renderer.ResetBounds Declaration public void ResetBounds (); Description Reset custom world space bounds. After you have set up custom world space bounding volume override with bounds , you can remove it with ResetBounds . This makes the renderer use default world space bounding volume.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2809a52d83e4
unity_docs
networking
Explain 'Matchmaker' in Unity.
com.unity.services.matchmaker ## Description Unity Matchmaker is part of Unity’s growing suite of multiplayer services that are designed to help you create and operate multiplayer games no matter what engine you’re using. ## Released for Unity Package version 1.1.5 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e0519c2aa2b
unity_docs
scripting
What is `Unity.Collections.NativeLeakDetection` in Unity? Explain its purpose and usage.
NativeLeakDetection class in Unity.Collections / Implemented in: UnityEngine.CoreModule Description Contains settings for native leak detection. Static Properties Property Description Mode Set whether native memory leak detection should be enabled or disabled.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e42f073c14f6
unity_docs
scripting
Show me a Unity C# example demonstrating `KeyCode.C`.
KeyCode.C Description 'c' key. ```csharp //Attach this to a GameObject //This script tells when the C arrow key is pressed down and when it is released using UnityEngine;public class Example : MonoBehaviour { void Update() { //Detect when the C arrow key is pressed down if (Input.GetKeyDown(KeyCode.C)) Debug.L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_68e095203601_doc_1
github
scripting
What does `SmoothTo` do in this Unity script? Explain its purpose and signature.
Smooths from source to goal, provided lerptime and a deltaTime.Current value"goal" value which will be lerped toSmoothing/lerp amount. Smoothing of 0 means no smoothing, and max value means no change at all.Delta time. Usually would be set to Time.deltaTimeSmoothed value Signature: ```csharp public static float Smooth...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_f263ad009d8f
unity_docs
physics
In Unity's 'Create custom binding types', what is 'Register and unregister binding objects' and how does it work?
The CustomBinding is like the IBinding interface, which allows you to register multiple binding instances instead of a single one. The CustomBinding is an extensibility entry point and only provides an Update method to update the binding. However, you can implement the following methods to receive a callback when a bin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_20e3990c58ef
unity_docs
physics
Explain 'Introduction to Wheel colliders' in Unity.
To simulate accurate wheel behavior in Unity, you use a Wheel collider for each wheel. Wheel colliders manage wheel rotation and vehicle movement, and also have properties that simulate a suspension system. The Wheel collider component is represented in the API as the WheelCollider class. ## Wheel collider raycast Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91680f9f7c1c
unity_docs
rendering
What is `VideoClipImporter.GetPreviewTexture` in Unity? Explain its purpose and usage.
VideoClipImporter.GetPreviewTexture Declaration public Texture GetPreviewTexture (); Returns Texture Texture containing the current frame. Description Returns a texture with the transcoded clip's current frame. Returns frame 0 when not playing, and frame at current time when playing.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.