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_72543792321b
unity_docs
scripting
What is `Rendering.RenderStateMask` in Unity? Explain its purpose and usage.
RenderStateMask enumeration Description Specifies which parts of the render state that is overriden. In order to override multiple parts of the render state, the desired values should be logically OR'd together. Additional resources: RenderStateBlock . Properties Property Description Nothing No render states ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_892ccdc6d7eb
unity_docs
scripting
What is `VersionControl.ResolveMethod` in Unity? Explain its purpose and usage.
ResolveMethod enumeration Description How assets should be resolved. Additional resources: Provider.Resolve . Properties Property Description UseMine Use "mine" (local version). UseTheirs Use "theirs" (other/remote version). UseMerged Use merged version.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b63b88392aa
unity_docs
scripting
What is `Playables.PlayableExtensions.GetOutputCount` in Unity? Explain its purpose and usage.
PlayableExtensions.GetOutputCount Declaration public static int GetOutputCount (U playable ); Parameters Parameter Description playable The Playable used by this operation. Returns int The count of outputs on the Playable. Description Returns the number of outputs supported by the Playable . Curr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_287120a92924_doc_3
github
scripting
What does `BeginMovieLoad` do in this Unity script? Explain its purpose and signature.
Start loading all frames for movie mode. Returns false if RAM check fails. Signature: ```csharp public bool BeginMovieLoad(Action<int, int> onProgress) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_9c35f3e94cfe
unity_docs
scripting
Give me an overview of the `ResourceRequest` class in Unity.
ResourceRequest class in UnityEngine / Inherits from: AsyncOperation / Implemented in: UnityEngine.CoreModule Description Asynchronous load request from the Resources bundle. Additional resources: Resources.LoadAsync , AsyncOperation . Properties Property Description asset Asset object being loaded (Rea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aaa68ed1acfb
unity_docs
performance
What is `Unity.Profiling.ProfilerRecorderOptions` in Unity? Explain its purpose and usage.
ProfilerRecorderOptions enumeration Description ProfilerRecorder lifecycle and collection options. Properties Property Description StartImmediately Use to start data collection immediately upon ProfilerRecorder initialization. KeepAliveDuringDomainReload Use to keep the ProfilerRecorder unmanaged instance runn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_657c3850f0fa
unity_docs
scripting
What is `Rendering.BatchDrawCommandProceduralIndirect.indexBufferHandle` in Unity? Explain its purpose and usage.
BatchDrawCommandProceduralIndirect.indexBufferHandle public GraphicsBufferHandle indexBufferHandle ; Description Handle of an index buffer to use for indexed drawing. If no buffer is provided the draws will be non indexed. This changes how the data in the buffer pointed to by indirectArgsBufferHandle is int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_445715c4871f
github
scripting
Write a Unity C# script called Animation State Data
```csharp using Unity.Collections; using Unity.Entities; using UnityEngine; namespace Farmer.Core { public struct AnimationStateData : IComponentData { public float CurrentTime; public int CurrentSprite; public float Step; } class SpriteAnimationSystem : ComponentSystem { ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_1aa5de27c925
unity_docs
rendering
What is `Playables.ScriptPlayableBinding.Create` in Unity? Explain its purpose and usage.
ScriptPlayableBinding.Create Declaration public static Playables.PlayableBinding Create (string name , Object key , Type type ); Parameters Parameter Description key A reference to a UnityEngine.Object that acts as a key for this binding. type The type of object that will be bound to the ScriptPlaya...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2291e7377490
unity_docs
rendering
Explain 'Convert data types' in Unity.
You can use type converters to convert data types between the data source and the UI. This allows you to: Bind data types that are different from the UI, such as binding to a Texture2D property from an int value. Convert data types that are the same as the UI when you want a different representation of the data, such a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c4730bfd599
unity_docs
editor
What is `SerializedProperty.hasMultipleDifferentValues` in Unity? Explain its purpose and usage.
SerializedProperty.hasMultipleDifferentValues public bool hasMultipleDifferentValues ; Description Does this property represent multiple different values due to multi-object editing? (Read Only) Returns true when there are multiple target objects, and they do not all have the same value. Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6a17979c4696_doc_1
github
scripting
What does `InvokeOnChanged` do in this Unity script? Explain its purpose and signature.
NOTE: This is also called from the . Signature: ```csharp protected override void InvokeOnChanged() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_82f2894c48f4
unity_docs
ui
Show me a Unity code example for 'Create a custom style for a custom control'.
tHub repository . ## Create the custom control Create a C# script to define the custom control and a USS file to define the custom style. Create a Unity project with any template. Create a folder named create-custom-style-custom-control to store your files. In the ExampleElementCustomStyle folder, create a C# script ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15ce958f62f2
unity_docs
editor
What is `Handles.EndGUI` in Unity? Explain its purpose and usage.
Handles.EndGUI Declaration public static void EndGUI (); Description End a 2D GUI block and get back to the 3D handle GUI. Additional resources: Handles.BeginGUI . GUI in the Scene View. ```csharp // Change the transform values for the selected object. // When selected this script starts and the handleExampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d7a2e7eb6fb
unity_docs
scripting
What is `Search.SearchExpression.ToString` in Unity? Explain its purpose and usage.
SearchExpression.ToString Declaration public string ToString (); Returns string Returns string representation of a SearchExpression . Description Convert an expression to a string representation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_45e3bf917f73
unity_docs
rendering
In Unity's 'Graphics', what is 'Set Default Render Pipeline Asset' and how does it work?
Use the Default Render Pipeline field to set the default render pipeline Unity uses to render your project. For example, set Default Render Pipeline to a Universal Render Pipeline (URP) Asset to use URP to render your project. If Default Render Pipeline is set to None , Unity uses the Built-In Render Pipeline.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1ae188a4c52f
unity_docs
editor
In Unity's 'Install Unity from the command line', what is 'Install the Unity Editor and components on Windows' and how does it work?
Use the following command line arguments to install the Editor and other components on Windows. Command line argument Description /S Performs an installation which runs silently without any user interaction. /D=PATH Sets the default installation directory. Use with the silent installation option. The default folder is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eaabdf5b402f
unity_docs
editor
What is `AssetDatabase.GetCacheServerAddress` in Unity? Explain its purpose and usage.
AssetDatabase.GetCacheServerAddress Declaration public static string GetCacheServerAddress (); Returns string Returns the IP address of the Cache Server in Editor Settings. Returns empty string if IP address is not set in Editor settings. Description Gets the IP address of the Cache Server in Editor Settin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c023be22700d
unity_docs
editor
What are the parameters of `EditorGUILayout.TextArea` in Unity?
Returns string The text entered by the user. Description Make a text area. This works just like @@ GUILayout.TextArea @@ with proper responsiveness to actions like Select all , Copy , Paste in the Editor. For Undo support, see Undo.RecordObject . To make the text wrap, set EditorStyles.textField.wordWrap . Quick script...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72f6ca184ed8
unity_docs
scripting
What is `AndroidJNI.GetStaticLongField` in Unity? Explain its purpose and usage.
AndroidJNI.GetStaticLongField Declaration public static long GetStaticLongField (IntPtr clazz , IntPtr fieldID ); Description Returns the value of a static field of an 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_2e85b4bb3168
unity_docs
xr
Give me an overview of the `AudioSpeakerMode` class in Unity.
AudioSpeakerMode enumeration Description The speaker configurations that Unity supports. Unity supports multiple speaker types. Each speaker type has a different number of channels and is suitable for different device types and situations. The operating system (OS) and hardware determine the final output. Unity re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d5f9d370f872_doc_9
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Input actions associated with locomotion that are affected by the active movement control scheme.Can use this list to select exactly the actions to affect instead of setting control scheme masks by Asset or Map. Signature: ```csharp public List<InputActionReference> actions ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86d6b362fe7b
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingConfig.minSolidAngle` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingConfig.minSolidAngle public float minSolidAngle ; Description The minimum solid angle in degrees that Unity uses for culling ray tracing instances associated with the Renderers in a Scene. If the projected solid angle of a Renderer relative to cameraPosition value from RayTracingInstan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8817d036df0
unity_docs
scripting
What is `Experimental.GraphView.MiniMap.anchored` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. MiniMap.anchored public bool anchored ; Description True if the MiniMap is pinned or achored (non-movable). False if you can drag and move it around.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_caf07b414158
unity_docs
editor
Show me a Unity code example for 'Search the Asset Database'.
To enable it, refer to Activate and deactivate search providers . Tip: You can use the Asset Database provider in the general Search window, or in a specialised window. To open a specialized search window for the Asset Database provider, from the main menu, select Window > Search > Asset Database . ## Query syntax Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43d84987103a
unity_docs
xr
What is `Search.SearchItem.TryGetField` in Unity? Explain its purpose and usage.
SearchItem.TryGetField(string,Field) Parameters Parameter Description name Field name. field Copy of the field found. Returns void Returns true if the requested field name exists. Description Returns an item field if available.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52d927e3cebf
unity_docs
scripting
What is `UIElements.Experimental.PointerOverLinkTagEvent.GetPooled` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PointerOverLinkTagEvent.GetPooled Declaration public static UIElements.Experimental.PointerOverLinkTagEvent GetPooled ( UIElements.IPointerEvent evt , string linkID , string linkText ); Returns PointerOverLinkTagEvent ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78b4fe0d2b93
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.allowDraggingColumnsToReorder` in Unity? Explain its purpose and usage.
MultiColumnHeader.allowDraggingColumnsToReorder protected bool allowDraggingColumnsToReorder ; Description Use this property to control whether the user can drag and drop columns to re-order them.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7f9354c5d657
github
scripting
Write a Unity Editor script for Modify Unity Android App Manifest
```csharp using System.IO; using System.Text; using System.Xml; using UnityEditor.Android; using UnityEngine; namespace MagicLeap.SetupTool.Editor.Utilities { // reference: https://stackoverflow.com/questions/43293173/use-custom-manifest-file-and-permission-in-unity public class ModifyUnityAndroidAppManifest ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09e7762beb79
unity_docs
scripting
What is `Playables.PlayableOutputExtensions.AddNotificationReceiver` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.AddNotificationReceiver Declaration public static void AddNotificationReceiver (U output , Playables.INotificationReceiver receiver ); Parameters Parameter Description output The target output. receiver The receiver to register. Description Registers a new receiver that listen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69fdf52e41cc
unity_docs
scripting
What is `Rendering.RenderPipelineManager.activeRenderPipelineTypeChanged` in Unity? Explain its purpose and usage.
RenderPipelineManager.activeRenderPipelineTypeChanged Description Delegate that you can use to invoke custom code when Unity changes the active render pipeline, and the new RenderPipeline has a different type to the old one. If the RenderPipeline that Unity uses to render a frame is a different type to the one ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9755582228d8
unity_docs
rendering
What is `SpeedTree.Importer.MaterialSettingsCallbackAttribute.ctor` in Unity? Explain its purpose and usage.
MaterialSettingsCallbackAttribute.ctor(int methodVersion) Parameters Parameter Description methodVersion The given method version. Description Initializes a new instance of the MaterialSettingsCallbackAttribute with the given method version.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f14183eb7834
unity_docs
rendering
Show me a Unity code example for 'Declare shader keywords'.
To declare shader keywords, use a #pragma directive in the HLSL code. For example: ``` #pragma shader_feature REFLECTION_TYPE1 REFLECTION_TYPE2 REFLECTION_TYPE3 ``` Use one of the following shader directives: dynamic_branch to keep branching code in one compiled shader program.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c430632c1915
unity_docs
rendering
In Unity's 'Introduction to font assets', what is 'Dynamic font asset' and how does it work?
Dynamic font assets start with an empty atlas texture. Dynamic font assets look for characters in the source font file and adds the characters dynamically as you use them in a UI. Use Dynamic font assets for unknown text in your project, such as any text input fields . Dynamic font assets are flexible, but they have ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cfeacc5fa45
unity_docs
physics
What is `CapsulecastCommand` in Unity? Explain its purpose and usage.
CapsulecastCommand struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Use this struct to set up a capsule cast command that is performed asynchronously during a job. When you use this struct to schedule a batch of capsule casts, the capsule casts are performed asynchronously and in pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a279ad82c057
unity_docs
ui
What is `EditorWindow.wantsMouseMove` in Unity? Explain its purpose and usage.
EditorWindow.wantsMouseMove public bool wantsMouseMove ; Description Checks whether MouseMove events are received in the GUI in this Editor window. Editor Window that detects mouse moves when the toggle button is activated and the mouse is over the window. ```csharp // Editor Script that shows the mouse moveme...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c62e6d0c7fd8_doc_1
github
scripting
What does `UpdateLineRendering` do in this Unity script? Explain its purpose and signature.
Coroutine to draw the line between the tooltip and the attach point.Called once this gameobject is enabled. Signature: ```csharp public IEnumerator UpdateLineRendering() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_c8446c71a422
unity_docs
rendering
In Unity's 'ZWrite command in ShaderLab reference', what is 'Syntax' and how does it work?
This command makes a change to the render state. Use it in a Pass block to set the render state for that Pass, or use it in a SubShader block to set the render state for all Passes in that SubShader. Signature Example syntax Function ZWrite [state] ZWrite Off Enables or disables writing to the depth buffer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_164f884a1be3
github
scripting
Write a Unity C# script called Angular Resizing Element Utils
```csharp using System.Collections.Generic; using JetBrains.Annotations; using UnityEngine.UIElements; using static UIToolkitXRAdapter.AngularResizing.AngularResizingUtils; using static UnityEngine.UIElements.Visibility; namespace UIToolkitXRAdapter.AngularResizing.DefaultElements { internal static class A...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_23d7a18a3c02
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchProvider.isExplicitProvider`.
SearchProvider.isExplicitProvider public bool isExplicitProvider ; Description This search provider is only active when specified explicitly using the filterId. ```csharp using UnityEditor; using UnityEditor.Search; using UnityEngine; static class SearchProvider_isExplicitProvider { internal static string typ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb5af592f24b
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.RemoveFile`.
PBXProject.RemoveFile Declaration public void RemoveFile (string fileGuid ); Parameters Parameter Description fileGuid The GUID of the file or folder reference. Description Removes the given file from project. The file is removed from the list of files to build for each native target and also removed from...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47adf659b5f9
unity_docs
scripting
What is `Vector3.MoveTowards` in Unity? Explain its purpose and usage.
Vector3.MoveTowards Declaration public static Vector3 MoveTowards ( Vector3 current , Vector3 target , float maxDistanceDelta ); Parameters Parameter Description current The position to move from. target The position to move towards. maxDistanceDelta Distance to move current per call. Returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7726641f2202
unity_docs
xr
Explain 'iOS 14 Advertising Support' in Unity.
com.unity.ads.ios-support ## Description Provides support for App Tracking Transparency and SkAdNetwork API newly introduced in Apple iOS 14. Includes a sample implementation of a customizable context screen to show before requesting tracking permission. ## Released for Unity Package version 1.0.1 is released for U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4e9131eb1ab
unity_docs
scripting
What is `Windows.WebCam.PhotoCapture.OnPhotoModeStartedCallback` in Unity? Explain its purpose and usage.
PhotoCapture.OnPhotoModeStartedCallback Declaration public delegate void OnPhotoModeStartedCallback ( Windows.WebCam.PhotoCapture.PhotoCaptureResult result ); Parameters Parameter Description result Indicates whether or not photo mode was successfully activated. Description Called when photo mode has been...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f9f39d01e378
unity_docs
scripting
In Unity's 'CurveField', what is 'Example' and how does it work?
The following UXML example creates a CurveField: ``` <UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements"> <uie:CurveField label="UXML Field" name="the-uxml-field" /> </UXML> ``` The following C# example illustrates some of the customizable functionalities of the CurveField: ``` /// <sample> // Get ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8e8d23e692a
unity_docs
scripting
What is `Terrain.GetActiveTerrains` in Unity? Explain its purpose and usage.
Terrain.GetActiveTerrains Declaration public static void GetActiveTerrains (List<Terrain> terrainList ); Parameters Parameter Description activeTerrainsList A List of Terrains this function populates with the active Terrains in the Scene. Description Populates a List of Terrains with the active Terrains i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62c95e9aaddf
unity_docs
scripting
Give me an overview of the `ChangeGameObjectStructureEventArgs` class in Unity.
ChangeGameObjectStructureEventArgs struct in UnityEditor Description A change of this type indicates that the structure of a GameObject has changed. This happens when a component is added to or removed from the GameObject using Undo.AddComponent or Undo.DestroyObjectImmediate . Note that multiple changes t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8872733d8e69
unity_docs
rendering
In Unity's 'Create a Profiler module', what is 'Create a Profiler module in code' and how does it work?
To create a Profiler module via code, you must create a new ProfilerModule script and define the module’s properties including the counters it displays, its name, and its icon. To define a Profiler module, your script must do the following: Define a class derived from ProfilerModule in your project or package. In the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_35f8fb3212ea_doc_18
github
scripting
What does `SetUseTheme` do in this Unity script? Explain its purpose and signature.
Enable or disable automatic theme integration for this button.When enabled, button colors will update automatically when the theme changes.True to use theme manager, false to use manual colors. Signature: ```csharp public void SetUseTheme(bool enable = true) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0ba196a9613
unity_docs
scripting
What is `Search.SearchExpressionType.Number` in Unity? Explain its purpose and usage.
SearchExpressionType.Number Description Denote a Literal expression of a numerical value. ```csharp [SearchExpressionEvaluator(SearchExpressionType.Iterable | SearchExpressionType.Variadic)] [SearchExpressionEvaluatorSignatureOverload(SearchExpressionType.Number, SearchExpressionType.Iterable | SearchExpressionType...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df8196365913
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.IsUnmanaged` in Unity? Explain its purpose and usage.
UnsafeUtility.IsUnmanaged Declaration public static bool IsUnmanaged (); Declaration public static bool IsUnmanaged (Type type ); Parameters Parameter Description type The System.Type of a struct. Returns bool True if type is unmanaged, otherwise false. Description Checks whether the struct o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_821512a6eccb
unity_docs
physics
In Unity's 'Optimize raycasts and other physics queries', what is 'Use batch queries for multiple operations' and how does it work?
Running many individual physics queries (for example, many raycasts per frame) can reduce performance because of the overhead of each call. If you need to perform many queries simultaneously, batch them using APIs like RaycastCommand , SpherecastCommand , or BoxcastCommand in conjunction with the job system . This appr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28b8c88c809e
unity_docs
editor
Give me an overview of the `ExportPackageOptions` class in Unity.
ExportPackageOptions enumeration Description Export package option. Multiple options can be combined together using the | operator. Additional resources: AssetDatabase.ExportPackage . Properties Property Description Default Default mode. Will not include dependencies or subdirectories nor include Library asse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe046551832e
unity_docs
rendering
Show me a Unity code example for 'Set the depth clip mode in a shader'.
Setting the GPU’s depth clip mode to clamp can be useful for stencil shadow rendering; it means that there is no need for special case handling when the geometry goes beyond the far plane, which results in fewer rendering operations. However, it can result in incorrect Z ordering. ## Example This example code demonst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a497415ad74
unity_docs
scripting
What is `Windows.WebCam.PhotoCapture.SupportedResolutions` in Unity? Explain its purpose and usage.
PhotoCapture.SupportedResolutions public static IEnumerable<Resolution> SupportedResolutions ; Description A list of all the supported device resolutions for taking pictures. ```csharp using UnityEngine; using System.Collections; using UnityEngine.Windows.WebCam;public class PhotoCaptureResolutionExample : Mono...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fed9e4b6933
unity_docs
ui
What is `TerrainData.SetHeightsDelayLOD` in Unity? Explain its purpose and usage.
TerrainData.SetHeightsDelayLOD Declaration public void SetHeightsDelayLOD (int xBase , int yBase , float[,] heights ); Parameters Parameter Description xBase First x index of heightmap samples to set. yBase First y index of heightmap samples to set. heights Array of heightmap samples to set (values ran...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_670fb1c22788
github
scripting
Write a Unity C# MonoBehaviour script called Socket Client
```csharp using UnityEngine; using System; using System.Collections.Generic; namespace TapLive.Network { /// <summary> /// WebSocket client for real-time communication /// NOTE: This is a stub - requires external WebSocket library (e.g., WebSocketSharp, NativeWebSocket) /// </summary> public class ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_595feb00cae1
unity_docs
scripting
What is `PlayerSettings.hdrBitDepth` in Unity? Explain its purpose and usage.
PlayerSettings.hdrBitDepth public static HDRDisplayBitDepth hdrBitDepth ; Description The number of bits in each color channel for swap chain buffers. The bit count defines the method Unity uses to render content to the display. When set to 10 , Unity uses the R10G10B10A2 buffer format, Rec2020 primaries, a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7d4be2136fb
unity_docs
editor
Show me a Unity C# example demonstrating `Help.BrowseURL`.
Help.BrowseURL Declaration public static void BrowseURL (string url ); Description Open url in the default web browser. Editor Window that lets you load docs for any Selected GameObject. ```csharp using UnityEngine; using UnityEditor;// EditorScript that quickly searchs for a help page // of the selected Ob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3acf170da0fb
unity_docs
scripting
What is `U2D.SpriteAtlasExtensions.GetPackingSettings` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.GetPackingSettings Declaration public static U2D.SpriteAtlasPackingSettings GetPackingSettings ( U2D.SpriteAtlas spriteAtlas ); Description Current SpriteAtlasPackingSettings to use when packing this SpriteAtlas .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_69830fccbb43
unity_docs
xr
Explain 'Set up your 3D panoramic video' in Unity.
Use 3D panoramic videos to create immersive environments in virtual reality (VR) or 3D scenes . This information covers how to use your panoramic video for 3D scenes or for use in VR . VR support is especially useful if your source video has stereo content. ## Set up your 360° 3D panoramic video 360° 3D panoramic vid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6eca90f244ec
unity_docs
rendering
Explain 'Choose a method for optimizing draw calls' in Unity.
Use draw call optimization if the CPU sends too many draw calls to the GPU, which is also known as being CPU-bound. For more information about draw calls, refer to Introduction to optimizing draw calls . ## Check the number of draw calls To check if your scene sends too many draw calls, do any of the following: Open ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fad4c81bca2
unity_docs
scripting
What is `SystemInfo.maxTiledPixelStorageSize` in Unity? Explain its purpose and usage.
SystemInfo.maxTiledPixelStorageSize public static int maxTiledPixelStorageSize ; Description Returns the maximum per-pixel storage size in bytes for Multiple Render Targets (MRT) in tile or render target memory on the current platform. Each GPU architecture has a limit on the amount of memory that can be alloc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b8188fb146d
unity_docs
editor
What is `EditorPrefs.SetString` in Unity? Explain its purpose and usage.
EditorPrefs.SetString Declaration public static void SetString (string key , string value ); Description Sets the value of the preference identified by key . Note that EditorPrefs does not support null strings and will store an empty string instead. Quick notes that last between Unity Sessions. ```csharp //...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_087e00928c55
unity_docs
scripting
What is `IMGUI.Controls.TreeView.CanMultiSelect` in Unity? Explain its purpose and usage.
TreeView.CanMultiSelect Declaration protected bool CanMultiSelect ( IMGUI.Controls.TreeViewItem item ); Parameters Parameter Description item Can this item be part of a multiselection. Description Override this method to control whether the item can be part of a multiselection. Default behavior: returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d43dcbc17c3d
unity_docs
math
What is `AndroidJNI.CallStaticIntMethod` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticIntMethod Declaration public static int CallStaticIntMethod (IntPtr clazz , IntPtr methodID , jvalue[] args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Java Native Interface S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db2d4cda63be
unity_docs
scripting
What is `ReflectionProbe.renderDynamicObjects` in Unity? Explain its purpose and usage.
ReflectionProbe.renderDynamicObjects public bool renderDynamicObjects ; Description Specifies whether Unity should render non-static GameObjects into the Reflection Probe. If you set this to true , Unity renders non-static GameObjects into the Reflection Probe. If you set this to false , Unity does not render...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85f8c4459f26
unity_docs
scripting
Show me a Unity C# example demonstrating `RigidbodyConstraints.FreezeRotationZ`.
RigidbodyConstraints.FreezeRotationZ Description Freeze rotation along the Z-axis. ```csharp //This example shows how RigidbodyConstraints is used to freeze the position and rotation of a Rigidbody in the z axis at start-up. //It also shows what happens when these constraints are removed, when you press the space k...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e37d26cbd924
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector4.Scale`.
Vector4.Scale Declaration public static Vector4 Scale ( Vector4 a , Vector4 b ); Description Multiplies two vectors component-wise. Every component in the result is a component of a multiplied by the same component of b . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b499551ab2ff
unity_docs
math
Give me an overview of the `RectTransformUtility` class in Unity.
RectTransformUtility class in UnityEngine / Implemented in: UnityEngine.UIModule Description Utility class containing helper methods for working with RectTransform . Static Methods Method Description CalculateRelativeRectTransformBounds Creates a Bounds object that encapsulates all the child RectTransform o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12b6341e78ff
unity_docs
scripting
What is `SceneManagement.StageUtility.GetMainStage` in Unity? Explain its purpose and usage.
StageUtility.GetMainStage Declaration public static SceneManagement.MainStage GetMainStage (); Returns MainStage The Main Stage object. Description Get the MainStage object. This object is always available. Additional resources: StageUtility.GetCurrentStage , StageUtility.GetStage .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_218303c91c93
unity_docs
rendering
What is `Rendering.BuiltinShaderMode.Disabled` in Unity? Explain its purpose and usage.
BuiltinShaderMode.Disabled Description Don't use any shader, effectively disabling the functionality. This is primarily used as a build size optimization, for example if you know the project never uses deferred shading, you could disable support for it in Graphics Settings and save some build data size. When Bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe38cbc7133a
unity_docs
networking
What is `Networking.CertificateHandler.ValidateCertificate` in Unity? Explain its purpose and usage.
CertificateHandler.ValidateCertificate Declaration protected bool ValidateCertificate (byte[] certificateData ); Parameters Parameter Description certificateData Certificate data in PEM or DER format. If certificate data contains multiple certificates, the first one is the leaf certificate. Returns bool t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1e34105663f
unity_docs
rendering
What is `SceneView.ClearUserDefinedCameraModes` in Unity? Explain its purpose and usage.
SceneView.ClearUserDefinedCameraModes Declaration public static void ClearUserDefinedCameraModes (); Description Remove all user-defined camera modes. If a user-defined camera mode is the currently selected camera mode, it will be readded to the list.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f50dce9c06a4
unity_docs
xr
What is `Networking.UnityWebRequest.SerializeFormSections` in Unity? Explain its purpose and usage.
UnityWebRequest.SerializeFormSections Declaration public static byte[] SerializeFormSections (List<IMultipartFormSection> multipartFormSections , byte[] boundary ); Parameters Parameter Description multipartFormSections A List of IMultipartFormSection objects. boundary A unique boundary string to separa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_70b9ee27b70f
unity_docs
physics
In Unity's 'Configure a particle trigger', what is 'Accessing particles within OnParticleTrigger()' and how does it work?
If you select Callback as the reaction to one of the trigger events, you can access the particles that fulfill the event condition from an attached script. To do this, you first need to add the OnParticleTrigger() function to an attached script. Inside this function, call the ParticlePhysicsExtensions.GetTriggerParticl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_483aa34999c7
unity_docs
physics
What is `Joint.connectedAnchor` in Unity? Explain its purpose and usage.
Joint.connectedAnchor public Vector3 connectedAnchor ; Description Position of the anchor relative to the connected Rigidbody. If Joint.autoConfigureConnectedAnchor is not enabled, then this will be used to set the position of the anchor on the connected rigidbody. The position is given in local coordinates...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8792d37af58
unity_docs
editor
Show me a Unity C# example demonstrating `Android.UserBuildSettings.DebugSymbols.format`.
UserBuildSettings.DebugSymbols.format public static Unity.Android.Types.DebugSymbolFormat format ; Description Specifies the format for the symbol package. ```csharp using UnityEditor.Android; using Unity.Android.Types;public class Settings { public void Setup() { UserBuildSettings.DebugSymbols.format = De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f873f81729c
unity_docs
ui
Show me a Unity C# example demonstrating `UIElements.UQueryBuilder_1`.
t enables you to search for elements and execute the query on any VisualElement, making it easier to navigate and filter the VisualElement tree in large UIs, by type, name, class, and hierarchy conditions. For more information, refer to the UQuery manual page . The following example demonstrates how to use UQuer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8c0190cb0a5
unity_docs
physics
What is `ParticleSystemForceField.drag` in Unity? Explain its purpose and usage.
ParticleSystemForceField.drag public ParticleSystem.MinMaxCurve drag ; Description Apply drag to particles within the volume of the Force Field. Use this property to slow down particles. Additional resources: ParticleSystemForceField .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80267c538b44
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.isPlaying`.
Clip or AudioRandomContainer. This includes if you use PlayOneShot() or if you play a video or timeline track through the AudioSource. Note: AudioSource.isPlaying returns false when AudioSource.Pause() is called. If you use AudioSource.Play() back again, it returns true. Note: If you use AudioSource.PlayDe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24e84871f9fb
unity_docs
scripting
What is `UIElements.BaseField_1` in Unity? Explain its purpose and usage.
BaseField<T0> class in UnityEngine.UIElements / Inherits from: UIElements.BindableElement / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IMixedValueSupport , INotifyValueChanged<T0> Description Abstract base class for controls. A BaseField is a base class for field elements like TextF...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07bddc46cc64
unity_docs
scripting
Show me a Unity C# example demonstrating `RigidbodyConstraints.FreezePositionZ`.
RigidbodyConstraints.FreezePositionZ Description Freeze motion along the Z-axis. ```csharp //This example shows how RigidbodyConstraints is used to freeze the position and rotation of a Rigidbody in the z axis at start-up. //It also shows what happens when these constraints are removed, when you press the space key...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb692eb35054
unity_docs
scripting
What is `IExposedPropertyTable.GetReferenceValue` in Unity? Explain its purpose and usage.
IExposedPropertyTable.GetReferenceValue Declaration public Object GetReferenceValue ( PropertyName id , out bool idValid ); Parameters Parameter Description id Identifier of the ExposedReference. idValid Is the identifier valid? Returns Object The value stored in the table. Description Retrieves ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d40a0e19e565
unity_docs
math
What is `Input.compositionCursorPos` in Unity? Explain its purpose and usage.
Input.compositionCursorPos public static Vector2 compositionCursorPos ; Description The current text input position used by IMEs to open windows. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdc25d7d07eb
unity_docs
editor
What is `IMGUI.Controls.PrimitiveBoundsHandle.handleColor` in Unity? Explain its purpose and usage.
PrimitiveBoundsHandle.handleColor public Color handleColor ; Description Returns or specifies the color of the control handles. This value is multiplied with the value of Handles.color at the time DrawHandle is called. If Color.a is 0 then the control handles are disabled. Additional resources: midp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_273ccef71462
unity_docs
scripting
What is `Camera.pixelWidth` in Unity? Explain its purpose and usage.
Camera.pixelWidth public int pixelWidth ; Description How wide is the camera in pixels (not accounting for dynamic resolution scaling) (Read Only). Use this to return how wide the Camera viewport is in pixels. This is read-only. ```csharp //Attach this script to an empty GameObject //Create a new Camera (Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ace72be6abb
unity_docs
math
Show me a Unity C# example demonstrating `Quaternion.Lerp`.
d unit quaternion value, returned when t = 1. t Interpolation ratio. The value is clamped to the range [0, 1]. Returns Quaternion A unit quaternion interpolated between quaternions a and b . Description Interpolates between a and b by t and normalizes the result afterwards. This is faster than Slerp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5174cf97b9e6
unity_docs
scripting
What is `Android.AndroidAssetPackState.error` in Unity? Explain its purpose and usage.
AndroidAssetPackState.error public Android.AndroidAssetPackError error ; Description Indicates an error code that describes what happened when querying the Android asset pack state. The default value is AndroidAssetPackError.NoError which indicates no errors. Read-only. Additional resources: AndroidAssetPack...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_133bebeacd1d
unity_docs
editor
Explain 'Access package assets using scripts' in Unity.
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_dc192609bf13
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.pixelRect`.
Camera.pixelRect public Rect pixelRect ; Description Where on the screen is the camera rendered in pixel coordinates. ```csharp //Attach this script to an empty GameObject //Create a new Camera (Create>Camera) and position it appropriately. Attach it to the Second Camera field in the Inspector of the GameObj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8f0b3012d6ed
unity_docs
editor
In Unity's 'Set up your environment for QNX', what is 'Direct dependencies' and how does it work?
Direct dependencies load at the application startup. Use the following dependencies for all versions of QNX: libm.so.3 libgcc_s.so.1 libscreen.so.1 libc.so.5 libsocket.so.3 (also known as io-pkt ) libasound.so.3
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2cf4be31a6f
unity_docs
scripting
Show me a Unity C# example demonstrating `LightProbes.Tetrahedralize`.
LightProbes.Tetrahedralize Declaration public static void Tetrahedralize (); Description Synchronously tetrahedralize the currently loaded LightProbe positions. Call this function to tetrahedralize the currently loaded LightProbe positions. You should generally only call this function upon receiving a LightPro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e18979352783
unity_docs
rendering
What is `Rendering.LightShadowResolution.FromQualitySettings` in Unity? Explain its purpose and usage.
LightShadowResolution.FromQualitySettings Description Use resolution from QualitySettings (default). Additional resources: Light.shadowResolution , Shadow map size calculation , Quality Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c50ca35fe3f0
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.SetImporterOverride`.
AssetDatabase.SetImporterOverride Declaration public static void SetImporterOverride (string path ); Parameters Parameter Description path Project relative path for the asset. Description Sets a specific importer to use for the asset. Multiple Importers may be registered to a single asset by using either ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc2fa2914b42
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.RemoveAssetTagForFile` in Unity?
Description Removes an asset tag for the given file. This function does nothing if the file isn't configured for building in the given target, or if the asset tag is not present in the list of asset tags configured for file. If the file was the last file referring to the given tag across the Xcode project, then the tag...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f355f9983fac
unity_docs
scripting
What is `IMGUI.Controls.TreeView.searchString` in Unity? Explain its purpose and usage.
TreeView.searchString public string searchString ; Description Current search string of the TreeView. If this search string is set then remember to use it to filter items when BuildRows is called. Note that this search string is stored in the TreeViewState object ( state ).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b573a013614
unity_docs
xr
What is `XR.XRDevice.GetNativePtr` in Unity? Explain its purpose and usage.
XRDevice.GetNativePtr Declaration public static IntPtr GetNativePtr (); Returns IntPtr The native pointer to the XR device. Description This method returns an IntPtr representing the native pointer to the XR device if one is available, otherwise the value will be IntPtr.Zero. This native pointer can be us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_89211301da65_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Controller coordinates everything betweenthe s and contains the core app logic Signature: ```csharp public class SceneSystemController: BaseController // Extending 'base' is optional <SceneSystemModel, SceneSystemView, DummyService> ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1dc63a5d8ee
unity_docs
editor
What is `PluginImporter.SetExcludeEditorFromAnyPlatform` in Unity? Explain its purpose and usage.
PluginImporter.SetExcludeEditorFromAnyPlatform Declaration public void SetExcludeEditorFromAnyPlatform (bool excludedFromAny ); Description Exclude Editor from compatible platforms when Any Platform is set to true. See also PluginImporter.SetExcludeFromAnyPlatform .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.