id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_083867cf95c1
unity_docs
scripting
Explain 'Structure of a Unity Xcode project' in Unity.
When you build a Unity project for the iOS platform, Unity creates a folder that contains an Xcode project. You need to build and sign this project before you deploy it on a device or distribute it on the App Store. Note : You can modify a generated Xcode project using Xcode.PBXProject . Every generated Unity iOS Xcode...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_203fa3073656
unity_docs
scripting
What is `PlayerLoop.TimeUpdate` in Unity? Explain its purpose and usage.
TimeUpdate struct in UnityEngine.PlayerLoop / Implemented in: UnityEngine.CoreModule Description Update phase in the native player loop that waits for the operating system (OS) to flip the back buffer to the display and update the time in the engine. TimeUpdate happens at the transition between two different fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43380ee6ae00
unity_docs
scripting
What is `UIElements.ScrollView.mode` in Unity? Explain its purpose and usage.
ScrollView.mode public UIElements.ScrollViewMode mode ; Description Controls how the ScrollView allows the user to scroll the contents. ScrollViewMode The default is ScrollViewMode.Vertical . Writing to this property modifies the class list of the ScrollView according to the specified value of ScrollV...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39bf16b063f8
unity_docs
editor
What is `AssetPostprocessor.OnPostprocessGameObjectWithUserProperties` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPostprocessGameObjectWithUserProperties(GameObject,string[],object[]) Description Gets called for each GameObject that had at least one user property attached to it in the imported file. The second argument string array (propNames) contains all the names of the properties found. The System.Obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_719bdeb89733
unity_docs
rendering
In Unity's 'Bumped Diffuse', what is 'Normal Mapped Properties' and how does it work?
Like a Diffuse shader, this computes a simple (Lambertian) lighting model. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on the angle, and does not change as the camera moves or rotates around. Normal mapping simulates small surface details using a text...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34332b17469c
unity_docs
scripting
What is `IntegratedSubsystem.Stop` in Unity? Explain its purpose and usage.
IntegratedSubsystem.Stop Declaration public void Stop (); Description Stops an instance of a subsystem. Once the instance is stopped, the subsystem representing this instance is no longer active and should not consume performance.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6456819b91e
unity_docs
scripting
What is `ParticleSystemScalingMode` in Unity? Explain its purpose and usage.
ParticleSystemScalingMode enumeration Description Control how particle systems apply transform scale. Properties Property Description Hierarchy Scale the Particle System using the entire transform hierarchy. Local Scale the Particle System using only its own transform scale. (Ignores parent scale). Shape Only...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e92af1a9ba8e
unity_docs
physics
What is `AssetImporters.CollectImportedDependenciesAttribute.version` in Unity? Explain its purpose and usage.
CollectImportedDependenciesAttribute.version public uint version ; Description The version of the imported dependency getter. Increment this version when making changes to the method. Incrementing the version triggers a re-import of the assets handled by the specified importer type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4bdcf991111d
unity_docs
rendering
In Unity's 'Console window reference', what is 'Searching and filtering Console output' and how does it work?
You can search Console messages for specific keywords from the Console search bar. As you type a search term, the Console filters messages to display only those that contain matching text. The Console highlights only the first match in the message text, and only if it’s in the visible part of the message (see Adjusting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_379d1d33b5e6
unity_docs
scripting
What is `CustomGridBrushAttribute.defaultName` in Unity? Explain its purpose and usage.
CustomGridBrushAttribute.defaultName public string defaultName ; Description Name of the default instance of this brush. In addition to asset instances of brush class, Unity creates a default instance of every brush to be shown in the palette window dropdown. This is the display name of that instance. If the de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98b1ca9f158d
unity_docs
xr
What is `Networking.UnityWebRequest.uploadedBytes` in Unity? Explain its purpose and usage.
UnityWebRequest.uploadedBytes public ulong uploadedBytes ; Description Returns the number of bytes of body data the system has uploaded to the remote server. (Read Only) If this UnityWebRequest has no upload handler, this property will always return zero.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72fab00b65c0
unity_docs
editor
What are the parameters of `AssetImporter.SetAssetBundleNameAndVariant` in Unity?
Description Set the AssetBundle name and variant. ```csharp using UnityEngine; using UnityEditor; public class SetAssetBundleNameAndVariant : MonoBehaviour { [MenuItem("Tools/SetAssetBundleNameAndVariantExample")] static void Example() { var importer = AssetImporter.GetAtPath("Path/To/Your/Asset"); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4824803dd2d4
unity_docs
rendering
What is `Light.shadowMatrixOverride` in Unity? Explain its purpose and usage.
Light.shadowMatrixOverride public Matrix4x4 shadowMatrixOverride ; Description Matrix that overrides the regular light projection matrix during shadow culling. Unity uses this matrix if you set Light.useShadowMatrixOverride to true .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_707118d5f593
unity_docs
scripting
In Unity's 'Introduction to build profiles', what is 'Platforms' and how does it work?
The Platforms pane displays a list of currently installed platforms that Unity supports. A platform profile includes some shared settings that apply to all platforms. For example, if you enable the Development Build setting for one platform profile, Unity will enable the setting across all the available platform profil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_85725089928c
unity_docs
scripting
In Unity's 'Keystore Manager window reference', what is 'New Key Values' and how does it work?
The properties in this section of the interface describe a new key to add to the keystore. For more information, see Add keys to a keystore . Note : The application doesn’t display the personal information in this section. Instead, the certificate that is part of your application includes it. Property Description Alias...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c4ef93e4c3b
unity_docs
editor
Show me a Unity C# example demonstrating `Rendering.OnDemandRendering.willCurrentFrameRender`.
OnDemandRendering.willCurrentFrameRender public static bool willCurrentFrameRender ; Description True if the current frame will be rendered. ```csharp using UnityEngine; using UnityEngine.Rendering;// This example shows how to determine if the current frame will be presented to the screen. public class Example...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7a246a38a1ae
unity_docs
rendering
Explain 'Customize the Standard shader source code in the Built-In Render Pipeline' in Unity.
Customize the Standard shader for different use cases by downloading the shader source code, and then editing it to fit your project needs. ## Download the Standard shader source code To download the source code for the Standard shader: Go to the Unity download archive . Select the Editor version that you are using f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5557f2095d04
unity_docs
rendering
Give me an overview of the `LightProbesQuery` class in Unity.
LightProbesQuery struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Thread-safe struct for batch sampling Light Probes in a Scene. This struct allows for sampling Light Probes from a job or a thread. If you load a scene additively, you must call LightProbes.Tetrahedralize to include its ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_347375157fff
unity_docs
rendering
Explain 'Branch based on shader model' in Unity.
SHADER_TARGET is defined to a numeric value that matches the Shader target compilation model (that is, matching #pragma target directive). For example, SHADER_TARGET is 30 when compiling into Shader model 3.0. You can use it in Shader code to do conditional checks. For example: ``` #if SHADER_TARGET < 30 // less than ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21da9b55456c
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.NegativeInfinity`.
Mathf.NegativeInfinity public static float NegativeInfinity ; Description A representation of negative infinity (Read Only). ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Debug.Log(Mathf.NegativeInfinity); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c246364e7a98_doc_1
github
scripting
What does `MapTo` do in this Unity script? Explain its purpose and signature.
Converts a float to 0-1 its position in the given range.If the float is outside the range, returns less than 0 or greater than 1. Signature: ```csharp public static float MapTo(this float x, float xMin, float xMax) => (x - xMin) / (xMax - xMin); ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_81c8dc679e55
unity_docs
ui
What is `UIElements.VisualElement.IndexOf` in Unity? Explain its purpose and usage.
VisualElement.IndexOf Declaration public int IndexOf ( UIElements.VisualElement element ); Parameters Parameter Description element The child element to retrieve. Returns int The index of the child, or -1 if the child is not found. Description Retrieves the child index of the specified VisualElemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cccfc274066f
unity_docs
editor
What is `PlayerSettings.iOS.buildNumber` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.buildNumber public static string buildNumber ; Description The build number of the bundle It is saved to the 'CFBundleVersion' field in the built app's info.plist file. ```csharp using UnityEngine; using UnityEditor;public class BuildNumberExample { // This example will create a Menu Item...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e33540036e97
unity_docs
editor
Explain 'UI Builder' in Unity.
UI Builder lets you visually create and edit UI assets, such as UI Documents (.uxml ), and StyleSheets (.uss ), that you use with UI Toolkit . You can also install the following optional packages that offer additional functionality in UI Builder: The com.unity.vectorgraphics package allows you to assign a VectorImage a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f830873bf81
unity_docs
rendering
What is `ParticleSystem.RotationBySpeedModule.zMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.RotationBySpeedModule.zMultiplier public float zMultiplier ; Description Speed multiplier along the z-axis. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall speed multiplier. ```csharp using UnityEngine; using System.Collections;[R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5efacaff7d2
unity_docs
xr
What is `PackageManager.Requests.ResetToEditorDefaultsRequest` in Unity? Explain its purpose and usage.
ResetToEditorDefaultsRequest class in UnityEditor.PackageManager.Requests / Inherits from: PackageManager.Requests.Request Description Represents an asynchronous request to reset the project packages to the current Editor default configuration. The PackageManager Client class returns a ResetToEditorDefaultsR...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dadbb7751ec9
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture2DArray.GetPixelData`.
oint to the correct memory location if the texture has been modified or updated. If you use a small type for T such as byte , GetPixelData may fail because the NativeArray would exceed the maximum length ( Int32.MaxValue ). To avoid this, use a larger type or struct. GetPixelData throws an exception when it fai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_be7147b9b5ec_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Authoring asset for one factory layer state id.Mental model for designers:- Slots describe where items may enter/exit.- Recipes describe item/resource transforms.- Duration controls cycle time.- Progress payload channel selects where runtime progress is tracked.Runtime note:- This ScriptableObject is editor-only author...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_26e9e17754a1
unity_docs
scripting
What is `AndroidJNI.GetStaticFloatField` in Unity? Explain its purpose and usage.
AndroidJNI.GetStaticFloatField Declaration public static float GetStaticFloatField (IntPtr clazz , IntPtr fieldID ); Description Returns the value of a static field of an object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_709f51bb6c1c
unity_docs
ui
What is `UIElements.VisualElementExtensions` in Unity? Explain its purpose and usage.
VisualElementExtensions class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description VisualElementExtensions is a set of extension methods useful for VisualElement. Static Methods Method Description AddManipulator Add a manipulator associated to a VisualElement. ChangeCo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11b8978fd350
unity_docs
animation
What is `Animations.AnimationSceneHandleUtility.ReadFloats` in Unity? Explain its purpose and usage.
AnimationSceneHandleUtility.ReadFloats Declaration public static void ReadFloats ( Animations.AnimationStream stream , NativeArray<PropertySceneHandle> handles , NativeArray<float> buffer ); Parameters Parameter Description stream The animation stream. handles The PropertySceneHandle array to read from....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cad42ce718ea
unity_docs
scripting
Show me a Unity C# example demonstrating `LightTransport.IDeviceContext.Flush`.
-blocking operations that produce an event can be followed by a call to IDeviceContext.Wait , to perform a blocking wait while the event completes. Use IDeviceContext.IsCompleted to determine if an event produced by an asynchronous operation has completed. Performance Note: Call Flush once after enqueuing multiple ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a56eb823a4a8
unity_docs
scripting
What is `AssetPostprocessor.GetVersion` in Unity? Explain its purpose and usage.
AssetPostprocessor.GetVersion Declaration public uint GetVersion (); Description Returns the version of the asset postprocessor. When the script is recompiled, if a version change is detected, the assets associated with this asset postprocessor will be reimported.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37777b0e4fa6
unity_docs
scripting
What is `Mesh.GetNativeIndexBufferPtr` in Unity? Explain its purpose and usage.
Mesh.GetNativeIndexBufferPtr Declaration public IntPtr GetNativeIndexBufferPtr (); Returns IntPtr Pointer to the underlying graphics API index buffer. Description Retrieves a native (underlying graphics API) pointer to the index buffer. Use this function to retrieve a pointer/handle corresponding to the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94f0d161e2a1
unity_docs
math
What is `Vector3Int` in Unity? Explain its purpose and usage.
Vector3Int struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Representation of 3D vectors and points using integers. This structure is used in some places to represent 3D positions and vectors that don't require the precision of floating-point. Static Properties Property Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eb516d957876
unity_docs
ui
In Unity's 'MinMaxSlider', what is 'Example' and how does it work?
The following UXML example creates a MinMaxSlider: ``` <UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements"> <MinMaxSlider label="UXML Field" name="the-uxml-field" min-value="0" max-value="20" low-limit="-10" high-limit="40" /> </UXML> ``` The following C# example illustrates some of the custo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b3a633262cf6
unity_docs
physics
In Unity's 'Physics Debug window reference', what is 'Physics debug panel' and how does it work?
When the Physics Debug window is open in Unity, the Physics Debug panel appears in the Scene view. By default, it appears in the bottom-right corner of the Scene view; however, you can click and drag to move it around. Property Description Collision Geometry Enable Collision Geometry to visualize collision information ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e7925e3d85d
unity_docs
rendering
In Unity's 'Scriptable Render Pipeline fundamentals', what is 'Render Pipeline Instance and Render Pipeline Asset' and how does it work?
Every render pipeline based on SRP has two key customized elements: A Render Pipeline Instance . This is an instance of a class that defines the functionality of your render pipeline. Its script inherits from RenderPipeline , and overrides its Render() method. A Render Pipeline Asset . This is an asset in your Unity Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c035b104f276
unity_docs
physics
What is `ContactFilter2D.useNormalAngle` in Unity? Explain its purpose and usage.
ContactFilter2D.useNormalAngle public bool useNormalAngle ; Description Sets the contact filter to filter the results by the collision's normal angle using minNormalAngle and maxNormalAngle .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d91ab6feb18
unity_docs
performance
What is `Unity.Jobs.IJob` in Unity? Explain its purpose and usage.
IJob interface in Unity.Jobs Description An interface that allows you to schedule a single job that runs in parallel to other jobs and the main thread. After a job is scheduled, the job's Execute method is invoked on a worker thread. You can use the returned JobHandle to make sure that the job has completed. Y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7d7a7b7922a
unity_docs
physics
Give me an overview of the `EdgeCollider2D` class in Unity.
EdgeCollider2D class in UnityEngine / Inherits from: Collider2D / Implemented in: UnityEngine.Physics2DModule Description Collider for 2D physics representing an arbitrary set of connected edges (lines) defined by its vertices. Additional resources: BoxCollider2D , CircleCollider2D , PolygonCollider2D . P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4fbb90aca99
unity_docs
animation
What is `AssetImporters.LightDescription.HasAnimationCurve` in Unity? Explain its purpose and usage.
LightDescription.HasAnimationCurve Declaration public bool HasAnimationCurve (string propertyName ); Parameters Parameter Description propertyName The name of the light property. Returns bool Returns true if the light property is animated. Returns false otherwise. Description Checks if a light proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9c760eba334
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddTargetDependency` in Unity? Explain its purpose and usage.
PBXProject.AddTargetDependency Declaration public void AddTargetDependency (string targetGuid , string targetDependencyGuid ); Declaration public void AddTargetDependency (string targetGuid , string targetDependencyGuid , string dependencyName ); Parameters Parameter Description targetGuid The GUID o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7025b00fdfad
unity_docs
scripting
What is `TrueTypeFontImporter` in Unity? Explain its purpose and usage.
TrueTypeFontImporter class in UnityEditor / Inherits from: AssetImporter Description AssetImporter for importing Fonts. Properties Property Description ascentCalculationMode Calculation mode for determining font's ascent. characterPadding Border pixels added to character images for padding. This is useful i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76b985a042aa
unity_docs
scripting
What is `SerializedObject.targetObjects` in Unity? Explain its purpose and usage.
SerializedObject.targetObjects public Object[] targetObjects ; Description The inspected objects (Read Only). The serialized object can represent multiple objects simultaneously when multi-object editing.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b3a773182aa
unity_docs
performance
Explain 'Package version conflict and resolution' in Unity.
When you add a package to a project manifest , Unity considers that package a dependency of the project (a direct dependency). However, a package can also have dependencies on other packages, which create indirect dependencies in any projects that require that package. Since most projects require more than one package ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cc07caa43d8
unity_docs
scripting
What is `AndroidJNI.NewLocalRef` in Unity? Explain its purpose and usage.
AndroidJNI.NewLocalRef Declaration public static IntPtr NewLocalRef (IntPtr obj ); Description Creates a new local reference that refers to the same object as obj . Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c34884f1cb09
unity_docs
input
What is `UIElements.ITextSelection` in Unity? Explain its purpose and usage.
ITextSelection interface in UnityEngine.UIElements Description Interface to access a TextElement selection and cursor information This interface is not meant to be implemented explicitly as its declaration might change in the future. Properties Property Description cursorIndex This is the cursor index i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ac0d4fbb351
unity_docs
scripting
What is `UIElements.MultiColumnListView.SetViewController` in Unity? Explain its purpose and usage.
MultiColumnListView.SetViewController Declaration public void SetViewController ( UIElements.CollectionViewController controller ); Parameters Parameter Description controller The controller to use with this view. Description Assigns the view controller for this view and registers all events required for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b493a2946af
unity_docs
animation
What is `Motion` in Unity? Explain its purpose and usage.
Motion class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.AnimationModule Description Base class for AnimationClips and BlendTrees. Motions are used by animation States in the Mecanim StateMachines. Inherited Members Properties Property Description hideFlags Should the object be hid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e97029eefa07
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.UsesPermissionSdk23` in Unity? Explain its purpose and usage.
UsesPermissionSdk23 class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <uses-permission-sdk-23> Android Manifest element. For more information about the element, see Android's documentation: UsesPermissionSdk23 element Pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3781b1a12813
unity_docs
scripting
What is `Object.DestroyImmediate` in Unity? Explain its purpose and usage.
Object.DestroyImmediate Declaration public static void DestroyImmediate ( Object obj , bool allowDestroyingAssets = false); Parameters Parameter Description obj Object to be destroyed. allowDestroyingAssets Set to true to allow assets to be destroyed. Description Destroys the specified object immedia...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e724e4982434
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.AtomicSafetyErrorType` in Unity? Explain its purpose and usage.
AtomicSafetyErrorType enumeration Description Error code for errors related to accessing native container instances in different situations. Each NativeContainer instance is monitored by an AtomicSafetyHandle , which coordinates safe access to the container. If the container can't be accessed safely, then the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f43281d35378
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.EnumFlagsField`.
Note: This method only supports enums whose underlying types are supported by Unity's serialization system (sbyte, short, int, byte, ushort, or uint). For enums backed by an unsigned type, the "Everything" option should have the value corresponding to all bits set (i.e. ~0 in an unchecked context or the MaxValue c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2087c175ef02
unity_docs
physics
What is `AssetImporters.ScriptedImporterAttribute.ctor` in Unity? Explain its purpose and usage.
ScriptedImporterAttribute Constructor Declaration public ScriptedImporterAttribute (int version , string ext ); Declaration public ScriptedImporterAttribute (int version , string ext , int importQueueOffset ); Declaration public ScriptedImporterAttribute (int version , string[] exts ); Declaration ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1d7fe9a0cd1
unity_docs
audio
What is `Networking.DownloadHandlerAudioClip.audioClip` in Unity? Explain its purpose and usage.
DownloadHandlerAudioClip.audioClip public AudioClip audioClip ; Description Returns the downloaded AudioClip , or null . (Read Only) This property returns an AudioClip object. If Unity was unable to decode the downloaded data, or has not yet finished decompressing/decoding the downloaded data, this proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_193baed7c81f
unity_docs
physics
In Unity's 'Search settings and preferences', what is 'Provider filters' and how does it work?
The Settings provider has additional filters in the visual query builder . This table lists the filters and their textual query equivalents. Filter Search token Query example Description Scope: Project set: scope:project set: scope:project physics Searches for physics settings in the Project Settings window. Scope: Use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7beff850b39
unity_docs
ui
In Unity's 'Install a UPM package from a local folder', what is 'Local packages inside your project' and how does it work?
You can place a local package anywhere inside your project except under these folders: Project folder: Reason: Assets If you place a package inside this folder, the Asset Database imports any assets under this folder twice: once as assets and once as package contents. Library Do not modify the contents of this folder. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a70f2ef074a6
unity_docs
physics
What is `ContactPairHeader.body` in Unity? Explain its purpose and usage.
ContactPairHeader.body public Component body ; Description The first Rigidbody or ArticulationBody in the pair. Use with the as keyword to determine the actual type of the component. ```csharp using UnityEngine;public class Example { public Rigidbody ExtractRigidbodyFromContactPairHeader(ContactPairHe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_058b04c86ef2
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8G8B8A8_SInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8G8B8A8_SInt Description A four-component, 32-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd643c57b7e8
unity_docs
editor
What is `EditorGUILayout.VerticalScope.ctor` in Unity? Explain its purpose and usage.
EditorGUILayout.VerticalScope Constructor Declaration public EditorGUILayout.VerticalScope (params GUILayoutOption[] options ); Declaration public EditorGUILayout.VerticalScope ( GUIStyle style , params GUILayoutOption[] options ); Parameters Parameter Description style The style to use for background...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ccf65fc6b54
unity_docs
editor
Show me a Unity C# example demonstrating `EditorWindow.OnGUI`.
EditorWindow.OnGUI() Description Implement your own editor GUI here. Use OnGUI to draw all the controls of your window. ```csharp // A simple script that saves frames from the Game view when in Play mode. // // You can put the frames together later to create a video. // The frames are saved in the project, at the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_08924184ed74_doc_1
github
scripting
What does `AlwaysUseMaterialPropertyBlocks` do in this Unity script? Explain its purpose and signature.
Override to true to force using Material Property Blocks. Signature: ```csharp protected virtual bool AlwaysUseMaterialPropertyBlocks => false; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_1ae420149dc1
unity_docs
scripting
What is `Animator` in Unity? Explain its purpose and usage.
Animator class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AnimationModule Description Interface to control the Mecanim animation system. Properties Property Description angularVelocity Gets the avatar angular velocity for the last evaluated frame. animatePhysics When enabled,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_439dfe82410b
unity_docs
scripting
Show me a Unity C# example demonstrating `Editor.saveChangesMessage`.
r.hasUnsavedChanges and override the Editor.SaveChanges method. This message shows exactly as you have written it. This message presents to users who have unsaved changes, if they attempt to close the Inspector, change Selection or enter Playmode. The save changes message might combine with other messages from other...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48fe5e8f8c9a
unity_docs
scripting
What are the parameters of `Networking.UnityWebRequest.Put` in Unity?
Returns UnityWebRequest A UnityWebRequest configured to transmit bodyData to uri via HTTP PUT. Description Creates a UnityWebRequest configured to upload raw data to a remote server via HTTP PUT. This method creates a UnityWebRequest, sets the target URL to the string uri argument and the method to PUT . It also sets t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b41bd90c6821
unity_docs
scripting
What is `Search.CustomObjectIndexerAttribute.version` in Unity? Explain its purpose and usage.
CustomObjectIndexerAttribute.version public int version ; Description Version of the custom indexer. Increment this number to have the indexer re-index the indexes. Each time you modify the code of a custom indexer, increment its version number in order to update the search indexes. ```csharp [CustomObjectIn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5d57d1d4004
unity_docs
math
What is `Grid.Swizzle` in Unity? Explain its purpose and usage.
Grid.Swizzle Declaration public static Vector3 Swizzle ( GridLayout.CellSwizzle swizzle , Vector3 position ); Parameters Parameter Description swizzle Determines the rearrangement order for the swizzle. position Position to swizzle. Returns Vector3 The swizzled position. Description Swizzles ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6607b98b1831
unity_docs
math
What are the parameters of `ContactFilter2D.IsFilteringNormalAngle` in Unity?
Returns bool Returns true when normal is excluded by the filter and false if otherwise. Description Checks if the angle of normal is within the normal angle range to be filtered. Filtering is defined as including or excluding objects based upon a specific condition. Normal angle filtering checks an angle and includes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_297f479d7843
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetNextSibling` in Unity? Explain its purpose and usage.
Hierarchy.GetNextSibling Declaration public Unity.Hierarchy.HierarchyNode GetNextSibling (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node. Returns HierarchyNode The next sibling of the hierarchy node. Description Gets the next sibling of a node.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ac8064925e5
unity_docs
rendering
What is `LightingSettings.indirectSampleCount` in Unity? Explain its purpose and usage.
LightingSettings.indirectSampleCount public int indirectSampleCount ; Description Specifies the number of samples the Progressive Lightmapper uses for indirect lighting calculations. (Editor only). The range is 8 through 131072. The default value is 512. If you increase this value, the quality of your lightmap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9569ba323fdf
unity_docs
audio
What is `AudioChorusFilter.wetMix1` in Unity? Explain its purpose and usage.
AudioChorusFilter.wetMix1 public float wetMix1 ; Description Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5. ```csharp using UnityEngine;[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioChorusFilter))] public class Example : MonoBehaviour { // Produce random mixes with the Chorus fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53fcf836b5c3
unity_docs
editor
What is `ExpressionEvaluator` in Unity? Explain its purpose and usage.
ExpressionEvaluator class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Evaluates simple math expressions; supports int / float and operators: + - * / % ^ ( ). This class has a single generic static method Evaluate , that evaluates a mathematical expression and returns the result. Support...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ca73c7789ca
unity_docs
performance
What is `ShortcutManagement.IShortcutManager.IsProfileReadOnly` in Unity? Explain its purpose and usage.
IShortcutManager.IsProfileReadOnly Declaration public bool IsProfileReadOnly (string profileId ); Parameters Parameter Description profileId ID of profile to determine read-only status for. Returns bool true if the profile with ID profileId is read-only: otherwise, false . Description Is the profi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_736033ac6b0d
unity_docs
rendering
Explain 'Preferences reference' in Unity.
Use preferences to customize the behavior of the Unity Editor. To open the Preferences window, go to Edit > Preferences (macOS: Unity > Settings ) in the main menu. To navigate the Preferences window, use the search box to filter the list of settings categories and highlight keywords in the details pane on the right of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0b83fdf79bd
unity_docs
editor
What are the parameters of `MeshUtility.SetMeshCompression` in Unity?
Description Change the mesh compression setting for a mesh. This allows you to enable mesh compression for meshes created from scripting, which have not been generated by the ModelImporter. That way you can generate compressed mesh assets from code. ```csharp using UnityEngine; using UnityEditor;public class ExampleMes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_210faa57f082
unity_docs
editor
What is `Search.SearchProvider.fetchColumns` in Unity? Explain its purpose and usage.
SearchProvider.fetchColumns public Func<SearchContext,IEnumerable<SearchItem>,IEnumerable<SearchColumn>> fetchColumns ; Description Handler used to enumerate search columns to be used in the Search Table view. See SearchColumnProviderAttribute if you need to define new column formats to display your custom va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_286de6bbf94e
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchContextAttribute`.
SearchContextAttribute class in UnityEngine.Search / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description This attribute can be attached to a component object field in order to have the ObjectField use the advanced Object Picker. ```csharp [SearchContext("t:mesh is:nested mesh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59bb7fb169fb
unity_docs
scripting
Give me an overview of the `Object` class in Unity.
Object class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Base class for all objects Unity can reference. UnityEngine.Object is the base class for all built-in Unity objects. Don't derive from or instantiate this class directly. Instead, use the appropriate subclass such as GameObject ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5568e94d80a
unity_docs
physics
What is `Physics2D.IsTouchingLayers` in Unity? Explain its purpose and usage.
Physics2D.IsTouchingLayers Declaration public static bool IsTouchingLayers ( Collider2D collider , int layerMask = Physics2D.AllLayers); Parameters Parameter Description Collider The Collider to check if it is touching Colliders on the layerMask . layerMask Any Colliders on any of these layers count as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c69b12dbc15
unity_docs
xr
Show me a Unity C# example demonstrating `U2D.SpriteAtlasManager.atlasRequested`.
on Trigger when any Sprite was bound to SpriteAtlas but couldn't locate the atlas asset during runtime. This usually means the sprite was packed to an atlas which is not included in build This callback does not expect an immediate response from the user. Instead, it passes on a System.Action. The user can load th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac5d7b978a58
unity_docs
scripting
What is `Event.capsLock` in Unity? Explain its purpose and usage.
Event.capsLock public bool capsLock ; Description Is Caps Lock on? (Read Only) Returns true if Caps Lock is switched on. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Creates a Label and prints CapsLock on/off // depending on the state of the capslock key. void OnGUI() { Event e = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cade95deafbe
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture2D.ReadPixels`.
can automatically update the mipmap when you call Apply instead of setting recalculateMipMaps to true . The following code example demonstrates how to use ReadPixels in the Built-in Render Pipeline. In Scriptable Render Pipelines such as the Universal Render Pipeline (URP), Camera.onPostRender isn't available,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d2899086332b
unity_docs
editor
In Unity's 'Assembly Definition file format reference', what is 'Example with assembly names and included platforms' and how does it work?
The following example Assembly Defintion JSON uses assembly names for references to other Assembly Definitions and the includePlatforms key to specify an array of included platforms: ``` { "name": "BeeAssembly", "references": [ "Unity.CollabProxy.Editor", "AssemblyB", "UnityEngine.UI", "UnityEngine.TestRunner", ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f3c3904e066d
unity_docs
rendering
Explain 'Transparent Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . One consideration for this shader is that the Base texture’s alpha channel defines both the Transparent areas as well as the Specular Map. ## Transparent Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6d08ee4ff712
unity_docs
xr
Explain 'Set up your Nginx server configuration for Web builds' in Unity.
Set up your Nginx server configuration file to use the Nginx server with Unity Web builds. You can use Nginx to serve web content you create with Unity quickly and efficiently. For a full code example with all file types and compression types included, refer to Full code example with all file types . For information ab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f23ded900b8d
unity_docs
physics
What is `Physics2D.SetLayerCollisionMask` in Unity? Explain its purpose and usage.
Physics2D.SetLayerCollisionMask Declaration public static void SetLayerCollisionMask (int layer , int layerMask ); Parameters Parameter Description layer The layer to set the collision layer mask for. layerMask A mask where each bit indicates a layer and whether it can collide with layer or not. Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d76ff61b4f2
unity_docs
rendering
What is `Graphics.SetRenderTarget` in Unity? Explain its purpose and usage.
Graphics.SetRenderTarget Declaration public static void SetRenderTarget ( RenderTexture rt , int mipLevel = 0, CubemapFace face = CubemapFace.Unknown, int depthSlice = 0); Declaration public static void SetRenderTarget ( Rendering.GraphicsTexture rt , int mipLevel = 0, CubemapFace face = Cubema...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a59307443dca
unity_docs
scripting
What is `Search.SearchColumnEventArgs` in Unity? Explain its purpose and usage.
SearchColumnEventArgs struct in UnityEditor.Search Description Search column event arguments are used by SearchColumn.getter , SearchColumn.drawer and SearchColumn.setter delegates. Properties Property Description column Search column being handled by the current event. context Search context being used ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2e161c5bc9b
unity_docs
scripting
What is `UIElements.BoundsField` in Unity? Explain its purpose and usage.
BoundsField class in UnityEngine.UIElements / Inherits from: UIElements.BaseField_1 / Implemented in: UnityEngine.UIElementsModule Description A Bounds editor field. For more information, refer to UXML element BoundsField . Static Properties Property Description centerFieldUssClassName USS class na...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0949b3211022
unity_docs
scripting
What is `Progress.Item.Pause` in Unity? Explain its purpose and usage.
Progress.Item.Pause Declaration public bool Pause (); Returns bool True if the task is paused, false if it cannot be paused. Description Pauses a running progress indicator. Additional resources: Progress.Pause , Progress.Item.Resume , Progress.Item.RegisterPauseCallback , Progress.Item.UnregisterPaus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3e89ddfdbe6
unity_docs
physics
Show me a Unity C# example demonstrating `ShaderKeywordFilter.ApplyRulesIfGraphicsAPIAttribute`.
derKeywordFilter.GraphicsAPIConstraintAttribute Description Enable or disable shader keyword filter attributes based on the graphics API. If you use this attribute, Unity enables filter attributes if the current build target matches any of the graphicsDeviceTypes . The following example builds only variants inc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_06c8f2ff8ad7
unity_docs
scripting
In Unity's 'Transition events', what is 'Transition events reference table' and how does it work?
The following table describes the transition events and their propagation phases: Event Description Trickles down Bubbles up Cancellable TransitionRunEvent Sent when a transition is created. Yes TransitionStartEvent Sent when a transition’s delay phase ends and the transition starts. Yes TransitionEndEvent Sent when a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_734f62ec100e
unity_docs
audio
In Unity's 'Use your native audio DSP plug-in and GUI in Unity', what is '1. Compile and build your plug-ins' and how does it work?
You must implement your plug-ins as a dynamic library for your preferred platform. Unlike with scripts , any platform that you want to support must be able to compile this file, along with platform-specific optimizations. For information about how to build your plug-in into a library file for each platform, refer to Bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af1d5a491b7e
unity_docs
ui
What is `EditorUtility.DisplayCancelableProgressBar` in Unity? Explain its purpose and usage.
EditorUtility.DisplayCancelableProgressBar Declaration public static bool DisplayCancelableProgressBar (string title , string info , float progress ); Description Displays or updates a progress bar that has a cancel button. The window title sets to title and the info sets to info . Set progress should to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33cff899a9f5
unity_docs
editor
What are the parameters of `VersionControl.Provider.IncomingChangeSetAssets` in Unity?
Description Given an incoming changeset this will start a task to query the version control server for which assets are part of the changeset. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.VersionControl; using UnityEngine;public class EditorScript : MonoBehaviour { [MenuItem("Ver...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c062394eac94
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoClip.sRGB`.
e color data in sRGB color space. Set VideoClipImporter.sRGBClip to true in most cases. Non-color movies are commonly stored as linear values, and the GPU should not perform color space conversions. Set to false in the VideoClipImporter for non-color movies. This setting corresponds to VideoClipImporter.sRGBClip ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4a11136b44e6
unity_docs
rendering
In Unity's 'Introduction to USS built-in variables', what is 'Group' and how does it work?
The group specifies what kind of data the variable represents. Each group has several possible sub-elements . The variable names have the following groups: Group Used for colors Color properties, such as background-color and border-color metrics Properties that control dimensions and shapes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c58c3158169
unity_docs
animation
What is `Animations.AnimatorController.CreateAnimatorControllerAtPath` in Unity? Explain its purpose and usage.
AnimatorController.CreateAnimatorControllerAtPath Declaration public static Animations.AnimatorController CreateAnimatorControllerAtPath (string path ); Parameters Parameter Description path The path where the AnimatorController asset will be created. Returns AnimatorController The created AnimationCon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4b6efcbb34c
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.CreateRendererList` in Unity? Explain its purpose and usage.
ScriptableRenderContext.CreateRendererList Declaration public Rendering.RendererList CreateRendererList ( Rendering.RendererUtils.RendererListDesc desc ); Declaration public Rendering.RendererList CreateRendererList (ref Rendering.RendererListParams param ); Parameters Parameter Description desc ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.