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_6cf7be053e8a
unity_docs
editor
What is `SearchService.SceneSearch` in Unity? Explain its purpose and usage.
SceneSearch class in UnityEditor.SearchService Description Use this API to perform searches in the Scene. Engines for this type of search implement the ISceneSearchEngine interface. Registered Scene search engines are called during searches in the Scene hierarchy. When the default object selector is used, they ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5a8d307e59b1
unity_docs
scripting
Explain 'Deep linking for macOS' in Unity.
Deep links are hyperlinks that take a user to a specific location within an app rather than a website. When a user clicks a deep link, the application opens from the designated location, such as a specific scene in a Unity application. There are two ways to enable deep links for macOS applications: URL schemes and univ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b8d35f7f4c7f
unity_docs
physics
In Unity's 'CPU Usage Profiler module reference', what is 'Module details pane toolbar' and how does it work?
When you select the CPU Usage module, the details pane displays a breakdown of where the application spent time in the selected frame. Use the toolbar at the top of the pane to navigate the views. Property Description Timing data view dropdown Choose to display the timing data as either a timeline or a hierarchical tab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b13fb29901f
unity_docs
performance
What is `Profiling.FrameDataView.GetSessionMetaData` in Unity? Explain its purpose and usage.
FrameDataView.GetSessionMetaData Declaration public NativeArray<T> GetSessionMetaData (Guid id , int tag ); Declaration public NativeArray<T> GetSessionMetaData (Guid id , int tag , int index ); Parameters Parameter Description id Unique identifier associated with the data. tag Data stream index. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
If the language server was initialized, meaning locales are replaced and can be switched. Signature: ```csharp private bool _initialized; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_13e1658e3fa3
github
scripting
Write a Unity Editor script for Exit Play Mode On Script Compile
```csharp using UnityEngine; using UnityEditor; namespace Wrld.Editor { // Copyright Cape Guy Ltd. 2015. http://capeguy.co.uk. // Provided under the terms of the MIT license - // http://opensource.org/licenses/MIT. Cape Guy accepts // no responsibility for any damages, financial or otherwise, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2feaf1904af2
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.SerboCroatian`.
SystemLanguage.SerboCroatian Description Serbo-Croatian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Serbo-Croatian language if (Application.systemLanguage == SystemLanguage.SerboCroatian) { //Outputs into consol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5cbffbbef927
unity_docs
scripting
What is `U2D.SpriteAtlasAsset` in Unity? Explain its purpose and usage.
SpriteAtlasAsset class in UnityEditor.U2D / Inherits from: Object Description SpriteAtlasAsset stores inputs for generating SpriteAtlas and generates atlas textures on Import. Properties Property Description isVariant Checks whether the Sprite Atlas Importer set the Sprite Atlas as a Variant. Public Methods...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b38bdfc9e34
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.IsBuildable` in Unity?
Returns bool Returns true if the file can be built. Description Checks if a file with the given extension can be built by Xcode. Note : Returns true if the extension is not known by PBXProject. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab9ecd25fa20
unity_docs
editor
What is `Handles.DrawAAPolyLine` in Unity? Explain its purpose and usage.
Handles.DrawAAPolyLine Declaration public static void DrawAAPolyLine (Color[] colors , Vector3[] points ); Declaration public static void DrawAAPolyLine (float width , Color[] colors , Vector3[] points ); Declaration public static void DrawAAPolyLine (params Vector3[] points ); Declaration public st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d6b6a2f1e01f
unity_docs
networking
Explain 'Mirror multiple Unity Accelerator instances' in Unity.
You can configure multiple Unity Accelerator instances to mirror the same cached data. You might want to have two mirrored cache servers running on the same network for high availability. For example, if one crashes, has a hardware failure, or needs maintenance for whatever reason, the other server can compensate. You ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18fe061abf0f
unity_docs
editor
What are the parameters of `BuildPipeline.BuildPlayer` in Unity?
Returns BuildReport A BuildReport object containing build process information. Description Builds a player. Use this function to programatically create a build of your project. Calling this method will invalidate any variables in the editor script that reference GameObjects, so they will need to be reacquired after the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8483a87fa45
unity_docs
math
What is `AndroidJNI.NewBooleanArray` in Unity? Explain its purpose and usage.
AndroidJNI.NewBooleanArray Declaration public static IntPtr NewBooleanArray (int size ); Description Constructs a new primitive array 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_1cc3881ea34b
unity_docs
rendering
What is `ModelImporter.skinWeights` in Unity? Explain its purpose and usage.
ModelImporter.skinWeights public ModelImporterSkinWeights skinWeights ; Description Skin weights import options. To import more than 4 bone weights per vertex, set this property to ModelImporterSkinWeights.Custom and set ModelImporter.maxBonesPerVertex to the required number. You may also limit the number...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87c05318c205
unity_docs
rendering
What is `MaterialEditor.LightmapEmissionFlagsProperty` in Unity? Explain its purpose and usage.
MaterialEditor.LightmapEmissionFlagsProperty Declaration public void LightmapEmissionFlagsProperty (int indent , bool enabled ); Declaration public void LightmapEmissionFlagsProperty (int indent , bool enabled , bool ignoreEmissionColor ); Parameters Parameter Description indent Level of indentation ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ea246e075813
unity_docs
rendering
In Unity's 'Change particle color', what is 'Color over lifetime' and how does it work?
The Color Over Lifetime module can change a particle’s color based on how long it has existed. Many types of natural and fantastical particles vary in color over time, and so this property has many uses. For example, white hot sparks will cool as they pass through the air and a magic spell might burst into a rainbow of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43a8c11fbda6
unity_docs
scripting
What is `MonoBehaviour.Start` in Unity? Explain its purpose and usage.
MonoBehaviour.Start() Description Start is called on the frame when a script is enabled just before any of the Update methods are called the first time. Start is called exactly once in the lifetime of the script and always after MonoBehaviour.Awake . Start might not be called on the same frame as Awake if th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0095eff0853
unity_docs
physics
What is `AI.NavMeshObstacle.carving` in Unity? Explain its purpose and usage.
NavMeshObstacle.carving public bool carving ; Description Should this obstacle make a cut-out in the navmesh. When enabled, this changes the navmesh by cutting out a hole. The shape of the hole is based on the size and shape set on NavMeshObstacle and the navmesh bake settings for radius and height. When the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2eb1d2be1e7d
unity_docs
rendering
What is `ShaderData.GetSubshader` in Unity? Explain its purpose and usage.
ShaderData.GetSubshader Declaration public ShaderData.Subshader GetSubshader (int index ); Parameters Parameter Description index The index of the subshader. Returns Subshader The associated runtime subshader or null if none exists. Description Obtains the runtime subshader at the given index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee8303252a54
unity_docs
scripting
What is `Unity.Properties.Property_2.Accept` in Unity? Explain its purpose and usage.
Property<T0,T1>.Accept Declaration public void Accept ( Unity.Properties.IPropertyVisitor visitor , ref TContainer container ); Parameters Parameter Description visitor The visitor being run. container The container being visited. Description Call this method to invoke IPropertyVisitor.Visit_2 with th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_33717a216c49
unity_docs
scripting
In Unity's 'Create a list view runtime UI', what is 'Create a list entry UI Document' and how does it work?
Create a UI Document and a Style Sheet for the individual entries in the list. The character list entry consists of a colored background frame and the character’s name. In the UI folder, create a UI Document named ListEntry.uxml with the following content: ``` <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1ad1d4809643
unity_docs
scripting
In Unity's 'Receive callbacks when any bound properties change', what is 'Create a Weapon object' and how does it work?
Create a C# script to define the class Weapon as a MonoBehaviour with two properties: m_BaseDamage and m_HardModeModifier . Create a project in Unity with any template. In your Project window , create a folder named callback-any-SerializedProperty-changes to store your files. Create a C# script named Weapon.cs and repl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aabd65d0e83b
unity_docs
rendering
What is `Camera.clearStencilAfterLightingPass` in Unity? Explain its purpose and usage.
Camera.clearStencilAfterLightingPass public bool clearStencilAfterLightingPass ; Description Should the camera clear the stencil buffer after the deferred light pass? When using Deferred Shading, the G-buffer and lighting passes use the stencil buffer. By default contents of the stencil buffer are preserved (n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4372133b6fa8
unity_docs
rendering
Give me an overview of the `TextureImporterType` class in Unity.
TextureImporterType enumeration Description Select this to set basic parameters depending on the purpose of your texture. Properties Property Description Default This is the most common setting used for all the textures in general. NormalMap Select this to turn the color channels into a format suitable for rea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4def5336445f
unity_docs
editor
What is `EditorGUI.RectIntField` in Unity? Explain its purpose and usage.
EditorGUI.RectIntField Declaration public static RectInt RectIntField ( Rect position , RectInt value ); Declaration public static RectInt RectIntField ( Rect position , string label , RectInt value ); Declaration public static RectInt RectIntField ( Rect position , GUIContent label , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38ab932dd829
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.UpdateBuildProperty`.
Parameter Description targetGuid The target GUID as returned by NativeTargetByName. targetGuids An array of target GUIDs. name The name of the build property. addValues The values to add to the build property. removeValues The values to remove from the build property. Description Adds and removes values fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac9950ad823c
unity_docs
physics
Give me an overview of the `PhysicsVisualizationSettings` class in Unity.
PhysicsVisualizationSettings class in UnityEditor Description This class contains the settings controlling the Physics Debug Visualization. Additional resources: PhysicsDebugWindow . Static Properties Property Description articulationBodyColor Color for Articulation Bodies. baseAlpha Alpha amount used for t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9c532eaf46dc
github
scripting
Write a Unity C# script called Spatial Hashing
```csharp using UnityEngine; public static class SpatialHashing { public static float CellSize = 1f; public static int Dimensions = 10; public static Vector3Int GetCell(Vector3 position, float cellSize) { return new Vector3Int((int)( position.x / cellSize ), (int)( position.y / cellSize ), (i...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_f4fdd28cd7de
unity_docs
rendering
What is `LineRenderer.SetPosition` in Unity? Explain its purpose and usage.
LineRenderer.SetPosition Declaration public void SetPosition (int index , Vector3 position ); Parameters Parameter Description index Which position to set. position The new position. Description Set the position of a vertex in the line. Consider using SetPositions instead, if setting multiple posi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e6104d2609c
unity_docs
rendering
What is `PlayerSettings.vulkanNumSwapchainBuffers` in Unity? Explain its purpose and usage.
PlayerSettings.vulkanNumSwapchainBuffers public static uint vulkanNumSwapchainBuffers ; Description Set the number of swapchain buffers used when rendering with Vulkan. The swapchain manages the sequence of images that are presented to the display. Valid range: 2-3 buffers. The default value is 3 . 2 : Lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_14bd67d1845b
github
scripting
Write a Unity C# script called Omnideck Continous Move Provider
```csharp using UnityEngine; using UnityEngine.XR.Interaction.Toolkit; namespace Omnifinity.Omnideck { public class OmnideckContinousMoveProvider : ContinuousMoveProviderBase { /// <summary> /// The Omnideck API /// </summary> [SerializeField] private OmnideckInterface m...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_4d8cd1da175c
unity_docs
scripting
What is `Transform.IsChildOf` in Unity? Explain its purpose and usage.
Transform.IsChildOf Declaration public bool IsChildOf ( Transform parent ); Description Is this transform a child of parent ? Returns a boolean value that indicates whether the transform is a child of a given transform. true if this transform is a child, deep child (child of a child) or identical to this tr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6153be7bb3f
unity_docs
math
What is `AnimatedValues.AnimFloat` in Unity? Explain its purpose and usage.
AnimFloat class in UnityEditor.AnimatedValues / Inherits from: AnimatedValues.BaseAnimValueNonAlloc_1 Description An animated float value. Animated using Mathf.Lerp . Constructors Constructor Description AnimFloat Constructor. Protected Methods Method Description GetValue Type specific implementation o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db727ea272b9
unity_docs
math
Show me a Unity C# example demonstrating `Color.operator_Vector4`.
Color.Color Description Colors can be implicitly converted to and from Vector4 . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color newColor = new Vector4(0.3f, 0.4f, 0.6f); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a0a999331f6
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime` in Unity? Explain its purpose and usage.
DiscreteTime struct in Unity.IntegerTime / Implemented in: UnityEngine.CoreModule Description Data-type representing a discrete time value. Static Properties Property Description MaxValue The maximum representable time. MaxValueSeconds The maximum representable time in seconds. MinValue The minimum represe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_551202d37208
unity_docs
physics
What is `CapsuleCollider.height` in Unity? Explain its purpose and usage.
CapsuleCollider.height public float height ; Description The height of the capsule measured in the object's local space. The capsule's height will be scaled by the transform's scale. Note: The height is the actual height including the half-spheres at each end.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3e151ea93f77
unity_docs
scripting
In Unity's 'TextElement', what is 'Create a TextElement' and how does it work?
You can create a TextElement with UXML or C#. The following C# example creates a TextElement with a text value and some styles: ``` var textElement = new TextElement() { text = "Hello World", style = { fontSize = 14, unityFontStyleAndWeight = FontStyle.Bold, unityTextAlign = TextAnchor.MiddleCenter, color = Colo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04c46b84ea97
unity_docs
math
What is `Tilemaps.Tilemap.GetSprite` in Unity? Explain its purpose and usage.
Tilemap.GetSprite Declaration public Sprite GetSprite ( Vector3Int position ); Parameters Parameter Description position Position of the Tile on the Tilemap . Returns Sprite Sprite at the XYZ coordinate. Description Gets the Sprite used in a Tile given the XYZ coordinates of a cell in the T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ed00abf3bd4
unity_docs
math
Show me a Unity C# example demonstrating `LineUtility.Simplify`.
esents the provided line but with fewer points(determined by tolerance). Note: This function can handle a large number of points as it is non-recursive. The 2D version of this function performs better than this function as it uses a simpler way to evaluate the points. Additional resources: LineRenderer.Simplify . The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e090f88c081c
unity_docs
rendering
Explain 'PackageRequirements block in ShaderLab reference' in Unity.
To specify package requirements for a SubShader or a Pass, you use the PackageRequirements block. ShaderLab supports a single PackageRequirements block per SubShader or Pass, but each block can specify multiple package requirements. ## Render pipeline compatibility Feature name Universal Render Pipeline (URP) High De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_baf36b62922c
unity_docs
scripting
What is `UIElements.IStyle.opacity` in Unity? Explain its purpose and usage.
IStyle.opacity public UIElements.StyleFloat opacity ; Description Specifies the transparency of an element and of its children. The opacity can be between 0.0 and 1.0. The lower value, the more transparent.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_29fa2645b6db
github
scripting
Write a Unity C# ScriptableObject for Heightmap Generator Editor
```csharp /* * HeightmapGeneratorEditor.cs * * Created by Arian - GameDevBox * YouTube Channel: https://www.youtube.com/@GameDevBox * * 🎮 Want more Unity tips, tools, and advanced systems? * 🧠 Learn from practical examples and well-explained logic. * 📦 Subscribe to GameDevBox for more game dev cont...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_20b6cbcf1154
unity_docs
editor
Give me an overview of the `PlatformIconKind` class in Unity.
PlatformIconKind class in UnityEditor Description Icon kind wrapper. Each platform implements its own icon kinds. See: AndroidPlatformIconKind , iOSPlatformIconKind and tvOSPlatformIconKind for more information.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17d3221a7966
unity_docs
scripting
What is `SceneView.CameraSettings` in Unity? Explain its purpose and usage.
CameraSettings class in UnityEditor Description Use this class to set SceneView Camera properties. ```csharp // Create a folder (right click in the Assets directory, click Create>Folder) // and name it Editor if one doesn't exist already. Create a new C# script called CustomSettings // and place it in that fold...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eae6a016ac8d
unity_docs
editor
Explain 'Android Logcat' in Unity.
com.unity.mobile.android-logcat ## Description Android Logcat package provides support for: - Android log messages - Android application memory statistics - Input injection - Android Screen Capture - Android Screen Recorder - Stacktrace Utility Click the ‘View documentation’ link above for more information. The windo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_816b4c91081e
unity_docs
scripting
What is `AssetImporters.AssetImporterEditor` in Unity? Explain its purpose and usage.
AssetImporterEditor class in UnityEditor.AssetImporters / Inherits from: Editor Description Default editor for all asset importer settings. Use the default editor to edit the import settings for assets. You can define a custom import settings editor for a specific asset type. To do this, create a new class that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f38f869c686
unity_docs
editor
What is `iOS.Xcode.PBXProject.GetBuildPropertyForAnyConfig` in Unity? Explain its purpose and usage.
PBXProject.GetBuildPropertyForAnyConfig Declaration public string GetBuildPropertyForAnyConfig (IEnumerable<string> targetGuids , string name ); Declaration public string GetBuildPropertyForAnyConfig (string targetGuid , string name ); Parameters Parameter Description targetGuid The GUID of the target...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_576da30e157a
unity_docs
scripting
Show me a Unity C# example demonstrating `Animations.GameObjectRecorder.Bind`.
claration public void Bind ( EditorCurveBinding binding ); Parameters Parameter Description binding The binding definition. Description Binds a GameObject's property as defined by EditorCurveBinding . Use this function to bind a specific GameObject's property. The binding is defined in EditorCurveBinding...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1397f39fa001
unity_docs
scripting
What is `LowLevel.PlayerLoop.GetCurrentPlayerLoop` in Unity? Explain its purpose and usage.
PlayerLoop.GetCurrentPlayerLoop Declaration public static LowLevel.PlayerLoopSystem GetCurrentPlayerLoop (); Description Returns a Player loop system representing the current update order of all engine systems in Unity. The PlayerLoopSystem returned by this method can be modified to create a custom update ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d223aa24f883
unity_docs
scripting
Give me an overview of the `ColorUtility` class in Unity.
ColorUtility class in UnityEngine / Implemented in: UnityEngine.CoreModule Description A collection of common color functions. Static Methods Method Description ToHtmlStringRGB Returns the color as a hexadecimal string in the format "RRGGBB". ToHtmlStringRGBA Returns the color as a hexadecimal string in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_357955385760
unity_docs
scripting
What is `WWWForm.AddField` in Unity? Explain its purpose and usage.
WWWForm.AddField Declaration public void AddField (string fieldName , string value ); Declaration public void AddField (string fieldName , string value , Encoding e ); Description Add a simple field to the form. Adds field fieldName with a given string value. Declaration public void AddField (strin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5b2ea022741
unity_docs
xr
What is `Networking.UnityWebRequest.ClearCookieCache` in Unity? Explain its purpose and usage.
UnityWebRequest.ClearCookieCache Declaration public static void ClearCookieCache (); Declaration public static void ClearCookieCache (Uri uri ); Parameters Parameter Description uri An optional URL to define which cookies are removed. Only cookies that apply to this URL are removed from the cache. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84aad1171429
unity_docs
scripting
What is `Rect.yMin` in Unity? Explain its purpose and usage.
Rect.yMin public float yMin ; Description The minimum Y coordinate of the rectangle. This value is the same as y , but setting it will resize the rectangle, changing y and height to preserve yMax .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea47e309874d
unity_docs
editor
Show me a Unity C# example demonstrating `EditorWindow.OnHierarchyChange`.
ilarly, changes to the rotation and scale will be seen. An animation showing how the OnHierarchyChange can be used. Additional resources: EditorApplication.hierarchyChange The following example script created an EditorWindow that monitors the number of objects and updates whenever the hierarchy changes. Copy it into...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f33ad49cfa63
unity_docs
physics
In Unity's 'Handling variation in time', what is 'Time variation and the fixed update loop' and how does it work?
The maximumDeltaTime value also affects the fixed update loop . The physics system uses the fixed time interval defined by Time.fixedDeltaTime to determine how much time to simulate in each step. Unity tries to keep the physics simulation up-to-date with the amount of time that has elapsed and sometimes performs multip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7ded0ee2d43
unity_docs
scripting
Show me a Unity C# example demonstrating `Collider.Raycast`.
Description ray The starting point and direction of the ray. hitInfo If true is returned, hitInfo will contain more information about where the collider was hit. maxDistance The max length of the ray. Returns bool True when the ray intersects the collider, otherwise false. Description Casts a Ray that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87bab5e2b184
unity_docs
scripting
What is `AssetPostprocessor.GetPostprocessOrder` in Unity? Explain its purpose and usage.
AssetPostprocessor.GetPostprocessOrder Declaration public int GetPostprocessOrder (); Description Override the order in which importers are processed. By overriding GetImportOrder you can sort in which order postprocessors are executed. Smaller priorities will be imported first. The GetPostprocessOrder function...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8878dd440daa
unity_docs
math
What is `AndroidJNI.CallStaticObjectMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticObjectMethodUnsafe Declaration public static IntPtr CallStaticObjectMethodUnsafe (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 ). This method returns a refe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2354882d44b8
unity_docs
rendering
What is `IHVImageFormatImporter.wrapMode` in Unity? Explain its purpose and usage.
IHVImageFormatImporter.wrapMode public TextureWrapMode wrapMode ; Description Texture coordinate wrapping mode. Using wrapMode sets the same wrapping mode on all axes. Different per-axis wrap modes can be set using wrapModeU , wrapModeV , wrapModeW . Querying the value returns the U axis wrap mode (same ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be9e5489713c
unity_docs
input
What is `Input.GetMouseButton` in Unity? Explain its purpose and usage.
Input.GetMouseButton Declaration public static bool GetMouseButton (int button ); Description Returns whether the given mouse button is held down. 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_c068f7c3ba55
unity_docs
rendering
What is `TextureImporterSwizzle.OneMinusA` in Unity? Explain its purpose and usage.
TextureImporterSwizzle.OneMinusA Description Use the inverted alpha color channel. Additional resources: TextureImporter.swizzleR , TextureImporter.swizzleG , TextureImporter.swizzleB , TextureImporter.swizzleA .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_edcf90f0a042
unity_docs
scripting
What is `GraphicsBuffer.name` in Unity? Explain its purpose and usage.
GraphicsBuffer.name public string name ; Description The debug label for the graphics buffer (setter only). This name shows up in profiling and frame debugging tools, when supported. The name does not affect the rendering process.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61293c9fee3b
unity_docs
math
What are the parameters of `LightTransport.IProbeIntegrator.IntegrateDirectRadiance` in Unity?
Returns void Result indicating success or failure with detailed error information. Description Computes direct lighting contribution at probe positions using spherical sampling. This method performs spherical sampling around each probe position to compute direct lighting contributions from all light sources in the scen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9856b0d499ce
unity_docs
scripting
Give me an overview of the `BeforeRenderOrderAttribute` class in Unity.
BeforeRenderOrderAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Use this BeforeRenderOrderAttribute when you need to specify a custom callback order for Application.onBeforeRender. Application.onBeforeRender will reorder all registered events recievers and call them in orde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42d2c812bd52
unity_docs
scripting
What is `Progress.Item.Cancel` in Unity? Explain its purpose and usage.
Progress.Item.Cancel Declaration public bool Cancel (); Returns bool True if the associated task is cancelled, false if something prevents it from being cancelled. Description Cancels a running progress indicator. Additional resources: Progress.Cancel , Progress.Item.RegisterCancelCallback , Progress.I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5caa42db03a
unity_docs
rendering
In Unity's 'Reduce shader duplication in AssetBundles', what is 'Create a separate AssetBundle for each scene or environment type' and how does it work?
Depending on how many shaders you have, putting all your shaders into a single AssetBundle might use a lot of memory at runtime. Shaders might also stay in memory when they’re no longer needed, because you can’t partially unload an AssetBundle. To avoid this, create a separate AssetBundle for each group of shaders you ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ebe4b44469b
unity_docs
rendering
Show me a Unity C# example demonstrating `EditorGUI.ColorField`.
ould show the eyedropper control. If false, don't show it. showAlpha If true, allow the user to set an alpha value for the color. If false, hide the alpha component. hdr If true, treat the color as an HDR value. If false, treat it as a standard LDR value. Returns Color The color selected by the user. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23b4c48ba62d
unity_docs
rendering
What is `Rendering.SupportedRenderingFeatures.overridesShadowmask` in Unity? Explain its purpose and usage.
SupportedRenderingFeatures.overridesShadowmask public bool overridesShadowmask ; Description Specifies whether the render pipeline overrides the Shadowmask settings in the Quality settings. If the render pipeline overrides the Shadowmask settings, Unity hides the built-in Shadowmask settings.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55b6ce78f765
unity_docs
scripting
What is `IMGUI.Controls.TreeView.FindRowOfItem` in Unity? Explain its purpose and usage.
TreeView.FindRowOfItem Declaration protected int FindRowOfItem ( IMGUI.Controls.TreeViewItem item ); Parameters Parameter Description item The item to find the row of. Returns int The row of the TreeViewItem. Description Returns the row of the given TreeViewItem.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d8f378979ac
unity_docs
animation
What is `Animations.AnimationLayerMixerPlayable.IsLayerAdditive` in Unity? Explain its purpose and usage.
AnimationLayerMixerPlayable.IsLayerAdditive Declaration public bool IsLayerAdditive (uint layerIndex ); Parameters Parameter Description layerIndex The layer index. Returns bool True if the layer is additive, false otherwise. Description Returns true if the layer is additive, false otherwise.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ff45144d5b92
unity_docs
physics
Show me a Unity code example for 'OnTrigger events'.
it first makes contact with another collider. Collider.OnTriggerStay : Unity calls this function on a trigger collider once per frame if it detects another Collider inside the trigger collider. Collider.OnTriggerExit : Unity calls this function on a trigger collider when it ceases contact with another collider. The fol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_13
github
scripting
What does `SetIndoorMap` do in this Unity script? Explain its purpose and signature.
Sets the Indoor Map of this Positioner. If this is unset, the Positioner will be outside instead.The identifier of the indoor map on which the positioner should be displayed.See the IndoorMapApi documentation for more details.The identifier of the indoor map floor on which the Positioner should be displayed. Signature...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_0879fb15662f
unity_docs
scripting
Give me an overview of the `ModelImporterNormalCalculationMode` class in Unity.
ModelImporterNormalCalculationMode enumeration Description Normal generation options for ModelImporter . Normals can be calculated by Unity using several methods. They can be either unweighted or weighted by area, angle or both. Additional resources: ModelImporter.normalImportMode. Properties Property Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b16a9868c8ba
unity_docs
ui
Explain 'ToggleButtonGroup' in Unity.
Use ToggleButtonGroup to enable single or multiple selections from a logical group of Button elements. The ToggleButtonGroup consists of a label and a set of interactable Button elements. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82d6f2effb58
unity_docs
scripting
Explain 'Create a custom search provider' in Unity.
You can use the Search API to create your own search provider . A custom search provider can combine search results from different sources, exclude properties from the search, and perform actions on the search results. This section provides information on how to create a custom search provider. Topic Description The Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4863e8ce0909
unity_docs
rendering
What is `RenderTextureDescriptor.memoryless` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.memoryless public RenderTextureMemoryless memoryless ; Description The render texture memoryless mode property. Use this property to set or return the render texture memoryless modes. Additional resources: RenderTextureMemoryless .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8ad4d6c860f
unity_docs
scripting
What is `PlayerSettings.useMacAppStoreValidation` in Unity? Explain its purpose and usage.
PlayerSettings.useMacAppStoreValidation public static bool useMacAppStoreValidation ; Description Enable receipt validation for the Mac App Store. When enabled, your game will only run when it has a valid receipt from the Mac App Store. Use useMacAppStoreValidation when submitting games to Apple for publishi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8d04054ce91
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.MoveArrayElement`.
SerializedProperty.MoveArrayElement Declaration public bool MoveArrayElement (int srcIndex , int dstIndex ); Description Move an array element from srcIndex to dstIndex. Additional resources: isArray , InsertArrayElementAtIndex , DeleteArrayElementAtIndex ```csharp using System.Collections.Generic; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_205ab82d0485
unity_docs
editor
What is `iOS.Xcode.PBXProject.IsKnownExtension` in Unity? Explain its purpose and usage.
PBXProject.IsKnownExtension Declaration public static bool IsKnownExtension (string ext ); Parameters Parameter Description ext The file extension. The leading . is not necessary but is accepted. Returns bool Returns true of the extension is known. Description Checks if files with the given extensi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b5fc08b070a
unity_docs
scripting
Show me a Unity C# example demonstrating `Caching.MoveCacheBefore`.
Caching.MoveCacheBefore Declaration public static void MoveCacheBefore ( Cache src , Cache dst ); Parameters Parameter Description src The Cache to move. dst The Cache which should come after the source Cache in the cache list. Description Moves the source Cache before the destination Cache in the ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_af468b6ecab7
unity_docs
editor
Explain 'Package inspection' in Unity.
Inspect the contents of any package in your project. You can view information about the package in a dedicated Inspector window and access the package’s manifest file. Topic Description Package Manifest window reference Learn about the elements in an Inspector window dedicated to displaying information about packages. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd507ae62a94
unity_docs
rendering
What is `ParticleSystem.RotationBySpeedModule.x` in Unity? Explain its purpose and usage.
ParticleSystem.RotationBySpeedModule.x public ParticleSystem.MinMaxCurve x ; Description Rotation by speed curve for the x-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94a537753ebc
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.positionAmount`.
ParticleSystem.NoiseModule.positionAmount public ParticleSystem.MinMaxCurve positionAmount ; Description How much the noise affects the particle positions. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private Par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_090e50f432a2
unity_docs
scripting
What are the parameters of `Transform.TransformPoints` in Unity?
Description Transforms multiple points from local space to world space overwriting each original point with the transformed version. Note that the positions of the returned points are affected by scale. Use Transform.TransformDirections if you are dealing with direction vectors. You can perform the opposite conversion,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f7b1e4d9f6dd
github
scripting
Write a Unity Editor script for Input System Event System Patcher
```csharp using System.Reflection; using CoreLibrary; using HarmonyLib; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.UIElements.InputSystem; using static UnityEngine.InputSystem.CommonUsages; #if UNITY_EDITOR using UnityEditor; #endif namespace UIToolkitXRAdapter.XRAdapter { internal class ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_7904d1bedc6a
unity_docs
networking
What is `Networking.DownloadHandler.GetNativeData` in Unity? Explain its purpose and usage.
DownloadHandler.GetNativeData Declaration protected NativeArray<byte> GetNativeData (); Returns NativeArray<byte> NativeArray providing access to downloaded data. Description Provides allocation-free access to the downloaded data as a NativeArray. The data is owned by the download handler and memory is re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a77f2dbb6298
unity_docs
scripting
What is `Search.SearchPropositionFlagsExtensions.HasAll` in Unity? Explain its purpose and usage.
SearchPropositionFlagsExtensions.HasAll Declaration public static bool HasAll ( Search.SearchPropositionFlags flags , Search.SearchPropositionFlags all ); Parameters Parameter Description flags Flags to be checked. all Flags should contains all these value. Returns bool Returns true if flags contai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd9ee97a2cfa
unity_docs
editor
What is `Overlays.OverlayAttribute` in Unity? Explain its purpose and usage.
OverlayAttribute class in UnityEditor.Overlays Description Attribute used to register a class as an overlay. Overlay must derive from the Overlay class. Properties Property Description defaultDisplay Whether the target Overlay is shown when a new instance of the EditorWindow type is instantiated. defaultDock...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3ace52dd8fa
unity_docs
ui
Show me a Unity C# example demonstrating `SceneManagement.LoadSceneMode`.
LoadSceneMode enumeration Description Used when loading a Scene in a player. Use LoadSceneMode to choose what type of Scene loads when using SceneManager.LoadScene . The available modes are Single and Additive. Single mode loads a standard Unity Scene which then appears on its own in the Hierarchy window. Additiv...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04a2b5779d66
unity_docs
rendering
What is `Device.SystemInfo.supportsRenderTargetArrayIndexFromVertexShader` in Unity? Explain its purpose and usage.
SystemInfo.supportsRenderTargetArrayIndexFromVertexShader public static bool supportsRenderTargetArrayIndexFromVertexShader ; Description This has the same functionality as SystemInfo.supportsRenderTargetArrayIndexFromVertexShader and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8264ed73252
unity_docs
math
What are the parameters of `Search.QueryEngine_1.SetDefaultParamFilter` in Unity?
Description Sets the default filter handler for function filters that were not registered. ```csharp using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_QueryEngine_SetDefaultParamFilter { static List<MyObjectType> s_Data; [...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0506d3c5968b
unity_docs
ui
Show me a Unity code example for 'Change events'.
gisterCallback works on all visual elements, regardless of whether they store internal values or not. If you want to listen to any changes that happen in the child controls of a parent element, this is the method to use. Because ChangeEvent is a typed event, you must specify the type when registering the event. The cod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90c473592d71
unity_docs
scripting
What is `Mesh.GetBaseVertex` in Unity? Explain its purpose and usage.
Mesh.GetBaseVertex Declaration public uint GetBaseVertex (int submesh ); Parameters Parameter Description submesh The sub-mesh index. See subMeshCount . Returns uint The offset applied to all vertex indices of this sub-mesh. Description Gets the base vertex index of the given sub-mesh . The base ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fcc0ec5d86c5
unity_docs
animation
In Unity's 'Avatar Mask window reference', what is 'Transform selection' and how does it work?
If your animation does not use a Humanoid Avatar and you want more detailed control over which bones are masked, you can select or deselect portions of the Model’s hierarchy: Assign a reference to the Avatar whose transform you would like to mask. Click the Import Skeleton button. The hierarchy of the avatar appears in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fcc787cb23a
unity_docs
rendering
What is `LightingSettings.lightmapper` in Unity? Explain its purpose and usage.
LightingSettings.lightmapper public LightingSettings.Lightmapper lightmapper ; Description Determines which backend to use for baking lightmaps in the Baked Global Illumination system. (Editor only). The default value is Progressive CPU . When Unity serializes this LightingSettings object as a Lighting S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71986db0be29
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.DrawOutline`.
exceeds 100). The alpha values of parentNodeColor and childNodeColor control the intensity of the outline, 0 makes it completely transparent and 1 makes it fully opaque. The fillOpacity controls the weight of the color multiplier for the Renderer. Higher fillOpacity values make the color more intense and leave ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f7c1711a587
unity_docs
scripting
What is `Undo.undoRedoEvent` in Unity? Explain its purpose and usage.
Undo.undoRedoEvent public static Undo.UndoRedoEventCallback undoRedoEvent ; Description Callback that is triggered after any undo or redo event. ```csharp using UnityEditor; using UnityEngine;public class ExampleUndoRedoEventScript : MonoBehaviour { void Start() { Undo.undoRedoEvent += OnUndoRedoEvent; } ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3ee345ee41d6
unity_docs
scripting
Show me a Unity code example for 'JSON Serialization'.
Use the JsonUtility class to convert Unity objects to and from the JSON format. For example, you can use JSON Serialization to interact with web services, or to easily pack and unpack data to a text-based format. JSON Serialization uses a notion of “structured” JSON: you create a class or structure to describe what var...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49e8337e5cd8
unity_docs
scripting
What is `RigidbodyConstraints.FreezePositionX` in Unity? Explain its purpose and usage.
RigidbodyConstraints.FreezePositionX Description Freeze motion along the X-axis. ```csharp //This example shows how RigidbodyConstraints is used to freeze the position and rotation of a Rigidbody in the x 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_48168f0ba4f7
unity_docs
rendering
What is `WebCamDevice` in Unity? Explain its purpose and usage.
WebCamDevice struct in UnityEngine / Implemented in: UnityEngine.AudioModule Description A structure describing the webcam device. Properties Property Description availableResolutions Possible WebCamTexture resolutions for this device. depthCameraName A string identifier used to create a depth data based We...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.