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_fa4a27343c0b
unity_docs
scripting
What is `UIElements.PointerDownEvent.ctor` in Unity? Explain its purpose and usage.
PointerDownEvent Constructor Declaration public PointerDownEvent (); Description Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3b4b8c6e465d
github
scripting
Write a Unity Editor script for TMP_Package Resource Importer
```csharp #if UNITY_EDITOR using System; using System.IO; using UnityEngine; using UnityEditor; namespace TMPro { [System.Serializable] public class TMP_PackageResourceImporter { bool m_EssentialResourcesImported; bool m_ExamplesAndExtrasResourcesImported; internal bool m_IsImpor...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_23601942807e
unity_docs
physics
In Unity's 'Rigidbody component reference', what is 'Layer overrides' and how does it work?
The Layer Overrides section provides properties that allow you to override the project-wide Layer-based collision detection settings for all colliders attached to this Rigidbody. Property Description Layer Override Priority Define the priority of the collider override for colliders attached to this Rigidbody. When coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0beefdd77912
unity_docs
scripting
What are the parameters of `Undo.SetCurrentGroupName` in Unity?
Description Set the name of the current undo group. Setting a name manually will override an implicitly generated name for the group. Additional resources: Undo.GetCurrentGroupName . ```csharp using UnityEditor; using UnityEngine; public class ResetPositionForSelectedGameObjectsExample : MonoBehaviour { [MenuItem(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ace9cf169d5f
unity_docs
scripting
Show me a Unity code example for 'Stop and restart Unity Accelerator'.
nd net start console commands from a terminal to stop and start the service. Examples: C:\> net stop "Unity Accelerator" # Stops the service C:\> net start "Unity Accelerator" # Starts the service ## macOS Run the launchctl command from the terminal to control the com.unity3d.accelerator service from the LaunchContro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_821107229184
unity_docs
rendering
What is `AssetImporters.LightDescription.GetStringPropertyNames` in Unity? Explain its purpose and usage.
LightDescription.GetStringPropertyNames Declaration public void GetStringPropertyNames (List<string> names ); Parameters Parameter Description names The list of retrieved property names. Description Retrieves the property names of type string for this light.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b3ffc04bbfa
unity_docs
scripting
What is `UIElements.LongField.ValueToString` in Unity? Explain its purpose and usage.
LongField.ValueToString Declaration protected string ValueToString (long v ); Parameters Parameter Description v The long integer to be converted to string. Returns string The long integer as string. Description Converts the given long integer to a string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba5925ad827a
unity_docs
rendering
Show me a Unity C# example demonstrating `UIElements.MeshGenerationContext`.
enerationContext.painter2D property, and then use it to issue drawing commands. You can find an example in the Painter2D documentation. If you manually provide content with MeshGenerationContext.Allocate and also provide a texture during the allocation, you can use the Vertex.uv vertex values to map it to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f15f037d6ac
unity_docs
editor
What is `Build.Reporting.BuildSummary` in Unity? Explain its purpose and usage.
BuildSummary struct in UnityEditor.Build.Reporting Description Contains overall summary information about a build. Properties Property Description buildEndedAt The time the build ended. buildStartedAt The time the build was started. buildType The type of build. guid The Application.buildGUID of the build. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2463482929f4
unity_docs
editor
What are the parameters of `Unity.Profiling.Editor.ProfilerModuleViewController.Dispose` in Unity?
Description Disposes the view controller. Unity calls this method automatically when the view controller is no longer required, and its view will be removed from the window hierarchy. Override this method to do any necessary clean up of your view controller, such as unsubscribing from events. You should always call the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2adca0d3aaf1
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetAssetOrScenePath`.
atic string GetAssetOrScenePath ( Object assetObject ); Parameters Parameter Description assetObject The asset object to check. Description Returns the path name relative to the project folder where the asset or scene is stored. All paths are relative to the project folder, for example: "Assets/MyTextures/...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c187d087c1f
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.InsertArrayElementAtIndex`.
SerializedProperty.InsertArrayElementAtIndex Declaration public void InsertArrayElementAtIndex (int index ); Description Insert an new element at the specified index in the array. The value of the inserted element is undefined and should be explicitly set after calling this function. Additional resources: i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_86f357931255
unity_docs
rendering
In Unity's 'Use video sources', what is 'File system' and how does it work?
On native build platforms, you can set the URL to any file path to directly use files in your file system. You can use a file:// prefix but it’s not necessary. Note: Some web browsers allow you to manually disable browser Cross-Origin Resource Sharing (CORS) security for file:// URL access for local development and tes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a939dd34e1c7
unity_docs
rendering
Show me a Unity C# example demonstrating `GL.PopMatrix`.
GL.PopMatrix Declaration public static void PopMatrix (); Description Restores the model, view and projection matrices off the top of the matrix stack. Changing the model, view or projection matrices overrides the current rendering matrices. It is good practice to save and restore these matrices using GL.PushM...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4d5a7e0dcf33
github
scripting
Write a Unity C# ScriptableObject for Grid State Color Palette Data
```csharp using UnityEngine; namespace FactoryMustScale.Runtime.Visualization { /// <summary> /// Runtime color lookup for cell state ids. /// Baked from ScriptableObject authoring and used in minimap hot paths (array lookup, no dictionary). /// </summary> public struct GridStateColorPaletteData ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_fe9867c72a4f
unity_docs
scripting
What is `PlayerSettings.iOS.VisionOSManualProvisioningProfileType` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.VisionOSManualProvisioningProfileType public static ProvisioningProfileType VisionOSManualProvisioningProfileType ; Description A ProvisioningProfileType that will be set when building a visionOS Xcode project. The type will be set automatically if the used provisioning profile is instal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdeb7b9ca316
unity_docs
scripting
What is `BuildPlayerWithProfileOptions.assetBundleManifestPath` in Unity? Explain its purpose and usage.
BuildPlayerWithProfileOptions.assetBundleManifestPath public string assetBundleManifestPath ; Description The path to a manifest file describing all the AssetBundles used in the build (optional). When you call BuildPipeline.BuildAssetBundles to create your AssetBundles, Unity will also generate a .manifest fi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4fe566868a61
unity_docs
physics
What are the parameters of `Collider2D.GetContacts` in Unity?
Returns int Returns the number of contacts placed in the contacts array. Description Retrieves all contact points for this Collider. Contacts involving a Collider2D set to be a trigger will never be returned here because trigger Colliders do not have contact points. You should pass an array that is large enough to cont...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c24c28eeb467
unity_docs
math
What is `Vector2.magnitude` in Unity? Explain its purpose and usage.
Vector2.magnitude public float magnitude ; Description Returns the length of this vector (Read Only). The length of the vector is square root of (x*x+y*y) . If you only need to compare magnitudes of some vectors, you can compare squared magnitudes of them using sqrMagnitude (computing squared magnitudes is f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2151cb47ade3
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.Set`.
Vector3.Set Declaration public void Set (float newX , float newY , float newZ ); Description Set x, y and z components of an existing Vector3. ```csharp // Attach this script to a GameObject. Create an empty GameObject that will act as your "New Transform". Assign this in the Inspector. // Press the "Set" bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52c749ed43cc
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.FindPropertyRelative`.
SerializedProperty.FindPropertyRelative Declaration public SerializedProperty FindPropertyRelative (string relativePropertyPath ); Description Retrieves the SerializedProperty at a relative path to the current property. When the SerializedProperty references a compound type, such as a struct, class or array,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b88e0e73261
unity_docs
physics
Show me a Unity C# example demonstrating `EditorApplication.quitting`.
this event when the editor application is quitting. Add an event handler to this event to receive a notification that the application is quitting. Note that this will not fire if the Editor is forced to quit or if there is a crash. This event is raised when the quitting process cannot be cancelled. To prevent the Edit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f64f7c806751
unity_docs
scripting
Give me an overview of the `CreateGameObjectHierarchyEventArgs` class in Unity.
CreateGameObjectHierarchyEventArgs struct in UnityEditor Description A change of this type indicates that a GameObject has been created, possibly with additional objects below it in the hierarchy. This happens for example when Undo.RegisterCreatedObjectUndo is used with a GameObject . Properties Property D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_61f8cc5cc525
unity_docs
editor
Explain 'Search performance and debugging' in Unity.
These search providers help you debug your project and improve its performance. Provider Description Search performance trackers Search Performance Trackers. Search Profiler Markers Search Profiler Markers . Search Logs Search the Editor log.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17ad687d28fa
unity_docs
rendering
What is `Build.Content.WriteParameters` in Unity? Explain its purpose and usage.
WriteParameters struct in UnityEditor.Build.Content Description This struct collects all the WriteSerializedFile parameters in to a single place. Properties Property Description bundleInfo Optional Parameter used when writing a serialized file for an Asset Bundle. globalUsage The global lighting information t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e263bff29a6
unity_docs
audio
What is `Networking.UnityWebRequestMultimedia` in Unity? Explain its purpose and usage.
UnityWebRequestMultimedia class in UnityEngine.Networking / Implemented in: UnityEngine.UnityWebRequestAudioModule Description Helpers for downloading multimedia files using UnityWebRequest . Static Methods Method Description GetAudioClip Create a UnityWebRequest to download an audio clip via HTTP GET and c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2461a216549
unity_docs
math
What is `GridBrushBase.Move` in Unity? Explain its purpose and usage.
GridBrushBase.Move Declaration public void Move ( GridLayout gridLayout , GameObject brushTarget , BoundsInt from , BoundsInt to ); Parameters Parameter Description grid Grid used for layout. brushTarget Target of the move operation. By default the currently selected GameObject. from Source bo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f31eeb05b5c5
unity_docs
rendering
Explain 'Customizing the Player loop' in Unity.
Unity runtime applications run in a continuous loop called the Player loop. During each iteration of the Player loop, Unity calls various systems to perform tasks such as rendering, physics simulation, and input handling. The various systems and subsystems updated during the Player loop are called in a defined default ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f37b267825e
unity_docs
scripting
What is `Rendering.RenderTargetBinding.ctor` in Unity? Explain its purpose and usage.
RenderTargetBinding Constructor Declaration public RenderTargetBinding ( Rendering.RenderTargetIdentifier colorRenderTarget , Rendering.RenderBufferLoadAction colorLoadAction , Rendering.RenderBufferStoreAction colorStoreAction , Rendering.RenderTargetIdentifier depthRenderTarget , Rendering.RenderBuffer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62933bbcdb9f
unity_docs
editor
What is `Build.Player.ScriptCompilationSettings` in Unity? Explain its purpose and usage.
ScriptCompilationSettings struct in UnityEditor.Build.Player Description Struct containing information on how to build scripts. Note: this struct and its members exist to provide low-level support for the Scriptable Build Pipeline package. This is intended for internal use only; use the Scriptable Build Pipeli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3d554abd486
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.ringBufferLoopRange`.
ge ; Description When ParticleSystem.MainModule.ringBufferMode is set to loop, this value defines the proportion of the particle life that loops. This enables you to use other particle properties that are applied over the particle lifetimes, such as SizeOverLifetime. When the system must replace a particle, it p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94c216cb2541_doc_16
github
scripting
What does `GetConfigCsvHeader` do in this Unity script? Explain its purpose and signature.
Returns the csv header of the config.The header is: "quizMode,questionOrdering,answersAmount,answersOrdering,questionType,answerType,feedbackMode,feedbackType"Separator character (Default: DataGatherer.DEFAULT_COLUMN_SEPARATOR).The configs csv header string. Signature: ```csharp public static string GetConfigCsvHeader...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_219121181d7e
unity_docs
editor
Show me a Unity C# example demonstrating `AssetModificationProcessor.OnWillSaveAssets`.
AssetModificationProcessor.OnWillSaveAssets(string[]) Description This is called by Unity when it is about to write serialized assets or Scene files to disk. If it is implemented, it allows you to override which files are written by returning an array containing a subset of the pathnames which have been passed by U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bc4dcc18644
unity_docs
physics
What is `PhysicsVisualizationSettings.QueryFilter.Ray` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.QueryFilter.Ray Description Whether the filter includes ray queries. For example, ray queries include Physics.Raycast , Physics.RaycastAll , and Physics.RaycastNonAlloc .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d30e43d11be8
unity_docs
scripting
What is `MPE.ChannelService.BroadcastBinary` in Unity? Explain its purpose and usage.
ChannelService.BroadcastBinary Declaration public static void BroadcastBinary (int channelId , byte[] data ); Parameters Parameter Description channelId The ID of the channel to send the message to. data The binary data to send. Description Sends a message to all of a specific channel's ChannelClient ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_103347a59c12_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores the used to display the current move speed of continuous movement. Signature: ```csharp public Text moveSpeedValueText ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32ad9a52b61e
unity_docs
editor
What is `Rendering.ResourcePathsBaseAttribute` in Unity? Explain its purpose and usage.
ResourcePathsBaseAttribute class in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description This abstract attribute is used to describe what path to the asset should be used. This is used in class implementing IRenderPipelineResources . It only keep given data in its constructor in Editor co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc50421d295f
unity_docs
input
What is `Touch.radius` in Unity? Explain its purpose and usage.
Touch.radius public float radius ; Description An estimated value of the radius of a touch. Add radiusVariance to get the maximum touch size, subtract it to get the minimum touch size. Android : Works correctly on a limited set of devices.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e217944ef54
unity_docs
scripting
What is `Search.StringView.ctor` in Unity? Explain its purpose and usage.
StringView Constructor Declaration public StringView (string baseString ); Parameters Parameter Description baseString The base string. Description Constructs a StringView over an entire string. Declaration public StringView (string baseString , int startIndex ); Parameters Parameter Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_36a11d958d2a
unity_docs
rendering
In Unity's 'Upgrade to Unity 2021 LTS', what is 'Render pipelines' and how does it work?
This upgrade guide describes how to upgrade to version 2021 of Unity’s built-in render pipeline. To upgrade to other render pipelines to version 2021, see: The URP upgrade guide The HDRP upgrade guide To upgrade other packages, refer to the documentation for the packages you are using.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98659add684a
unity_docs
scripting
What is `Projector.nearClipPlane` in Unity? Explain its purpose and usage.
Projector.nearClipPlane public float nearClipPlane ; Description The near clipping plane distance. The projector will not affect anything that is nearer than this distance. Additional resources: projector component . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Project...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28a97504abdf
unity_docs
editor
What is `AssetDatabase.UnregisterCustomDependencyPrefixFilter` in Unity? Explain its purpose and usage.
AssetDatabase.UnregisterCustomDependencyPrefixFilter Declaration public static uint UnregisterCustomDependencyPrefixFilter (string prefixFilter ); Parameters Parameter Description prefixFilter Prefix filter for the custom dependencies to unregister. Returns uint Number of custom dependencies removed. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d29df27658dd
unity_docs
physics
What is `AI.NavMeshEditorHelpers.CollectSourcesInStage` in Unity? Explain its purpose and usage.
NavMeshEditorHelpers.CollectSourcesInStage Description Creates a list of build sources directly from the current geometry in the specified editor stage. The collection can be controlled in terms of layers, type of geometry and by collecting either by hierarchy or volume. The stageProxy parameter is used for pick...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84ed7f449012
unity_docs
scripting
What are the parameters of `Logger.Log` in Unity?
Description Logs message to the Unity Console using default logger. Additional resources: ILogger , ILogHandler . ```csharp using UnityEngine; using System.Collections;public class MyGameClass : MonoBehaviour { private static ILogger logger = Debug.unityLogger; private static string kTAG = "MyGameTag"; void ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c9a8d301bc5
unity_docs
scripting
What is `Mesh.MeshData.GetSubMesh` in Unity? Explain its purpose and usage.
Mesh.MeshData.GetSubMesh Declaration public Rendering.SubMeshDescriptor GetSubMesh (int index ); Parameters Parameter Description index The index of the sub-mesh. See subMeshCount . If you specify an out of range index, Unity throws an exception. Returns SubMeshDescriptor Returns sub-mesh data. De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97ddd916cd98
unity_docs
rendering
Give me an overview of the `LightmapsModeLegacy` class in Unity.
LightmapsModeLegacy enumeration Description Single, dual, or directional lightmaps rendering mode, used only in GIWorkflowMode.Legacy Additional resources: LightmapSettings.lightmapsModeLegacy. Properties Property Description Single Single, traditional lightmap rendering mode. Dual Dual lightmap rendering mod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_949f8dc63215
unity_docs
ui
What is `EditorUtility.DisplayProgressBar` in Unity? Explain its purpose and usage.
EditorUtility.DisplayProgressBar Declaration public static void DisplayProgressBar (string title , string info , float progress ); Description Displays or updates a progress bar. The window title will be set to title and the info will be set to info . Progress should be set to a value between 0.0 and 1.0,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fba822971fd8
unity_docs
scripting
Give me an overview of the `FullScreenMode` class in Unity.
FullScreenMode enumeration Description Sets the full-screen mode. For information on platform compatibility, refer to the description of each mode. Additional resources: Screen.fullScreenMode , PlayerSettings.fullScreenMode , PlayerSettings.Android.fullscreenMode Properties Property Description ExclusiveFul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a30f7d4fdff5
unity_docs
xr
What is `Rendering.VirtualTexturing.System` in Unity? Explain its purpose and usage.
Virtual Texturing is experimental and not ready for production use. The feature and documentation might be changed or removed in the future. System class in UnityEngine.Rendering.VirtualTexturing / Implemented in: UnityEngine.VirtualTexturingModule Description The virtual texturing system. Static Properties P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_755a66700385
unity_docs
scripting
What is `Experimental.GraphView.PlacematContainer.HideCollapsedEdges` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PlacematContainer.HideCollapsedEdges Declaration public void HideCollapsedEdges (); Description Hides the edges that are hidden because of collapsed placemats.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47432714a947
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.SetIndexBufferData`.
SetSubMesh . By default, the index buffer data array is checked for out-of-bounds indices. flags parameter can be set to MeshUpdateFlags.DontValidateIndices to turn the validation off for performance reasons. For information about the difference between the simpler and more advanced methods of assigning data to a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1b925f8a3a7
unity_docs
rendering
What is `LightingExplorerTab.ctor` in Unity? Explain its purpose and usage.
LightingExplorerTab Constructor Declaration public LightingExplorerTab (string title , Func<Object[]> objects , Func<LightingExplorerTableColumn[]> columns ); Parameters Parameter Description title The title of the tab. objects The objects that the tab must contain. columns How the columns should look ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_724090836f66
unity_docs
physics
Give me an overview of the `SliderJoint2D` class in Unity.
SliderJoint2D class in UnityEngine / Inherits from: AnchoredJoint2D / Implemented in: UnityEngine.Physics2DModule Description Joint that restricts the motion of a Rigidbody2D object to a single line. Additional resources: Rigidbody2D , DistanceJoint2D , HingeJoint2D , SpringJoint2D , JointTranslationLi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_875fd91cdba6
unity_docs
xr
What is `XR.MeshVertexAttributes` in Unity? Explain its purpose and usage.
MeshVertexAttributes enumeration Description A set of vertex attributes. This enum is used by XRMeshSubsystem.GenerateMeshAsync to request particular vertex attributes, or by MeshGenerationResult to indicate which vertex attributes were written to the Mesh .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_238f30f25c02
unity_docs
math
Show me a Unity C# example demonstrating `Graphics.RenderMeshIndirect`.
pute shaders . Use this function to draw the same Mesh multiple times times using a custom shader and GPU controlled rendering arguments. Use RenderParams.worldBounds to define bounds to cull and sort the geometry rendered with the method as a single entity.. Add the following lines in the pass section of a shader to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e989e06d2d88
unity_docs
scripting
What is `UIElements.EventInterestOptions.Inherit` in Unity? Explain its purpose and usage.
EventInterestOptions.Inherit Description Use the Inherit option when only the events needed by the base class are required. For example, a class that overrides the CallbackEventHandler.HandleEventBubbleUp method and checks if an enabled flag is active before calling its base.ExecuteDefaultActionAtTarget method...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c2e94fc756e
unity_docs
math
What are the parameters of `AndroidJavaObject.Call` in Unity?
Description Calls a Java method on an object (non-static). To call a method with return type 'void', use the regular version. Declaration public ReturnType Call (string methodName , params object[] args ); Declaration public ReturnType Call (string methodName , T[] args ); Parameters Parameter Description methodName Sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa3503457a2e
unity_docs
performance
What are the parameters of `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.CreateMarker` in Unity?
Returns IntPtr Returns the marker native handle. Description Constructs a new Profiler marker handle for code instrumentation. Use profiler marker handle with ProfilerUnsafeUtility methods only. The categoryId parameter associates the marker with one of the predefined categories in ProfilerCategory struct. Note: Marker...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87705700f758
unity_docs
animation
What is `AnimatorTransitionInfo.fullPathHash` in Unity? Explain its purpose and usage.
AnimatorTransitionInfo.fullPathHash public int fullPathHash ; Description The hash name of the Transition. Format is "FULLPATH.CURRENT_STATE -> FULLPATH.NEXT_STATE". The hash is generated using Animator.StringToHash .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ea5123d2aa9
unity_docs
editor
Give me an overview of the `StaticOcclusionCulling` class in Unity.
StaticOcclusionCulling class in UnityEditor Description StaticOcclusionCulling lets you perform static occlusion culling operations. Static Properties Property Description doesSceneHaveManualPortals Does the Scene contain any occlusion portals that were added manually rather than automatically? isRunning Used...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6d42077ccde
unity_docs
ui
What is `UIElements.VisualElement.visualTreeAssetSource` in Unity? Explain its purpose and usage.
VisualElement.visualTreeAssetSource public UIElements.VisualTreeAsset visualTreeAssetSource ; Description Stores the asset reference, if the generated element is cloned from a VisualTreeAsset.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b1f7b2d742c8
unity_docs
ui
Explain 'Add styles to UXML' in Unity.
In UI Toolkit, you can use USS to customize the appearance of visual elements . The suggested workflow for USS is that you visually style an element in UI Builder, extract the style to a USS file, and then reference it in UXML. If you style an element in UI Builder, the style is added as an inline style to the style at...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44f513e8e17b
unity_docs
editor
Show me a Unity C# example demonstrating `MonoImporter.GetScript`.
MonoImporter.GetScript Declaration public MonoScript GetScript (); Returns MonoScript Returns the imported script. Description Gets the imported MonoScript . If the imported C# file contains multiple classes, the first is returned. ```csharp using UnityEngine; using UnityEditor;class Example { [MenuIt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97fd30777238
unity_docs
physics
What is `Physics.BoxCastNonAlloc` in Unity? Explain its purpose and usage.
Physics.BoxCastNonAlloc Declaration public static int BoxCastNonAlloc ( Vector3 center , Vector3 halfExtents , Vector3 direction , RaycastHit[] results , Quaternion orientation = Quaternion.identity, float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c1df8ba7e1c
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.ctor`.
o parent by default. If you call the constructor in a context where there is no valid scene loaded, such as during static initialization, or in scripts executing in Edit mode, the GameObject may be created in the "preview scene" or an internal context and not be part of any visible scene. In this case, you can explicit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c80b1c93eef3
unity_docs
rendering
Explain 'Font Asset properties reference' in Unity.
You can adjust the properties of a font asset after the font asset is created. To adjust the properties of a font asset, select the font asset, and change the values of its properties in the Inspector window. ## Font Asset properties This section describes all the Font Asset properties. ## Face Info Use the Face In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef0e744b8483
unity_docs
physics
What are the parameters of `Assertions.Assert.AreNotApproximatelyEqual` in Unity?
Description Asserts that the values are approximately not equal. An absolute error check is used for approximate equality check (|a-b| < tolerance). Default tolerance is 0.00001f. ```csharp using UnityEngine; using UnityEngine.Assertions;public class AssertionExampleClass : MonoBehaviour { Rigidbody rb; void Upd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20b00cb4d683
unity_docs
scripting
What is `Handles.DrawDottedLine` in Unity? Explain its purpose and usage.
Handles.DrawDottedLine Declaration public static void DrawDottedLine ( Vector3 p1 , Vector3 p2 , float screenSpaceSize ); Parameters Parameter Description p1 The start point. p2 The end point. screenSpaceSize The size in pixels for the lengths of the line segments and the gaps between them. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f423c837965
unity_docs
scripting
What is `Unity.Properties.Property_2.SetValue` in Unity? Explain its purpose and usage.
Property<T0,T1>.SetValue Declaration public void SetValue (ref TContainer container , TValue value ); Parameters Parameter Description container The container whose property value will be set. value The new property value. Description Sets the property value of a specified container.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b3be6044aad
unity_docs
scripting
What is `Rendering.VertexAttribute.Color` in Unity? Explain its purpose and usage.
VertexAttribute.Color Description Vertex color. Colors usually use the Color32 format. Color32 uses four bytes and is low precision. This vertex attribute maps to COLOR Semantic in the HLSL shading language. Additional resources: Mesh.HasVertexAttribute , Mesh.SetColors .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61f264c85898
unity_docs
editor
What is `UIElements.DropdownMenu.InsertAction` in Unity? Explain its purpose and usage.
DropdownMenu.InsertAction(int,string,Action<DropdownMenuAction>,Func<DropdownMenuAction,DropdownMenuAction.Status>,object) Parameters Parameter Description atIndex The index to insert the item at. actionName The name of the item. This name is displayed in the dropdown menu. action Callback to execute when the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09cd0e81ff9b
unity_docs
math
What is `Rendering.BatchCullingOutputDrawCommands.drawRanges` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands.drawRanges public BatchDrawRange* drawRanges ; Description Contains filtering settings for draw commands, which tell Unity in which conditions it should render a given draw command. Each draw range covers a continuous range of draw commands in the BatchCullingOutputDrawCommands.d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b745a4f2e6b5
unity_docs
editor
What is `EditorUserBuildSettings.SwitchActiveBuildTargetAsync` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.SwitchActiveBuildTargetAsync Declaration public static bool SwitchActiveBuildTargetAsync ( BuildTargetGroup targetGroup , BuildTarget target ); Parameters Parameter Description targetGroup Build target group. target Target build platform. Returns bool True if the build targe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0b389706444
unity_docs
scripting
Show me a Unity C# example demonstrating `AssetBundle.LoadFromFileAsync`.
request for an AssetBundle. Use assetBundle property to get an AssetBundle once it is loaded. Description Asynchronously loads an AssetBundle from a file on disk. The function supports bundles of any compression type. In case of LZMA compression, the data will be decompressed to the memory. See AssetBundles c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_807857aa1984
unity_docs
scripting
What is `Transform.Find` in Unity? Explain its purpose and usage.
Transform.Find Declaration public Transform Find (string n ); Parameters Parameter Description n The search string, either the name of an immediate child or a hierarchy path for finding a descendent. Returns Transform The found child transform. Null if child with matching name isn't found. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e011ab9056de
unity_docs
rendering
Show me a Unity code example for 'Create a Profiler module'.
dule in code To create a Profiler module via code, you must create a new ProfilerModule script and define the module’s properties including the counters it displays, its name, and its icon. To define a Profiler module, your script must do the following: Define a class derived from ProfilerModule in your project or pac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2107b2677fc9
unity_docs
animation
In Unity's 'Sub-State Machines', what is 'External transitions' and how does it work?
As noted above, a sub-state machine is just a way of visually collapsing a group of states in the editor, so when you make a transition to a sub-state machine, you have to choose which of its states you want to connect to. You will notice an extra state in the sub-state machine whose name begins with Up . The Up state ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff9ac0adbcb3
unity_docs
ui
What is `Canvas.willRenderCanvases` in Unity? Explain its purpose and usage.
Canvas.willRenderCanvases Description Event that is called just before Canvas rendering happens. This allows you to delay processing / updating of canvas based elements until just before they are rendered.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28521e78c931
unity_docs
rendering
What is `ShaderUtil.GetMissShaderRayPayloadSize` in Unity? Explain its purpose and usage.
ShaderUtil.GetMissShaderRayPayloadSize Declaration public static int GetMissShaderRayPayloadSize ( Rendering.RayTracingShader s , int shaderIndex ); Parameters Parameter Description s The RayTracingShader instance. shaderIndex The miss Shader index for which to retrieve the ray payload size. Returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_201f63fda833
unity_docs
xr
Explain 'Panoramic video' in Unity.
Use panoramic videos in your game or application to provide a more immersive experience. Topic Description Introduction to panoramic videos Learn more about panoramic videos in Unity. Set up a panoramic video Instructions on how to set up a panoramic video in Unity. Set up a panoramic video as a skybox Instructions on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74ad60420827
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.columnSelfTime` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.columnSelfTime public static int columnSelfTime ; Description The CPU time in milliseconds that Unity spends in a sample itself, excluding the time from child samples. This value is the columnTotalTime value of the sample minus the columnTotalTime values of child samples. Note: If i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3fc186c84eea_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Whether to require that the hits an with an alignment of in order to spawn anything. Signature: ```csharp public bool requireHorizontalUpSurface ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_57d08da6228c
unity_docs
editor
What are the parameters of `EditorUtility.OpenFilePanel` in Unity?
Description Displays the "open file" dialog and returns the selected path name. Additional resources: SaveFilePanel function. Open File Panel. ```csharp using System.IO; using UnityEngine; using UnityEditor;public class OpenFilePanelExample : EditorWindow { [MenuItem("Example/Overwrite Texture")] static void Ap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0838ccad95d4_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
GameObject with this script attached to it won't be destroyed on load. Signature: ```csharp public class DDOL : MonoBehaviour ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_7bec8a8f613d
unity_docs
ui
What is `UIElements.VisualElement.PlaceInFront` in Unity? Explain its purpose and usage.
VisualElement.PlaceInFront Declaration public void PlaceInFront ( UIElements.VisualElement sibling ); Parameters Parameter Description sibling The sibling element. Description Places this element right after the sibling element in their parent children list. If the element and the sibling position overla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c3bcf8c3b56
unity_docs
scripting
What is `UIElements.CustomStyleResolvedEvent` in Unity? Explain its purpose and usage.
CustomStyleResolvedEvent class in UnityEngine.UIElements / Inherits from: UIElements.EventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent after the custom style properties of a VisualElement have been resolved. Properties Property Description customStyle Returns the cust...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cdb591924ab
unity_docs
rendering
What is `Experimental.Rendering.GraphicsStateCollection.ShaderVariant` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ShaderVariant struct in UnityEngine.Experimental.Rendering / Implemented in: UnityEngine.CoreModule Description Identifies a specific variant of a shader stored in a GraphicsStateCollection . Properties Property Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2170664693b6
unity_docs
editor
What is `EditorAnalyticsSessionInfo` in Unity? Explain its purpose and usage.
EditorAnalyticsSessionInfo class in UnityEditor Description Provides access to Editor Analytics session information. This class contains static methods for looking up session information collected by the Editor Analytics system. Static Properties Property Description activeElapsedTime The total time, in milli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05d37f303bf5
unity_docs
editor
What is `Profiling.HierarchyFrameDataView.GetItemMergedSamplesMetadata` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemMergedSamplesMetadata Declaration public string GetItemMergedSamplesMetadata (int id , int sampleIndex , int metadataIndex ); Parameters Parameter Description id Hierarchy item identifier. sampleIndex Merged sample index. metadataIndex Metadata index. Returns string Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_939731f297f1
unity_docs
editor
What is `Search.SearchMonitor` in Unity? Explain its purpose and usage.
SearchMonitor class in UnityEditor.Search Description The search monitor is responsible to track any changes that occurs in Unity in order to update search indexes or other search data structure at runtime. Static Properties Property Description pending Indicates if the changes still need to be processed by th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b03ce60b0b3f
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemColumnDataAsFloat` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemColumnDataAsFloat Declaration public float GetItemColumnDataAsFloat (int id , int column ); Parameters Parameter Description id Hierarchy item identifier. column Column identifier. Returns float Value of the correspnding column as float. Description Returns float repr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_454be7141478
unity_docs
scripting
What is `Experimental.Rendering.IScriptableBakedReflectionSystem.BakeAllReflectionProbes` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableBakedReflectionSystem.BakeAllReflectionProbes Declaration public bool BakeAllReflectionProbes (); Returns bool Returns true when the reflection probe baking process completed successfully. Returns false when the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3f629beb6fbc_doc_9
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Searches through the specified search scope until a component of type T is foundand assigns it to the passed variable reference if and only iff the variable hasnothing assigned to it yet. When no component could be found in the specified scope,a new component of type T is added to the game object instead.A reference to...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_d97ce078a19d
unity_docs
physics
What is `PhysicsShapeGroup2D.AddBox` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D.AddBox Declaration public int AddBox ( Vector2 center , Vector2 size , float angle = 0f, float edgeRadius = 0f); Parameters Parameter Description center The center point of the box shape. This is analogous to Collider2D.offset . size The size of the box. This is identical to B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5728d022533b
unity_docs
scripting
Give me an overview of the `SpritePackingRotation` class in Unity.
SpritePackingRotation enumeration Description Sprite rotation modes for the Sprite Packer. Properties Property Description None No rotation. FlipHorizontal Sprite is flipped horizontally when packed. FlipVertical Sprite is flipped vertically when packed. Rotate180 Sprite is rotated 180 degree when packed. A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6accbfbe62d3
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.hasMultipleDifferentValues`.
SerializedProperty.hasMultipleDifferentValues public bool hasMultipleDifferentValues ; Description Does this property represent multiple different values due to multi-object editing? (Read Only) Returns true when there are multiple target objects, and they do not all have the same value. Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ba3adab602f
unity_docs
editor
What is `EditorGUI.EndFoldoutHeaderGroup` in Unity? Explain its purpose and usage.
EditorGUI.EndFoldoutHeaderGroup Declaration public static void EndFoldoutHeaderGroup (); Description Closes a group started with BeginFoldoutHeaderGroup. Additional resources: EditorGUILayout.BeginFoldoutHeaderGroup .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_489110791b6c
unity_docs
performance
Explain 'Memory performance data' in Unity.
Use the Memory Profiler module to investigate where Unity allocated memory in your application. Topic Description Memory Profiler module introduction Visualize how Unity allocated memory in your application. Accessing memory counters in players Display memory metrics in a built player. Memory Profiler module reference ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b52d11358817
unity_docs
ui
What is `EditorGUILayout` in Unity? Explain its purpose and usage.
EditorGUILayout class in UnityEditor Description Auto laid out version of EditorGUI . Static Methods Method Description BeginBuildTargetSelectionGrouping Begin a build target grouping and get the selected BuildTargetGroup back. BeginFadeGroup Begins a group that can be be hidden/shown and the transition will...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_57c5fd7d8089_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The amount of time, in seconds, between updates to the indicator pointing at the potential destination. Signature: ```csharp public float potentialIndicatorUpdateFrequency ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.