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_4fc409a52a6c
unity_docs
rendering
Show me a Unity C# example demonstrating `Material.SetMatrix`.
o set. Description Sets a named matrix for the shader. This is mostly used with custom shaders that need extra matrix parameters. Matrix parameters are not exposed in the material inspector, but can be set and queried with SetMatrix and GetMatrix from scripts. Additional resources: GetMatrix , Materials , Sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_693a413ad397
unity_docs
scripting
What is `GUISettings.cursorColor` in Unity? Explain its purpose and usage.
GUISettings.cursorColor public Color cursorColor ; Description The color of the cursor in text fields. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Set the cursor color to Cyan. string str = "This is a string with \n two lines of text"; void OnGUI() { GUI.skin.settings.cursorColor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3fe66acf5ec
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R32G32B32A32_SInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R32G32B32A32_SInt Description A four-component, 128-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A com...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f801f1a18f7b
unity_docs
scripting
What is `Rect.zero` in Unity? Explain its purpose and usage.
Rect.zero public static Rect zero ; Description Shorthand for writing new Rect(0,0,0,0) . Additional resources: Rect . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Rect initialBox = Rect.zero; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b47165bd10f
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddRemotePackageFrameworkToProject` in Unity?
Description Adds a remote package framework dependency for the specified target. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_AddRemotePackageFrameworkToProject { [PostProcessBuild] public static void OnPostprocessBuild(BuildTarget ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3afc1bedc747
unity_docs
rendering
What is `Video.VideoRenderMode.APIOnly` in Unity? Explain its purpose and usage.
VideoRenderMode.APIOnly Description Don't draw the video content anywhere, but still make it available via the VideoPlayer's texture property in the API. You can use this render mode to play the video into a Canvas' RawImage. You can assign the VideoPlayer.texture directly to RawImage texture . This lets you us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc983a20f1da
unity_docs
scripting
What is `SceneManagement.Stage` in Unity? Explain its purpose and usage.
Stage class in UnityEditor.SceneManagement / Inherits from: ScriptableObject Description The Stage class represents an editing context which includes a collection of Scenes. The main stage contains all the currently open regular Scenes, while a Prefab stage contains a preview Scene used solely for editing the P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1c71c183488
unity_docs
ui
What is `UIElements.ContextualMenuManipulator` in Unity? Explain its purpose and usage.
ContextualMenuManipulator class in UnityEngine.UIElements / Inherits from: UIElements.PointerManipulator / Implemented in: UnityEngine.UIElementsModule Description Manipulator that displays a contextual menu when the user clicks the right mouse button or presses the menu key on the keyboard. Constructors ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a58b9bb2dc8b
unity_docs
xr
What is `Camera.CopyStereoDeviceProjectionMatrixToNonJittered` in Unity? Explain its purpose and usage.
Camera.CopyStereoDeviceProjectionMatrixToNonJittered Declaration public void CopyStereoDeviceProjectionMatrixToNonJittered ( Camera.StereoscopicEye eye ); Parameters Parameter Description eye Specifies the stereoscopic eye whose non-jittered projection matrix will be sourced from the VR SDK. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdad4d4dd62a
unity_docs
scripting
Show me a Unity C# example demonstrating `Gizmos.color`.
Gizmos.color public static Color color ; Description Sets the Color of the gizmos that are drawn next. You can apply any color to gizmos. You can make a gizmo transparent by setting the alpha component of Color to a value lower than 1. The following example shows how to create a red gizmo. ```csharp usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd04c14ea1f7
unity_docs
animation
In Unity's 'CPU Usage Profiler module introduction', what is 'Views' and how does it work?
The CPU Usage Profiler module displays profiling data in a timeline view, or in different hierarchical views. The following views are available: Timeline : Displays samples in a timeline graph, which displays the relationship between markers on different threads. Hierarchy : Displays samples grouped by their call stack...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59525652302f
unity_docs
scripting
What is `Debug.CheckIntegrity` in Unity? Explain its purpose and usage.
Debug.CheckIntegrity Declaration public static string CheckIntegrity ( IntegrityCheckLevel level ); Parameters Parameter Description level Thoroughness of integrity check. Description Performs an integrity check of the currently running process and return discovered errors.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0786fabd7666
unity_docs
physics
In Unity's 'Perforce Integration', what is 'Setting up Perforce' and how does it work?
Follow the setup process described in the Version Control documentation. See Perforce documentation if you encounter any problems. Note : If your Perforce workspace has multi-factor authentication enabled you will first need to login through the command line using p4 login2 or by using a visual client like P4V to be ab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7164c3dd32a3
unity_docs
audio
Show me a Unity C# example demonstrating `Networking.UnityWebRequest.ctor`.
ler or UploadHandler . Default method is GET . The raw constructor is useful for use cases which require detailed custom configuration of a UnityWebRequest . Most use cases will require the attachment of a DownloadHandler , an UploadHandler or both in order to function propertly. Additional resources: Get , G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9affdf576e21
unity_docs
editor
What is `EditorUserBuildSettings.macOSXcodeBuildConfig` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.macOSXcodeBuildConfig public static XcodeBuildConfig macOSXcodeBuildConfig ; Description The scheme Xcode uses to run this project. You can change the project scheme later in Xcode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9dd4db6a25b8
unity_docs
math
What is `GridBrushBase.MoveEnd` in Unity? Explain its purpose and usage.
GridBrushBase.MoveEnd Declaration public void MoveEnd ( GridLayout gridLayout , GameObject brushTarget , BoundsInt position ); Parameters Parameter Description position Layers affected by the move operation. brushTarget Target of the move operation. By default the currently selected GameObject. gri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81b3edebf919
unity_docs
scripting
What is `UIElements.LayerField` in Unity? Explain its purpose and usage.
LayerField class in UnityEditor.UIElements / Inherits from: UIElements.PopupField_1 Description A LayerField editor. For more information, refer to UXML element LayerField . Static Properties Property Description inputUssClassName USS class name of input elements in elements of this type. labelUssCl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8515c63a56bc
unity_docs
performance
What is `Profiling.RawFrameDataView.GetSampleMetadataAsDouble` in Unity? Explain its purpose and usage.
RawFrameDataView.GetSampleMetadataAsDouble Declaration public double GetSampleMetadataAsDouble (int sampleIndex , int metadataIndex ); Parameters Parameter Description sampleIndex Index of the Profiler sample. metadataIndex Metadata index. Returns double Returns double representation of sample metadat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e30208735465
unity_docs
editor
What is `PlayerSettings.WSA.defaultTileSize` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.defaultTileSize public static PlayerSettings.WSADefaultTileSize defaultTileSize ; Description The tile size type to use as the default size for the application's tile. In the Editor, Unity displays this under Tile section in UWP Player Settings . For information on Application tiles,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_170076cce551
unity_docs
rendering
Explain 'Introduction to USS built-in variables' in Unity.
USS built-in variables specify default values for Editor and runtime UI. You can use these variables in your own USS to match your custom interfaces with Unity style. The name of each built-in variable indicates how and where the variable is used. A variable name consists of one or more parts, separated by hyphens. Eac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9a1d0bdfeda8
unity_docs
scripting
Explain 'Instantiate projectiles and explosions' in Unity.
You can instantiate prefabs to use as projectiles and destroy them with explosion effects in your application. The following example instantiates a projectile prefab when the user presses the fire button. You can attach it to a GameObject which acts as a launcher for the prefab. ## Create a projectile prefab asset In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1071be27e841
unity_docs
scripting
In Unity's 'PopupWindow', what is 'USS classes' and how does it work?
The following table lists all the C# public property names and their related USS selector. C# property USS selector Description ussClassName.unity-popup-window USS class name of elements of this type. contentUssClassName.unity-popup-window__content-container USS class name of content elements in elements of this type. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00034df736b3
unity_docs
physics
What is `RenderTexture.ResolveAntiAliasedSurface` in Unity? Explain its purpose and usage.
RenderTexture.ResolveAntiAliasedSurface Declaration public void ResolveAntiAliasedSurface (); Declaration public void ResolveAntiAliasedSurface ( RenderTexture target ); Parameters Parameter Description target The render texture to resolve into. If set, the target render texture must have the same dime...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ecce250ffa3
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.GetComponents`.
that GameObject). You can then call GetComponents on that reference. Note : If the type you request is a derivative of MonoBehaviour and the associated script can't be loaded then this function will return null for that component. The following example gets a reference to all hinge joint components on the specified...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e953935d07a
unity_docs
scripting
What is `TerrainData.OverrideMaximumHeightError` in Unity? Explain its purpose and usage.
TerrainData.OverrideMaximumHeightError Declaration public void OverrideMaximumHeightError (float[] maxError ); Parameters Parameter Description maxError Provided maximum height error values. Description Override the maximum tessellation height error with user provided values. Note that the overriden values...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_757b02dcdcda
unity_docs
editor
In Unity's 'Package Manager', what is 'Scoped Registries' and how does it work?
The Scoped Registries group displays a list of scoped registries added to the current project on the left of the settings group, and the details of the selected registry on the right. For detailed information about scoped registries, including how to use and configure them with the Unity Package Manager, refer to Scope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e1c21c1e43a
unity_docs
scripting
What is `ModelImporterAvatarSetup` in Unity? Explain its purpose and usage.
ModelImporterAvatarSetup enumeration Description Set the Avatar generation mode for ModelImporter . Additional resources: ModelImporter.avatarSetup . Properties Property Description NoAvatar Disable Avatar creation for this model. CreateFromThisModel Create the Avatar from this model and save it as a sub-as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3624823d8e8b
github
scripting
Write a Unity C# script called Rigidbody Data
```csharp using UnityEngine; using System.Collections.Generic; using System.Text; namespace PlainSaveLoad { public class RigidbodyData { public Vector3 velocity; public Vector3 angularVelocity; public RigidbodyData(Vector3 velocity, Vector3 angularVelocity) { this....
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_46ea1690ae74
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.green`.
Color.green public static Color green ; Description Solid green. RGBA is (0, 1, 0, 1). ```csharp //Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options to create a GameObject with a Renderer automatically attached). //This script changes the Color of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecc930b1c34c
unity_docs
xr
What is `Playables.PlayableGraph.GetOutputCountByType` in Unity? Explain its purpose and usage.
PlayableGraph.GetOutputCountByType Declaration public int GetOutputCountByType (); Returns int The number of PlayableOutput of the same type T in the graph. Description Get the number of PlayableOutput of the requested type in the graph.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_92153fa3b06d
unity_docs
ui
In Unity's 'Keyboard events', what is 'KeyDownEvent' and how does it work?
A KeyDownEvent is sent each time you press a key on the keyboard. The key pressed contains the keyCode property for that event. If that key press has text input associated with it, additional events are sent for each character of text input. The character property contains the character for those events. When you press...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3b8ba275d7a
unity_docs
editor
What is `SceneManagement.EditorSceneManager.NewPreviewScene` in Unity? Explain its purpose and usage.
EditorSceneManager.NewPreviewScene Declaration public static SceneManagement.Scene NewPreviewScene (); Returns Scene The new preview Scene. Description Creates a new preview Scene. Any object added to a preview Scene will only be rendered in that Scene. Additional resources: ClosePreviewScene , OpenPr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_99424bb84ecc
github
scripting
Write a Unity C# MonoBehaviour script called Joy Debugger
```csharp using System; using System.Collections.Generic; using System.Linq; using starikcetin.Joy.Core; using UnityEngine; namespace starikcetin.Joy.Debugging { public class JoyDebugger : MonoBehaviour { [Tooltip("If true, keeps updating debug info every frame. Otherwise only updates one time at the s...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_fc117ba8cb8c
unity_docs
performance
What is `Unity.Jobs.IJobParallelForExtensions.Run` in Unity? Explain its purpose and usage.
IJobParallelForExtensions.Run Declaration public static void Run (T jobData , int arrayLength ); Parameters Parameter Description jobData The job and data to execute. arrayLength The number of iterations to execute the for loop over. Description Performs the job's Execute method immediately on the same ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ae30b5ec988
unity_docs
scripting
What is `Android.AndroidProjectFilesModifierContext.AddDirectoryToCopy` in Unity? Explain its purpose and usage.
AndroidProjectFilesModifierContext.AddDirectoryToCopy Parameters Parameter Description source The path to the source directory. This can be an absolute or relative path. If it's relative, the root of the path is the Unity project's root. destination The path to place the directory copy. This is relative to the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6e3a5255628
unity_docs
editor
Give me an overview of the `EditorCurveBinding` class in Unity.
EditorCurveBinding struct in UnityEditor Description Defines how a curve is attached to an object that it controls. Properties Property Description isDiscreteCurve Returns true if the binding is a discrete curve. Returns false otherwise. (Read Only) isPPtrCurve Returns true if the binding is an object curve. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c4f663beb29
unity_docs
editor
What is `UIElements.DropdownMenu.InsertSeparator` in Unity? Explain its purpose and usage.
DropdownMenu.InsertSeparator Declaration public void InsertSeparator (string subMenuPath , int atIndex ); Parameters Parameter Description subMenuPath The submenu path to add the separator to. Path components are delimited by forward slashes ('/'). atIndex The index to insert the separator at. Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_288674e2e3f9
unity_docs
input
Show me a Unity code example for 'Mobile device input'.
by accessing the Input.touches property array. Android devices don’t have a unified limit on how many fingers they track. Instead, it varies from device to device and can be anything from two-touch on older devices to five fingers on some newer devices. Each finger touch is represented by an Input.Touch data structure ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e309269095c
unity_docs
editor
What is `EditorUserBuildSettings.connectProfiler` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.connectProfiler public static bool connectProfiler ; Description Start the player with a connection to the profiler. When the build is started, an open Profiler Window will automatically connect to the Player and start profiling. When the Player is build with the BuildOptions.AutoRunPla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecf39b85064d
unity_docs
editor
What is `AssetImporters.ScriptedImporter.GatherDependenciesFromSourceFile` in Unity? Explain its purpose and usage.
AssetImporters.ScriptedImporter.GatherDependenciesFromSourceFile(string) Parameters Parameter Description path The path of the asset currently being processed by this method. Returns void A string array containing paths to the assets that you want create dependencies on for the asset currently being processed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2238c684cbf
unity_docs
rendering
What is `ShaderUtil.IsPassCompiled` in Unity? Explain its purpose and usage.
ShaderUtil.IsPassCompiled Declaration public static bool IsPassCompiled ( Material material , int pass ); Parameters Parameter Description material The Material to check against. pass The index of the Shader pass to check. Description Checks if the Shader variant for the given pass in the Material has ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36b7b4bfa4e0
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.InverseTransformPoint`.
nsform.TransformPoint which is used to convert from local to world space. Note that the returned position is affected by scale. Use Transform.InverseTransformDirection if you are dealing with direction vectors rather than positions. If you need to transform many points at once consider using Transform.InverseTransf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ca4c1b6efc9
unity_docs
rendering
What is `ParticleSystemAnimationTimeMode` in Unity? Explain its purpose and usage.
ParticleSystemAnimationTimeMode enumeration Description Control how animation frames are selected. Additional resources: ParticleSystem.textureSheetAnimation.timeMode, ParticleSystem.textureSheetAnimation.frameOverTime, ParticleSystem.textureSheetAnimation.fps, ParticleSystem.textureSheetAnimation.speedRange. Pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9429bb25df1
unity_docs
animation
What is `Animations.AnimatorControllerPlayable.GetAnimatorTransitionInfo` in Unity? Explain its purpose and usage.
AnimatorControllerPlayable.GetAnimatorTransitionInfo Declaration public AnimatorTransitionInfo GetAnimatorTransitionInfo (int layerIndex ); Parameters Parameter Description layerIndex The layer's index. Returns AnimatorTransitionInfo An AnimatorTransitionInfo with the informations on the current tran...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a53f78f8014
unity_docs
rendering
What is `LightmapSettings` in Unity? Explain its purpose and usage.
LightmapSettings class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Stores lightmaps of the Scene. A Scene can have several lightmaps stored in it, and Renderer components can use those lightmaps. This makes it possible to use the same material on multiple obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f3e02dc705f
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.Android.minimumWindowHeight`.
PlayerSettings.Android.minimumWindowHeight public static int minimumWindowHeight ; Description The minimum vertical size of the Android Player window in pixels. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class MinimumWindowHeightSample : MonoBehaviour { [MenuItem("Build/Min...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6987edafbbfb
unity_docs
rendering
What is `ParticleSystem.Particle.position` in Unity? Explain its purpose and usage.
ParticleSystem.Particle.position public Vector3 position ; Description The position of the particle. The position is defined relative to the simulation space (ie, world space or local space) set by the simulationSpace property. You can use Transform.TransformPoint and Transform.InverseTransformPoint to c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef7f02cbdc0b
unity_docs
rendering
What is `Rendering.GraphicsSettings.realtimeDirectRectangularAreaLights` in Unity? Explain its purpose and usage.
GraphicsSettings.realtimeDirectRectangularAreaLights public static bool realtimeDirectRectangularAreaLights ; Description Is the current render pipeline capable of rendering direct lighting for rectangular area Lights? The current render pipeline can use this property to indicate that it is capable of renderin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8a648c8e5e8f
unity_docs
input
In Unity's 'Unity Remote', what is 'Requirements and compatibility' and how does it work?
Unity Remote supports Android, iOS, and tvOS devices. To use Unity Remote on an Android device, the Android SDK must be installed on your development computer. For more information, refer to Android environment setup . Note : Unity Remote replaces the iOS Remote and Android Remote applications from earlier versions of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1d5832e96de
unity_docs
math
What is `U2D.SpriteAtlasUtility.PackAtlases` in Unity? Explain its purpose and usage.
SpriteAtlasUtility.PackAtlases Declaration public static void PackAtlases (SpriteAtlas[] atlases , BuildTarget target , bool canCancel ); Parameters Parameter Description target The target build platform. atlases An array containing the atlases to pack. canCancel Whether the user can cancel the opera...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3f629beb6fbc_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Before C# 7Collider result;if(gameObject.Is<Collider>(out result)) result.trigger = true;With C# 7if(gameObject.Is<Collider>(out var result)) result.trigger = true;A component of type T if found, null otherwise.Optional search scope if the object itself does not have the component.The type of the comp...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_fb052fdaeec5_doc_9
github
scripting
What does `ConvertColumn` do in this Unity script? Explain its purpose and signature.
Convert single column data by header name. Signature: ```csharp public static IList ConvertColumn(Type dataType, string csvContent, string headerName, char cellSeparator = CSVDataHelper.CommaCharacter, bool supportCellMultiline = true) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dd7ca3133e1
unity_docs
performance
What is `Profiling.Recorder.enabled` in Unity? Explain its purpose and usage.
Recorder.enabled public bool enabled ; Description Enables recording. When enabled Recorder collects data regardless of Profiler being enabled or not. Note: Set to false to make measurements available immediately for synchronous testing scenarious. ```csharp using UnityEngine; using UnityEngine.Profiling;pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c467ac6dda2
unity_docs
scripting
What is `SerializedProperty.Copy` in Unity? Explain its purpose and usage.
SerializedProperty.Copy Declaration public SerializedProperty Copy (); Description Returns a copy of the SerializedProperty iterator in its current state. This is useful if you want to keep a reference to the current property but continue with the iteration.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d169c019220
unity_docs
rendering
What is `LightTransport.RadeonRaysProbeIntegrator.IntegrateDirectRadiance` in Unity? Explain its purpose and usage.
RadeonRaysProbeIntegrator.IntegrateDirectRadiance(IDeviceContext,int,int,int,BufferSlice<SphericalHarmonicsL2>) Parameters Parameter Description context Device context. positionOffset Offset measured from the beginning of the probe position buffer. positionCount Number of probes to integrate. sampleCount Nu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b228eb074bdc
unity_docs
rendering
Explain 'Trail Renderer component reference' in Unity.
This section contains the following sub-sections: Trail settings Materials Lighting Probes Additional Settings ## Trail settings Property Function Width Define a width value, and a curve value to control the width of your trail along its length. The curve is sampled at each vertex, so its accuracy is limited by the n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b7b3bd89bb6
unity_docs
rendering
Explain 'Set up GameObjects for batching' in Unity.
For more information about batching, refer to Introduction to batching meshes . ## Get the best results from batching To get the best results from batching, do the following: Share materials among as many GameObjects as possible. If you have two material assets that are identical apart from their textures, combine th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c601ab8d19e9
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormatUtility.IsHalfFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsHalfFormat Declaration public static bool IsHalfFormat ( Experimental.Rendering.GraphicsFormat format ); Description Returns true if the format is a half precision floating point format. Returns fals...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_888bf1d3e170
unity_docs
animation
What is `Animations.ParentConstraint.AddSource` in Unity? Explain its purpose and usage.
ParentConstraint.AddSource Declaration public int AddSource ( Animations.ConstraintSource source ); Parameters Parameter Description source The source object and its weight. Returns int Returns the index of the added source. Description Adds a constraint source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_de766fd5416f
unity_docs
scripting
In Unity's 'Move elements at runtime', what is 'Create the name tag UXML template' and how does it work?
Create a USS file to style the name tag and a UXML file to define the name tag template. The name tag template is a Label element that displays the name of the NPC. The name tag follows the NPC in the Scene. In the UI folder, create a USS file named NameTag.uss with the following content: ``` #NameTag { /* This sets t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3f629beb6fbc_doc_6
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. Throws an exception if nothing could be found.A reference to the variable to be set.Optional search scope if the object itself does not have the component.The type of the component to find.If...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_3b73851a9d71
unity_docs
scripting
What is `PlayerSettings.SetMobileMTRendering` in Unity? Explain its purpose and usage.
PlayerSettings.SetMobileMTRendering Declaration public static void SetMobileMTRendering ( Build.NamedBuildTarget buildTarget , bool enable ); Obsolete Use SetMobileMTRendering(NamedBuildTarget buildTarget, bool enable) instead. Declaration public static void SetMobileMTRendering ( BuildTargetGroup targe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84d328d6222b
unity_docs
performance
Show me a Unity C# example demonstrating `ParticleSystem.emission`.
ParticleSystem.emission public ParticleSystem.EmissionModule emission ; Description Script interface for the EmissionModule of a Particle System. This module provides control over how many particles are emitted. Particle System modules do not need to be reassigned back to the system; they are interfaces and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a22672a53b0
unity_docs
scripting
What is `UIElements.Repeat.Space` in Unity? Explain its purpose and usage.
Repeat.Space Description The background-image is repeated as much as possible without clipping. The first and last image is pinned to either side of the element, and whitespace is distributed evenly between the images.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65bbfd2af9ef
unity_docs
math
What is `Plane.Set3Points` in Unity? Explain its purpose and usage.
Plane.Set3Points Declaration public void Set3Points ( Vector3 a , Vector3 b , Vector3 c ); Parameters Parameter Description a First point in clockwise order. b Second point in clockwise order. c Third point in clockwise order. Description Sets a plane using three points that lie within it. The p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27a8434a8679
unity_docs
rendering
What is `Experimental.Rendering.IScriptableBakedReflectionSystem` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableBakedReflectionSystem interface in UnityEditor.Experimental.Rendering Description Defines the required members for a ScriptableBakedReflectionSystem implementation. You can use the empty implementation as base class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be74061aa4ad
unity_docs
scripting
Give me an overview of the `Lightmapping` class in Unity.
Lightmapping class in UnityEditor Description Allows to control the lightmapping job. Before starting the job the bake settings can be set via LightingSettings . Additional resources: LightingSettings . Static Properties Property Description bakedGI This property is now obsolete. Use LightingSettings.bakedG...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04eb35d54554
unity_docs
rendering
What is `Mesh.RecalculateTangents` in Unity? Explain its purpose and usage.
Mesh.RecalculateTangents Declaration public void RecalculateTangents ( Rendering.MeshUpdateFlags flags = MeshUpdateFlags.Default); Parameters Parameter Description flags Flags controlling the function behavior, see MeshUpdateFlags . Description Recalculates the tangents of the Mesh from the normals and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b8c67c37ea1
unity_docs
ui
Show me a Unity C# example demonstrating `Unity.Profiling.Editor.ProfilerModuleViewController.CreateView`.
roller’s view. A VisualElement . Description Creates the view controller’s view. Unity calls this method automatically when it is about to display the view controller’s view for the first time. You must override this method to construct the view controller’s view hierarchy. To do this, load a visual tree from a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f520d7449e5
unity_docs
scripting
Give me an overview of the `ColorPrimaries` class in Unity.
ColorPrimaries enumeration Description Represents a color space based on its set of red, green, and blue color primaries. Properties Property Description Rec709 Rec. 709 color space. Rec2020 Rec. 2020 color space. P3 P3 color space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_838faad81f56
unity_docs
rendering
What is `Search.SearchTable` in Unity? Explain its purpose and usage.
SearchTable class in UnityEditor.Search Description A search table configuration is used to define the columns when search results are displayed in table view. See DisplayMode.Table . ``` static SearchTable CreateDecalsTableConfiguration() { var materialIcon = EditorGUIUtility.Load("Material Icon") as Texture;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e125b20ae84
unity_docs
ui
What is `UIElements.MultiColumnController` in Unity? Explain its purpose and usage.
MultiColumnController class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description The default controller for a multi column view. Takes care of adding the MultiColumnCollectionHeader and reacting to the various callbacks. Static Properties Property Description cellLabelUssC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4f9d32233081
unity_docs
rendering
Explain 'Troubleshooting the Unity Editor' in Unity.
The following sections explain how to troubleshoot and prevent problems with the Unity Editor in different situations. In general, make sure your computer meets all the system requirements , is up-to-date, and that you have the required user permissions in your system. Also, make backups regularly to protect your proje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8366538cd2d2
unity_docs
scripting
What is `Accessibility.AccessibilitySettings` in Unity? Explain its purpose and usage.
AccessibilitySettings class in UnityEngine.Accessibility / Implemented in: UnityEngine.AccessibilityModule Description Provides access to the accessibility settings for the current platform. The currently supported platforms are: RuntimePlatform.Android RuntimePlatform.IPhonePlayer This class also provi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_052ec7b38289
unity_docs
scripting
What is `Sprite.SetScriptableObjectAt` in Unity? Explain its purpose and usage.
Sprite.SetScriptableObjectAt Declaration public bool SetScriptableObjectAt ( ScriptableObject obj , uint i ); Parameters Parameter Description obj The new ScriptableObject to reference. i The index of the ScriptableObject reference to be replaced. Returns bool Returns true if the reference is re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b9662d970ef
unity_docs
rendering
What is `Experimental.GlobalIllumination.DirectionalLight.position` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. DirectionalLight.position public Vector3 position ; Description The light's position. Only relevant for cookie placement.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5aea2de30af5
unity_docs
rendering
Show me a Unity C# example demonstrating `Mesh.uv5`.
or Vector4 value if you need to. This property returns a copy of the data. This means that it causes a heap memory allocation. It also means that to make changes to the original data, you must update the copy and then reassign the updated copy to the mesh. The following example demonstrates how to create an array to ho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c70e8fae1c03
unity_docs
scripting
Show me a Unity code example for 'CurveField'.
Clip , providing precise control over how these properties change over time. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a CurveField You can create a CurveField with UI Builder, U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79b4d3f4b725
unity_docs
scripting
Show me a Unity C# example demonstrating `LensFlare.brightness`.
LensFlare.brightness public float brightness ; Description The strength of the flare. This controls the size and brightness of the flare elements. Additional resources: Lens flare component , flare assets . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Increments the strenght of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b616de247cc
unity_docs
rendering
What are the parameters of `AssetDatabase.SetMainObject` in Unity?
Description Specifies which object in the asset file should become the main object after the next import. All other objects in the asset become children of the main object. NOTE: This function modifies the importer object, not the asset itself. The next import reflects the change in the imported asset. ```csharp using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d5ae36f39a3
unity_docs
performance
What is `Unity.Profiling.LowLevel.ProfilerMarkerDataType.GfxResourceId` in Unity? Explain its purpose and usage.
ProfilerMarkerDataType.GfxResourceId Description Indicates that ProfilerMarkerData.Ptr points to a value of type ulong that represents a graphics resource. Use FrameDataView.GetGfxResourceInfo to obtain further information about the resource.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db077bee7a0b
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8G8_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8G8_SRGB Description A two-component, 16-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G component stored with sRGB nonlinear encoding in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9aaa061999e
unity_docs
editor
What is `EditorTools.EditorTool.IsAvailable` in Unity? Explain its purpose and usage.
EditorTool.IsAvailable Declaration public bool IsAvailable (); Returns bool Returns true if the custom editor tool is available. Returns false otherwise. Description Checks whether the custom editor tool is available based on the state of the editor. See ToolManager.RefreshAvailableTools for an example.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_999f84b3917b
unity_docs
scripting
What is `Pool.ObjectPool_1` in Unity? Explain its purpose and usage.
ObjectPool<T0> class in UnityEngine.Pool / Implemented in: UnityEngine.CoreModule Implements interfaces: IObjectPool<T0> Description A stack-based pool of object instances of type T, which implements the IObjectPool interface. Use this class to create a pool of object instances that can be reused to reduce th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91d08363dc5e
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.GetTargetProductFileRef`.
roject.GetTargetProductFileRef Declaration public string GetTargetProductFileRef (string targetGuid ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . Returns string The file reference of the artifact created by building target. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e50270bebc3
unity_docs
scripting
What is `SystemLanguage.Lithuanian` in Unity? Explain its purpose and usage.
SystemLanguage.Lithuanian Description Lithuanian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Lithuanian language if (Application.systemLanguage == SystemLanguage.Lithuanian) { //Outputs into console that the sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_072570b67ab3_doc_0
github
scripting
What does `HasChanged` do in this Unity script? Explain its purpose and signature.
Notifies MaterialPropertyProviders of a change in source Material. Signature: ```csharp public static void HasChanged(this Material material) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_c886b587f046
github
scripting
Write a Unity C# MonoBehaviour script called Stick To Object
```csharp using UnityEngine; /// <summary> /// On collision align the object with the normal of the surface that was hit /// </summary> public class StickToObject : MonoBehaviour { public void AlignWithSurface(Collision collision) { ContactPoint contactPoint = collision.GetContact(0); transfor...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_500aa974fe33_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Grid minimap presenter setup:1) Add SimulationLoopDriver to a scene object and configure the real simulation state.2) Add SimLoopMinimapSource and assign the SimulationLoopDriver reference.3) Add GridMinimapView and assign Source + palette assets.4) Assign a Quad Renderer with an unlit material; this component writes t...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_bd281857af29
unity_docs
ui
What is `UIElements.PointerEnterEvent` in Unity? Explain its purpose and usage.
PointerEnterEvent class in UnityEngine.UIElements / Inherits from: UIElements.PointerEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description This event is sent when a pointer enters a VisualElement or one of its descendants. The event does not trickle down and does not bubble up. Constructo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e7a060b99ee
unity_docs
physics
What is `JointLimits` in Unity? Explain its purpose and usage.
JointLimits struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description JointLimits is used by the HingeJoint to limit the joints angle. Additional resources: HingeJoint . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Set the hinge limits for a doo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d6747e7248e
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R16G16B16A16_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R16G16B16A16_UNorm Description A four-component, 64-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c3e93b6cbe1
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseElement.RemoveCustomAttribute` in Unity? Explain its purpose and usage.
BaseElement.RemoveCustomAttribute Declaration public void RemoveCustomAttribute (string name ); Parameters Parameter Description name Attribute name. Description Removes a custom attribute by name.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb96b378e2f9
unity_docs
scripting
What is `Search.SearchMonitorView.TryLoadProperty` in Unity? Explain its purpose and usage.
SearchMonitorView.TryLoadProperty Declaration public bool TryLoadProperty (ulong documentKey , string propertyName , out Search.PropertyDatabaseRecordKey recordKey , out object value , out string alias ); Declaration public bool TryLoadProperty ( Search.PropertyDatabaseRecordKey recordKey , out object ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9c56f891f34b
unity_docs
scripting
Show me a Unity code example for 'RectField'.
The RectField lets users enter a Rect value in a UI. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a RectField You can create a RectField with UI Builder, UXML, or C#. The following ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c1ffec900f90
unity_docs
rendering
In Unity's 'Create a drag-and-drop list and tree views between windows', what is 'Create custom controls to display the data' and how does it work?
Create custom controls named PlayerDataElement and PlayerItemView to display the data of a player. The PlayerItemView control binds to a PlayerData object as its data context. In the Scripts folder, create a folder named UI . In the UI folder, create a C# script named PlayerDataElement.cs with the following content: ``...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbe1c792a742
unity_docs
scripting
Give me an overview of the `iOSLaunchScreenImageType` class in Unity.
iOSLaunchScreenImageType enumeration Description iOS launch screen settings. Properties Property Description iPhonePortraitImage Portrait oriented launch screen image on the iPhone. iPhoneLandscapeImage Landscape oriented launch screen image on the iPhone. iPadImage Launch screen image on the iPad.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b28e59c6cbd9
unity_docs
animation
What is `AnimationState` in Unity? Explain its purpose and usage.
AnimationState class in UnityEngine / Implemented in: UnityEngine.AnimationModule Description The AnimationState gives full control over animation blending. In most cases the Animation interface is sufficient and easier to use. Use the AnimationState if you need full control over the animation blending any pl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54f03a13fd36
unity_docs
scripting
Show me a Unity C# example demonstrating `EventType.MouseDown`.
EventType.MouseDown Description Mouse button was pressed. This event gets sent when any mouse button is pressed. Use Event.button to determine which button was pressed down. Additional resources: EventType , Event.Use . ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d47c696d4fca
unity_docs
editor
What is `Unity.Loading.ContentLoadInterface` in Unity? Explain its purpose and usage.
ContentLoadInterface class in Unity.Loading / Implemented in: UnityEngine.ContentLoadModule Description API Interface for loading and unloading Content files. Static Methods Method Description GetContentFiles Returns all the ContentFile handles associated with the provided ContentNamespace. GetIntegrationTi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.