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_5ebee47dedf0
unity_docs
scripting
What is `Experimental.GraphView.GraphView.GetNodeByGuid` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.GetNodeByGuid Declaration public Experimental.GraphView.Node GetNodeByGuid (string guid ); Parameters Parameter Description guid The GUID. Returns Node The first node with the given GUID. Null if none foun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ebb7d300dc4
unity_docs
scripting
What is `LightProbes.TetrahedralizeAsync` in Unity? Explain its purpose and usage.
LightProbes.TetrahedralizeAsync Declaration public static void TetrahedralizeAsync (); Description Asynchronously tetrahedralize all currently loaded LightProbe positions. Call this function to asynchronously calculate a Delaunay tetrahedralization of all currently loaded LightProbe positions, and update the L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2703379705e
unity_docs
math
What is `HashUtilities.QuantisedVectorHash` in Unity? Explain its purpose and usage.
HashUtilities.QuantisedVectorHash Declaration public static void QuantisedVectorHash (ref Vector3 value , ref Hash128 hash ); Parameters Parameter Description hash The Vector3 to hash. value The computed hash. Description Compute a Hash128 of a Vector3. The Vector3 is quantized before the hashing w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a169eedcf913
unity_docs
rendering
Explain 'Asset packs in Unity' in Unity.
This page describes how asset packs work in the context of a Unity Android application that uses Play Asset Delivery . You can configure Unity to generate an Android App Bundle (AAB) that includes your application split into a base module and asset packs: Base module : Contains the executables (Java and native), plug-i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2a311b2b3f69_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Utility class to make inheriting types singletons.Unlike , this does not create a new instance of if there are no existing ones.The type to be made a singleton. Signature: ```csharp public class DontCreateNewSingleton<T> : MonoBehaviour where T : Component ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_9a91dcada9aa
unity_docs
scripting
What is `UIElements.DragAndDropData` in Unity? Explain its purpose and usage.
DragAndDropData class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Data stored during drag-and-drop operations, enabling information to be carried throughout the process. Properties Property Description paths A list of paths to the assets being dragged. source ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33f6bf51e319
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.GwpAsanMode` in Unity? Explain its purpose and usage.
GwpAsanMode enumeration Description Mirrors the GwpAsanMode enum. For more information about the attribute, see Android's documentation: GwpAsanMode attribute Properties Property Description Null Attribute is not set and will not appear in the element. Always Mirrors android:gwpAsanMode="always". Never ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19b57b1e02ee
unity_docs
rendering
What is `RenderTextureCreationFlags.DynamicallyScalableExplicit` in Unity? Explain its purpose and usage.
RenderTextureCreationFlags.DynamicallyScalableExplicit Description Set this flag to mark this RenderTexture for Dynamic Resolution, if the target platform/graphics API supports Dynamic Resolution. If you set this flag, you need to scale the render texture manually, instead of using ScalableBufferManager.ResizeBuff...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_627b09885e19
unity_docs
scripting
What is `AI.ObstacleAvoidanceType` in Unity? Explain its purpose and usage.
ObstacleAvoidanceType enumeration Description Level of obstacle avoidance. Properties Property Description NoObstacleAvoidance Disable avoidance. LowQualityObstacleAvoidance Enable simple avoidance. Low performance impact. MedQualityObstacleAvoidance Medium avoidance. Medium performance impact. GoodQualityOb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6309301086a2
github
scripting
Write a Unity C# physics script for Collision Debug
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class CollisionDebug : MonoBehaviour { private void OnCollisionEnter(Collision collision) { Debug.Log("OnCollisionEnter " + collision.rigidbody.name); } private void OnCollisionExit(Collision colli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f03f766f72f
unity_docs
editor
What is `AssetImporter.RemoveRemap` in Unity? Explain its purpose and usage.
AssetImporter.RemoveRemap Declaration public bool RemoveRemap ( AssetImporter.SourceAssetIdentifier identifier ); Parameters Parameter Description identifier The identifier of the sub-asset. Returns bool Returns true if an element was removed, otherwise false. Description Removes an item from the ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9e2640d60123
github
scripting
Write a Unity Editor script for Data
```csharp using System; using System.Collections.Generic; using UnityEngine; namespace Unity.VisualScripting { [SerializationVersion("A")] [SpecialUnit] public abstract class EventUnit<TArgs> : Unit, IEventUnit, IGraphElementWithData, IGraphEventHandler<TArgs> { public class Data : IGraphElemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cb2b70717b1
unity_docs
physics
What is `ContactFilter2D.isFiltering` in Unity? Explain its purpose and usage.
ContactFilter2D.isFiltering public bool isFiltering ; Description Given the current state of the contact filter, determine whether it would filter anything. This property checks the following properties and returns true, indicating filtering is enabled; useTriggers , useLayerMask , useDepth and useNormalAn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82b0d242b79d
unity_docs
scripting
What is `UIElements.BaseListView.SetViewController` in Unity? Explain its purpose and usage.
BaseListView.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 it to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef3bd77b2d5c
unity_docs
scripting
What is `Color32.operator_Color` in Unity? Explain its purpose and usage.
Color32.Color32 Description Color32 can be implicitly converted to and from Color . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color32 color = new Color(0.5f, 1f, 0.5f, 1f); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0a533edca57
unity_docs
scripting
Show me a Unity C# example demonstrating `RenderSettings.fog`.
RenderSettings.fog public static bool fog ; Description Is fog enabled? ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { // Enable fog RenderSettings.fog = true; } } ``` Additional resources: RenderSettings.fogMode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_232ca2798be7
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.intValue`.
lue instead. And if you are accessing 64 bit integers use longValue or ulongValue instead. When assigning a value to intValue , the value is clamped in the range of the property's declared type. For example, a property that is declared as a byte is clamped between 0 and 255. Additional resources: intValue...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54fc2120fddc
unity_docs
audio
What is `AudioChorusFilter.dryMix` in Unity? Explain its purpose and usage.
AudioChorusFilter.dryMix public float dryMix ; Description Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5. ```csharp using UnityEngine;[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioChorusFilter))] public class Example : MonoBehaviour { void Start() { GetCompon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_684d7806d1fd
unity_docs
scripting
Show me a Unity C# example demonstrating `Tilemaps.Tilemap.SetTiles`.
void SetTiles (Vector3Int[] positionArray , TileBase[] tileArray ); Parameters Parameter Description positionArray An array of positions of Tiles on the Tilemap . tileArray An array of Tile s to be placed. Description Sets an array of Tile s at the given XYZ coordinates of the corresponding cells in th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c38662b49dc2
unity_docs
ui
Show me a Unity C# example demonstrating `GUISkin.font`.
GUISkin.font public Font font ; Description The default font to use for all styles. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies the font only of the current GUISkin. public Font font; void OnGUI() { if (!font) { Debug.LogError("No font found, assign one in the inspecto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e0eddf69e9a7
unity_docs
scripting
In Unity's 'Package a UWP app in Visual Studio', what is 'Install your package on your machine' and how does it work?
After you create your app package, use the following steps to install the package on your machine: Open the folder which contains your package. Right-click on the Add-AppxPackage <yourappx>.appx file. Choose Run with PowerShell and follow the prompts. If you signed your file , the file will now install on your machine....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_746299c829bc
unity_docs
xr
What is `Networking.UnityWebRequest.downloadHandler` in Unity? Explain its purpose and usage.
UnityWebRequest.downloadHandler public Networking.DownloadHandler downloadHandler ; Description Holds a reference to a DownloadHandler object, which manages body data received from the remote server by this UnityWebRequest . Setting this property to null indicates that this UnityWebRequest does not car...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bf98a129088
unity_docs
scripting
What is `ModifiableMassProperties.otherInverseInertiaScale` in Unity? Explain its purpose and usage.
ModifiableMassProperties.otherInverseInertiaScale public float otherInverseInertiaScale ; Description The inverse inertia scaling that the solver should apply to the second body of this contact pair.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_9
github
scripting
What does `SetAutoGraphicsApi` do in this Unity script? Explain its purpose and signature.
Toggles the Auto Graphics Api project setting Signature: ```csharp public static void SetAutoGraphicsApi(BuildTarget buildTarget, bool automatic) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_d028b1f5d7ef
unity_docs
scripting
What are the parameters of `GridLayout.LocalToCell` in Unity?
Returns Vector3Int Cell position of the local position. Description Converts a local position to cell position. ```csharp // Snap the GameObject to parent GridLayout using UnityEngine;public class ExampleClass : MonoBehaviour { void Start() { GridLayout gridLayout = transform.parent.GetComponent<GridLay...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_322da6a7d786
unity_docs
rendering
In Unity's 'Reflective 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_214913a3f046
unity_docs
editor
What is `StatusQueryOptions.UseCachedIfPossible` in Unity? Explain its purpose and usage.
StatusQueryOptions.UseCachedIfPossible Description This option sets the status query to first use the latest valid version control system status of the file and query for a valid status synchronously if otherwise. A synchronous query does not return a value until the VCS system responds. This can cause significant ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa6b679f41c3
unity_docs
scripting
What is `Build.Content.ContentBuildInterface.GetTypeForObject` in Unity? Explain its purpose and usage.
ContentBuildInterface.GetTypeForObject Declaration public static Type GetTypeForObject ( Build.Content.ObjectIdentifier objectID ); Parameters Parameter Description objectID The specific object. Returns Type The type of the object. Description Returns the System.Type of the ObjectIdentifier specif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_39b662609422_doc_3
github
scripting
What does `ApplyConstraint` do in this Unity script? Explain its purpose and signature.
Updates an rotation so that its facing the camera Signature: ```csharp public override void ApplyConstraint(ref MixedRealityTransform transform) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_d766a26b26c1
unity_docs
rendering
What is `Rendering.SortingSettings.customAxis` in Unity? Explain its purpose and usage.
SortingSettings.customAxis public Vector3 customAxis ; Description Used to calculate distance to objects, by comparing the positions of objects to this axis. When the sorting mode is set to Custom Axis, use this together with worldToCameraMatrix and cameraPosition to determine the distances to objects for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9c736b3e085f
unity_docs
scripting
In Unity's 'Editor Coroutines', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.editorcoroutines@1.1 released 1.1.0 com.unity.editorcoroutines@1.0 released 1.0.0, 1.0.1
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_138fdb84a130_doc_8
github
scripting
What does `SetLocale` do in this Unity script? Explain its purpose and signature.
Sets the locale using a Locale object, if it is available.Locale to set. Signature: ```csharp public void SetLocale(Locale locale) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_f31db21e9c16
unity_docs
editor
What are the parameters of `Android.AndroidProjectFiles.SetBuildGradleFile` in Unity?
Description Sets a new build.gradle file. To use this method, you must also declare your new file in AndroidProjectFilesModifier.Setup using the AndroidProjectFilesModifierContext.AdditionalOutputs.AddBuildGradleFile method. ```csharp using System.IO; using Unity.Android.Gradle; using UnityEditor.Android;public class M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb803c290409
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetrics.IsEnabled` in Unity? Explain its purpose and usage.
AsyncReadManagerMetrics.IsEnabled Declaration public static bool IsEnabled (); Returns bool True, if the metrics system of the AsyncReadManager is currently recording data; false, otherwise. Description Reports whether the metrics system for the AsyncReadManager is currently recording data. Start metric...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e84963e2c744
unity_docs
scripting
In Unity's 'Display camera views on multiple monitors', what is 'Activating multi-display support' and how does it work?
Unity’s default display mode is one monitor only. When you run your application, you need to use Display.Activate() to explicitly activate additional displays. Once you activate a display, you can’t deactivate it. The best time to activate additional displays is when your application creates a new Scene . A good way to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7da66b99154d
github
scripting
Write a Unity C# UI script for Inspector Look Checker
```csharp using System; using UnityEngine; namespace Baxter.ClusterScriptExtensions.Internal { public class InspectorLookChecker : MonoBehaviour { public enum MyPatterns { Default, なんかオプション, Three, } [Flags] public enum MyOptions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef29310c44f7
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.Android.optimizedFramePacing`.
PlayerSettings.Android.optimizedFramePacing public static bool optimizedFramePacing ; Description Enable optimized frame pacing. Enable this option to allow Unity to evenly distribute frames for less variance in framerate, creating a smoother gameplay. ```csharp using UnityEngine; using UnityEditor; using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba145c20c825
unity_docs
editor
What is `Build.BuildCallbackVersionAttribute` in Unity? Explain its purpose and usage.
BuildCallbackVersionAttribute class in UnityEditor.Build Description Attribute to provide a version number for IProcessSceneWithReport callbacks. This attribute is used to inform the build system when the callback implementation changes and the build result needs to be regenerated. Therefore, developers should b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e292846ad81
unity_docs
audio
Explain 'Audio Low Pass Simple Effect' in Unity.
The Audio Low Pass Simple Effect passes low frequencies of an AudioMixer group while removing frequencies higher than the Cutoff Frequency . ## Properties Property: Function: Cutoff freq Lowpass cutoff frequency in Hertz (range 10.0 to 22000.0, default = 5000.0). ## Details The Resonance (short for Lowpass Resonanc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09d17c1fdb77
unity_docs
physics
What is `RaycastHit.transform` in Unity? Explain its purpose and usage.
RaycastHit.transform public Transform transform ; Description The Transform of the rigidbody or collider that was hit. Additional resources: Physics.Raycast , Physics.Linecast , Physics.RaycastAll .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_09b1547621f9
unity_docs
editor
Explain 'Build an iOS application' in Unity.
The process of building an iOS application with Unity has two main steps: Unity generates an Xcode project. Xcode builds the generated project into the application. For further information on how Unity builds iOS applications, refer to How Unity builds iOS applications . Note : To build an iOS application locally, your...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aad3fa693f4e
unity_docs
scripting
In Unity's 'Creating, loading, and saving scenes', what is 'Creating a new scene' and how does it work?
There are several ways to create a new scene: Use the New Scene dialog to create a new scene from a specific scene template. Use the menu or the Project window to create new scenes from your Project’s Basic scene template without opening the New Scene dialog. Create a scene from a specific template directly from a C# s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6910d9d9a9ea_doc_31
github
scripting
What does `OnTransformChildrenChangedAsObservable` do in this Unity script? Explain its purpose and signature.
This function is called when the list of children of the transform of the GameObject has changed. Signature: ```csharp public static IObservable<Unit> OnTransformChildrenChangedAsObservable(this Component component) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_799eae577a1f
unity_docs
scripting
What is `CreateGameObjectHierarchyEventArgs.ctor` in Unity? Explain its purpose and usage.
CreateGameObjectHierarchyEventArgs Constructor Declaration public CreateGameObjectHierarchyEventArgs (int instanceId , SceneManagement.Scene scene ); Parameters Parameter Description instanceId The instance ID of the GameObject that has been created. scene The scene containing the GameObject that ha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135fdb2d61f3
unity_docs
scripting
What is `UIElements.LineCap` in Unity? Explain its purpose and usage.
LineCap enumeration Description Cap types for the beginning and end of paths (see Painter2D.lineCap ). Properties Property Description Butt Terminates the path with no tip. Round Terminates the path with a round tip.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d95173edd90
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddBuildConfig`.
project. The number and names of the build configurations is a project-wide setting. Each target has the same number of build configurations and the names of these build configurations is the same. The created configurations are initially empty. Care must be taken to fill them with reasonable defaults. The function th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83a1031b26f4
unity_docs
scripting
Show me a Unity C# example demonstrating `Event.keyCode`.
Event.keyCode public KeyCode keyCode ; Description The raw key code for keyboard events. Used in EventType.KeyDown and EventType.KeyUp events; this returns KeyCode value that matches the physical keyboard key. Use this for handling cursor keys, function keys etc. Additional resources: Event.character ....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe29416cbe80
unity_docs
animation
Show me a Unity C# example demonstrating `AnimatorOverrideController.ApplyOverrides`.
ionClip>> overrides ); Parameters Parameter Description overrides Overrides list to apply. Description Applies the list of overrides on this Animator Override Controller. This function should be used as soon as you need to override more than two Animation Clips in the same frame. The function will notify the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3f6706f1510
unity_docs
editor
What are the parameters of `AssetDatabase.GetImporterOverride` in Unity?
Returns Type Importer type. Description Returns the type of the override importer. Returns null if there isn't one. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.AssetImporters; using UnityEngine.Assertions;public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Example Imp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46fd094f3197
unity_docs
scripting
What is `Rendering.RasterState.ctor` in Unity? Explain its purpose and usage.
RasterState Constructor Declaration public RasterState ( Rendering.CullMode cullingMode , int offsetUnits , float offsetFactor , bool depthClip ); Parameters Parameter Description cullingMode Controls which sides of polygons should be culled (not drawn). offsetUnits Scales the minimum resolvable depth ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_08e2d0b32cb8
unity_docs
rendering
Explain 'Cache Management for Virtual Texturing' in Unity.
Virtual Texturing uses fixed-size texture caches in GPU memory. There is one cache per graphics format. You can configure the default size of a cache and overwrite its default size. The Streaming Virtual Texturing (SVT) system also uses one CPU cache in main memory to store tile pages. A tile page contains multiple til...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31ea0b35db73
unity_docs
ui
What is `Connect.IProjectEditorDrawer` in Unity? Explain its purpose and usage.
IProjectEditorDrawer interface in UnityEditor.Connect Description Common interface for any UI containers that change the state of the project with regards to services. Public Methods Method Description GetVisualElement Retrieves the VisualElement that draws the project state-changing UI. Events Event Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_067e1bd7d3ae
unity_docs
editor
Show me a Unity C# example demonstrating `EditorUtility.CreateGameObjectWithHideFlags`.
deFlags Declaration public static GameObject CreateGameObjectWithHideFlags (string name , HideFlags flags , params Type[] components ); Description Creates a game object with HideFlags and specified components. This is very similar to creating a GameObject the usual way, except it sets the specified ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56630ff0b810
unity_docs
math
What are the parameters of `Mathf.PerlinNoise1D` in Unity?
Returns float A value in the range of 0.0 and 1.0. The value might be slightly higher or lower than this range. Description Generates a 1D pseudo-random pattern of float values across a 2D plane. Although the noise plane is two-dimensional, you can use a single one-dimensional line through the pattern to good effect, f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8ada38ffef0
unity_docs
editor
What is `Rendering.RecreatePipelineOnChangeAttribute` in Unity? Explain its purpose and usage.
RecreatePipelineOnChangeAttribute class in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description This attribute is used on field of a IRenderPipelineGraphicsSettings to ensure pipeline would be recreated if the value is changed. If the settings change through the default inspector or thro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_070089dd05ed
unity_docs
input
What is `UIElements.PointerMoveEvent` in Unity? Explain its purpose and usage.
PointerMoveEvent class in UnityEngine.UIElements / Inherits from: UIElements.PointerEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description This event is sent when a pointer changes state. The state of a pointer changes when one or more of its properties change, such as the mouse button pre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82fc6d17c117
unity_docs
networking
What is `Android.AndroidConfiguration.colorModeHdr` in Unity? Explain its purpose and usage.
AndroidConfiguration.colorModeHdr public Android.AndroidColorModeHdr colorModeHdr ; Description Mirrors the Android property colorMode based on the COLOR_MODE_HDR_MASK value. For information about this property, refer to the Android developer documentation on colorMode and COLOR_MODE_HDR_MASK .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d2cfcd73a05
unity_docs
physics
What is `Physics2D.Linecast` in Unity? Explain its purpose and usage.
Physics2D.Linecast Declaration public static RaycastHit2D Linecast ( Vector2 start , Vector2 end , int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Parameter Description start The start point of the line in world space. end The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b71abb2441de
unity_docs
editor
What is `FileUtil.CopyFileOrDirectoryFollowSymlinks` in Unity? Explain its purpose and usage.
FileUtil.CopyFileOrDirectoryFollowSymlinks Declaration public static void CopyFileOrDirectoryFollowSymlinks (string source , string dest ); Description Copies the file or directory. Copies from the path suppplied as the source parameter to the path supplied as the dest parameter. In presence of symbolic l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6292e624ea2e
unity_docs
audio
Explain 'Video file compatibility with the Unity Editor' in Unity.
You can import many video file formats into Unity. Unity stores imported video files as VideoClip assets. For Unity to preview video files, the files must be compatible with the platform where you run the Unity Editor. Your files must also be compatible with the target build platforms. Unity provides options for transc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e8b49f683c44
unity_docs
math
Explain 'Place Light Probes with a script' in Unity.
Placing Light Probes over large levels by hand can be time consuming. You can automate the placing of light probes by writing your own editor scripts . Your script can create a new GameObject with a LightProbeGroup component, and you can add probe positions individually according to any rules that you choose to program...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77b11225ac37
unity_docs
math
What is `Tilemaps.TileBase.GetTileData` in Unity? Explain its purpose and usage.
TileBase.GetTileData Declaration public void GetTileData ( Vector3Int position , Tilemaps.ITilemap tilemap , ref Tilemaps.TileData tileData ); Parameters Parameter Description position Position of the Tile on the Tilemap . tilemap The Tilemap the tile is present on. tileData Data to render the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b7a11e32a5f
unity_docs
physics
What is `Texture.SetGlobalAnisotropicFilteringLimits` in Unity? Explain its purpose and usage.
Texture.SetGlobalAnisotropicFilteringLimits Declaration public static void SetGlobalAnisotropicFilteringLimits (int forcedMin , int globalMax ); Description Sets Anisotropic limits. ForcedMin value controls the minimal anisotropy level set when Anisotropy is forced. globalMax value controls the max possible a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b9271002b2c
unity_docs
scripting
What is `Terrain.drawHeightmap` in Unity? Explain its purpose and usage.
Terrain.drawHeightmap public bool drawHeightmap ; Description Indicates whether Unity draws the Terrain geometry itself. If false , Unity doesn't draw the Terrain geometry, and only draws other Terrain details such as grass and trees.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0765f4fee643
unity_docs
rendering
What is `Rendering.RenderQueue.Background` in Unity? Explain its purpose and usage.
RenderQueue.Background Description This render queue is rendered before any others. You would typically use this for things that really need to be in the background. Additional resources: Material.renderQueue , Shader.renderQueue , subshader tags .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1304521fd08
unity_docs
rendering
What is `ParticleSystem.LightsModule` in Unity? Explain its purpose and usage.
LightsModule struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Access the ParticleSystem Lights Module. This module allows you to attach real-time Lights to a percentage of your particles. The Lights Module is a simple and powerful module that allows particles to cast light o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0b3093b3f7e
unity_docs
rendering
Show me a Unity C# example demonstrating `CubemapArray.GetPixels32`.
mipmap level. Each pixel is a Color32 struct. GetPixels32 might be slower than some other texture methods because it converts the format the texture uses into Color32 . To get pixel data more quickly, use GetPixelData instead. If GetPixels32 fails, Unity throws an exception. GetPixels32 might fail if the arr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3eb24783e3b6
unity_docs
physics
What is `WheelCollider.motorTorque` in Unity? Explain its purpose and usage.
WheelCollider.motorTorque public float motorTorque ; Description Motor torque on the wheel axle expressed in Newton metres. Positive or negative depending on direction. To simulate brakes, do not use negative motor torque - use brakeTorque instead.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f7e16b178a3
unity_docs
rendering
What is `Rendering.BatchCullingFlags` in Unity? Explain its purpose and usage.
BatchCullingFlags enumeration Description Additional parameters for the current culling context Properties Property Description None No additional parameters. CullLightmappedShadowCasters This culling invocation should cull static objects whose shadows have been baked in lightmaps.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3c02fb9e3c87
github
scripting
Write a Unity C# UI script for Fade
```csharp using UnityEngine; using UnityEngine.UI; namespace VrBlocks { public class Fade : MonoBehaviour { public Image fadeImage; public enum FadeStatus { None, Fading, Faded, Unfading } public float TimeElapsed { get; private set; } = 0.0f; public float TotalTime { get; pri...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_9055363c7f75_doc_4
github
scripting
What does `AfterWait` do in this Unity script? Explain its purpose and signature.
Starts a coroutine that waits for a specified number of secondsand then calls the specified action.The action to call after the wait.The number of seconds to wait.If true, the wait time is real-time, otherwise it is game-time.The coroutine that was started. Signature: ```csharp public static UnityEngine.Coroutine Afte...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_6cc6b43bd257
unity_docs
physics
Give me an overview of the `CursorMode` class in Unity.
CursorMode enumeration Description Determines whether the mouse cursor is rendered using software rendering or, on supported platforms, hardware rendering. See Cursor for supported platforms. Properties Property Description Auto Use hardware cursors on supported platforms. ForceSoftware Force the use of sof...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d0a37d01347
unity_docs
rendering
What is `Rendering.BatchDrawCommandProceduralIndirect.batchID` in Unity? Explain its purpose and usage.
BatchDrawCommandProceduralIndirect.batchID public Rendering.BatchID batchID ; Description The batch ID that this draw command uses. Determines the metadata values that are available to a shader. This determines the metadata values that are available to a shader and which Graphics buffer to bind as the unity_...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4cfac04f7fad
unity_docs
editor
What is `Handles.DrawTexture3DSlice` in Unity? Explain its purpose and usage.
Handles.DrawTexture3DSlice Declaration public static void DrawTexture3DSlice ( Texture texture , Vector3 slicePositions , FilterMode filterMode = FilterMode.Bilinear, bool useColorRamp = false, Gradient customColorRamp = null); Parameters Parameter Description texture The volumetric texture to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_daefd8039de0
unity_docs
animation
What is `Animations.PositionConstraint.locked` in Unity? Explain its purpose and usage.
PositionConstraint.locked public bool locked ; Description Locks the offset and position at rest. In Edit mode, unlocks the constraint to update its offsets. In Play mode, the constraint is always locked.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b41d76bb10da
unity_docs
math
What is `Mathf.CeilToInt` in Unity? Explain its purpose and usage.
Mathf.CeilToInt Declaration public static int CeilToInt (float f ); Description Returns the smallest integer greater to or equal to f . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Start() { // Prints 10 Debug.Log(Mathf.CeilToInt(10.0f)); // Prin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_33c2c636bc78
github
scripting
Write a Unity C# XR/VR script for AR Occlusion Support
```csharp using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems; [RequireComponent(typeof(AROcclusionManager))] public class AROcclusionSupport : MonoBehaviour { private AROcclusionManager arOcclusionManager; private const string UNSUPPORTED_...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f0d06d3c9740
unity_docs
physics
What is `UIElements.VisualElement.generateVisualContent` in Unity? Explain its purpose and usage.
VisualElement.generateVisualContent public Action<MeshGenerationContext> generateVisualContent ; Description Delegate function to generate the visual content of a visual element. Use this delegate to generate custom geometry in the content region of the VisualElement . This delegate is called during the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15ac2615f63f
unity_docs
scripting
What is `AndroidJavaObject.Get` in Unity? Explain its purpose and usage.
AndroidJavaObject.Get Declaration public FieldType Get (string fieldName ); Parameters Parameter Description fieldName The name of the field (e.g. int counter; would have fieldName = "counter"). Description Get the value of a field in an object (non-static). The generic parameter determines the field ty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e86ebf2b0978_doc_11
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Destroys all objects in the MonoBehaviour-based pool.The type of MonoBehaviour objects to destroy. Signature: ```csharp public void DestroyAllMono<T>() where T : MonoBehaviour, IPoolable => GetPool<MonoPool<T>, T>(_monoPools).DestroyAll(); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_25561112c1ee
unity_docs
xr
Show me a Unity C# example demonstrating `XR.InputDevices.GetDevicesWithCharacteristics`.
ied InputDeviceCharacteristics bitmask exactly and inserts them into the inputDevices list. The function does not include devices that only provide some of the desired characteristics or capabilities. The inputDevices list is cleared before any new elements are added. The characteristics are a bitmask, and so you c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af666a053d8f
unity_docs
scripting
What is `Input.acceleration` in Unity? Explain its purpose and usage.
Input.acceleration public static Vector3 acceleration ; Description Last measured linear acceleration of a device in three-dimensional space. (Read Only) Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ff892a708c7
unity_docs
ui
What is `UIElements.BackgroundRepeat` in Unity? Explain its purpose and usage.
BackgroundRepeat struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Script interface for VisualElement background-repeat style property IStyle.backgroundRepeat . Properties Property Description x Background repeat in the x direction. y Background repeat i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80439b5d3634
unity_docs
rendering
In Unity's 'New in Unity 6.0 Preview', what is 'Editor and Workflow' and how does it work?
Added a piercing menu that you can use to select GameObjects that overlap with other GameObjects. To open the piercing menu,  hold down Ctrl+Right-click in the Scene view. The piercing menu displays a list of all selectable GameObjects under the cursor. Added Additional App IDs to Steam ID Provider Editor Settings for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0a212619fc54_doc_7
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Destroys the specified non-MonoBehaviour object and removes it from the pool.The type of the non-MonoBehaviour object to destroy.The object to destroy. Signature: ```csharp public static void DestroyPure<T>(T obj) where T : class, IPoolable => _poolService.DestroyPure(obj); ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_de0cdb5c42b0
unity_docs
rendering
Explain 'Import a normal map' in Unity.
A normal map can be imported by placing the texture file in your assets folder, as usual. However, you need to tell Unity that this texture is a normal map. You can do this by changing the “Texture Type” setting to “Normal Map” in the import inspector settings. To import a black and white heightmap as a normal map, the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4871f507d091
unity_docs
rendering
Show me a Unity code example for 'Configure multiple cameras'.
ts view to cover the whole screen and so only one camera view can be seen at a time (the visible camera is the one that has the highest value for its depth property). By disabling one camera and enabling another from a script, you can “cut” from one camera to another to give different views of a scene. You might do thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88a396e9d31f
unity_docs
rendering
What is `SparseTexture.UnloadTile` in Unity? Explain its purpose and usage.
SparseTexture.UnloadTile Declaration public void UnloadTile (int tileX , int tileY , int miplevel ); Parameters Parameter Description tileX Tile X coordinate. tileY Tile Y coordinate. miplevel Mipmap level of the texture. Description Unload sparse texture tile. This function removes a tile at (tileX...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_756e34f56204
unity_docs
scripting
Explain 'Look At Constraint component' in Unity.
A Look At Constraint rotates a GameObject to face its source GameObjects. You typically apply the Look At Constraint on a Camera to follow around one or more GameObjects. In addition, if you import a Target Camera , Unity creates a camera with a Look At Constraint using the target object as the source. Look At is a sim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_24ef48c9d45f
unity_docs
audio
Explain 'Overview of Usage and API' in Unity.
The Audio Mixer is a self-contained asset with a streamlined API . You can find music-related demos in the audio demos repository. The native audio plugin repository provides the official SDK for developing custom extensions, as well as examples involving complex routing, custom processing and custom generation of audi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0472b55e5c19
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Device.deferSystemGesturesMode`.
Mode to control which screen edge gestures the system waits for before responding to the second swipe. The first swipe is ignored to help prevent unintentional actions in the app. The iOS Human Interface Guidelines do not recommend turning on this setting, as it could confuse users. Note : The initial value of this se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b4f8cdd78d7
unity_docs
scripting
What is `Terrain.collectDetailPatches` in Unity? Explain its purpose and usage.
Terrain.collectDetailPatches public bool collectDetailPatches ; Description Collect detail patches from memory. By default the property value is true, meaning the detail patches in the Terrain will be removed from memory when not visible. If the property is set to false, the patches are kept in memory until the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf1ef11b6618
unity_docs
scripting
What is `GUISettings.doubleClickSelectsWord` in Unity? Explain its purpose and usage.
GUISettings.doubleClickSelectsWord public bool doubleClickSelectsWord ; Description Should double-clicking select words in text fields. By default is set to true. ```csharp using UnityEngine;public class Example : MonoBehaviour { string str = "This is a string with \n two lines of text"; void OnGUI() { GUI....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7ffba6f6415
unity_docs
scripting
What is `WSA.SecondaryTileData.showNameOnSquare150x150Logo` in Unity? Explain its purpose and usage.
SecondaryTileData.showNameOnSquare150x150Logo public bool showNameOnSquare150x150Logo ; Description Defines whether the displayName should be shown on a medium secondary tile. Defaults to true.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_888d7551ba0b
unity_docs
scripting
What is `Search.QueryEngine_1.SetGlobalStringComparisonOptions` in Unity? Explain its purpose and usage.
QueryEngine<T0>.SetGlobalStringComparisonOptions Declaration public void SetGlobalStringComparisonOptions (stringComparison stringComparison ); Parameters Parameter Description stringComparison String comparison options. Description Sets global string comparison options. Used for word matching and filter h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9aa6327481ad
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddFileToBuild`.
getGuid . fileGuid The file GUID returned by AddFile or AddFolderReference . Description Configure a file to build for the given native target. In projects containing multiple native targets, you can configure a single file or folder reference to build in all, some, or none of the targets. The file or folder re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87514d4b18df
unity_docs
editor
What is `FileUtil.ReplaceDirectory` in Unity? Explain its purpose and usage.
FileUtil.ReplaceDirectory Declaration public static void ReplaceDirectory (string src , string dst ); Description Replaces a directory. Replaces the directory located at dst with the directory located at src . if dst doesnt exists it copies the file. If dst exists then it deletes it and copies the dire...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_806069c365cf
github
scripting
Write a Unity C# MonoBehaviour script called Global Test8
```csharp using System.Collections; using UnityEngine; public class GlobalTest8 : MonoBehaviourExtended, ITest { [GlobalComponent(Optional = true)] private Monster4 monster; private void Start() { if (!Test()) { Debug.LogError("Test failed: " + this); } } ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_66a07cc42764
unity_docs
xr
What is `Progress.RegisterPauseCallback` in Unity? Explain its purpose and usage.
Progress.RegisterPauseCallback Declaration public static void RegisterPauseCallback (int id , Func<bool,bool> callback ); Parameters Parameter Description id The progress indicator's unique ID. callback This function is called when a request to pause or resume the progress indicator's task is made. It tak...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a84538bab229
unity_docs
rendering
In Unity's 'macOS Player settings reference', what is 'Resolution' and how does it work?
This section allows you to customize the screen mode and default size. Property Description Run In Background Enable this option to allow the application to run in the background when it loses focus. When disabled, the application pauses when it loses focus. Fullscreen Mode Choose the full-screen mode. This defines the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.