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_82cbb3a690d0
unity_docs
rendering
What is `SceneManagement.StageUtility.IsGameObjectRenderedByCameraAndPartOfEditableScene` in Unity? Explain its purpose and usage.
StageUtility.IsGameObjectRenderedByCameraAndPartOfEditableScene Declaration public static bool IsGameObjectRenderedByCameraAndPartOfEditableScene ( GameObject gameObject , Camera camera ); Parameters Parameter Description gameObject The GameObject to check. camera The Camera to check. Returns bool ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_35458313a576
github
scripting
Write a Unity C# script called Singleton Example
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class SingletonExample : SingletonMono<SingletonExample> { //example of a singleton that only enables only the instance behavior's gameobject //while keeping none instances alive protected override void...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c28059c71cd
unity_docs
editor
What is `Rendering.EditorGraphicsSettings.SetRenderPipelineGlobalSettingsAsset` in Unity? Explain its purpose and usage.
EditorGraphicsSettings.SetRenderPipelineGlobalSettingsAsset Declaration public static void SetRenderPipelineGlobalSettingsAsset (Type renderPipelineType , Rendering.RenderPipelineGlobalSettings newSettings ); Declaration public static void SetRenderPipelineGlobalSettingsAsset ( Rendering.RenderPipelineGlobal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d68486d5ea88
unity_docs
ui
What is `UIElements.ListView.ctor` in Unity? Explain its purpose and usage.
ListView Constructor Declaration public ListView (); Description Creates a ListView with all default properties. The ListView.itemsSource must all be set for the ListView to function properly. Declaration public ListView (IList itemsSource , float itemHeight , Func<VisualElement> makeItem , Action<Vis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_359bf8f00f78
unity_docs
rendering
What is `Transform.localToWorldMatrix` in Unity? Explain its purpose and usage.
Transform.localToWorldMatrix public Matrix4x4 localToWorldMatrix ; Description Matrix that transforms a point from local space into world space (Read Only). You can also use Transform.TransformPoint to transform coordinates instead of this matrix. Do not use this matrix to set shader parameters or to perfo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_351dab473899
unity_docs
rendering
What is `ShaderUtil.ShaderHasError` in Unity? Explain its purpose and usage.
ShaderUtil.ShaderHasError Declaration public static bool ShaderHasError ( Shader shader ); Parameters Parameter Description shader The shader to check for compilation errors. Returns bool Returns true if the shader has any compilation errors. Otherwise, returns false. Description Checks if a shader ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46ff2feaafd1
unity_docs
animation
What are the parameters of `AnimatorOverrideController.GetOverrides` in Unity?
Description Gets the list of Animation Clip overrides currently defined in this Animator Override Controller. This function is allocation-free if you pre-allocate the overrides list with AnimatorOverrideController.overridesCount . ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine;p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_decf052ffc05
unity_docs
editor
What is `Profiling.FrameDataView.MethodInfo` in Unity? Explain its purpose and usage.
MethodInfo struct in UnityEditor.Profiling Description Managed method descriptor structure. Provides information about the method and its location in the source code. Additional resources: ResolveMethodInfo . Properties Property Description methodName Fully qualified method name. sourceFileLine Line number ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a8671ab74d8e
unity_docs
xr
Explain 'Use private repositories with HTTPS Git URLs' in Unity.
When you use Git in a terminal to access a private repository over HTTPS, Git prompts you to enter a username and password. Then, Git submits these credentials to the server and proceeds with the command if the server accepts those credentials and allows access to the repository. When the Unity Package Manager fetches ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfab5b6570e9
unity_docs
scripting
What is `Search.SearchUtils.SplitCamelCase` in Unity? Explain its purpose and usage.
SearchUtils.SplitCamelCase Declaration public static string[] SplitCamelCase (string source ); Parameters Parameter Description source Word to split according to camelCase. Returns string[] Camel case tokens. Description Tokenize a string each capital letter.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f98cd0530ee
unity_docs
editor
What is `PackageManager.BuildUtilities` in Unity? Explain its purpose and usage.
BuildUtilities class in UnityEditor.PackageManager Description Utility class that allows packages to register build callbacks with the Unity Package Manager. BuildUtilities is a static class so you don't need to obtain an instance of it before calling its methods. Additional resources: IShouldIncludeInBuildCa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42d0bfd53ffe
unity_docs
editor
Show me a Unity C# example demonstrating `SettingsService.NotifySettingsProviderChanged`.
SettingsService.NotifySettingsProviderChanged Declaration public static void NotifySettingsProviderChanged (); Description Use this function to notify the SettingsService that a SettingsProvider changed. The client managing the SettingsProvider should call this function when a SettingsProvider is added, removed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a99c20389133
unity_docs
scripting
What is `CrashReporting.CrashReportingSettings.logBufferSize` in Unity? Explain its purpose and usage.
CrashReportingSettings.logBufferSize public static uint logBufferSize ; Description The Performance Reporting service will keep a buffer of up to the last X log messages (Debug.Log, etc) to send along with crash reports. The default is 10 log messages, the max is 50. Set this to 0 to disable capture of logs with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3fbba1a45eb7
github
scripting
Write a Unity C# XR/VR script for Auto Register Module
```csharp // // /*=============================================================================== // // Copyright (C) 2023 PhantomsXR Ltd. All Rights Reserved. // // // // This file is part of the Phantom.XRMOD.RokidModule.Runtime. // // // // The RokidPlatform cannot be copied, distributed, or made available to // // ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_434eb5a8ca29
unity_docs
scripting
What is `AndroidJNIHelper.GetFieldID` in Unity? Explain its purpose and usage.
AndroidJNIHelper.GetFieldID Declaration public static IntPtr GetFieldID (IntPtr javaClass , string fieldName ); Declaration public static IntPtr GetFieldID (IntPtr javaClass , string fieldName , string signature ); Declaration public static IntPtr GetFieldID (IntPtr javaClass , string fieldName , stri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f064bda6339e
unity_docs
input
In Unity's 'Support touch input for QNX', what is 'Configure QNX touch scaling' and how does it work?
As the QNX Unity player requires the touch coordinates to be in screen coordinates, configure the following setup in the scaling.conf file: Configure the QNX scaling.conf ( QNX 7.0 / QNX 7.1 ) file to use screen coordinates. For example, if you have a 1366x768 display, set mode:scale for the display resolution to scali...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ce8491ccc22
unity_docs
ui
Show me a Unity C# example demonstrating `GUI.backgroundColor`.
GUI.backgroundColor public static Color backgroundColor ; Description Global tinting color for all background elements rendered by the GUI. This gets multiplied by color . Additional resources: contentColor , color . Yellow Background color applied to a button. ```csharp using UnityEngine; using System.C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b299e7db0bc
unity_docs
scripting
What is `Unity.Properties.PropertyContainer.TryGetProperty` in Unity? Explain its purpose and usage.
PropertyContainer.TryGetProperty Declaration public static bool TryGetProperty (TContainer container , ref Unity.Properties.PropertyPath path , out Unity.Properties.IProperty property ); Parameters Parameter Description container The container tree to search. path The property path to resolve. prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91a2c921a0b6
unity_docs
rendering
What is `ShaderUtil.GetAllShaderInfo` in Unity? Explain its purpose and usage.
ShaderUtil.GetAllShaderInfo Declaration public static ShaderInfo[] GetAllShaderInfo (); Returns ShaderInfo[] ShaderInfo array of all available shaders. Description Returns an array of ShaderInfo of all available shaders. That includes built-in shaders.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56c3407c5169
unity_docs
rendering
What is `Shader.GetPropertyDefaultFloatValue` in Unity? Explain its purpose and usage.
Shader.GetPropertyDefaultFloatValue Declaration public float GetPropertyDefaultFloatValue (int propertyIndex ); Parameters Parameter Description propertyIndex The index of the shader property. Description Returns the default float value of the shader property at the specified index. The shader property d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17b63efe2910
unity_docs
editor
What is `Device.SystemInfo.maxComputeBufferInputsDomain` in Unity? Explain its purpose and usage.
SystemInfo.maxComputeBufferInputsDomain public static int maxComputeBufferInputsDomain ; Description This has the same functionality as SystemInfo.maxComputeBufferInputsDomain 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_ba0df52db505
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.Text`.
MouseCursor.Text Description Text cursor. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a small window that has a color box in it. //Hov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5174c0eea34d
github
scripting
Write a Unity C# UI script for Enabled Switcher
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UIStateSwitcher { public class EnabledSwitcher : SwitchableElement { [SerializeField] private List<MonoBehaviour> targetElements; [SerializeField] private List<SwitchableEnabled> switchab...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_abb14c89a9f8
unity_docs
rendering
Explain 'Surface Shader optional directives reference for the Built-In Render Pipeline' in Unity.
Transparency and alpha testing is controlled by alpha and alphatest directives. Transparency can typically be of two kinds: traditional alpha blending (used for fading objects out) or more physically plausible “premultiplied blending” (which allows semitransparent surfaces to retain proper specular reflections). Enabli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4188ced47c66
unity_docs
performance
In Unity's 'Job system overview', what is 'Safety system' and how does it work?
To make it easier to write multithreaded code, the job system has a safety system that detects all potential race conditions and protects you from the bugs they can cause. A race condition happens when the output of one operation depends on the timing of another process outside of its control. For example, if the job s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4aaf8c2680c
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerRecorderDescription.Flags` in Unity? Explain its purpose and usage.
ProfilerRecorderDescription.Flags public Unity.Profiling.LowLevel.MarkerFlags Flags ; Description Profiler marker flags of the metric. Use to differentiate between builtin and custom metrics.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6961a8f313f
unity_docs
scripting
Give me an overview of the `TextMesh` class in Unity.
TextMesh class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.TextRenderingModule Description A script interface for the text mesh component . Additional resources: text mesh component . Properties Property Description alignment How lines of text are aligned (Left, Right, Cente...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a987ddc352aa
unity_docs
scripting
What is `TerrainChangedFlags` in Unity? Explain its purpose and usage.
TerrainChangedFlags enumeration Description Indicate the types of changes to the terrain in OnTerrainChanged callback. Use bitwise AND to detect multiple changes. ```csharp using UnityEngine;[ExecuteInEditMode] public class DetectTerrainChanges : MonoBehaviour { void OnTerrainChanged(TerrainChangedFlags flags) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_88f1812712b9
unity_docs
networking
In Unity's 'Collecting performance data on an Android device', what is 'Configuring Android Debug Bridge manually' and how does it work?
The Editor automatically creates an adb tunnel for your application when you select Build & Run . You can configure this tunnel manually if you want to profile another application, or you restart the adb server. To configure the tunnel manually: Open a Terminal window or Command prompt.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17267cb7d5ea
unity_docs
editor
Give me an overview of the `BuildAssetBundlesParameters` class in Unity.
BuildAssetBundlesParameters struct in UnityEditor Description Provide various options to control the behavior of BuildPipeline.BuildAssetBundles . Additional resources: BuildPipeline , EditorUserBuildSettings , EditorBuildSettings , BuildPlayerOptions Properties Property Description bundleDefinitions Arr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04c3ec45cac1
unity_docs
scripting
Show me a Unity C# example demonstrating `Terrain.treeMaximumFullLODCount`.
public int treeMaximumFullLODCount ; Description Maximum number of trees rendered at full LOD. This is an easy setting to prevent too many trees being rendered at too high resolution in dense forests. Since there will be no fade if treeMaximumFullLODCount is exceeded you should tweak the treeBillboardDistance ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e87b57975d39
unity_docs
xr
Give me an overview of the `SubsystemManager` class in Unity.
SubsystemManager class in UnityEngine / Implemented in: UnityEngine.SubsystemsModule Description Gives access to subsystems which provide additional functionality through plugins. Provides the ability to query for SubsystemDescriptors which enumerate features. Given an SubsystemDescriptor, you can create an Sub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_61a9729a844d
github
scripting
Write a Unity C# animation script for Path Spline Performance
```csharp using UnityEngine; using System.Collections; using System.Collections.Generic; using DentedPixel; // This class is to test the upper limits of a complex spline public class PathSplinePerformance : MonoBehaviour { public GameObject trackTrailRenderers; public GameObject car; public GameObject carInternal...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_c0b24f471998
unity_docs
physics
In Unity's 'Scene visibility', what is 'Set Scene visibility for GameObjects and their children' and how does it work?
You control Scene visibility for individual GameObjects from the Hierarchy window . To toggle between hiding and showing the GameObject and its children: Click a GameObject’s visibility icon in the Hierarchy window, or press H . For multiple GameObjects, press H . Toggling visibility for an object and its children affe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b0cb440450a2
unity_docs
ui
In Unity's 'UPM package Asset Store publishing workflow', what is 'Publish a UPM package to the Asset Store' and how does it work?
To publish a UPM package to the Asset Store, you need to enroll on the Publisher Portal. To learn more, refer to UPM Publishing on the Asset Store . To create and publish a UPM package, perform the following steps: Create a product draft . Validate and upload your package . Submit the package for approval . You can the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72a4c0837a40
unity_docs
physics
What is `Search.PropertyDatabase.Flush` in Unity? Explain its purpose and usage.
PropertyDatabase.Flush Declaration public void Flush (); Description Triggers a manual update of the backing file. When a change happens on the PropertyDatabase , it is stored in memory until we update the backing file. If the PropertyDatabase is created with the flag autoFlush set to true, this is done au...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38a074e7e397
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.limitVelocityOverLifetime`.
articleSystem.LimitVelocityOverLifetimeModule limitVelocityOverLifetime ; Description Script interface for the LimitVelocityOverLifetimeModule of a Particle System. . This module reduces particle velocities by either applying drag or simply reducing velocity over time. Particle System modules do not need to be r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d2f786c9fe2
unity_docs
scripting
What is `Mesh.UploadMeshData` in Unity? Explain its purpose and usage.
Mesh.UploadMeshData Declaration public void UploadMeshData (bool markNoLongerReadable ); Parameters Parameter Description markNoLongerReadable Frees up system memory copy of mesh data when set to true . Description Upload previously done Mesh modifications to the graphics API. When creating or modifying...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8b54ca36dda3
unity_docs
performance
Show me a Unity code example for 'Read frame timing data with ProfilerRecorder'.
s. The benefit of this is that when you use the ProfilerRecorder API, FrameTimingManager only records values when you attach a recorder to a specific counter. This behavior enables you to control which counters collect data and reduces the impact that the FrameTimingManager has on performance. The following example tra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4020cfedbad4
unity_docs
scripting
What is `SceneManagement.Stage.OnOpenStage` in Unity? Explain its purpose and usage.
Stage.OnOpenStage Declaration protected bool OnOpenStage (); Returns bool true if Unity opened the Stage successfully, otherwise returns false . Description Unity calls this method when the Stage is opened. Classes that inherit from Stage should implement initialization logic in this method. A Stage can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48dfbddddfc3
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemMetadataAsFloat` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemMetadataAsFloat Declaration public float GetItemMetadataAsFloat (int id , int index ); Parameters Parameter Description id Hierarchy item identifier. index Metadata index. Returns float Value of the metadata as float. Description Returns float representation of hierar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a37711250f5
unity_docs
input
What is `Experimental.GraphView.EdgeManipulator.OnMouseMove` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeManipulator.OnMouseMove Declaration protected void OnMouseMove ( UIElements.MouseMoveEvent evt ); Parameters Parameter Description evt The event. Description Handle mouse move event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6b796dd914b
unity_docs
ui
What is `Overlays.OverlayToolbar.SetupChildrenAsButtonStrip` in Unity? Explain its purpose and usage.
OverlayToolbar.SetupChildrenAsButtonStrip Declaration public void SetupChildrenAsButtonStrip (); Description Use this method to apply button strip styling to the contents of this VisualElement.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bb340c8c098
unity_docs
physics
Give me an overview of the `SpringJoint2D` class in Unity.
SpringJoint2D class in UnityEngine / Inherits from: AnchoredJoint2D / Implemented in: UnityEngine.Physics2DModule Description Joint that attempts to keep two Rigidbody2D objects a set distance apart by applying a force between them. Note that unlike DistanceJoint2D, the length of the joint can stretch and o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2122d04823ac
unity_docs
editor
What are the parameters of `EditorWindow.Show` in Unity?
Description Show the EditorWindow window. EditorWindow.Show displays any window that has been created. In the script example below the window is created with no addition functionality. Many of the script examples in EditorWindow are more complex. ```csharp // Create an empty Edit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa671bdea04b
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.RayTracingGeometryInstanceConfig.vertexAttributes`.
TracingGeometryInstanceConfig.vertexAttributes public VertexAttributeDescriptor[] vertexAttributes ; Description An array of vertex attributes that define the vertex format of vertexBuffer . The Position attribute is mandatory for building an acceleration structure. You can access other vertex attributes in sh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5514561e5540
unity_docs
scripting
What is `UIElements.InspectorElement.uIECustomVariantUssClassName` in Unity? Explain its purpose and usage.
InspectorElement.uIECustomVariantUssClassName public static string uIECustomVariantUssClassName ; Description USS class name of elements of this type, when they are displayed in UIElements custom mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b16166bd887d
unity_docs
editor
What are the parameters of `EditorGUI.ObjectField` in Unity?
Returns Object The object that has been set by the user. Description Makes an object field. You can assign objects either by drag and drop objects or by selecting an object using the Object Picker. Ensure that the allowSceneObjects parameter is false if the object reference is stored as part of an asset, since assets c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_018b7a8fd134
unity_docs
rendering
What is `RenderPickingArgs` in Unity? Explain its purpose and usage.
RenderPickingArgs struct in UnityEditor Description Provides information about what is expected to render during the current picking rendering callback. Properties Property Description pickingIndex Specifies the picking index value that the first pickable object uses to write to the picking render texture. re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2392cec2098
unity_docs
input
What is `UIElements.PointerId.touchPointerIdBase` in Unity? Explain its purpose and usage.
PointerId.touchPointerIdBase public static int touchPointerIdBase ; Description The base ID for touch pointers. The pointer ID for a touch event is a number between touchPointerIdBase and touchPointerIdBase + touchPointerCount - 1.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce8131d22e0f
unity_docs
editor
What is `Tilemaps.Tilemap.editorPreviewOrigin` in Unity? Explain its purpose and usage.
Tilemap.editorPreviewOrigin public Vector3Int editorPreviewOrigin ; Description The origin of the Tilemap in cell position inclusive of editor preview Tiles. This is used when rendering the Tilemap in Editor mode, taking both placed Tiles and editor preview Tiles for preview placement into account.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7b7c84716d1
unity_docs
scripting
What is `Rendering.SortingLayerRange.ctor` in Unity? Explain its purpose and usage.
SortingLayerRange Constructor Declaration public SortingLayerRange (short lowerBound , short upperBound ); Parameters Parameter Description lowerBound Lowest sorting layer value to include. upperBound Highest sorting layer value to include. Description Sets the inclusive range for a sorting layer object...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bf698d15efb
unity_docs
scripting
What is `Progress.Item.SetTimeDisplayMode` in Unity? Explain its purpose and usage.
Progress.Item.SetTimeDisplayMode Declaration public void SetTimeDisplayMode ( Progress.TimeDisplayMode mode ); Parameters Parameter Description mode The progress indicator's time display mode. Description Set a progress indicator's time display mode. The time display mode indicates what kind of time info...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28d7abfe1658
unity_docs
rendering
What is `AssetDatabase.GenerateUniqueAssetPath` in Unity? Explain its purpose and usage.
AssetDatabase.GenerateUniqueAssetPath Declaration public static string GenerateUniqueAssetPath (string path ); Parameters Parameter Description path The path name to create. Description Creates a new unique path for an asset. When you call this method, Unity checks to see whether an asset already exists w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_106c8aaf7f6e
unity_docs
scripting
Explain 'Object' in Unity.
The UnityEngine.Object class acts as a base class for all objects that Unity can reference in the Unity Editor. You can drag and drop classes that inherit from UnityEngine.Object into fields in the Inspector , or pick them using the Object Picker next to an Object field. Rather than inheriting directly from Object for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a66e309d0185
unity_docs
input
In Unity's 'Device Simulator introduction', what is 'Simulated touch input' and how does it work?
If you click on the simulated device screen with the mouse cursor, the device simulator creates touch events in the active input solution (either the Input Manager , the Input System , or both, depending on your project settings). Note : The Device Simulator only simulates input when the Editor is in Play mode. The Dev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_1
github
scripting
What does `IsPlatformSupported` do in this Unity script? Explain its purpose and signature.
Checks if the current Unity editor supports the given build platform Signature: ```csharp private static bool IsPlatformSupported(BuildTarget buildTargetToTest) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5ff4af64320
unity_docs
rendering
In Unity's 'Standard Shader Material Inspector window reference for the Built-In Render Pipeline', what is 'Rendering Mode' and how does it work?
The first Material Parameter in the Standard Shader is Rendering Mode . This allows you to choose whether the object uses transparency, and if so, which type of blending mode to use. For more information, refer to Change Rendering Mode in the Standard Shader using a script . Opaque - Is the default, and suitable for no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da401a4a45b7
unity_docs
rendering
What is `ParticleSystem.ShapeModule.boxThickness` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.boxThickness public Vector3 boxThickness ; Description Thickness of the box to emit particles from. When using edge and shell modes, this controls how far from the perimeter that Unity can generate particles. Additional resources: ParticleSystem.ShapeModule.shapeType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09ed0cc4fb41
unity_docs
rendering
What is `EditorSelectedRenderState` in Unity? Explain its purpose and usage.
EditorSelectedRenderState enumeration Description The editor selected render mode for Scene View selection. Properties Property Description Hidden The Renderer has no selection highlight or wireframe in the Editor. Wireframe The Renderer has wireframe but not selection highlight in the Editor. Highlight The R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e099a5a00b97
unity_docs
scripting
What is `PhysicsUpdateBehaviour2D` in Unity? Explain its purpose and usage.
PhysicsUpdateBehaviour2D class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.Physics2DModule Description A base type for 2D physics components that required a callback during FixedUpdate. Inherited Members Properties Property Description enabled Enabled Behaviours are Updated, disa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c19b5998cb1
unity_docs
physics
Explain '2D preferences reference' in Unity.
The 2D preference settings allow you to define the settings of 2D-related features and packages. When you install 2D related packages (such as the Tilemap Editor package) into your Project, their preference settings appear in this section. Use the Physics preferences to configure the 2D physics settings, such as the co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f6b954fddb0
unity_docs
networking
What is `Networking.PlayerConnection.PlayerConnection.RegisterConnection` in Unity? Explain its purpose and usage.
PlayerConnection.RegisterConnection Declaration public void RegisterConnection (UnityAction<int> callback ); Parameters Parameter Description callback The action that is called when the Player connects to the Editor, with the Player ID of the Editor. Description Registers a callback that is invoked when th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01238e57d404
unity_docs
scripting
What is `ParticleSystem.MainModule.startSpeedMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startSpeedMultiplier public float startSpeedMultiplier ; Description A multiplier for ParticleSystem.MainModule.startSpeed . Changing this property is more efficient than accessing the entire curve, if you only want to change the overall speed multiplier. ```csharp using UnityEngine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0ce3fdfb04fc
unity_docs
scripting
Explain 'Constraint components' in Unity.
Constraint components allow you to control the position, rotation, and scale of GameObjects based on other objects in your scene . They provide a way to create relationships between objects without using parent-child hierarchies or writing custom scripts . Constraints are useful for character rigging , camera control, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a9472d5218f8
unity_docs
rendering
Explain 'Jobs preferences reference' in Unity.
Contains preferences for the job system , which you can use to write simple and safe multithreaded code so that your application can use all its available CPU cores to execute code. The job system can improve the performance of your application. To open the preferences, go to Edit > Preferences > Jobs (macOS: Unity > S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6073fb7af64
unity_docs
math
What are the parameters of `Mesh.AcquireReadOnlyMeshData` in Unity?
Returns MeshDataArray Returns a MeshDataArray containing read-only MeshData structs. See MeshDataArray and MeshData . Description Gets a snapshot of Mesh data for read-only access. When you pass one or more Meshes to Mesh.AcquireReadOnlyMeshData , Unity returns a MeshDataArray of read-only MeshData structs. You can acc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df20699035a2
unity_docs
editor
Show me a Unity C# example demonstrating `GenericMenu.AddDisabledItem`.
DisabledItem Declaration public void AddDisabledItem ( GUIContent content ); Parameters Parameter Description content The GUIContent to display as a disabled menu item. Description Add a disabled item to the menu. The example below shows a context menu with a disabled menu item that can be toggled on and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a1f6c2cd52a8
unity_docs
physics
Explain 'Low-level native plug-in rendering extensions' in Unity.
On top of the low-level native plug-in interface , Unity also supports low level rendering extensions that can receive callbacks when certain events happen. This is mostly used to implement and control low-level rendering in your plug-in and enable it to work with Unity’s multithreaded rendering. Due to the low-level n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4faf29c7ec9c
unity_docs
performance
What is `Unity.Jobs.IJobExtensions.Run` in Unity? Explain its purpose and usage.
IJobExtensions.Run Declaration public static void Run (T jobData ); Parameters Parameter Description jobData The job and data to run. Description Performs the job's Execute method immediately on the same thread. Additional resources: IJob .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3446a2735eb4
unity_docs
scripting
What is `Undo.RevertAllInCurrentGroup` in Unity? Explain its purpose and usage.
Undo.RevertAllInCurrentGroup Declaration public static void RevertAllInCurrentGroup (); Description Performs the last undo operation but does not record a redo operation. This is useful when you want to simply revert the last performed action. In Unity the escape is commonly used to execute this function.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b118a6768b6
unity_docs
input
What is `UIElements.MouseCaptureController.CaptureMouse` in Unity? Explain its purpose and usage.
MouseCaptureController.CaptureMouse Declaration public static void CaptureMouse ( UIElements.IEventHandler handler ); Parameters Parameter Description handler The event handler that captures mouse events. Description Assigns an event handler to capture mouse events. If an event handler is already set...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3dd60b022b94
unity_docs
animation
In Unity's 'Common Blend Tree Options', what is 'Time Scale' and how does it work?
You can alter the “natural” speed of animation clips with the animation speed number fields (the columns with a clock icon). For example, to double the speed of a walk clip, specify a value of 2.0 . To rescale the speed of each clip in the motions list relative to the minimum and maximum values, Select Adjust Time Scal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_139815858441
unity_docs
editor
What are the parameters of `ShortcutManagement.ShortcutManager.RegisterContext` in Unity?
Description Registers a IShortcutContext as a custom context used to filter shortcuts. Additional resources: ShortcutManager.UnregisterContext . ```csharp using UnityEditor; using UnityEditor.ShortcutManagement; using UnityEngine; public class ShortcutContextSample : EditorWindow { public class CustomShortcutConte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e90f741a89c
unity_docs
rendering
What is `LightmapParameters.AntiAliasingSamples` in Unity? Explain its purpose and usage.
AntiAliasingSamples enumeration Description The number of sub-texel positions to use when sampling a lightmap texel. The number of sub-texel positions to use when sampling a lightmap texel. Values higher than 1 will use supersampling to improve lightmap quality and reduce artifacts related to aliasing. The def...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67878533e28e
unity_docs
animation
What is `Keyframe.time` in Unity? Explain its purpose and usage.
Keyframe.time public float time ; Description The time of the keyframe. In a 2D graph you could think of this as the x-value. Additional resources: value . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { AnimationCurve curve = AnimationCurve.Linear(0, 0, 5, 5); // Extract...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54c886c3802e
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.TargetGuidByName`.
yName Declaration public string TargetGuidByName (string name ); Parameters Parameter Description name The name of the native target. Returns string The GUID identifying the native target. Description Returns the GUID of the native target with the given name. Note : To retrieve a GUID for a Unity ge...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_427fef4caa4a
unity_docs
scripting
Show me a Unity C# example demonstrating `RenderMode.WorldSpace`.
RenderMode.WorldSpace Description Render using any Camera in the Scene that can render the layer. ```csharp //Attach this script to your Canvas GameObjectusing UnityEngine;public class Example : MonoBehaviour { enum RenderModeStates { camera, overlay, world }; RenderModeStates m_RenderModeStates; Canvas m_Canva...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9c5b7cc716a4
unity_docs
physics
In Unity's 'Scene visibility', what is 'Turn Scene visibility on and off' and how does it work?
The Scene visibility switch in the Scene view View Options Overlay toolbar shows or hides GameObjects in the scene. Click it to toggle Scene visibility on and off. Turning Scene visibility off essentially mutes the Scene visibility settings you set in the Hierarchy window, but doesn’t delete or change them. All hidden ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82ed17e3968b
unity_docs
scripting
What is `Device.Application.genuineCheckAvailable` in Unity? Explain its purpose and usage.
Application.genuineCheckAvailable public static bool genuineCheckAvailable ; Description This has the same functionality as Application.genuineCheckAvailable . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5cf31b25120
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightBoxShape.color` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightBoxShape.color public Experimental.GlobalIllumination.LinearColor color ; Description The direct light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4694d8591b54
unity_docs
scripting
What is `UIElements.WheelEvent.GetPooled` in Unity? Explain its purpose and usage.
WheelEvent.GetPooled Declaration public static UIElements.WheelEvent GetPooled ( Event systemEvent ); Parameters Parameter Description systemEvent A wheel IMGUI event. Returns WheelEvent An initialized event. Description Gets an event from the event pool and initializes it with the given values. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Returns the index of the current selected locale or -1 if not initialized. Signature: ```csharp private int _currentLocaleIdx; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdd6387f79b6
unity_docs
scripting
Give me an overview of the `TerrainDetailTextureWizard` class in Unity.
TerrainDetailTextureWizard class in UnityEditor / Inherits from: TerrainWizard Description Provides methods for displaying the detail texture wizard. Derived class that manages the detail mesh wizards used for displaying and altering detail mesh data. Note: This method derives from TerrainWizard. Additiona...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c57eb19a2e69
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchService.ShowContextual`.
ce.ShowContextual Declaration public static Search.ISearchView ShowContextual (params string[] providerIds ); Parameters Parameter Description providerIds Unique IDs of search providers to enable when opening the search view. Returns ISearchView Returns the search view window instance. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_30eef9532327
unity_docs
math
Explain 'Create a scriptable tile' in Unity.
The code example on this page demonstrates how to create your own scriptable tile, and how to use it in your project. The PipelineExampleTile scriptable tile is an example of a tile that can be used to layout linear segments onto the tilemap that automatically join up as you paint. This is very useful for designing til...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4235fb5501d1
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R5G5B5A1_UNormPack16` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R5G5B5A1_UNormPack16 Description A four-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit B component in bits 1..5, and a 1-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_888745617ea4
unity_docs
rendering
What is `SkinQuality` in Unity? Explain its purpose and usage.
SkinQuality enumeration Description The maximum number of bones affecting a single vertex. Additional resources: SkinnedMeshRenderer.quality , QualitySettings.skinWeights . Properties Property Description Auto Chooses the number of bones from the number current QualitySettings. (Default) Bone1 Use only 1 bo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfc9fb3dbd5c
unity_docs
physics
Give me an overview of the `AnchoredJoint2D` class in Unity.
AnchoredJoint2D class in UnityEngine / Inherits from: Joint2D / Implemented in: UnityEngine.Physics2DModule Description Parent class for all joints that have anchor points. Additional resources: DistanceJoint2D class, HingeJoint2D class, SliderJoint2D class, SpringJoint2D class, WheelJoint2D class. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3b3b48854d0
unity_docs
animation
Show me a Unity C# example demonstrating `Animation.Index_operator`.
Animation.this[string] public AnimationState this[string] ; Description Returns the animation state named name . ```csharp using UnityEngine; using System.Collections;public class ExampleScript : MonoBehaviour { public Animation anim; void Start() { // Get the walk animation state and set its speed anim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d21f244e6f0d
unity_docs
scripting
What is `Experimental.Rendering.ScriptableBakedReflectionSystem.SynchronizeReflectionProbes` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ScriptableBakedReflectionSystem.SynchronizeReflectionProbes Declaration public void SynchronizeReflectionProbes (); Description Synchronize the baked data with the actual components and rendering settings. This implementatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a6a3ecf4ce2
unity_docs
rendering
What is `Rendering.DrawingSettings.sortingSettings` in Unity? Explain its purpose and usage.
DrawingSettings.sortingSettings public Rendering.SortingSettings sortingSettings ; Description How to sort objects during rendering. Additional resources: SortingSettings , ScriptableRenderContext.DrawRenderers.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef73d89f4d0d
unity_docs
physics
What is `OverlapBoxCommand` in Unity? Explain its purpose and usage.
OverlapBoxCommand struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Struct used to set up an overlap box command to be performed asynchronously during a job. When you use this struct to schedule a batch of overlap box commands, the commands are performed asynchronously. The results o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fd02582284e
unity_docs
scripting
Show me a Unity C# example demonstrating `AndroidJavaProxy`.
ityEngine / Implemented in: UnityEngine.AndroidJNIModule Description This class can be used to implement any java interface. Any java vm method invocation matching the interface on the proxy object will automatically be passed to the c# implementation. Note : this API can be used from custom thread, but requires ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d646c86c6427
unity_docs
scripting
What is `Input.GetAccelerationEvent` in Unity? Explain its purpose and usage.
Input.GetAccelerationEvent Declaration public static AccelerationEvent GetAccelerationEvent (int index ); Description Returns specific acceleration measurement which occurred during last frame. (Does not allocate temporary variables). Note : This API is part of the legacy Input Manager. The recommended best ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_43e0e6facbb5
unity_docs
ui
Explain 'Introduction to scripting back ends' in Unity.
Scripting back end is the Unity term for the runtime technology that compiles and executes your C# scripts . It determines how your code is turned into executable instructions and what runtime manages it on target platforms. The choice of a scripting back end can impact various aspects of your project, including: Build...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c91a7536205d
unity_docs
physics
Show me a Unity C# example demonstrating `JointMotor`.
JointMotor struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description The JointMotor is used to motorize a joint. For example the HingeJoint can be told to rotate at a given speed and force. The joint will then attempt to reach the velocity with the given maximum force. Additional resource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75d7b04edfcb
unity_docs
ui
What is `UIElements.KeyboardNavigationManipulator.ctor` in Unity? Explain its purpose and usage.
KeyboardNavigationManipulator Constructor Declaration public KeyboardNavigationManipulator (Action<KeyboardNavigationOperation,EventBase> action ); Parameters Parameter Description action This action is invoked when specific low level events are dispatched to the target <see cref="VisualElement" />, with a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f154e8130cc
unity_docs
scripting
What is `Playables.PlayableOutputExtensions.SetReferenceObject` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.SetReferenceObject Declaration public static void SetReferenceObject (U output , Object value ); Parameters Parameter Description output The PlayableOutput used by this operation. value The new reference object value. Description Sets the bound object to a new value. Used to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c98c83871c0c
unity_docs
scripting
In Unity's 'Move elements at runtime', what is 'Example overview' and how does it work?
This example creates a prefab in the scene . The prefab represents a non-player character (NPC) that moves randomly within a specified range. The NPC has a name tag that follows it and scales based on the distance from the camera . You can find the completed files that this example creates in this GitHub repository .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.