id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_059caf7a67f4
unity_docs
rendering
Explain 'RenderingLayerMaskField' in Unity.
A RenderingLayerMaskField is an Editor-only control that lets users select one or more rendering layers from a list of available HDRP or URP rendering layers defined in Tags and Layers . ## Create a RenderingLayerMaskField You can create a RenderingLayerMaskField with UXML and C#. The following C# example creates a R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_607b18665ac9
unity_docs
xr
What is `AudioSettings.AudioConfigurationChangeHandler` in Unity? Explain its purpose and usage.
AudioSettings.AudioConfigurationChangeHandler Declaration public delegate void AudioConfigurationChangeHandler (bool deviceWasChanged ); Parameters Parameter Description deviceWasChanged True if the change was caused by an device change. Description A delegate called whenever the global audio settings are...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b1b604cfc38
unity_docs
scripting
What is `PluginImporter.GetCompatibleWithPlatform` in Unity? Explain its purpose and usage.
PluginImporter.GetCompatibleWithPlatform Declaration public bool GetCompatibleWithPlatform ( BuildTarget platform ); Declaration public bool GetCompatibleWithPlatform (string platformName ); Parameters Parameter Description platform Target platform. Description Is plugin compatible with specified pla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee1527fe9d4f
unity_docs
input
Show me a Unity C# example demonstrating `Event.KeyboardEvent`.
eed to check if a certain key has been pressed - possibly with modifiers. The syntax for the key string is a key name (same as in the Input Manager), optionally prefixed by any number of modifiers: & = Alternate, ^ = Control, % = Command/Windows key, # = Shift Examples: &f12 = Alternate + F12, "^[0]" = Control + ke...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fe4f05437f8
unity_docs
rendering
What is `Texture2D.grayTexture` in Unity? Explain its purpose and usage.
Texture2D.grayTexture public static Texture2D grayTexture ; Description Gets a small Texture with all gray pixels. Unity sets all pixels of this Texture to gray (0.5,0.5,0.5,0.5). The alpha value is also 0.5 (half transparent), and the color is in sRGB color space. Additional resources: linearGrayTexture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fe424d2f47e
unity_docs
scripting
What is `Video.VideoClip.height` in Unity? Explain its purpose and usage.
VideoClip.height public uint height ; Description The height of the images in the video clip in pixels. (Read Only). You can use this property to help get the dimensions of your video and help display your video properly. Also, you can use it to calculate the image aspect ratio. Additional resources: VideoClip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e0884376212
unity_docs
editor
What is `Build.Content.BuildUsageTagSet` in Unity? Explain its purpose and usage.
BuildUsageTagSet class in UnityEditor.Build.Content Description Container for holding information about how objects are being used in a build. This class helps ensure the correct Shared Variants, Mesh Channels, and more are included in the build correctly. Note: this class and its members exist to provide low-lev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_813cfa173a58
unity_docs
scripting
What is `SceneManagement.SceneManager.GetActiveScene` in Unity? Explain its purpose and usage.
SceneManager.GetActiveScene Declaration public static SceneManagement.Scene GetActiveScene (); Returns Scene The active Scene. Description Gets the currently active Scene. The currently active Scene is the Scene which will be used as the destination for new GameObjects and the source of current lighting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_311b6d33aa67
unity_docs
math
What is `Compilation.CompilationPipeline.GetResponseFileDefinesFromAssemblyName` in Unity? Explain its purpose and usage.
CompilationPipeline.GetResponseFileDefinesFromAssemblyName Declaration public static string[] GetResponseFileDefinesFromAssemblyName (string assemblyName ); Parameters Parameter Description assemblyName The name of the assembly without the extension. Returns string[] A string array of #define directives ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_05381a4974d6
unity_docs
editor
Explain 'scriptmultiplescenes' in Unity.
## Use scripts to edit multiple scenes You can edit multiple scenes using scripts within the Editor or at runtime. ## Use scripts within the Editor When using (or running) scripts within the Editor, use: Scene struct: Available both in the Editor and at runtime, Scene struct contains read-only properties that relate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ec9e366cf1c
unity_docs
rendering
What is `Rendering.CullingResults.GetLightIndexMap` in Unity? Explain its purpose and usage.
CullingResults.GetLightIndexMap Declaration public NativeArray<int> GetLightIndexMap ( Unity.Collections.Allocator allocator ); Parameters Parameter Description allocator The allocator to use. Returns NativeArray<int> Array of indices that map from VisibleLight indices to internal per-object light lis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_96bf71fa1336
unity_docs
rendering
In Unity's 'Color emojis', what is 'Control emoji fallback search' and how does it work?
You can prioritize searching the Fallback Emoji Text Assets for emojis. For example, if a font includes black and white emojis, you can choose whether to use emojis from the primary font or the Fallback Emoji Text Assets list. In UI Builder, select the text element in the Hierarchy panel. In the Inspector panel, in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02133c923f52
unity_docs
rendering
What is `RenderTextureFormat.ARGBFloat` in Unity? Explain its purpose and usage.
RenderTextureFormat.ARGBFloat Description Color render texture format, 32 bit floating point per channel. Note that not all graphics cards support floating point render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5cec2b8b5d36
unity_docs
scripting
Explain 'Troubleshooting the QNX Player' in Unity.
This page lists the common problems and limitations that might occur when using the QNX Player. ## The QNX Player fails to enumerate all display resolutions Due to an ABI breakage in the QNX 7.1 screen system headers, the Player might not be able to query all available display modes. For more information, refer to th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ac0a7bfcb6ee
unity_docs
editor
Explain 'Introduction to runtime asset management' in Unity.
How you load and manage assets in your project impacts on your application’s memory usage, load times, and build size. Unity provides several asset management systems, each designed for specific use cases and project sizes. Small applications with fixed content sizes can usually use Unity’s default asset management sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a82adb52ca8
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Queries.ctor` in Unity? Explain its purpose and usage.
Queries Constructor Declaration public Queries (); Declaration public Queries ( Unity.Android.Gradle.Manifest.Queries queries ); Parameters Parameter Description queries Element to copy. Description Element constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ffd5b22d12d
unity_docs
rendering
What is `Terrain` in Unity? Explain its purpose and usage.
Terrain class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.TerrainModule Description The Terrain component renders the terrain. Static Properties Property Description activeTerrain The active Terrain. This is a convenient function to get to the main Terrain in the Scene. activeT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5c5aec5a5410
unity_docs
rendering
Explain 'Metal requirements and compatibility' in Unity.
This page lists the requirements for using Metal as well as the features that Metal is compatible with. ## Platform compatibility Unity supports Metal for the Unity Player on iOS, tvOS, and macOS. Unity also supports Metal for the Unity Editor on macOS. ## Hardware compatibility Unity supports Metal for all Apple d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73acc2c4828d
unity_docs
scripting
What is `UIElements.TimeValue` in Unity? Explain its purpose and usage.
TimeValue struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Represents a time value. Properties Property Description unit The unit of the value property. value The time value. Constructors Constructor Description TimeValue Creates from a float and a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_983cb9579222_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
If true, we also consider inactive elements in the scene when we search for an instance. Signature: ```csharp protected static bool ConsiderInactiveInstances = false; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_5ad787646502
unity_docs
editor
What is `L10n` in Unity? Explain its purpose and usage.
L10n class in UnityEditor Description Class for text localization. Use this class to localize your text shown in the Unity Editor. You need a po file (ja.po for example) and an asmdef (Assembly Definition) file. Add this syntax to define the LocalizationAttribute in any script in the assembly: [assembly:Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f636811010d
unity_docs
physics
Show me a Unity C# example demonstrating `RaycastHit2D.distance`.
cted a Collider2D . When the RaycastHit2D result is returned from a physics query, the distance refers to the distance from the physics query start position to the position the physics query shape intersected as indicated by RaycastHit2D.centroid . For simple linecast or raycast queries, RaycastHit2D.point is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b877f873e7c7
unity_docs
physics
Show me a Unity C# example demonstrating `Physics.Linecast`.
ryTriggerInteraction.UseGlobal); Parameters Parameter Description start Start point. end End point. layerMask A Layer mask that is used to selectively filter which colliders are considered when casting a ray. queryTriggerInteraction Specifies whether this query should hit Triggers. Description Returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17a3395e95a4
unity_docs
scripting
What is `Experimental.GraphView.EdgeConnector_1.OnPointerMove` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeConnector<T0>.OnPointerMove Declaration protected void OnPointerMove ( UIElements.PointerMoveEvent e ); Parameters Parameter Description e The pointer move event. Description Called when a pointer move event occurs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b442323a5896
unity_docs
scripting
What is `AssetMoveResult` in Unity? Explain its purpose and usage.
AssetMoveResult enumeration Description Result of Asset move Properties Property Description DidNotMove Tells the internal implementation that the asset was not moved physically on disk by the script. FailedMove Tells the internal implementation that the script could not move the assets. DidMove Tells the int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62845c04d06e
unity_docs
rendering
In Unity's 'Setup a project for 2D games', what is 'Installing packages' and how does it work?
Most packages you need to make a 2D game in Unity are included in the Unity Editor. The following table lists the packages included by default when you choose the 2D template : Package Description 2D Animation 2D Animation provides the necessary tooling and runtime components for applying skeletal animation to your Spr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_401fdbb1051f
unity_docs
scripting
What is `SceneTemplate.SceneTemplatePipelineAdapter.BeforeTemplateInstantiation` in Unity? Explain its purpose and usage.
SceneTemplatePipelineAdapter.BeforeTemplateInstantiation Declaration public void BeforeTemplateInstantiation ( SceneTemplate.SceneTemplateAsset sceneTemplateAsset , bool isAdditive , string sceneName ); Parameters Parameter Description sceneTemplateAsset The Scene template Asset to instantiate. isAdditiv...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b016d2f58643_doc_2
github
scripting
What does `ApplyHorizontalImpulse` do in this Unity script? Explain its purpose and signature.
Applies a horizontal impulse, ignoring vertical forces.Impulse to be applied. Signature: ```csharp public void ApplyHorizontalImpulse(Vector3 impulse) => ApplyImpulse(new Vector3(impulse.x, 0.0f, impulse.z)); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_0e91f553c5ce
unity_docs
scripting
What is `Rendering.SubMeshDescriptor.baseVertex` in Unity? Explain its purpose and usage.
SubMeshDescriptor.baseVertex public int baseVertex ; Description Offset that is added to each value in the index buffer, to compute the final vertex index. You can use the Base vertex to achieve meshes that are larger than 65535 vertices while using 16 bit index buffers, as long as each sub-mesh fits within its...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_291afe1b9097
unity_docs
rendering
What is `Rendering.GraphicsSettings.HasShaderDefine` in Unity? Explain its purpose and usage.
GraphicsSettings.HasShaderDefine Declaration public static bool HasShaderDefine ( Rendering.GraphicsTier tier , Rendering.BuiltinShaderDefine defineHash ); Description Returns true if shader define was set when compiling shaders for current GraphicsTier . Graphics Tiers are only available in the Built-in R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57f35a909468
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.ClearSampleFramesAvailableNativeHandler` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.ClearSampleFramesAvailableNativeHandler Declaration public void ClearSampleFramesAvailableNativeHandler (); Description Clear the native handler set with AudioSampleProvider.SetSampleFramesAvailableNative...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d922edad4991
unity_docs
scripting
What is `GizmoInfo.CompareTo` in Unity? Explain its purpose and usage.
GizmoInfo.CompareTo Declaration public int CompareTo (object obj ); Parameters Parameter Description obj The GizmoInfo to compare. Returns int Returns an integer value comparing the name property of two GizmoInfo types. Description Returns an integer value comparing the name property of two GizmoInfo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9353373765c2
unity_docs
editor
What is `Experimental.GraphView.GraphViewEditorWindow.GetExtraPaneTypes` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewEditorWindow.GetExtraPaneTypes Declaration public IEnumerable<Type> GetExtraPaneTypes (); Returns IEnumerable<Type> The extra panes that are specific to the window. Description Gets the extra panes associated w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6112941b4b08
unity_docs
performance
What is `Unity.Jobs.IJobFor.Execute` in Unity? Explain its purpose and usage.
IJobFor.Execute Declaration public void Execute (int index ); Parameters Parameter Description index The index of the for loop to perform work from. Description Performs work against a specific iteration index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fab789723eb
unity_docs
animation
What is `AnimationUtility.EditorCurveBindingsToGenericBindings` in Unity? Explain its purpose and usage.
AnimationUtility.EditorCurveBindingsToGenericBindings Declaration public static GenericBinding[] EditorCurveBindingsToGenericBindings (EditorCurveBinding[] editorCurveBindings ); Parameters Parameter Description editorCurveBindings The EditorCurveBinding to be converted. Returns GenericBinding[] Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36174b945799
unity_docs
rendering
What is `Search.SearchProvider.onEnable` in Unity? Explain its purpose and usage.
SearchProvider.onEnable public Unity.Android.Gradle.Manifest.Action onEnable ; Description Called when the SearchWindow is opened. Allows the search provider to perform some caching. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Light...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c923437891af
unity_docs
input
What is `XR.InputDevice.subsystem` in Unity? Explain its purpose and usage.
InputDevice.subsystem public XR.XRInputSubsystem subsystem ; Description Gets the XRInputSubsystem that reported this InputDevice . Will return null if no XRInputSubsystem is associated with this device.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e8f9b8d76c0
unity_docs
scripting
Give me an overview of the `ExcludeFromObjectFactoryAttribute` class in Unity.
ExcludeFromObjectFactoryAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Add this attribute to a class to prevent the class and its inherited classes from being created with ObjectFactory methods. Constructors Constructor Description ExcludeFromObjectFactoryAttribute Defa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ffea42caf41
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.dragHoverBarUssClassName` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.dragHoverBarUssClassName public static string dragHoverBarUssClassName ; Description The USS class name of the drag hover bar. Unity adds this USS class to the bar that appears when the user drags an item in the list. Any styling applied to this class affects every BaseVerticalCo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8330b4823024
unity_docs
rendering
What is `Android.AndroidPlatformIconKind` in Unity? Explain its purpose and usage.
AndroidPlatformIconKind class in UnityEditor.Android Description Contains all Android PlatformIconKind supported by Unity. Use this class to configure icons used in your Android application. For detailed information on Android icons, refer to the Android developer documentation on Android icon design guideline...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0de301880ca3
unity_docs
scripting
What is `Search.SearchItem.GetValue` in Unity? Explain its purpose and usage.
SearchItem.GetValue Declaration public object GetValue (string name , Search.SearchContext context ); Parameters Parameter Description name Field name. Can be null. context Search context if available. Can be null. Returns object Search item value. Description Get the default search item value o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95ea0589c385
unity_docs
rendering
What is `Terrain.normalmapFormat` in Unity? Explain its purpose and usage.
Terrain.normalmapFormat public static Experimental.Rendering.GraphicsFormat normalmapFormat ; Description Graphics format of the Terrain normal map texture. Additional resources: normalmapTexture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b123254b6a81
unity_docs
rendering
Show me a Unity C# example demonstrating `EditorGUIUtility.Load`.
EditorGUIUtility.Load Declaration public static Object Load (string path ); Description Load a built-in resource. This function will look in Assets/Editor Default Resources/ + path for the resource. If not there, it will try the built-in editor resources by name. ```csharp using UnityEngine; using UnityEditor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_67a39180bb61
unity_docs
editor
Explain 'Undo History window' in Unity.
The Undo History window provides a visual way of navigating through your undo history, or undoing or redoing multiple actions in the Editor at once. ## Undoing and redoing actions To open the Undo History window, click the Undo icon ( ), or choose Edit > Undo History . Select an entry in the Undo History window to re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54bda75b4eb5
unity_docs
math
What is `Rendering.BatchDrawCommandFlags.HasSortingPosition` in Unity? Explain its purpose and usage.
BatchDrawCommandFlags.HasSortingPosition Description Instances in the draw command have explicit world space sorting positions in the instanceSortingPositions array. Unity uses those sorting positions for depth sorting.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea0f1f488cf0
unity_docs
scripting
Give me an overview of the `Sprite` class in Unity.
Sprite class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Represents a Sprite object for use in 2D gameplay. Sprites are 2D graphic objects used for characters, props, projectiles and other elements of 2D gameplay. The graphics are obtained from bitmap images -...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd3b09b01842
unity_docs
math
What is `Search.SearchUtils.FetchGameObjects` in Unity? Explain its purpose and usage.
SearchUtils.FetchGameObjects Declaration public static GameObject[] FetchGameObjects ( SceneManagement.Scene scene ); Declaration public static IEnumerable<GameObject> FetchGameObjects (); Parameters Parameter Description scene Scene to get objects from. Returns GameObject[] The array of game object...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca0e92975070
unity_docs
ui
What is `DeviceSimulation.DeviceSimulatorPlugin` in Unity? Explain its purpose and usage.
DeviceSimulatorPlugin class in UnityEditor.DeviceSimulation Description Extend this class to create a Device Simulator plug-in. Extend this class to create a Device Simulator plug-in. A plug-in lets you control custom simulation parameters from a UI inside the Control Panel of a Device Simulator window. Unity cre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4fa84292ce06
unity_docs
scripting
Give me an overview of the `HeaderAttribute` class in Unity.
HeaderAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Use this PropertyAttribute to add a header above some fields in the Inspector. The header is done using a DecoratorDrawer . ```csharp using UnityEngine;public class Example : MonoBe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e91c75d175d2
unity_docs
editor
What is `Tilemaps.Tilemap.HasEditorPreviewTile` in Unity? Explain its purpose and usage.
Tilemap.HasEditorPreviewTile Declaration public bool HasEditorPreviewTile ( Vector3Int position ); Parameters Parameter Description position Position to check. Returns bool Returns true if there is an Editor Preview Tile at the position. Returns false otherwise. Description Returns whether there is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c6fd675a19b
unity_docs
scripting
What is `GL.LINES` in Unity? Explain its purpose and usage.
GL.LINES public static int LINES ; Description Mode for Begin : draw lines. Draws lines between each pair of vertices passed. If you pass four vertices, A, B, C and D, two lines are drawn: one between A and B, and one between C and D. To set up the screen for drawing in 2D, use GL.LoadOrtho or GL.LoadPixelM...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47ff13b24e79
unity_docs
rendering
What is `Rendering.LocalKeywordSpace.operator_ne` in Unity? Explain its purpose and usage.
LocalKeywordSpace.operator != public static bool operator != ( Rendering.LocalKeywordSpace lhs , Rendering.LocalKeywordSpace rhs ); Description Returns true if the local shader keyword spaces are not the same. Otherwise, returns false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89d16e677328
unity_docs
scripting
What is `Pool.IObjectPool_1.Get` in Unity? Explain its purpose and usage.
IObjectPool<T0>.Get Declaration public T Get (); Returns T A pooled object or a new instance if the pool is empty. Description Get an instance from the pool. If the pool is empty then a new instance will be created. ```csharp using System.Text; using UnityEngine; using UnityEngine.Pool;// This component r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35d67e87d797
unity_docs
physics
What is `Collision2D.otherCollider` in Unity? Explain its purpose and usage.
Collision2D.otherCollider public Collider2D otherCollider ; Description The other Collider2D involved in the collision with the collider . This collider is attached to the Collision2D.otherRigidbody . Additional resources: Collider2D and Rigidbody2D .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5378b91090b7
unity_docs
ui
What is `Experimental.GraphView.RectangleSelector` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RectangleSelector class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.MouseManipulator Description Rectangle selection box manipulator. Constructors Constructor Description RectangleSelector RectangleS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2748cfc10de9
unity_docs
editor
What is `EditorCurveBinding.isSerializeReferenceCurve` in Unity? Explain its purpose and usage.
EditorCurveBinding.isSerializeReferenceCurve public bool isSerializeReferenceCurve ; Description Returns true if the binding is to a curve that points to field on a SerializeReference instance. Returns false otherwise. (Read Only)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a498211ce80e
unity_docs
xr
Explain 'Troubleshooting for Android' in Unity.
Learn how to resolve common issues when developing Android applications using Unity. ## Android manifest file contains unexpected permissions When building a Unity Android application, the final application manifest might contain permissions that you didn’t explicitly add to your project. Such unexpected permissions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b70387c623ef
unity_docs
animation
What is `Animations.TransformStreamHandle.SetLocalScale` in Unity? Explain its purpose and usage.
TransformStreamHandle.SetLocalScale Declaration public void SetLocalScale ( Animations.AnimationStream stream , Vector3 scale ); Parameters Parameter Description scale The scale of the transform relative to the parent. stream The AnimationStream that holds the animated values. Description Sets the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b4af96e31b1
unity_docs
scripting
What is `ArticulationBody.AddForce` in Unity? Explain its purpose and usage.
ArticulationBody.AddForce Declaration public void AddForce ( Vector3 force , ForceMode mode = ForceMode.Force); Parameters Parameter Description force The force vector to apply. mode The type of force to apply. Description Applies a force to the ArticulationBody . Note that the force accumulates ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8483b5325624
unity_docs
ui
What are the parameters of `GUILayout.VerticalSlider` in Unity?
Returns float The value that has been set by the user. Description A vertical slider the user can drag to change a value between a min and a max. Vertical slider in the Game View. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a vertical slider control that goes from 10 (top) to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94ff6a007dfa
github
scripting
Write a Unity C# script called Logger
```csharp using System.Linq; using DilmerGames.Core.Singletons; using TMPro; using UnityEngine; using System; using UnityEngine.UI; using UnityEngine.EventSystems; public class Logger : Singleton<Logger> { [SerializeField] private TextMeshProUGUI debugAreaText = null; [SerializeField] private bool en...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_caf4293d25db
unity_docs
math
In Unity's 'Introduction to Unity Properties', what is 'Fundamental features' and how does it work?
The Unity Properties framework has the following fundamental features that you can use to handle C# type data generically: Property bags : An IPropertyBag<T> describes the fields and properties of type T . Unity generates property bags so the system can enumerate properties of your type. Visitors : You implement a visi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bb225e439d2
unity_docs
scripting
What is `PlayerSettings.GetDefaultScriptingBackend` in Unity? Explain its purpose and usage.
PlayerSettings.GetDefaultScriptingBackend Declaration public static ScriptingImplementation GetDefaultScriptingBackend ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description buildTarget The NamedBuildTarget . Returns ScriptingImplementation A ScriptingImplementation object that des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b0aa6b414fd
unity_docs
ui
What is `GUIContent.none` in Unity? Explain its purpose and usage.
GUIContent.none public static GUIContent none ; Description Shorthand for empty content. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void OnGUI() { GUI.Button(new Rect(0, 0, 100, 20), GUIContent.none); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dbf43ece3e6
unity_docs
rendering
What is `EditorCurveBinding.PPtrCurve` in Unity? Explain its purpose and usage.
EditorCurveBinding.PPtrCurve Declaration public static EditorCurveBinding PPtrCurve (string inPath , Type inType , string inPropertyName ); Parameters Parameter Description inPath The transform path to the object to animate. inType The type of the object to animate. inPropertyName The name of the pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_155dfa7ad246
unity_docs
audio
In Unity's 'Audio Clip Import Settings reference', what is 'Platform-specific audio clip override settings' and how does it work?
The following table shows the options available in the platform-specific overrides panel in the Audio Clip Import Settings Inspector window. In this panel, you can configure the audio clip’s settings for various platforms. To access the settings for a specific platform, select the tab for that platform. Property Functi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8d3cc2ecc2b
unity_docs
editor
What is `BuildPipeline.BuildPlayer` in Unity? Explain its purpose and usage.
BuildPipeline.BuildPlayer Declaration public static Build.Reporting.BuildReport BuildPlayer ( BuildPlayerOptions buildPlayerOptions ); Parameters Parameter Description buildPlayerOptions Provide various options to control the behavior of BuildPipeline.BuildPlayer . Returns BuildReport A BuildReport ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e79ecc9a7611
unity_docs
rendering
Give me an overview of the `TransparencySortMode` class in Unity.
TransparencySortMode enumeration Description Transparent object sorting mode of a Camera . By default, perspective cameras sort objects based on distance from camera position to the object center; and orthographic cameras sort based on distance along the view direction. If you're making a 2D game with a perspecti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dc84afc2646
unity_docs
scripting
What is `LightTransport.RadeonRaysContext.ReadBuffer` in Unity? Explain its purpose and usage.
RadeonRaysContext.ReadBuffer Declaration public void ReadBuffer (BufferSlice<T> src , NativeArray<T> dst ); Declaration public void ReadBuffer (BufferSlice<T> src , NativeArray<T> dst , LightTransport.EventID id ); Parameters Parameter Description src The buffer slice to read from. dst The array ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135f8803eb88
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystemRenderer.maxParticleSize`.
ParticleSystemRenderer.maxParticleSize public float maxParticleSize ; Description Clamp the maximum particle size. Particles can become very heavy on fillrate. Use this setting to make sure they don't use too much performance when up close to the viewer. ```csharp using UnityEngine; using System.Collections;[R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7cad72058db
unity_docs
editor
What is `Profiling.FrameDataView.GetUnityObjectInfo` in Unity? Explain its purpose and usage.
FrameDataView.GetUnityObjectInfo Declaration public bool GetUnityObjectInfo (int instanceId , out Profiling.FrameDataView.UnityObjectInfo info ); Parameters Parameter Description instanceId UnityEngine.Object instance identifier. info UnityEngine.Object information output struct with name and other attr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ffde57c9f25b
unity_docs
physics
Explain 'Force over Lifetime module reference' in Unity.
Particles can be accelerated by forces (such as wind or attraction) that are specified in this module. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function X, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8c2a6761767
unity_docs
scripting
What is `SerializedProperty.managedReferenceFieldTypename` in Unity? Explain its purpose and usage.
SerializedProperty.managedReferenceFieldTypename public string managedReferenceFieldTypename ; Description String corresponding to the value of the managed reference field full type string. Contains a valid value when propertyType is SerializedPropertyType.ManagedReference . This property is Read Only (you ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99f144fb6328
unity_docs
physics
What is `PhysicsMaterial2D` in Unity? Explain its purpose and usage.
PhysicsMaterial2D class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.Physics2DModule Description Asset type that defines the surface properties of a Collider2D . When two Colllider2D come into contact, the physics system uses both friction and bounciness if it needs to calculate a col...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ee255a3d917
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.Android.useCustomKeystore`.
Description Enable application signing with a custom keystore. When enabled, the Android application is signed with the key specified in keyaliasName from the keystore specified in keystoreName . When disabled, the application is signed with a debug key. The following code example demonstrates how to enable applic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d1522ba2328
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.NativeSliceUnsafeUtility.GetUnsafeReadOnlyPtr` in Unity? Explain its purpose and usage.
NativeSliceUnsafeUtility.GetUnsafeReadOnlyPtr Declaration public static void* GetUnsafeReadOnlyPtr (NativeSlice<T> nativeSlice ); Parameters Parameter Description nativeSlice The NativeSlice to check. Returns void* The memory buffer pointer of nativeSlice . Description Gets a NativeSlice memory buff...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a29af7ead01
unity_docs
performance
What is `GraphicsJobMode` in Unity? Explain its purpose and usage.
GraphicsJobMode enumeration Description Enum used to specify the graphics jobs mode to use. Additional resources: PlayerSettings.graphicsJobMode . Properties Property Description Native Native Graphics Jobs. Legacy Legacy Graphics Jobs ("Jobified Rendering"). Split Split Graphics Jobs.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24b4e2a4631d
unity_docs
rendering
What is `LineRenderer.alignment` in Unity? Explain its purpose and usage.
LineRenderer.alignment public LineAlignment alignment ; Description Select whether the line will face the camera, or the orientation of the Transform Component. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(LineRenderer))] public class ExampleClass : MonoBehaviour { private ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdf0ba9b43a7
unity_docs
editor
What is `EditorGUI.DoubleField` in Unity? Explain its purpose and usage.
EditorGUI.DoubleField Declaration public static double DoubleField ( Rect position , double value , GUIStyle style = EditorStyles.numberField); Declaration public static double DoubleField ( Rect position , string label , double value , GUIStyle style = EditorStyles.numberField); Declaration pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a65420960a8b
unity_docs
xr
In Unity's 'Property bags', what is 'Performance considerations' and how does it work?
Generating property bags by reflection can introduce performance overhead the first time you request a property bag for a given container type. Creating properties for field members through reflection can allocate memory and increase garbage collector overhead in IL2CPP builds. To avoid reflection and improve performan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63a8cd58f090
unity_docs
scripting
What are the parameters of `Mesh.RecalculateNormals` in Unity?
Description Recalculates the normals of the Mesh from the triangles and vertices. After modifying the vertices it is often useful to update the normals to reflect the change. Normals are calculated from all shared vertices. Imported Meshes sometimes don't share all vertices. For example, a vertex at a UV seam is split ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9908a61a749e
unity_docs
ui
Explain 'Launch and use the Search window' in Unity.
The Search window finds assets in your project, packages in Unity’s registry, assets from the Unity Asset Store , log information, and so on. You can compare items, view them in an Inspector tab, and act on them. This page reviews the window’s interface. ## Launch Search To launch Search, do one of the following: Pre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6194a4e5cf21
unity_docs
rendering
What are the parameters of `ImageConversion.EncodeToJPG` in Unity?
Description Encodes this texture into JPG format. This function returns a byte array which is the JPG file data. You can store the encoded data as a file or send it over the network without further processing. This function does not work on any compressed format. Texture.isReadable must be true . The encoded JPG data w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e19b78e36595
unity_docs
editor
What is `AssetDatabase.RemoveUnusedAssetBundleNames` in Unity? Explain its purpose and usage.
AssetDatabase.RemoveUnusedAssetBundleNames Declaration public static void RemoveUnusedAssetBundleNames (); Description Remove all the unused AssetBundle names in the Asset Database. ```csharp using System.Linq; using UnityEngine; using UnityEditor;public class AssetDatabaseExamples : MonoBehaviour { [MenuItem(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_85092b831255
unity_docs
physics
Explain 'Search your project and scenes' in Unity.
You can search your project and scenes with the Hierarchy, Project, and Asset Database search providers: Hierarchy : Search GameObjects in the loaded scenes. Project : Search the project’s assets. This is a faster search than the Asset Database search, and supports more filters. The Project provider includes more infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8fca012879b7
unity_docs
rendering
What is `Graphics.DrawMeshNow` in Unity? Explain its purpose and usage.
Graphics.DrawMeshNow Declaration public static void DrawMeshNow ( Mesh mesh , Vector3 position , Quaternion rotation ); Declaration public static void DrawMeshNow ( Mesh mesh , Vector3 position , Quaternion rotation , int materialIndex ); Declaration public static void DrawMeshNow ( Mesh m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a41b3583f5f0
unity_docs
editor
What is `U2D.SpriteAtlasUtility` in Unity? Explain its purpose and usage.
SpriteAtlasUtility class in UnityEditor.U2D Description Utility methods to pack atlases in the Project. Static Methods Method Description CleanupAtlasPacking Cleanup internal states after packing SpriteAtlas assets. Must be called after a call to SpriteAtlasUtility.PackAllAtlases. PackAllAtlases Pack all the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_71c8dafd05e1
unity_docs
scripting
Explain 'The visual tree' in Unity.
In your UI, you structure elements into a visual tree . Topic Description Introduction to visual elements and visual tree Understand visual elements in the visual tree and how to use it. Panels Understand panels in the visual tree. Draw order Understand the elements ordering in the visual tree. Coordinate and position ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fc63028c582c
unity_docs
rendering
Explain 'Colors preferences reference' in Unity.
The Colors preferences let you pick colors for various user interface elements in the Unity Editor. To open the preferences, go to Edit > Preferences > Colors (macOS: Unity > Settings > Colors ). ## General colors Use this setting to customize color preferences for General settings. Property Function Playmode Tint Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_93584d94b472
unity_docs
scripting
Explain 'Create prefabs' in Unity.
To create and use prefabs in your project, you must do the following: Create a prefab asset . Create an instance of the prefab asset . ## Create a prefab asset To create a prefab asset, perform the following steps: Create a GameObject and configure its position, scale, rotation, components, and other properties as ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f522d911594a
unity_docs
scripting
What is `AI.NavMeshAgent.destination` in Unity? Explain its purpose and usage.
NavMeshAgent.destination public Vector3 destination ; Description Gets or attempts to set the destination of the agent in world-space units. Getting: Returns the destination set for this agent. • If a destination is set but the path is not yet processed the position returned will be valid navmesh position tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3f6489641ae6
unity_docs
physics
In Unity's 'Example scripts for collider events', what is 'Example: Send an event message every physics update' and how does it work?
The following example uses a trigger collider to produce a hoverpad. The trigger collider is positioned directly on top of a hoverpad GameObject, and applies a constant upward force to any GameObject within its trigger. ```csharp using UnityEngine; using System.Collections; public class HoverPad : MonoBehaviour { // ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_318dd8eaf442
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryEngine_1.AddTypeParser`.
n be converted into TFilterConstant. Takes a string and returns a ParseResult object. This contains the success flag, and the converted value if it succeeds. Description Adds a type parser that parses a string and returns a custom type. Used by custom operator handlers (see AddOperatorHandler ). <TFilterConstant>: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d86629ad07e0
unity_docs
xr
What is `Android.DownloadAssetPackAsyncOperation.downloadedAssetPacks` in Unity? Explain its purpose and usage.
DownloadAssetPackAsyncOperation.downloadedAssetPacks public string[] downloadedAssetPacks ; Description Gets the names of Android asset packs downloaded by this operation. This property returns the names of asset packs that the device downloaded and made available to the app based on the download request that t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d60d8cddc97f
unity_docs
rendering
What is `ParticleSystem.proceduralSimulationSupported` in Unity? Explain its purpose and usage.
ParticleSystem.proceduralSimulationSupported public bool proceduralSimulationSupported ; Description Determines whether this system supports Procedural Simulation. Internally, each of the Built-In Particle Systems has two modes of operation: procedural and non-procedural. In procedural mode, it is possible to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6183d7e91f4e
unity_docs
scripting
What is `Mesh.GetSubMesh` in Unity? Explain its purpose and usage.
Mesh.GetSubMesh Declaration public Rendering.SubMeshDescriptor GetSubMesh (int index ); Parameters Parameter Description index Sub-mesh index. See subMeshCount . Out of range indices throw an exception. Returns SubMeshDescriptor Sub-mesh data. Description Get information about a sub-mesh of the M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ca6f0cc2fdc
unity_docs
scripting
What is `GameObject.CreatePrimitive` in Unity? Explain its purpose and usage.
GameObject.CreatePrimitive Declaration public static GameObject CreatePrimitive ( PrimitiveType type ); Parameters Parameter Description type The type of primitive object to create, specified as a member of the PrimitiveType enum. Description Creates a GameObject of the specified PrimtiveType with a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b57bdaed36b6
unity_docs
xr
What is `AssetBundle.LoadAssetWithSubAssetsAsync` in Unity? Explain its purpose and usage.
AssetBundle.LoadAssetWithSubAssetsAsync Declaration public AssetBundleRequest LoadAssetWithSubAssetsAsync (string name ); Declaration public AssetBundleRequest LoadAssetWithSubAssetsAsync (string name ); Declaration public AssetBundleRequest LoadAssetWithSubAssetsAsync (string name , Type type ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_29c745fec15b
unity_docs
scripting
Explain 'Animator component' in Unity.
Use an Animator component to assign animation to a GameObject in your Scene . The Animator component requires a reference to an Animator Controller which defines which animation clips to use, and controls when and how to blend and transition between them. If the GameObject is a humanoid character with an Avatar definit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_db9e7d867e39_doc_1
github
scripting
What does `IsTracked` do in this Unity script? Explain its purpose and signature.
Define if the current controller is tracked not depending on handeness.True if the controller is tracked Signature: ```csharp public abstract bool IsTracked(); ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.