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_cf300125a93d
unity_docs
input
Show me a Unity C# example demonstrating `AI.NavMeshAgent.FindClosestEdge`.
e resulting location. Returns bool True if a nearest edge is found. Description Locate the closest NavMesh edge. The returned NavMeshHit object contains the position and details of the nearest point on the nearest edge of the Navmesh. Since an edge typically corresponds to a wall or other large object, this ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_043ba5036d40
unity_docs
physics
What are the parameters of `PhysicsShapeGroup2D.GetShapeVertex` in Unity?
Returns Vector2 Returns the specified shape vertex. Description Gets a single vertex of a shape. The vertex index is zero-based with the shape having a quantity of vertex specified by PhysicsShape2D.vertexCount . NOTE : When accessing multiple vertices, it is more efficient to do one of the following: Get all the shape...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12c06693ffba
unity_docs
rendering
What is `ParticleSystemRenderer.SetMeshWeightings` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.SetMeshWeightings Declaration public void SetMeshWeightings (float[] weightings , int size ); Declaration public void SetMeshWeightings (float[] weightings ); Parameters Parameter Description weightings The array of weights to use. size The number of elements from the weighting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4b3a5491bcd
unity_docs
scripting
What is `DeviceType.Unknown` in Unity? Explain its purpose and usage.
DeviceType.Unknown Description Device type is unknown. You should never see this in practice. ```csharp //Attach this script to a GameObject //This script checks what device type the Application is running on and outputs this to the consoleusing UnityEngine;public class DeviceTypeExample : MonoBehaviour { //This i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b32dcaa84d61
unity_docs
rendering
What is `Unity.Android.Gradle.Manifest.ForegroundServiceType` in Unity? Explain its purpose and usage.
ForegroundServiceType enumeration Description Mirrors the ForegroundServiceType enum. For more information about the attribute, see Android's documentation: ForegroundServiceType attribute Properties Property Description Camera Mirrors android:foregroundServiceType="camera". ConnectedDevice Mirrors andro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_622b2311093b
unity_docs
scripting
What is `Unity.Collections.NativeSlice_1.Stride` in Unity? Explain its purpose and usage.
NativeSlice<T0>.Stride public int Stride ; Description Gets the stride value for the NativeSlice<T0> instance. The stride value allows a NativeSlice to represent non-contiguous memory ranges.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7ffdc280a6e
unity_docs
rendering
What is `RenderingPath` in Unity? Explain its purpose and usage.
RenderingPath enumeration Description Rendering path of a Camera . Properties Property Description UsePlayerSettings Use Player Settings. VertexLit Vertex Lit. Forward Forward Rendering. DeferredShading Deferred Shading.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b7ef64caf838
unity_docs
scripting
In Unity's 'How Unity builds iOS applications', what is 'The build process' and how does it work?
Unity collects project resources, code libraries, and plug-ins from your Unity project and uses them to create a valid Xcode project . Unity updates the Xcode project based on the Unity project’s Player settings and build settings. Depending on whether you use replace or append mode , Unity replaces or preserves previo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33ed6f8fce0b
unity_docs
scripting
What is `Assertions.Comparers.FloatComparer.s_ComparerWithDefaultTolerance` in Unity? Explain its purpose and usage.
FloatComparer.s_ComparerWithDefaultTolerance public static floatComparer s_ComparerWithDefaultTolerance ; Description Default instance of a comparer class with deafult error epsilon and absolute error check.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eda4d07d3a2e
unity_docs
xr
In Unity's 'Create an XR project', what is 'Start from a non-XR project' and how does it work?
You can always convert an existing non-XR project: Use the Unity Hub to open the project. In the Editor, configure the project’s XR plug-ins with the XR Plug-in Management system. Add additional XR packages, such as AR Foundation and the XR Interaction Toolkit , using the Package Manager. Set up an XR scene .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_61d3b575ba55
unity_docs
xr
In Unity's 'Search preferences reference', what is 'General search settings' and how does it work?
Setting Function Track the current selection in the search Enable this setting to execute the SearchProvider.trackSelection callback each time the Search selection changes. The callback pings Assets in the Project window or Hierarchy window, which can slow Search navigation in large Projects. Generate an asset preview ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba2df9d1c448
unity_docs
rendering
What is `WebCamDevice.isAutoFocusPointSupported` in Unity? Explain its purpose and usage.
WebCamDevice.isAutoFocusPointSupported public bool isAutoFocusPointSupported ; Description Returns true if the camera supports automatic focusing on points of interest and false otherwise. Additional resources: WebCamTexture.autoFocusPoint .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2992ebaff2b
unity_docs
math
Show me a Unity C# example demonstrating `AudioListener.GetSpectrumData`.
ject basis. As a result, the output data will initially be empty until the engine processes sufficient audio to populate the buffer. Please note this function isn't suited for critical or chronological, real-time data analysis or processing, or scenarios where you require low latency. Additional resources: AudioListen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cb94ccabe61
unity_docs
scripting
What is `UIElements.UxmlHash128AttributeDescription.TryGetValueFromBag` in Unity? Explain its purpose and usage.
UxmlHash128AttributeDescription.TryGetValueFromBag Declaration public bool TryGetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc , ref Hash128 value ); Parameters Parameter Description bag The bag of attributes. cc The context in which the values are retrieved. value ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d04befb2e8f4
unity_docs
scripting
What is `AndroidJNI.SetStaticShortField` in Unity? Explain its purpose and usage.
AndroidJNI.SetStaticShortField Declaration public static void SetStaticShortField (IntPtr clazz , IntPtr fieldID , short val ); Description Sets the value of a static field in the specified object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d397cb56c21
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.LongestReadTimeMicroseconds` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.LongestReadTimeMicroseconds public float LongestReadTimeMicroseconds ; Description The longest read time (not including time in queue) included in the summary calculation in microseconds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_30cc898c4a1f
unity_docs
input
In Unity's 'FloatField', what is 'Customize the input text selection' and how does it work?
Input text is selectable by default. You can customize the selection behaviors such as selectAllOnMouseUP and selectAllOnFocus . In C#, set them through textSelection : ``` myElement.textSelection.selectAllOnMouseUp = false; myElement.textSelection.selectAllOnFocus = false; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a9b75bc811d
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetAssetPathFromTextMetaFilePath`.
AssetDatabase.GetAssetPathFromTextMetaFilePath Declaration public static string GetAssetPathFromTextMetaFilePath (string path ); Parameters Parameter Description path The .meta file name. Description Gets the path to the asset file associated with a text .meta file. ```csharp using System.IO; using UnityE...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bbe11e4ab8b
unity_docs
scripting
What is `Search.SearchField.name` in Unity? Explain its purpose and usage.
SearchField.name public string name ; Description Field selector name. Compared to label, this field can be decorated with tokens such as # when this field selects a dynamic serialized property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c751650ffcae
unity_docs
scripting
What is `Scripting.RequiredInterfaceAttribute` in Unity? Explain its purpose and usage.
RequiredInterfaceAttribute class in UnityEngine.Scripting / Implemented in: UnityEngine.CoreModule Description When a type is marked, all interface implementations of the specified types will be marked. ```csharp using System; using UnityEngine; using UnityEngine.Scripting;public class NewBehaviourScript : Mono...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3932991844fb
unity_docs
performance
What is `Unity.Profiling.ProfilerRecorder.CurrentValue` in Unity? Explain its purpose and usage.
ProfilerRecorder.CurrentValue public long CurrentValue ; Description Gets current value of the Profiler metric. Use to obtain immediate profiler counter value or marker timing. If the current value is the only data you are interested in, there is no need to start ProfilerRecorder or allocate sample storage. In ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee4ddc705fb5
unity_docs
rendering
What is `Rendering.SortingSettings.ctor` in Unity? Explain its purpose and usage.
SortingSettings Constructor Declaration public SortingSettings ( Camera camera ); Parameters Parameter Description camera The camera's transparency sort mode is used to determine whether to use orthographic or distance based sorting. Description Create a sorting settings struct. Additional resources: Scr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93cc5ed03f7c
unity_docs
rendering
What is `ComputeBufferType.Counter` in Unity? Explain its purpose and usage.
ComputeBufferType.Counter Description ComputeBuffer with a counter. Adds a "counter" to a RWStructuredBuffer and allows using IncrementCounter / DecrementCounter HLSL functions on it. The stride passed when constructing the buffer must match structure size, be a multiple of 4 and less than 2048. See Micros...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6c696e93e39
unity_docs
ui
What is `GUI.ToolbarButtonSize` in Unity? Explain its purpose and usage.
ToolbarButtonSize enumeration Description Determines how toolbar button size is calculated. Properties Property Description Fixed Calculates the button size by dividing the available width by the number of buttons. The minimum size is the maximum content width. FitToContents The width of each toolbar button is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_51abaa700230
unity_docs
scripting
In Unity's 'Preserving code using annotations', what is 'Root annotations' and how does it work?
Root annotations force the Unity linker to treat code elements as roots, which aren’t stripped in the code stripping process. There are two types of root annotations you can use, depending on whether you need to preserve individual types with their constructors or assemblies: Preserve Attribute : Annotates individual t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_998e066251dd
unity_docs
scripting
What is `Unity.IO.Archive.ArchiveFileInterface.MountAsync` in Unity? Explain its purpose and usage.
ArchiveFileInterface.MountAsync Declaration public static Unity.IO.Archive.ArchiveHandle MountAsync ( Unity.Content.ContentNamespace namespaceId , string filePath , string prefix ); Parameters Parameter Description namespaceId ContentNamespace identifier. filePath Path of the archive on disk. prefix ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e422d38ea80
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioClip.loadInBackground`.
perty is useful if you have a lot of files or large files to load. If you load them in a separate thread from the main thread, it can help prevent frame rate drops. You can’t change this property during runtime so if you need to set this property, do one of the following before you enter Play mode: Enable Load In Ba...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5f8735828a24
unity_docs
rendering
Show me a Unity code example for 'Light Probe data format'.
cks . Geomerics’ original approach was based on the notation and reconstruction method from Ramamoorthi/Hanrahan’s paper, An Efficient Representation for Irradiance Environment Maps . The shader code for reconstruction is found in UnityCG.cginc and is using the method from Appendix A10 Shader/CPU code for Irradiance Env...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_afa07019ebf4
unity_docs
rendering
Explain 'Remove SRP Batcher compatibility for GameObjects in URP' in Unity.
In some rare cases, you might want to intentionally make particular GameObjects incompatible with the SRP Batcher. For example, if you want to use GPU instancing , which isn’t compatible with the SRP Batcher. If you want to render many identical meshes with the exact same material, GPU instancing can be more efficient ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5e670cbee12
unity_docs
rendering
What is `SystemInfo.supportsCubemapArrayTextures` in Unity? Explain its purpose and usage.
SystemInfo.supportsCubemapArrayTextures public static bool supportsCubemapArrayTextures ; Description Are Cubemap Array textures supported? (Read Only) Additional resources: CubemapArray class.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae3dfb7b3163
unity_docs
xr
What is `WSA.Tile.Delete` in Unity? Explain its purpose and usage.
Tile.Delete Declaration public void Delete (); Declaration public void Delete ( Vector2 pos ); Declaration public void Delete ( Rect area ); Parameters Parameter Description pos The coordinates for a request to unpin tile. area The area on the screen above which the request to unpin tile will be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50a8372667ea
unity_docs
rendering
What is `AMD.GraphicsDevice` in Unity? Explain its purpose and usage.
GraphicsDevice class in UnityEngine.AMD / Implemented in: UnityEngine.AMDModule Description Provides the main entry point for the AMD Module. Use this to interact with the FSR2 feature. The GraphicsDevice includes an interface for creating and managing feature contexts, handling FSR2 command execution, and pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4896d34e76f6
unity_docs
animation
Give me an overview of the `AnimatorOverrideController` class in Unity.
AnimatorOverrideController class in UnityEngine / Inherits from: RuntimeAnimatorController / Implemented in: UnityEngine.AnimationModule Description Interface to control Animator Override Controller. Animator Override Controller is used to override Animation Clips from a controller to specialize animations fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f3e9e4fbdf0
unity_docs
xr
What is `Unity.CodeEditor.CodeEditor.SetCodeEditor` in Unity? Explain its purpose and usage.
CodeEditor.SetCodeEditor Declaration public void SetCodeEditor (string editorPath ); Parameters Parameter Description path The absolute path to the code editor executable. Unity uses this to open files you request. Description Sets the path to the code editor that Unity uses to open script assets.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e1ed298df80
unity_docs
scripting
What is `UIElements.SearchFieldBase_2.value` in Unity? Explain its purpose and usage.
SearchFieldBase<T0,T1>.value public T value ; Description The object currently being exposed by the field. If the new value is different from the current value, this method notifies registered callbacks with a ChangeEvent_1.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bf5cf5c5d6e1_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Behavior that provides events for when an starts and ends a poke gesture. The gesture isdetected if the index finger is extended and the middle, ring, and little fingers are curled in. Signature: ```csharp public class PokeGestureDetector : MonoBehaviour ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_93d4884d3cb0
unity_docs
editor
Explain 'Implement a custom native container' in Unity.
To implement a custom native container, you must annotate your type with the the NativeContainer attribute. You should also understand how native containers are integrated with the safety system . There are two major elements to implement: Usage tracking: Allows Unity to keep track of scheduled jobs that use a NativeCo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3cf5472b5425
unity_docs
ui
Show me a Unity code example for 'Example native audio plug-ins included in the SDK'.
response. ## Code to analyze plug-in data and GUI performance Both Equalizer and Multiband plug-ins also provide code to overlay the input and output spectra for visualizing the effect of the plug-ins. The GUI code runs at much lower update rate than the audio processing and doesn’t have access to the audio streams. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37c0c941b875
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.LaunchMode` in Unity? Explain its purpose and usage.
LaunchMode enumeration Description Mirrors the LaunchMode enum. For more information about the attribute, see Android's documentation: LaunchMode attribute Properties Property Description Null Attribute is not set and will not appear in the element. Standard Mirrors android:launchMode="standard". Single...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_362a146e2f20
unity_docs
physics
Show me a Unity C# example demonstrating `CollisionDetectionMode`.
CollisionDetectionMode enumeration Description The collision detection mode constants used for Rigidbody.collisionDetectionMode . ```csharp //This script allows you to switch collision detection mode at the press of the space key, and move your GameObject. It also outputs collisions that occur to the console. //A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_897fae08003d
unity_docs
scripting
What is `Search.SearchColumn` in Unity? Explain its purpose and usage.
SearchColumn class in UnityEditor.Search Implements interfaces: ISerializationCallbackReceiver Description Search columns are used to display additional information in the Search Table view. See SearchProvider.fetchColumns and SearchColumnProviderAttribute for some examples. Properties Property Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_13
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Will cause collision geometry to be generated for terrain meshes if true. Signature: ```csharp public bool TerrainCollision ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_2a266d77059b
unity_docs
rendering
What is `Material.shader` in Unity? Explain its purpose and usage.
Material.shader public Shader shader ; Description The shader used by the material. Additional resources: Shader.Find method, Materials , ShaderLab documentation . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Toggle between Diffuse and Transparent/Diffuse shaders // when space...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_462c1321d9c6
unity_docs
rendering
What is `QualitySettings.shadows` in Unity? Explain its purpose and usage.
QualitySettings.shadows public static ShadowQuality shadows ; Description Real-time Shadows type to be used. This determines which type of shadows should be used. The available options are Hard and Soft Shadows, Hard Shadows Only and Disable Shadows. Additional resources: Light.shadows . ```csharp using Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74c92939d7e2
unity_docs
rendering
What is `Display` in Unity? Explain its purpose and usage.
Display class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provides access to a display or screen for rendering operations. Unity supports multi-display rendering on the following platforms: Desktop platforms (Windows, macOS, and Linux) Android (OpenGL ES and Vulkan) iOS Embedded Linu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1724f442d80c_doc_12
github
scripting
What does `ReverseTriangleWinding` do in this Unity script? Explain its purpose and signature.
Flips winding order by swapping indices indexA and indexB.indexA and indexB must be in the range [0, 2] and not equal to each other. Signature: ```csharp public static void ReverseTriangleWinding(GeometryPool pool, int indexA, int indexB) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3cccfeaa735
unity_docs
animation
What is `AnimationUtility.GetKeyBroken` in Unity? Explain its purpose and usage.
AnimationUtility.GetKeyBroken Declaration public static bool GetKeyBroken ( AnimationCurve curve , int index ); Parameters Parameter Description curve Curve to query. index Keyframe index. Returns bool Broken flag at specified index. Description Retrieves the broken tangent flag for a specfic key...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4adda6d10c20
unity_docs
scripting
What is `BillboardAsset.imageCount` in Unity? Explain its purpose and usage.
BillboardAsset.imageCount public int imageCount ; Description Number of pre-rendered images that can be switched when the billboard is viewed from different angles. Additional resources: GetImageTexCoords , SetImageTexCoords .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af41d42c5f19
unity_docs
scripting
What is `Color.operator_subtract` in Unity? Explain its purpose and usage.
Color.operator - public static Color operator - ( Color a , Color b ); Description Subtracts color b from color a . Each component is subtracted separately. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color redColor = Color.magenta - Color.blue; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a066a93ec39
unity_docs
scripting
Show me a Unity C# example demonstrating `Grid.GetCellCenterLocal`.
s. Description Get the logical center coordinate of a grid cell in local space. In a rectangular grid layout, a call to GridLayout.CellToLocal with Vector3Int parameter, returns a Vector3 coordinate that represents the bottom-left of the cell. This is mathematically correct, but when for example instantiatin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4f884d77e269
unity_docs
scripting
In Unity's 'Update a UPM package for the Asset Store', what is 'Validate and update the package' and how does it work?
Edit the package manifest file by updating the version property . The version number of the package must be unique, and the technical naming consistent. Use the Asset Store Validator window in the Asset Store Publishing Tools validate the package. Use the Asset Store Uploader window to upload a new version of the packa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_703ca75914ce
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Lithuanian`.
SystemLanguage.Lithuanian Description Lithuanian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Lithuanian language if (Application.systemLanguage == SystemLanguage.Lithuanian) { //Outputs into console that the sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c4c330fd011
unity_docs
math
What is `Rendering.RayTracingMeshInstanceConfig.frontTriangleCounterClockwise` in Unity? Explain its purpose and usage.
RayTracingMeshInstanceConfig.frontTriangleCounterClockwise public bool frontTriangleCounterClockwise ; Description Whether to flip the way triangles face in this ray tracing instance. If True , front-facing triangles become back-facing, and vice versa.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e6f8a9dd929
unity_docs
rendering
Give me an overview of the `ShadowResolution` class in Unity.
ShadowResolution enumeration Description Default shadow resolution. Each decrease in quality level halves the resolution of shadows. Additional resources: QualitySettings.shadowResolution , Light.shadowResolution , Shadow map size calculation . Properties Property Description Low Low shadow map resolution. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_362d11d0c88d
unity_docs
audio
In Unity's 'Set up your environment for Embedded Linux', what is 'Toolchain packages' and how does it work?
Operating system Package Windows com.unity.toolchain.win-x86_64-embeddedlinux Windows(Arm64) com.unity.toolchain.win-arm64-embeddedlinux macOS com.unity.toolchain.macos-x86_64-embeddedlinux macOS(Arm64) com.unity.toolchain.macos-arm64-embeddedlinux Linux com.unity.toolchain.linux-x86_64-embeddedlinux When you install a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e33a4a1e471a
unity_docs
editor
What is `Search.SearchFlags.WantsMore` in Unity? Explain its purpose and usage.
SearchFlags.WantsMore Description Sets the search to search for all results. This might take longer than unusual if SearchProvider are using multiple sources of items (files on disk, AssetDatabase...) ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; stat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbc76e91486f
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchUtils.CreateGroupProvider`.
ID later. Returns SearchProvider A new search provider that can be used temporarily for a given search session. Description Copy of a search provider to create a new group copy. This can be useful to base a new search provider on an existing one simply by replacing a few handlers. Note that this search provide...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_25649ab7847f
unity_docs
rendering
In Unity's 'Sample a texture in HLSL', what is 'Sample other textures with the same sampler' and how does it work?
To sample a second texture with the sampler from a texture, follow these steps: In the HLSLPROGRAM block, declare the second texture using the UNITY_DECLARE_TEX2D_NOSAMPLER macro. For example: ``` UNITY_DECLARE_TEX2D_NOSAMPLER(_SecondTex); ``` To sample the texture, use the UNITY_SAMPLE_TEX2D_SAMPLER macro, passing in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ba4592d3d2b
unity_docs
editor
What is `Profiling.FrameDataView.GetCounterValuePtr` in Unity? Explain its purpose and usage.
FrameDataView.GetCounterValuePtr Declaration public void* GetCounterValuePtr (int markerId ); Parameters Parameter Description markerId Marker identifier. Returns void* Returns unsafe pointer to the counter value. Description Gets unsafe pointer to the last value of a counter marker in the frame. Us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7aca7abd0851
unity_docs
rendering
What is `Terrain.GetSplatMaterialPropertyBlock` in Unity? Explain its purpose and usage.
Terrain.GetSplatMaterialPropertyBlock Declaration public void GetSplatMaterialPropertyBlock ( MaterialPropertyBlock dest ); Description Get the previously set splat material properties by copying to the dest MaterialPropertyBlock object. Additional resources: SetSplatMaterialPropertyBlock , Renderer.GetPr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d1102ac6933
unity_docs
physics
Show me a Unity C# example demonstrating `Cursor.SetCursor`.
spot The offset from the top left of the texture to use as the target point. This must be in the bounds of the cursor. cursorMode Whether to render this cursor as a hardware cursor on supported platforms, or force software cursor. Description Sets a custom cursor to use as your cursor. Call Cursor.SetCursor with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01e97fc73a23
unity_docs
rendering
What is `ParticleSystemGradientMode` in Unity? Explain its purpose and usage.
ParticleSystemGradientMode enumeration Description The particle gradient mode. This is used by MinMaxGradient to determine which mode to evaluate color gradients in. Properties Property Description Color Use a single color for the MinMaxGradient. Gradient Use a single color gradient for the MinMaxGradient. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_518d89bdbf0b
unity_docs
physics
Give me an overview of the `TerrainCollider` class in Unity.
TerrainCollider class in UnityEngine / Inherits from: Collider / Implemented in: UnityEngine.TerrainPhysicsModule Description A heightmap based collider. Additional resources: SphereCollider , CapsuleCollider , PhysicsMaterial , Rigidbody . Properties Property Description terrainData The terrain that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_048b3c7e06ed
unity_docs
rendering
Explain 'Create a cubemap' in Unity.
## Creating Cubemaps from Textures The fastest way to create cubemaps is to import them from specially laid out Textures . Select the Texture in the Project window , to see the Import Settings in the Inspector window. In the Import Settings, set the Texture Type to Default , Normal Map or Single Channel , and the Text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bc0e53cb2e5
unity_docs
scripting
What is `Undo.GetCurrentGroupName` in Unity? Explain its purpose and usage.
Undo.GetCurrentGroupName Declaration public static string GetCurrentGroupName (); Returns string Name of the current group or an empty string if the current group is empty. Description Get the name that will be shown in the UI for the current undo group. By default, this name is inferred from the actions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3035b6e96b5
unity_docs
rendering
Give me an overview of the `ParticleSystemShapeType` class in Unity.
ParticleSystemShapeType enumeration Description The emission shape. This is used by the ShapeModule to determine how to sort the particles. Properties Property Description Sphere Emit from a sphere. Hemisphere Emit from a half-sphere. Cone Emit from the base of a cone. Box Emit from the volume of a box. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f1faa05472e
unity_docs
performance
What is `ParticleSystemJobs.IJobParticleSystemParallelForBatchExtensions.EarlyJobInit` in Unity? Explain its purpose and usage.
IJobParticleSystemParallelForBatchExtensions.EarlyJobInit Declaration public static void EarlyJobInit (); Description Gathers and caches reflection data for the internal job system's managed bindings. Unity is responsible for calling this method - don't call it yourself. When the Jobs package is included in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39156b151913
unity_docs
editor
What is `AssetImporter.assetPath` in Unity? Explain its purpose and usage.
AssetImporter.assetPath public string assetPath ; Description The path name of the asset for this importer. (Read Only) ```csharp using UnityEngine; using UnityEditor; public class AssetPathExample : MonoBehaviour { [MenuItem("Tools/AssetPathExample")] static void Example() { var importers = AndroidAssetPac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49c05407948b
unity_docs
rendering
What is `U2D.SpriteRendererDataAccessExtensions.DeactivateDeformableBuffer` in Unity? Explain its purpose and usage.
SpriteRendererDataAccessExtensions.DeactivateDeformableBuffer Declaration public static void DeactivateDeformableBuffer ( SpriteRenderer renderer ); Description Stop using the deformable buffer to render the Sprite and use the original mesh instead.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e02ddb2eda24
unity_docs
ui
Show me a Unity C# example demonstrating `UIElements.ToggleButtonGroupState.GetInactiveOptions`.
ToggleButtonGroupState.GetInactiveOptions Declaration public Span<int> GetInactiveOptions (Span<int> inactiveOptionsIndices ); Parameters Parameter Description inactiveOptionsIndices A Span of type integers with the allocated size to hold the number of inactive indices. Description Retrieves a Span of int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7013559b4487
unity_docs
scripting
What is `GameObject.AddComponent` in Unity? Explain its purpose and usage.
GameObject.AddComponent Declaration public Component AddComponent (Type componentType ); Description Adds a component of the specified type to the GameObject. There is no corresponding method for removing a component from a GameObject. To remove a component, use Object.Destroy . ```csharp using UnityEngin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3afd6c8eaa48
unity_docs
rendering
What is `XR.XRDisplaySubsystem.scaleOfAllViewports` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.scaleOfAllViewports public float scaleOfAllViewports ; Description Controls how much of the allocated display texture should be used for rendering. Valid range is 0.0 to 1.0. This value can be changed at runtime without reallocating textures, which makes it useful for dynamically adjusting re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb3633adc12d
unity_docs
rendering
What is `TerrainTools.TerrainInspectorUtility.TerrainShaderValidationGUI` in Unity? Explain its purpose and usage.
TerrainInspectorUtility.TerrainShaderValidationGUI Declaration public static void TerrainShaderValidationGUI ( Material material ); Parameters Parameter Description material The Material to validate. Description Checks whether a Material is compatible with Terrain. This method determines whether a Mater...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_221713f444a3_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Destroys the given GameObject if it is not null, then creates a child GameObject from resources and assigns it to the reference.Can be null, if it is not then it will be destroyed.The path to the resourced asset.The new TComponent Signature: ```csharp public static TComponent OverwriteChild<TComponent>(this GameObject...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_8c6581cdda21
unity_docs
rendering
Show me a Unity C# example demonstrating `LightTransport.IProbeIntegrator`.
erations are essential for baking light probes in Unity's lighting system. Unity provides a concrete implementation of this interface: - UnityEngine.LightTransport.RadeonRaysProbeIntegrator for GPU-accelerated integration using OpenCL 1.2. The integrator operates on light probe positions and produces spherical harmonic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_76a1bd80e9ba
unity_docs
physics
In Unity's 'Use build callbacks', what is 'Supported callbacks' and how does it work?
The following table lists the build callbacks that Unity supports: Callback Method Description BuildPlayerProcessor PrepareForBuild Add files and perform custom setup before the build starts. IPreprocessBuildWithContext OnPreprocessBuild Called at the start of a build. IPostprocessBuildWithContext OnPostprocessBuild Ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07edacd8cfaa
unity_docs
scripting
What is `RenderSettings.fogDensity` in Unity? Explain its purpose and usage.
RenderSettings.fogDensity public static float fogDensity ; Description The density of the exponential fog. Fog density is used by Exponential and ExponentialSquared modes. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { // Set the fog de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44d6bdf6e3bf
unity_docs
scripting
Show me a Unity C# example demonstrating `Screen.fullScreen`.
Screen.fullScreen public static bool fullScreen ; Description Enables full-screen mode for the application. Use this property to toggle full-screen mode: ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Toggle fullscreen Screen.fullScreen = !Screen.fullScreen; } } ``` ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc9af3518af0
unity_docs
scripting
Explain 'JSON Serialization' in Unity.
Use the JsonUtility class to convert Unity objects to and from the JSON format. For example, you can use JSON Serialization to interact with web services, or to easily pack and unpack data to a text-based format. JSON Serialization uses a notion of “structured” JSON: you create a class or structure to describe what var...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42141674ceb4
unity_docs
scripting
Give me an overview of the `OcclusionArea` class in Unity.
OcclusionArea class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.CoreModule Description OcclusionArea is an area in which occlusion culling is performed. Properties Property Description center Center of the occlusion area relative to the transform. size Size that the occlusion ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_936c61a12b24
unity_docs
rendering
Show me a Unity C# example demonstrating `TerrainData.SetAlphamaps`.
TerrainData.SetAlphamaps Declaration public void SetAlphamaps (int x , int y , float[,,] map ); Description Assign all splat values in the given map area. The array supplied to this function determines the width and height of the portion to be replaced. The third dimension of the array corresponds to the num...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90ef3cbb0a18
unity_docs
editor
What is `EditorApplication.isPlaying` in Unity? Explain its purpose and usage.
EditorApplication.isPlaying public static bool isPlaying ; Description Whether the Editor is in Play mode. Returns true if the Editor is in Play mode. Setting isPlaying delays the result until after all script code has completed for this frame. This also returns true if the Editor is paused. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88e0acfcc9c5
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.LightsModule.rangeMultiplier`.
ParticleSystem.LightsModule.rangeMultiplier public float rangeMultiplier ; Description Range multiplier. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall range multiplier. Additional resources: ParticleSystem.LightsModule.range . ```csharp using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f2386f763d6
unity_docs
scripting
What is `Experimental.GraphView.TokenNode` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. TokenNode class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.Node Description The TokenNode class includes methods for creating and managing a Node that resembles a capsule. The TokenNode clas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e57c8b01519
unity_docs
scripting
What is `DrawGizmo` in Unity? Explain its purpose and usage.
DrawGizmo class in UnityEditor Description The DrawGizmo attribute allows you to supply a gizmo renderer for any Component . The renderer function must be static, and take two parameters: the object for which the gizmo is being drawn, and a GizmoType parameter which indicates the context in which the gizmo is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_617882e3d3af
unity_docs
scripting
What are the parameters of `Search.SearchUtils.SelectMultipleItems` in Unity?
Description Select and ping multiple objects in the Project Browser. ```csharp private static void DeleteAssets(IEnumerable<SearchItem> items) { var oldSelection = Selection.objects; SearchUtils.SelectMultipleItems(items, pingSelection: false); // We call ProjectBrowser.DeleteSelectedAssets for the confirma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d83063f7d91
unity_docs
scripting
What is `ContactFilter2D.useOutsideDepth` in Unity? Explain its purpose and usage.
ContactFilter2D.useOutsideDepth public bool useOutsideDepth ; Description Sets the contact filter to filter within the minDepth and maxDepth range, or outside that range. useOutsideDepth uses the range between minDepth and maxDepth to filter depth. Set useOutsideDepth to true to only return object de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d216903a14d2
unity_docs
scripting
What are the parameters of `Object.DestroyImmediate` in Unity?
Description Destroys the specified object immediately. Use with caution and in Edit mode only. DestroyImmediate is intended for use in scripts that run in Edit mode, not at runtime. In Edit mode, the usual delayed destruction performed by Destroy does not occur, so immediate destruction is necessary. In runtime code, u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3bf6566e74d7
unity_docs
editor
Show me a Unity code example for 'Access package assets using scripts'.
This section explains how to access or refer to assets that are defined inside a package: Referring to package paths Loading a Texture inside a package Resolving absolute paths Note : Package Manager doesn’t support streaming assets in packages. Use the Addressables package instead. ## Referring to package paths To r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e545978702d6
unity_docs
math
What is `UIElements.MeshWriteData.SetAllIndices` in Unity? Explain its purpose and usage.
MeshWriteData.SetAllIndices(UInt16[]) Parameters Parameter Description indices The array of indices to copy from. The length of the array must match the allocated index count. Description Fills the values of the allocated indices with values copied directly from an array. Each 3 consecutive indices form a sing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60eae7e7274a
unity_docs
scripting
What is `UIElements.MouseCaptureEvent` in Unity? Explain its purpose and usage.
MouseCaptureEvent class in UnityEngine.UIElements / Inherits from: UIElements.MouseCaptureEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent after a handler starts capturing the mouse. Inherited Members Properties Property Description bubbles Returns whether this event ty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6f637ee62d9
unity_docs
animation
What is `Animator.GetIKHintPosition` in Unity? Explain its purpose and usage.
Animator.GetIKHintPosition Declaration public Vector3 GetIKHintPosition ( AvatarIKHint hint ); Parameters Parameter Description hint The AvatarIKHint that is queried. Returns Vector3 Return the current position of this IK hint in world space. Description Gets the position of an IK hint.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6ee16b8a989
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.DrawGizmos` in Unity? Explain its purpose and usage.
ScriptableRenderContext.DrawGizmos Declaration public void DrawGizmos ( Camera camera , Rendering.GizmoSubset gizmoSubset ); Parameters Parameter Description camera The camera of the current view. gizmoSubset Set to GizmoSubset.PreImageEffects to draw Gizmos that should be affected by postprocessing, o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a103f1f790b
unity_docs
math
What is `AndroidJNI.CallObjectMethod` in Unity? Explain its purpose and usage.
AndroidJNI.CallObjectMethod Declaration public static IntPtr CallObjectMethod (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.lang.Objec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b893bb8738df
unity_docs
scripting
What is `SystemLanguage.German` in Unity? Explain its purpose and usage.
SystemLanguage.German Description German. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the German language if (Application.systemLanguage == SystemLanguage.German) { //Outputs into console that the system is German D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c2bb08dafe2
unity_docs
scripting
What is `ArticulationBody.GetRelativePointVelocity` in Unity? Explain its purpose and usage.
ArticulationBody.GetRelativePointVelocity Declaration public Vector3 GetRelativePointVelocity ( Vector3 relativePoint ); Description The velocity relative to the articulation body at the point relativePoint . Gets the velocity relative to the articulation body at the specified relativePoint . ```csharp ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df5eb18c5391
unity_docs
math
What is `Vector3Int.CeilToInt` in Unity? Explain its purpose and usage.
Vector3Int.CeilToInt Declaration public static Vector3Int CeilToInt ( Vector3 v ); Description Converts a Vector3 to a Vector3Int by doing a Ceiling to each value. As there is a conversion of float to integer, there is a loss of precision.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a603817d86c5
unity_docs
editor
Explain 'CCD Management' in Unity.
com.unity.services.ccd.management ## Description Cloud Content Delivery (CCD) is a managed cloud service that hosts and delivers live content to your application’s users worldwide. Note: The Addressables package (1.19.6+) contains features that utilize this SDK to manage CCD. ## Released for Unity Package version 3...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f44edecccd1
unity_docs
editor
What is `SceneManagement.PrefabStageUtility.OpenPrefab` in Unity? Explain its purpose and usage.
PrefabStageUtility.OpenPrefab Declaration public static SceneManagement.PrefabStage OpenPrefab (string prefabAssetPath ); Declaration public static SceneManagement.PrefabStage OpenPrefab (string prefabAssetPath , GameObject openedFromInstance ); Declaration public static SceneManagement.PrefabStage ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de0c0883b906
unity_docs
scripting
What is `Unity.Android.Gradle.GradlePlugin.ctor` in Unity? Explain its purpose and usage.
GradlePlugin Constructor Declaration public GradlePlugin (string id , string version , bool apply ); Parameters Parameter Description id Plugin ID. version Plugin version. apply Should plugin be applied. Description Element constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.