id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_f9d2518997b7
unity_docs
rendering
Show me a Unity code example for 'Theme Style Sheet (TSS)'.
elect the TSS asset. Go to the Inspector window > Inherited Themes . Select + . This adds a new reference field. Select the list icon in the reference field. A dropdown list displays with all the style sheets in your project. Select the style sheet to use. Select Apply . ## Import the default theme with the@importrule...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c838b3bf06d
unity_docs
scripting
Show me a Unity C# example demonstrating `LightTransport.RadeonRaysContext.WriteBuffer`.
ted with IDeviceContext.CreateEvent to track the completion status, if desired. The WriteBuffer method returns immediately after enqueuing the command in the context. Note: EventID is single-use. Once an EventID has been passed to this function, it may not be passed to subsequent IDeviceContext.WriteBuffer or ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a79040daffbb
unity_docs
rendering
What is `SpeedTreeImporter.receiveShadowsByDefault` in Unity? Explain its purpose and usage.
SpeedTreeImporter.receiveShadowsByDefault public bool receiveShadowsByDefault ; Description Gets and sets a boolean to enable whether the SpeedTree asset receives shadows from other objects in your scene. To change this setting for a specific LOD, see SpeedTreeImporter.receiveShadows and SpeedTreeImporter.e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f8e23820038
unity_docs
editor
What is `EditorSettings.assetNamingUsesSpace` in Unity? Explain its purpose and usage.
EditorSettings.assetNamingUsesSpace public static bool assetNamingUsesSpace ; Description Controls whether to insert a space before a number in duplicated Asset names. Unity adds successive numbers to a duplicated asset's name. By default, it adds a space before the number. Set assetNamingUsesSpace to false ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f952d271ec0
unity_docs
editor
Show me a Unity C# example demonstrating `Unity.Profiling.Editor.ProfilerModuleViewController.Dispose`.
necessary clean up of your view controller, such as unsubscribing from events. You should always call the base implementation afterwards. You do not need to explicitly remove the view controller’s view from the hierarchy; Unity does this automatically when it disposes of the view controller. For more information on th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66e0d2845db9
unity_docs
scripting
Show me a Unity C# example demonstrating `Terrain.SampleHeight`.
Terrain.SampleHeight Declaration public float SampleHeight ( Vector3 worldPosition ); Description Samples the height at the given position defined in world space, relative to the Terrain space. This method automatically clamps the world position to the Terrain boundaries. ```csharp using UnityEngine;public c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_08c675e9fd34
unity_docs
rendering
Explain 'Color by Speed module reference' in Unity.
The color of a particle can be set here to change according to its speed in distance units per second. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Col...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_913c68726370
unity_docs
math
What is `XR.InputDevice.TryGetFeatureValue` in Unity? Explain its purpose and usage.
InputDevice.TryGetFeatureValue Declaration public bool TryGetFeatureValue (InputFeatureUsage<bool> usage , out bool value ); Declaration public bool TryGetFeatureValue (InputFeatureUsage<uint> usage , out uint value ); Declaration public bool TryGetFeatureValue (InputFeatureUsage<float> usage , out floa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c94944348b8e
unity_docs
scripting
What is `RenderPickingResult` in Unity? Explain its purpose and usage.
RenderPickingResult struct in UnityEditor Description This struct contains information to notify Unity the outcome of this render picking callback. This struct type has to be returned from the RenderPickingCallback to notify Unity of: The number of consecutive picking indices used during the callback The Res...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57f928fed1a5
unity_docs
rendering
What is `LightTransport.InputExtraction.ComputeOcclusionLightIndicesFromBakeInput` in Unity? Explain its purpose and usage.
InputExtraction.ComputeOcclusionLightIndicesFromBakeInput Declaration public static int[] ComputeOcclusionLightIndicesFromBakeInput ( LightTransport.InputExtraction.BakeInput bakeInput , Vector3[] probePositions , uint maxLightsPerProbe ); Parameters Parameter Description bakeInput The BakeInput containin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca26b4a980b2
unity_docs
rendering
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility` in Unity? Explain its purpose and usage.
ProfilerUnsafeUtility class in Unity.Profiling.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Utility class which provides access to low level Profiler API. Use ProfilerUnsafeUtility methods to build a high-level profiling primitive. The low level Profiler API is included in a Release B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Returns the number of available locale or -1 if not initialized. Signature: ```csharp private int _numLocales = 1; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88076f0e929f
unity_docs
animation
What is `AnimationUtility.GetAnimatableBindings` in Unity? Explain its purpose and usage.
AnimationUtility.GetAnimatableBindings Declaration public static EditorCurveBinding[] GetAnimatableBindings ( GameObject targetObject , GameObject root ); Description Retrieves the animatable bindings for a specific GameObject. Use this method to find which can be animated for a GameObject. The root GameOb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9196a57839d
unity_docs
input
Give me an overview of the `TouchScreenKeyboard` class in Unity.
TouchScreenKeyboard class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Interface for on-screen keyboards. Only native iPhone, Android, and Windows Store Apps are supported. This interface allows to display different types of the keyboard: ASCII, Numbers, URL, Email, and others. Because th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90c9e72491b3
unity_docs
scripting
What is `Search.SearchQueryError.ctor` in Unity? Explain its purpose and usage.
SearchQueryError Constructor Declaration public SearchQueryError (int index , int length , string reason , Search.SearchContext context , Search.SearchProvider provider , bool fromSearchQuery , Search.SearchQueryErrorType type ); Parameters Parameter Description index Index where the error occurr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1906d97324a0
unity_docs
scripting
Show me a Unity C# example demonstrating `Caching.GetCacheByPath`.
Caching.GetCacheByPath Declaration public static Cache GetCacheByPath (string cachePath ); Parameters Parameter Description cachePath The cache path. Returns Cache A reference to the Cache with the given path. Description Returns the Cache that has the given cache path. ```csharp using System.IO; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_866c9c9107b1
unity_docs
rendering
What are the parameters of `PrefabUtility.SetPropertyModifications` in Unity?
Description Assigns a set of PropertyModification objects to a target Prefab instance relative to its source Prefab Asset. It's important to provide this method with the top-level object in the target instance's branch of the hierarchy to avoid unexpected results. Use GetOutermostPrefabInstanceRoot for this purpose. Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e6128a48a43
unity_docs
rendering
What is `GL.Vertex3` in Unity? Explain its purpose and usage.
GL.Vertex3 Declaration public static void Vertex3 (float x , float y , float z ); Description Submit a vertex. In OpenGL this matches glVertex3f(x,y,z) ; on other graphics APIs the same functionality is emulated. This function can only be called between GL.Begin and GL.End functions. ```csharp using Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ae6ab1d4c42
unity_docs
physics
Show me a Unity C# example demonstrating `PhysicsShapeGroup2D.SetShapeRadius`.
SetShapeRadius Declaration public void SetShapeRadius (int shapeIndex , float radius ); Parameters Parameter Description shapeIndex The index of the shape stored in the PhysicsShapeGroup2D . The shape index is zero-based with the shape group having a quantity of shapes specified by shapeCount . radius T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e5ee1d0bc3c
unity_docs
rendering
Give me an overview of the `ParticleSystemGradientMode` class in Unity.
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_man_dcea33b3846d
unity_docs
physics
In Unity's 'RenderDoc Integration', what is 'Loading RenderDoc' and how does it work?
If a RenderDoc installation is detected, then at any time after loading the Editor you can right click on the tab for the Game View or Scene View and click the ‘Load RenderDoc’ option. This will reload the graphics device so you must save any changes, but afterwards RenderDoc will be ready to capture without having to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0aaa384b07e
unity_docs
scripting
What is `ILogHandler` in Unity? Explain its purpose and usage.
ILogHandler interface in UnityEngine Description Interface for custom log handler implementation. ILogHandler interface to ease unit-testing and mocking of loggers. ```csharp using UnityEngine; using System.Collections; using System.IO; using System;public class MyFileLogHandler : ILogHandler { private FileStre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d45cbe906556
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchExpressionEvaluatorSignatureOverloadAttribute`.
SearchExpressionEvaluatorSignatureOverloadAttribute class in UnityEditor.Search Description Allows user to add more function signature overload to a SearchExpressionEvaluatorAttribute . Here is an evaluator with 2 functional signatures: ```csharp [Description("Convert arguments to a string allowing you to forma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72606e179df6
unity_docs
rendering
What is `Rendering.RenderBufferStoreAction` in Unity? Explain its purpose and usage.
RenderBufferStoreAction enumeration Description This enum describes what should be done on the render target when the GPU is done rendering into it. When the GPU is done rendering into a render target, this setting specifies the action that should be performed on the rendering results. Tile-based GPUs may get perf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c72356711eb0
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.LinkButton`.
t position , GUIContent label ); Parameters Parameter Description position Rectangle on the screen to use for the control. The underline is done with the bottom border so set the size accordingly. label Label of the link. Returns bool true when the user clicks the link. Description Make a clickabl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3faafd6589f
unity_docs
editor
What is `StaticEditorFlags.OccluderStatic` in Unity? Explain its purpose and usage.
StaticEditorFlags.OccluderStatic Description Mark the GameObject as a Static Occluder in the occlusion culling system. For more information, see the documentation on the Occlusion Culling system . ```csharp using UnityEngine; using UnityEditor; public class StaticEditorFlagsExample { [MenuItem("Examples/Create G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16a55d45c5b5
unity_docs
editor
What is `SceneTemplate.SceneTemplatePipelineAdapter` in Unity? Explain its purpose and usage.
SceneTemplatePipelineAdapter class in UnityEditor.SceneTemplate Implements interfaces: ISceneTemplatePipeline Description An adapter that implements all the functions of ISceneTemplatePipeline for easier usage. Use it to partially override a ISceneTemplatePipeline . Public Methods Method Description AfterTem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd8fdf77ddff
unity_docs
scripting
Show me a Unity code example for 'Create a native plug-in for Android'.
To compile a C++ plug-in for Android, use the Android NDK and familiarize yourself with the steps required to build a shared library or a static library. If you use C++ to implement the plug-in, you must declare with C linkage to avoid name mangling issues . By default, only C source files that have a .c file extension...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf7e8faedac7
unity_docs
scripting
What is `Rendering.BlendState.separateMRTBlendStates` in Unity? Explain its purpose and usage.
BlendState.separateMRTBlendStates public bool separateMRTBlendStates ; Description Determines whether each render target uses a separate blend state. If false , all render targets use blendState0 . Otherwise render target 0 uses blendState0 , render target 1 uses blendState1 etc.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_422d2ee6e90f
unity_docs
rendering
What is `ModelImporterMaterialSearch.RecursiveUp` in Unity? Explain its purpose and usage.
ModelImporterMaterialSearch.RecursiveUp Description Recursive-up search in Materials folders. Unity will perform a recursive-up search for the material in all Materials folders up to the Assets folder. For example: if model is Assets/Model/MyModel.fbx, then it will try to locate the material in these folders in thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b60363b0c3a
unity_docs
editor
What is `Build.Content.ResourceFile` in Unity? Explain its purpose and usage.
ResourceFile struct in UnityEditor.Build.Content Description Details about a specific file written by the ContentBuildInterface.WriteSerializedFile or ContentBuildInterface.WriteSceneSerializedFile APIs. Note: this struct and its members exist to provide low-level support for the Scriptable Build Pipeline p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_270c85aaa478
unity_docs
physics
What is `ModifiableContactPair` in Unity? Explain its purpose and usage.
ModifiableContactPair struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description A light-weight proxy that allows to access the contact buffers directly. Properties Property Description bodyAngularVelocity Angular velocity of the first body in the contact pair. bodyInstanceID Instance ID ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4cfeec723bc8
unity_docs
scripting
What is `UIElements.Columns.stretchMode` in Unity? Explain its purpose and usage.
Columns.stretchMode public UIElements.Columns.StretchMode stretchMode ; Description Indicates how the size of columns in this collection is automatically adjusted as other columns or the containing view get resized.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a87f818b6823
unity_docs
rendering
Explain 'Stencil command in ShaderLab reference' in Unity.
Configures settings relating to the stencil buffer on the GPU. ## Render pipeline compatibility Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Custom SRP Built-in Render Pipeline Stencil Yes Yes Yes Yes ## Syntax Signature Example syntax Function Stencil { Ref <ref> ReadMask <re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5081edf1cbb9
unity_docs
editor
In Unity's 'Multiplay', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.services.multiplay@1.3 released 1.3.0, 1.3.1 com.unity.services.multiplay@1.2 released 1.2.5
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d454ba5d01b
unity_docs
xr
What is `Playables.PlayableGraph` in Unity? Explain its purpose and usage.
PlayableGraph struct in UnityEngine.Playables / Implemented in: UnityEngine.CoreModule Description Use the PlayableGraph to manage Playable creations and destructions. The PlayableGraph is also the link to different systems, through structs that implement IPlayableOutput . For example, AnimationPlayableOutp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5cf1f2f8333
unity_docs
scripting
What is `UIElements.Hash128Field.ctor` in Unity? Explain its purpose and usage.
Hash128Field Constructor Declaration public Hash128Field (); Description Initializes and returns an instance of Hash128Field. Declaration public Hash128Field (int maxLength ); Parameters Parameter Description maxLength Maximum number of characters for the field. Description Initializes and return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e6181dad7d59
unity_docs
editor
In Unity's 'Binding examples', what is 'Basic Editor binding examples' and how does it work?
Topics Description Bind with binding path in C# script Use bindingPath to create a binding that changes the name of a GameObject in a custom Editor window. Bind without the binding path Use BindProperty() to create a binding that changes the name of a GameObject in a custom Editor window. Bind with UXML and C# Create a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33285bde99e2
unity_docs
rendering
Show me a Unity C# example demonstrating `Mesh.uv6`.
or Vector4 value if you need to. This property returns a copy of the data. This means that it causes a heap memory allocation. It also means that to make changes to the original data, you must update the copy and then reassign the updated copy to the mesh. The following example demonstrates how to create an array to ho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ea8e453da09
unity_docs
scripting
Show me a Unity C# example demonstrating `OcclusionArea.center`.
OcclusionArea.center public Vector3 center ; Description Center of the occlusion area relative to the transform. ```csharp using UnityEngine;[RequireComponent(typeof(OcclusionArea))] public class Example : MonoBehaviour { // Sets the center of the occlusion area to the center of the transform void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83b07a118014
unity_docs
scripting
What is `IntegratedSubsystemDescriptor` in Unity? Explain its purpose and usage.
IntegratedSubsystemDescriptor class in UnityEngine / Implemented in: UnityEngine.SubsystemsModule Implements interfaces: ISubsystemDescriptor Description Information about a subsystem that can be queried before creating a subsystem instance. Properties Property Description id A unique string that identifies...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc64c14c149a
unity_docs
scripting
What is `UIElements.Columns.IsPrimary` in Unity? Explain its purpose and usage.
Columns.IsPrimary Declaration public bool IsPrimary ( UIElements.Column column ); Parameters Parameter Description column The column to check. Returns bool Whether or not the specified column is the primary one. Description Checks if the specified column is the primary one.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_237c90df1e7b
unity_docs
rendering
Show me a Unity C# example demonstrating `Material.ctor`.
rary Material. If you have a script which implements a custom special effect, you implement all the graphic setup using shaders & materials. Use this function to create a custom shader & material inside your script. After creating the material, use SetColor , SetTexture , SetFloat , SetVector , SetMatrix to popu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0fbd934bb2f
unity_docs
editor
What is `PrefabUtility.ConvertToPrefabInstances` in Unity? Explain its purpose and usage.
PrefabUtility.ConvertToPrefabInstances Declaration public static void ConvertToPrefabInstances (GameObject[] plainGameObjects , GameObject prefabAssetRoot , ConvertToPrefabInstanceSettings settings , InteractionMode mode ); Parameters Parameter Description plainGameObjects The array of GameObjects t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a477d3d0e0f3
unity_docs
animation
Show me a Unity C# example demonstrating `AnimationState.length`.
AnimationState.length public float length ; Description The length of the animation clip in seconds. ```csharp using UnityEngine; using System.Collections;public class ExampleScript : MonoBehaviour { public Animation anim; void Start() { // Print the length of the walk animation in seconds print(anim["Walk"...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a6aab62595b
unity_docs
xr
What is `AI.NavMesh.pathfindingIterationsPerFrame` in Unity? Explain its purpose and usage.
NavMesh.pathfindingIterationsPerFrame public static int pathfindingIterationsPerFrame ; Description The maximum number of nodes processed for each frame during the asynchronous pathfinding process. During the pathfinding process, the pathfinder expands only a certain number of nodes (NavMesh polygons) for each ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bffec12e323
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.NativeContainerSupportsDeferredConvertListToArray` in Unity? Explain its purpose and usage.
NativeContainerSupportsDeferredConvertListToArray class in Unity.Collections.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Indicates that the native container type can be passed to the Schedule method of an IJobParallelForDefer job.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94fa52320746
unity_docs
rendering
What are the parameters of `AssetDatabase.FindAssetGUIDs` in Unity?
Returns GUID[] An array containing the GUIDs of any matching assets. If no matching assets were found, returns empty array. Description Searches the asset database with a filter string and returns an array of GUIDs. FindAssetGUIDs allows you to search for assets. The string argument can provide names, labels o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37517bfc8f46
unity_docs
scripting
What is `MinAttribute.ctor` in Unity? Explain its purpose and usage.
MinAttribute Constructor Declaration public MinAttribute (float min ); Parameters Parameter Description min The minimum allowed value. Description Attribute used to make a float or int variable in a script be restricted to a specific minimum value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83210711f6b3
unity_docs
math
What is `Animations.TransformStreamHandle.GetLocalTRS` in Unity? Explain its purpose and usage.
TransformStreamHandle.GetLocalTRS Declaration public void GetLocalTRS ( Animations.AnimationStream stream , out Vector3 position , out Quaternion rotation , out Vector3 scale ); Parameters Parameter Description stream The AnimationStream that holds the animated values. position The position of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d3037c35f03f
unity_docs
xr
Explain 'API compatibility levels for .NET' in Unity.
Unity supports two different .NET API compatability levels that your project code can compile against. The compatability level you select determines which .NET class libraries are available to your C# code. The available levels are:.NET Standard 2.1 :.NET Standard 2.1, as published by the .NET Foundation. This is the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_264e137d5602
unity_docs
editor
What is `UIElements.DropdownMenu.RemoveItemAt` in Unity? Explain its purpose and usage.
DropdownMenu.RemoveItemAt Declaration public void RemoveItemAt (int index ); Parameters Parameter Description index The index of the item to remove. Description Removes the menu item at index. ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements;public class ContextMenuWindow : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d0ae653c7ed
unity_docs
scripting
What is `Search.SearchExpression.GetNumberValue` in Unity? Explain its purpose and usage.
SearchExpression.GetNumberValue Declaration public double GetNumberValue (double defaultValue ); Parameters Parameter Description defaultValue Initial value if we cannot convert the innerText. Returns double Returns a numerical representation of the expression. Description Try to parse the innerText ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46b80be6caff
unity_docs
animation
What is `Animations.TransformSceneHandle.GetLocalToParentMatrix` in Unity? Explain its purpose and usage.
TransformSceneHandle.GetLocalToParentMatrix Declaration public Matrix4x4 GetLocalToParentMatrix ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that manages this handle. Returns Matrix4x4 Returns the local to parent matrix. Description Gets the lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a75cc533466
unity_docs
scripting
What is `Quaternion.RotateTowards` in Unity? Explain its purpose and usage.
Quaternion.RotateTowards Declaration public static Quaternion RotateTowards ( Quaternion from , Quaternion to , float maxDegreesDelta ); Parameters Parameter Description from The unit quaternion to be aligned with to . to The target unit quaternion. maxDegreesDelta The maximum angle in degrees a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8eb4745f0b1
unity_docs
rendering
Give me an overview of the `TextureImporterMipFilter` class in Unity.
TextureImporterMipFilter enumeration Description Mip map filter for TextureImporter . Additional resources: TextureImporter.mipmapFilter . Properties Property Description BoxFilter Box mipmap filter. KaiserFilter Kaiser mipmap filter.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_927043402897
unity_docs
scripting
What is `ModifiableContactPair.GetDynamicFriction` in Unity? Explain its purpose and usage.
ModifiableContactPair.GetDynamicFriction Declaration public float GetDynamicFriction (int i ); Parameters Parameter Description i Index of the contact point. Returns float Dynamic friction coefficient. Description Get the value of the dynamic friction for a specified contact point in this contact pai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c00a37e6c2e6
unity_docs
physics
What is `Callbacks.PostProcessSceneAttribute` in Unity? Explain its purpose and usage.
PostProcessSceneAttribute class in UnityEditor.Callbacks / Inherits from: CallbackOrderAttribute Description Add this attribute to a method to get a notification just after building the Scene. A method with this attribute will also get called when entering Playmode, when SceneManager.LoadScene is called. P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93ee9e090854
unity_docs
math
What is `Handles.TransformHandle` in Unity? Explain its purpose and usage.
Handles.TransformHandle Declaration public static void TransformHandle (ref Vector3 position , ref Quaternion rotation , ref Vector3 scale ); Declaration public static void TransformHandle (ref Vector3 position , ref Quaternion rotation , ref float uniformScale ); Declaration public static voi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fced7da5c3b5
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnApplicationQuit`.
platform, the operating system can quit the application to free up resources. In this case, depending on the operating system, Unity might be unable to call this method. On mobile platforms, don't rely on this method to save the state of your application. Instead, consider every loss of application focus as the exit of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2b9d799277f5_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
!!!DEPRECATED!!!Acts as a wrapper for allowing XRGrabInteractables to be scaled while being held.This will **not** scale the GameObject itself but all of it's children. Scaling will be applied to the children using their initial scale. Signature: ```csharp public class ScalableGrabInteractable : ExPresSXRGrabInteracta...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_a6deba5842fa
unity_docs
scripting
What is `PrefabUtility.GetPropertyModifications` in Unity? Explain its purpose and usage.
PrefabUtility.GetPropertyModifications Declaration public static PropertyModification[] GetPropertyModifications ( Object targetPrefab ); Parameters Parameter Description targetPrefab Can be a Prefab instance in the scene or a Prefab instance in an Prefab Asset (e.g a Variant asset). Description Returns a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa07d5752af9
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddRemotePackageReferenceAtVersionUpToNextMajor` in Unity?
Returns string Returns the GUID of the remote package reference. Description Adds a reference to the remote package at the given version and allows updates up to the next major version. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_AddRemotePa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b241cf99649
unity_docs
scripting
Show me a Unity C# example demonstrating `Experimental.Rendering.GraphicsStateCollection.WarmUp`.
warming job. Description Prewarms all shader variants in this collection using associated graphics states. This will result in the GPU representation of the stored shader variants being created. The JobHandle returned by this method can be used to control if the creation of GPU representations occurs synchronously...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3186aa2d4e19
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddFileToBuildWithFlags`.
uilding for the given target with specific compiler flags. The function is equivalent to AddFileToBuild except that the compile flags are specified. In projects containing multiple native targets, you can configure a single file or folder reference to build in all, some, or none of the targets. The file or folder re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d472317a0d9
unity_docs
scripting
What is `Color.cyan` in Unity? Explain its purpose and usage.
Color.cyan public static Color cyan ; Description Cyan. RGBA is (0, 1, 1, 1). ```csharp //Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options to create a GameObject with a Renderer automatically attached). //This script changes the Color of your Gam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db1a83d01997
unity_docs
math
What is `BoundsInt.zMax` in Unity? Explain its purpose and usage.
BoundsInt.zMax public int zMax ; Description The maximal z point of the box. Only points with a z component less than this value are contained in the box. Sets the maximum value of BoundsInt 's z point. If you enter a maximum value that is less than the current minimum value, then the entered value becomes th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02f3a6dba9ff
unity_docs
rendering
What are the parameters of `Rendering.GlobalKeyword.Create` in Unity?
Returns GlobalKeyword Returns a new instance of the GlobalKeyword class. Description Creates and returns a GlobalKeyword that represents a new or existing global shader keyword. Unity creates and returns a GlobalKeyword struct to represent the global shader keyword with the given name. If a global shader keyword with t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c21723d9858b
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.SetTeamId`.
PBXProject.SetTeamId Declaration public void SetTeamId (string targetGuid , string teamId ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . teamId The code signing team ID to be used for this target. Description Sets the Team ID of an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17d5857360e2
unity_docs
scripting
Give me an overview of the `Application` class in Unity.
Application class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provides access to application runtime data. This class contains static methods for looking up information about and controlling the runtime data. Static Properties Property Description absoluteURL The URL of the document....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_784a8fdadf8b_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Default materials lookup directory with existing semantically named materials required for runtime assignment. Signature: ```csharp public string MaterialsDirectory; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_dc30ec728819
unity_docs
editor
In Unity's 'Set background images', what is '9-Slice images with UI Toolkit' and how does it work?
Generally, you can apply the 9-slice technique to a regular 2D Sprite . However, with UI Toolkit, you can apply the 9-slice technique to Texture, Render Texture, and SVG Vector images. To apply 9-slice, set the following: Slice values : The slice values are the pixel values for the left, right, top, and bottom slices o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ff3593c8ace
unity_docs
rendering
What is `Cubemap.CreateExternalTexture` in Unity? Explain its purpose and usage.
Cubemap.CreateExternalTexture Declaration public static Cubemap CreateExternalTexture (int width , TextureFormat format , bool mipmap , IntPtr nativeTex ); Parameters Parameter Description size The width and height of each face of the cubemap should be the same. format Format of underlying cubemap o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_788990d48caf
unity_docs
rendering
What is `Rendering.GraphicsTextureState.InitializedOnRenderThread` in Unity? Explain its purpose and usage.
GraphicsTextureState.InitializedOnRenderThread Description The GraphicsTexture has completed creation on the render thread. This is the working state of a GraphicsTexture. Only at this state is the descriptor accessible. Additional resources: GraphicsTextureDescriptor , GraphicsTexture.descriptor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8ed775ba8736
unity_docs
performance
Explain 'Jobs overview' in Unity.
A job is a small unit of work that does one specific task. A job receives parameters and operates on data, similar to how a method call behaves. Jobs can be self-contained, or they can depend on other jobs to complete before they can run. In Unity, a job refers to any struct that implements the IJob interface. Only the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b9a580cef89
unity_docs
performance
What is `GfxThreadingMode` in Unity? Explain its purpose and usage.
GfxThreadingMode enumeration Description Enum used to specify the threading mode to use. Additional resources: PlayerSettings.graphicsThreadingMode. Properties Property Description Direct Direct threading mode. NonThreaded SingleThreaded mode. Threaded MultiThreaded mode. ClientWorkerJobs Legacy Graphics Jo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7ec1961e879
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Burst.BurstDiscardAttribute`.
decorated with the [BurstCompile] attribute. You can use the [BurstDiscard] attribute on a method or property to exclude code from Burst compilation in situations where it can only run in .NET runtimes. For example, you can use [BurstDiscard] to exclude methods that use managed objects to perform logging, or meth...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7573e4889183
unity_docs
xr
What is `PackageManager.Requests.ClearCacheRequest` in Unity? Explain its purpose and usage.
ClearCacheRequest class in UnityEditor.PackageManager.Requests / Inherits from: PackageManager.Requests.Request Description Represents an asynchronous request to clear the global package cache on the disk. The PackageManager Client class returns a ClearCacheRequest instance when you call the Client.ClearCac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fa00c4c4eb6
unity_docs
scripting
What is `UIElements.Binding.SetGlobalLogLevel` in Unity? Explain its purpose and usage.
Binding.SetGlobalLogLevel Declaration public static void SetGlobalLogLevel ( UIElements.BindingLogLevel logLevel ); Parameters Parameter Description logLevel The log level. Description Sets the log level for all binding failures. This can be overriden per panel using SetPanelLogLevel.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e3bb08481d8
unity_docs
ui
Give me an overview of the `Viewpoint_1` class in Unity.
Viewpoint<T0> class in UnityEditor Description Defines a Viewpoint that can be selected from the Cameras overlay. Use this base class with ICameraLensData to define a Viewpoint and expose a component in the Cameras overlay. If you expose a component in the Cameras overlay, you can use the Cameras overlay to loo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_51437c331f7c
unity_docs
input
Explain 'Supporting input devices on tvOS' in Unity.
While tvOS builds on the foundation of iOS, it does create new challenges such as adapting content to function with tvOS inputs, and for display on a bigger screen. There are two main inputs for tvOS: The Apple TV Remote Made For iOS (MFi) controllers ## Apple TV Remote The Apple TV Remote (Siri Remote) is a multi-pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8f0085ba6b3
unity_docs
math
What are the parameters of `Quaternion.ToAngleAxis` in Unity?
Description Converts a rotation to angle-axis representation. This method decomposes the quaternion into an angle (in degrees) and a unit vector representing the axis of rotation. Normalize the quaternion before calling this method, otherwise Unity throws an exception. ```csharp using UnityEngine;public class Example :...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9dc2c456187c
unity_docs
rendering
What is `ParticleSystemJobs.IJobParticleSystem` in Unity? Explain its purpose and usage.
IJobParticleSystem interface in UnityEngine.ParticleSystemJobs Description Inherit from this interface to implement a Particle System job. Additional resources: IJobParticleSystem.Execute . Public Methods Method Description Execute Implement this method to access and modify particle properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_311637be0b0a
unity_docs
rendering
Explain 'Desktop headless mode' in Unity.
The Dedicated Server build target is similar to the desktop headless mode. The only difference is that the Dedicated Server build target is optimized to increase memory and CPU performance when running as a networked application. Desktop headless mode allows you to run applications in batchmode on any desktop platform ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_689debbac5dd
unity_docs
scripting
What is `Accessibility.AccessibilityNode.ToString` in Unity? Explain its purpose and usage.
AccessibilityNode.ToString Declaration public string ToString (); Returns string A string containing the accessibility node ID and generational version. Description Provides a debugging string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bd4511d955b
unity_docs
physics
What is `MonoBehaviour.OnJointBreak` in Unity? Explain its purpose and usage.
MonoBehaviour.OnJointBreak(float) Description Called when a joint attached to the same game object broke. When a force that is higher than the breakForce of the joint, the joint will break off. When the joint breaks off, OnJointBreak will be called and the break force applied to the joint will be passed in. After ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fecf017503fb
unity_docs
input
What is `WebGLInput.mobileKeyboardSupport` in Unity? Explain its purpose and usage.
WebGLInput.mobileKeyboardSupport public static bool mobileKeyboardSupport ; Description Enable mobile keyboard support for UI input fields. This property determines whether to enable mobile keyboard support for UI input fields. If this is enabled (default), the browser's soft keyboard will be requested when sel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69fc23e42d50
unity_docs
scripting
What is `Experimental.GraphView.GraphView.placematContainer` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.placematContainer public Experimental.GraphView.PlacematContainer placematContainer ; Description The PlacematContainer used by the GraphView.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e6ec7151ad1
unity_docs
rendering
What is `ParticleSystem.RotationOverLifetimeModule` in Unity? Explain its purpose and usage.
RotationOverLifetimeModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for the RotationOverLifetimeModule. Rotate particles throughout their lifetime. Additional resources: ParticleSystem , ParticleSystem.rotationOverLifetime . Properties Property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a02339ec53d4
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.GetLatest`.
GetLatest ( VersionControl.Asset asset ); Parameters Parameter Description assets List of assets to update. asset Asset to update. Description Start a task for getting the latest version of an out of sync asset from the version control server. Note that the Provider.GetLatest task does not solve file co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ecea64aea1d
unity_docs
editor
What are the parameters of `EditorBuildSettings.AddConfigObject` in Unity?
Returns void Throws an exception if the object is null , not persisted, or if there is a name conflict and the overwrite parameter is set to false. Description Store a reference to a config object by name. The object must be an asset in the project, otherwise it will not be saved when the editor is restarted or script...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e378e093dea
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.Revert`.
escription Reverts the specified assets by undoing any changes done since the last time you synced. The last sync time is usually when Provider.GetLatest was last issued but may differ if an external version control client is used at the same time. Note that after this operation is completed, Asset Database is not ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c3c3ae1bb69
unity_docs
physics
Show me a Unity C# example demonstrating `Collider.OnCollisionExit`.
mation about contact points, impact velocity etc. If you don't use collisionInfo in the function, leave out the collisionInfo parameter as this avoids unneccessary calculations. Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events will be sent to di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc3f37742048
unity_docs
scripting
What is `UIElements.Image` in Unity? Explain its purpose and usage.
Image class in UnityEngine.UIElements / Inherits from: UIElements.VisualElement / Implemented in: UnityEngine.UIElementsModule Description A VisualElement representing a source texture. Additional resources: UXML element Image . Note : This is the Image control for the UI Toolkit framework. This is no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b61685e139e0
unity_docs
scripting
What are the parameters of `Unity.Loading.ContentLoadInterface.LoadContentFileAsync` in Unity?
Returns ContentFile Handle to access the results of the load process. Description Loads a serialized file asynchronously from disk. The status of the load operation can be accessed using the returned ContentFile . Objects loaded with this function will not be garbage collected; the user is responsible for calling Conte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2aa97b48e5e5
unity_docs
math
Give me an overview of the `SerializedPropertyType` class in Unity.
SerializedPropertyType enumeration Description Represents the type of a SerializedProperty . Additional resources: SerializedProperty.propertyType . Properties Property Description Generic Represents an array, list, struct or class. Integer Represents an integer property, for example int, byte, short, uint ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b8cc48a4aa0
unity_docs
rendering
Show me a Unity C# example demonstrating `Android.AndroidPlatformIconKind`.
AndroidPlatformIconKind class in UnityEditor.Android Description Contains all Android PlatformIconKind supported by Unity. Use this class to configure icons used in your Android application. For detailed information on Android icons, refer to the Android developer documentation on Android icon design guideline...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61715f81ac6d
unity_docs
animation
What is `AnimationClip.AddEvent` in Unity? Explain its purpose and usage.
AnimationClip.AddEvent Declaration public void AddEvent ( AnimationEvent evt ); Parameters Parameter Description evt AnimationEvent to add. Description Adds an animation event to the clip. Note that events added with AddEvent persist until play mode is exited or the is player quit. If you want to add an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa61c993f599
unity_docs
physics
Give me an overview of the `ModifiableContactPair` class in Unity.
ModifiableContactPair struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description A light-weight proxy that allows to access the contact buffers directly. Properties Property Description bodyAngularVelocity Angular velocity of the first body in the contact pair. bodyInstanceID Instance ID ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_336c7d449f78
unity_docs
math
In Unity's 'Parallel tessellation', what is 'Jobified tessellation with allocation on the main thread' and how does it work?
If you can quickly calculate the number of vertices or indices, use the main thread to allocate the mesh and add it to the draw sequence. You can do so with the following APIs: MeshGenerationContext.AllocateTempMesh MeshGenerationContext.DrawMesh Note : You can add the mesh to the draw sequence at any point during the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.