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_fbc714686316
unity_docs
ui
What is `UIElements.CollectionViewController.DestroyItem` in Unity? Explain its purpose and usage.
CollectionViewController.DestroyItem Declaration protected void DestroyItem ( UIElements.VisualElement element ); Parameters Parameter Description element The element being destroyed. Description Destroys a VisualElement when the view is rebuilt or cleared.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d126d98e7ed
unity_docs
scripting
What is `Event.character` in Unity? Explain its purpose and usage.
Event.character public char character ; Description The character typed. Used in EventType.KeyDown event. Note that EventType.KeyUp events might not contain a character, only Event.keyCode . Additional resources: Event.keyCode . ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnG...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2328ca9cb683
unity_docs
editor
Explain 'Nest prefab instances in other prefabs' in Unity.
You can include prefab instances inside other prefabs. Prefab instances included in other prefabs are called nested prefabs. Nested prefabs keep their links to their own prefab assets, while also forming part of another prefab asset. You can add nested prefabs in prefab editing mode , or from the Hierarchy view. ## Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e257eabcae4
unity_docs
physics
What is `PhysicsShapeGroup2D.AddCapsule` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D.AddCapsule Declaration public int AddCapsule ( Vector2 vertex0 , Vector2 vertex1 , float radius ); Parameters Parameter Description vertex0 The position of one end of a capsule shape. This point represents the center point of a logical circle at the end of a capsule. vertex1 The po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d01d714d3e57
unity_docs
editor
In Unity's 'Tracking garbage collection allocations', what is 'Tracking allocations with the CPU Usage module' and how does it work?
To track garbage collection allocations with the CPU Usage Profiler module , perform the following steps: Open the Profiler window ( Window > Analysis > Profiler ). Collect some performance data . Select a frame in the CPU Usage Profiler module. In the module details pane, open the Hierarchy view , and inspect the GC.A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be4843f14d03
unity_docs
editor
What is `Experimental.GraphView.SearchTreeGroupEntry` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SearchTreeGroupEntry class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.SearchTreeEntry Description This class describes group entries in the search tree. The search tree is displayed in the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_58cfeb01be6e
unity_docs
rendering
Explain 'Status bar' in Unity.
The status bar provides notifications about various Unity processes, and quick access to related tools and settings. You cannot move or rearrange the status bar. The status bar displays the following: The most recent message logged to the Console window . Click the message to open the Console window. A global progress ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c898a95ce16
unity_docs
performance
What is `Unity.Profiling.Memory.CaptureFlags.NativeAllocations` in Unity? Explain its purpose and usage.
CaptureFlags.NativeAllocations Description Specifies that the Native Memory used by any Native Allocation made by Unity should be captured. This information allows the Memory Profiler to show not just the native size of Unity Objects, but also their graphics sizes. Additionally, this also includes information on na...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_19e880bbb4d8
github
scripting
Write a Unity Editor script for Validation Element
```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements; namespace AssetStoreTools.Uploader.UIElements { internal abstract class ValidationElement : VisualElement { protected Button ValidateButton; protected VisualElement InfoBox; protected Label InfoBoxLa...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_27b043da99d1
unity_docs
physics
What is `Physics2D.CircleCastAll` in Unity? Explain its purpose and usage.
Physics2D.CircleCastAll Declaration public static RaycastHit2D[] CircleCastAll ( Vector2 origin , float radius , Vector2 direction , float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Parameter Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23bfa1e453c3
unity_docs
rendering
What is `LightTransport.ReferenceContext.CreateEvent` in Unity? Explain its purpose and usage.
ReferenceContext.CreateEvent Declaration public LightTransport.EventID CreateEvent (); Returns EventID ID of newly created event. Description Creates a new event. The event may be passed to IDeviceContext.ReadBuffer and IDeviceContext.WriteBuffer to track when the corresponding read or write finishe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e32c0f91a801
unity_docs
physics
What is `AnchoredJoint2D.connectedAnchor` in Unity? Explain its purpose and usage.
AnchoredJoint2D.connectedAnchor public Vector2 connectedAnchor ; Description The joint's anchor point on the second object (ie, the one which doesn't have the joint component). Additional resources: anchor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d9a70fa259f
unity_docs
rendering
What is `Camera.RenderWithShader` in Unity? Explain its purpose and usage.
Camera.RenderWithShader Declaration public void RenderWithShader ( Shader shader , string replacementTag ); Description Render the camera with shader replacement. See Rendering with Replaced Shaders page for details. This will render the camera. It will use the camera's clear flags, target texture and all...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af64913ec69c
unity_docs
editor
What is `EditorTools.ToolManager.activeContextChanging` in Unity? Explain its purpose and usage.
ToolManager.activeContextChanging Parameters Parameter Description value An event issued before the active EditorToolContext changes. Description Defines an event handler for when the active EditorToolContext will change.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_433cfdf6c422
unity_docs
editor
What is `AssetDatabase.IsValidFolder` in Unity? Explain its purpose and usage.
AssetDatabase.IsValidFolder Declaration public static bool IsValidFolder (string path ); Parameters Parameter Description path Project relative path to the folder. Returns bool Returns true if the folder exists. Description Given a path to a folder, returns true if it exists, false otherwise. The gi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7a3114be6aa
unity_docs
audio
Show me a Unity C# example demonstrating `AudioEchoFilter.delay`.
AudioEchoFilter.delay public float delay ; Description Echo delay in ms. 10 to 5000. Default = 500. ```csharp using UnityEngine;[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioEchoFilter))] public class Example : MonoBehaviour { // Set the delay on the chorus filter to the max working va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5119ea10937d
unity_docs
editor
Show me a Unity C# example demonstrating `Android.AndroidProjectFiles.GetData`.
iven key does not exist, Unity throws an error. Declaration public T GetData (string key ); Parameters Parameter Description key Data key. value Serializable object. Description Gets data that was set in the Setup method. This method is used to get data from the Unity Editor by setting it in the Setup ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_441957b9bd0c
github
scripting
Write a Unity C# script called Lynx Scrollbar
```csharp using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; namespace Lynx.UI { public class LynxScrollbar : Scrollbar { [SerializeField] public bool m_disableSelectState = true; [SerializeField] protected bool useTheme = false; protected override void Awake() ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_9aa539b8cb12
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.MakeBezierPoints`.
.MakeBezierPoints Declaration public static Vector3[] MakeBezierPoints ( Vector3 startPosition , Vector3 endPosition , Vector3 startTangent , Vector3 endTangent , int division ); Description Retuns an array of points to representing the bezier curve. The division argument provides the number of li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f495fad3f92
unity_docs
editor
Show me a Unity C# example demonstrating `SceneManagement.EditorSceneManager.SaveScene`.
saved before, in which case a save dialog is shown. The function returns false if the save failed. This can happen if the specified path is invalid or if the user cancels in the case of a save dialog. Additional resources: EditorSceneManager.GetActiveScene Example: Simple Editor Window that saves each 300 seconds the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_663fa3745d11
unity_docs
rendering
Explain 'Preview a 3D texture' in Unity.
To preview a 3D texture, do one of the following: Use the Inspector window. Draw the 3D texture in the Scene view. ## Use the Inspector window To preview a 3D texture, select the texture in the Project window. In the Inspector window, Unity displays the preview of the texture at the bottom of the Texture Import Setti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_341afdf24e80
unity_docs
scripting
What is `Playables.PlayableExtensions.SetDone` in Unity? Explain its purpose and usage.
PlayableExtensions.SetDone Declaration public static void SetDone (U playable , bool value ); Parameters Parameter Description playable The Playable used by this operation. value True if the operation is completed, false otherwise. Description Changes a flag indicating that a playable has completed it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_50e30da120fd
unity_docs
networking
Explain 'Collecting performance data on an Android device' in Unity.
Use the Profiler to collect performance data about your application. You can collect performance data while in Play mode in the Unity Editor. However, to get the most accurate data about your application, you can connect the Profiler directly to an Android device that’s on your network. ## Enabling remote profiling T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ba72b76830a
unity_docs
math
What are the parameters of `EditorJsonUtility.FromJsonOverwrite` in Unity?
Description Overwrite data in an object by reading from its JSON representation. This is similar to JsonUtility.FromJsonOverwrite , but it supports any engine object. Note that using this method with a struct may not do what you expect because structs are passed to the method by value and not by reference. This means t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_000b00100c51
unity_docs
animation
What is `PlayerSettings.SplashScreen` in Unity? Explain its purpose and usage.
SplashScreen class in UnityEditor Description Interface to splash screen player settings. Static Properties Property Description animationBackgroundZoom The target zoom (from 0 to 1) for the background when it reaches the end of the SplashScreen animation's total duration. Only used when animationMode is Anim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ced45170d7c
unity_docs
networking
What is `Networking.DownloadHandlerAssetBundle.assetBundle` in Unity? Explain its purpose and usage.
DownloadHandlerAssetBundle.assetBundle public AssetBundle assetBundle ; Description Returns the downloaded AssetBundle , or null . (Read Only) This property returns the asset bundle which has been downloaded (or is downloading, in the case of streamed asset bundles). If there is an error decoding the asset ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac4475661729_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can be initialized using an argument of type .-derived classes that implement this interface can be instantiated with an argument using the function.-derived classes that implement this interface can be added to a with an argument using the GameObject.AddComponent function.These functions can...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_cce94e919f8e
unity_docs
rendering
What is `Graphics.WaitOnAsyncGraphicsFence` in Unity? Explain its purpose and usage.
Graphics.WaitOnAsyncGraphicsFence Declaration public static void WaitOnAsyncGraphicsFence ( Rendering.GraphicsFence fence ); Declaration public static void WaitOnAsyncGraphicsFence ( Rendering.GraphicsFence fence , Rendering.SynchronisationStage stage = SynchronisationStage.PixelProcessing); Parameter...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7ae30df80cb5
unity_docs
ui
In Unity's 'Searching in the Unity Editor introduction', what is 'Asset labels' and how does it work?
A label is a short piece of text that you can use to group particular assets. To view the menu of existing labels, navigate to the Project window header and select the Search by Label button (the label icon). Select a label from the menu to search the project for any assets that have that label assigned to them. To add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_caec49bc56d7
unity_docs
scripting
Show me a Unity code example for 'Thread-safe linear allocator example'.
cator. A few overflow allocations are fine: 1 to 10 in a frame, or a few hundred, especially during load. If the overflow count grows with every frame, you can increase the block size to avoid fallback allocations. However, if you increase the block size too much (for example, to match peak use in events such as scene ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd495c32cd4c
unity_docs
scripting
What is `IExposedPropertyTable` in Unity? Explain its purpose and usage.
IExposedPropertyTable interface in UnityEngine Description Interface for objects used as resolvers on ExposedReferences. Public Methods Method Description ClearReferenceValue Remove a value for the given reference. GetReferenceValue Retrieves a value for the given identifier. SetReferenceValue Assigns a valu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_497d76309c34
unity_docs
rendering
What is `Camera.GetAllCameras` in Unity? Explain its purpose and usage.
Camera.GetAllCameras Declaration public static int GetAllCameras (Camera[] cameras ); Parameters Parameter Description cameras An array to be filled up with cameras currently in the Scene. Description Fills an array of Camera with the current cameras in the Scene, without allocating a new array. The pass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7e0e508b76f
unity_docs
scripting
What is `StandaloneBuildSubtarget.Server` in Unity? Explain its purpose and usage.
StandaloneBuildSubtarget.Server Description Uses a player build optimized to run as a headless server. When StandaloneBuildSubtarget.Server is selected, Unity compiles the standalone player for each target platform as follows: MacOS Player: Compiled as a standard console application. Windows Player: Compiled wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0e953564e10c
unity_docs
scripting
In Unity's 'Create a custom Inspector', what is 'Create a new MonoBehaviour' and how does it work?
To create a custom Inspector, first define a custom class that inherits from a MonoBehaviour . The custom class represents a simple car with several properties. Create a project in Unity with any template. In your Project window , create a folder named create-a-custom-inspector to store all your files. Create a C# scri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9265527097cf
unity_docs
scripting
Show me a Unity C# example demonstrating `Animation.PlayQueued`.
queue is QueueMode.CompleteOthers this animation will only start once all other animations have stopped playing. If queue is QueueMode.PlayNow this animation will start playing immediately on a duplicated animation state. After the animation has finished playing it will automatically clean itself up. Using the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f6b15551121e
unity_docs
editor
Explain 'Delete an asset package from the cache' in Unity.
When you download an asset package (.unitypackage file), the Unity Package Manager stores it in a cache for asset packages. Each time you import a downloaded package or a custom package, the Unity Package Manager stores it in the Assets directory in your project. You might want to delete a package from the asset packag...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ea5fe63faa9
unity_docs
editor
In Unity's 'Create a custom Editor window with C# script', what is 'Create the Editor window script' and how does it work?
To add UI controls to the UI, add visual elements to the visual tree. UI Toolkit uses the VisualElement.Add() method to add children to an existing visual element, and accesses the visual tree of an Editor window via the rootvisualElement property. Place scripts for custom editor windows in an Editor folder because Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a07e265e1a41
unity_docs
scripting
Show me a Unity C# example demonstrating `Event.capsLock`.
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_a287dd36c5a6
unity_docs
animation
Show me a Unity C# example demonstrating `Tilemaps.TileBase.GetTileAnimationData`.
Description position Position of the Tile on the Tilemap . tilemap The Tilemap the tile is present on. tileAnimationData Data to run an animation on the tile. Returns bool Whether the call was successful. Description Retrieves any tile animation data from the scripted tile. Implement this and fill in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77b7b88a8490
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.StopMultiEye` in Unity? Explain its purpose and usage.
ScriptableRenderContext.StopMultiEye Declaration public void StopMultiEye ( Camera camera ); Parameters Parameter Description camera Camera to disable stereo rendering on. Description Schedules a stop of stereo rendering on the ScriptableRenderContext. For more information on usage, see StartMultiEye Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7993420f1e26
unity_docs
editor
In Unity's 'Play mode and Editor profile samples', what is 'Play mode samples' and how does it work?
When you profile Play mode, the Profiler only collects timing samples that happened inside the PlayerLoop . This group helps to reduce the amount of misleading measurements in the CPU and GPU Profiler modules . Unity categorizes any EditorLoop samples as Others in the CPU Profiler module charts , meaning that EditorLoo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55a8b68ead50
unity_docs
rendering
Show me a Unity C# example demonstrating `TrailRenderer.colorGradient`.
TrailRenderer.colorGradient public Gradient colorGradient ; Description Set the color gradient describing the color of the trail at various points along its length. Additional resources: Gradient . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(TrailRenderer))] public class ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_967a6307b5d9_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Gets the overriding Tiling Rule of a given Tiling Rule.The original Tiling Rule that is overridden Signature: ```csharp public RuleTile.TilingRule this[RuleTile.TilingRule originalRule] ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_933ccd2cf7f8
unity_docs
scripting
What is `Vector4.operator_subtract` in Unity? Explain its purpose and usage.
Vector4.operator - public static Vector4 operator - ( Vector4 a , Vector4 b ); Description Subtracts one vector from another. Subtracts each component of b from a . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // prints (-5.0,-3.0,-1.0,1.0) print(new Vector4(1...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93db940b4644
unity_docs
animation
What are the parameters of `Animations.AnimationScriptPlayable.Create` in Unity?
Returns AnimationScriptPlayable A new AnimationScriptPlayable linked to the PlayableGraph . Description Creates an AnimationScriptPlayable in the PlayableGraph . This playable contains a job implementing an IAnimationJob . This interface defines two methods that will be called while processing the PlayableGraph . Here ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22ca3acf13d3
unity_docs
scripting
What is `Unity.Android.Gradle.CompileOptions` in Unity? Explain its purpose and usage.
CompileOptions class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description The C# definition of the compileOptions element in a gradle file. For more information about the element, see Android's documentation: CompileOptions Properties Property Description SourceCompatibilit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed31483c622b
unity_docs
editor
What is `iOS.Xcode.PBXProject.RemoveFileFromBuild` in Unity? Explain its purpose and usage.
PBXProject.RemoveFileFromBuild Declaration public void RemoveFileFromBuild (string targetGuid , string fileGuid ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . fileGuid The GUID of the file or folder reference. Description Removes th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_70e44e507820
unity_docs
scripting
What are the parameters of `UIElements.DropdownField.ctor` in Unity?
Description Construct a DropdownField with a Label in front. Declaration public DropdownField (List<string> choices , string defaultValue , Func<string,string> formatSelectedValueCallback , Func<string,string> formatListItemCallback ); Parameters Parameter Description choices The list of choices to display in the dropd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cbe14725d183
unity_docs
physics
Explain 'Character control' in Unity.
In a first-person or third-person application, a user’s character or avatar usually needs some collision-based physics, so that it doesn’t fall through the floor or walk through walls. In 3D physics, you can create and configure character physics and control with a Character Controller. You can configure character cont...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c946ec7570c
unity_docs
rendering
What is `ParticleSystem.hasNonUniformParticleSizes` in Unity? Explain its purpose and usage.
ParticleSystem.hasNonUniformParticleSizes public bool hasNonUniformParticleSizes ; Description Determines whether the Particle System uses a single value for the width and height (and depth, when using meshes), or if the system specifies different values for each axis.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f281ea3c9789
unity_docs
scripting
In Unity's 'Using Unity as a Library in other applications', what is 'Limitations' and how does it work?
When hosted by another application, Unity doesn’t control the runtime lifecycle, so it might not work in all scenarios. Known limitations include: On Android and iOS: Only full-screen rendering is supported. However, if you are a Unity Industry customer, the limitations and features might differ. When Unity is in an un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a24c550f468c
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime.operator_multiply` in Unity? Explain its purpose and usage.
DiscreteTime.operator * public static Unity.IntegerTime.DiscreteTime operator * ( Unity.IntegerTime.DiscreteTime lhs , long rhs ); public static Unity.IntegerTime.DiscreteTime operator * ( Unity.IntegerTime.DiscreteTime lhs , double s ); public static Unity.IntegerTime.DiscreteTime operator * ( U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35adb3792dee
unity_docs
scripting
Give me an overview of the `AssetMoveResult` class in Unity.
AssetMoveResult enumeration Description Result of Asset move Properties Property Description DidNotMove Tells the internal implementation that the asset was not moved physically on disk by the script. FailedMove Tells the internal implementation that the script could not move the assets. DidMove Tells the int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebccbc218d4d
unity_docs
math
What is `AndroidJNI.GetCharArrayElement` in Unity? Explain its purpose and usage.
AndroidJNI.GetCharArrayElement Declaration public static char GetCharArrayElement (IntPtr array , int index ); Description Returns the value of one element of a primitive array. This function is a special case of GetCharArrayRegion(), called with region size set to 1. Additional resources: Java Native Interf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52ead7ffe95e
unity_docs
rendering
What is `SkinnedMeshRenderer.GetVertexBuffer` in Unity? Explain its purpose and usage.
SkinnedMeshRenderer.GetVertexBuffer Declaration public GraphicsBuffer GetVertexBuffer (); Returns GraphicsBuffer The skinned mesh vertex buffer as a GraphicsBuffer . Description Retrieves a GraphicsBuffer that provides direct access to the GPU vertex buffer for this skinned mesh, for the current fram...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ccbaedc55fcb
unity_docs
scripting
In Unity's 'Remove imported assets from a project', what is 'Before you begin' and how does it work?
Make sure you understand these important notes before you begin: Use this procedure to remove assets only if they came from an asset package and you imported them by following the Download and import an asset package procedure. Don’t use this procedure to try to remove UPM packages that you installed . Installed UPM pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cfc1457aca1
unity_docs
editor
What is `Search.SearchProvider.fetchThumbnail` in Unity? Explain its purpose and usage.
SearchProvider.fetchThumbnail public Func<SearchItem,SearchContext,Texture2D> fetchThumbnail ; Description Handler to provide an asynchronous thumbnail for an item. Is called when the item is about to be displayed. Compared to preview a thumbnail should be small and returned as fast as possible. Use fetchPreview...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18d2f0947fcd
unity_docs
animation
What are the parameters of `ModelImporterClipAnimation.ConfigureClipFromMask` in Unity?
Description Copy the mask settings from an AvatarMask to the clip configuration. When writing an AssetPostprocessor , use this method to copy an AvatarMask to your clip configuration. See also: ModelImporterClipAnimation.ConfigureMaskFromClip . ```csharp using UnityEditor; using UnityEngine;public class CopyAvatarMask ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d6f48d50f8c
unity_docs
scripting
What are the parameters of `Undo.RegisterCompleteObjectUndo` in Unity?
Description Stores a copy of the object states on the undo stack. If the undo is performed, any changes made to the object after this function is called will be undone, and the object will be restored to the recorded state. Transform parent change, AddComponent, and object destruction can not be restored with this func...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3e509a0dfb2
unity_docs
scripting
Give me an overview of the `ScriptableSingleton_1` class in Unity.
ScriptableSingleton<T0> class in UnityEditor / Inherits from: ScriptableObject Description Generic class for storing Editor state. The ScriptableSingleton generic class allows you to create 'Manager' type classes in the Unity Editor. In classes that derive from ScriptableSingleton, serializable data you add sur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_04303bb973b2
unity_docs
performance
Show me a Unity code example for 'Job dependencies'.
ete before it can run. Completing a dependent job must first complete any job it depends on, and any jobs those jobs depend on. When you call the Schedule method of a job it returns a JobHandle . You can use a JobHandle as a dependency for other jobs. If a job depends on the results of another job, you can pass the fir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f37ca35462e3
unity_docs
math
What is `Rendering.RayTracingAccelerationStructure.Settings.enableCompaction` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.Settings.enableCompaction public bool enableCompaction ; Description Set to true to enable acceleration structure compaction for static geometries. Acceleration structure compaction is an optional GPU operation that reduces the memory requirements for acceleration structures.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae27e63578f6
unity_docs
scripting
Give me an overview of the `PivotMode` class in Unity.
PivotMode enumeration Description Where is the tool handle placed. Properties Property Description Center The tool handle is at the graphical center of the selection. Pivot The tool handle is on the pivot point of the active object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ded5e8a11ccf
unity_docs
rendering
What is `TextureFormat.YUY2` in Unity? Explain its purpose and usage.
TextureFormat.YUY2 Description A format that uses the YUV color space and is often used for video encoding or playback. Currently, this texture format is only useful for native code plug-ins as it doesn't support texture importing or pixel access. YUY2 format is implemented for Direct3D 9 and Direct3D 11. Additiona...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_16d88667d3c9
unity_docs
physics
In Unity's 'Example scripts for collider events', what is 'Example: Different events for different GameObject properties' and how does it work?
You can configure your scripts to trigger different events based on the properties of the other collider ’s associated GameObject , such as its name or tag. This is useful if, for example, you want to allow some colliders to produce an event, but not others. The following example prints a different message depending on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b1d913b3dab0
unity_docs
editor
In Unity's 'Removing unused override data', what is 'Remove unused overrides' and how does it work?
To check for and remove unused overrides, perform the following steps: In the prefab instance Inspector , select Overrides . Select Unused overrides . If the prefab instance doesn’t have any unused overrides, this section is unavailable. The Unused overrides panel displays a list of the unused overrides. Select Remove ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e3c72d3f6fd
unity_docs
physics
Show me a Unity C# example demonstrating `Collider.OnTriggerExit`.
Behaviours in response to collisions. OnTriggerExit occurs on the FixedUpdate after the Colliders have stopped touching. The Colliders involved are not guaranteed to be at the point of initial separation. Deactivating or destroying a Collider while it is inside a trigger volume will not register an on exit event. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3855c58adfd
unity_docs
scripting
What is `Presets.PresetSelectorReceiver` in Unity? Explain its purpose and usage.
Method group is Obsolete PresetSelectorReceiver class in UnityEditor.Presets / Inherits from: ScriptableObject Obsolete The PresetSelectorReceiver is deprecated. Please use PresetSelector.ShowSelector(Object[], Preset, bool) instead. Description Implement this class to control the selection change when selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fba8f3b0257d
unity_docs
rendering
What is `Cubemap.Apply` in Unity? Explain its purpose and usage.
Cubemap.Apply Declaration public void Apply (bool updateMipmaps = true, bool makeNoLongerReadable = false); Parameters Parameter Description updateMipmaps When the value is true , Unity recalculates mipmap levels, using mipmap level 0 as the source. The default value is true . makeNoLongerReadable Whe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2b6fb2a5fa1
unity_docs
math
What is `TreeInstance` in Unity? Explain its purpose and usage.
TreeInstance struct in UnityEngine / Implemented in: UnityEngine.TerrainModule Description Contains information about a tree placed in the Terrain game object. This struct can be accessed from the TerrainData Object. Properties Property Description color Color of this instance. heightScale Height scale of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aad7c004c8df
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.emitterVelocity`.
ParticleSystem.MainModule.emitterVelocity public Vector3 emitterVelocity ; Description The current Particle System velocity. If you set this property to a particular value, the emitterVelocityMode automatically switches to ParticleSystemEmitterVelocityMode.Custom . ```csharp using UnityEngine;[RequireCom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0243b743554b
unity_docs
editor
What are the parameters of `Actions.EditorAction.OnSceneGUI` in Unity?
Description Callback raised when the Scene view calls OnGUI. Use this method to implement any handles or interactive code. This is equivalent in functionality to EditorTool.OnToolGUI . ```csharp using System; using UnityEditor; using UnityEditor.Actions; using UnityEditor.Overlays; using UnityEngine; using UnityEngine....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e28fddc3b43
unity_docs
physics
What is `PhysicsScene` in Unity? Explain its purpose and usage.
PhysicsScene struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Represents a single instance of a 3D physics Scene. Public Methods Method Description BoxCast Casts the box along a ray and returns detailed information on what was hit. CapsuleCast Casts a capsule against all collide...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcd83160fe6f
unity_docs
scripting
Show me a Unity C# example demonstrating `Playables.PlayableOutputExtensions.PushNotification`.
, Playables.INotification notification , object context ); Parameters Parameter Description output The output sending the notification. origin The originating playable of the notification. notification The notification to be sent. context Extra information about the state when the notification was fire...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3697f1927863
unity_docs
scripting
What is `Video.VideoTimeReference.ExternalTime` in Unity? Explain its purpose and usage.
VideoTimeReference.ExternalTime Description The external reference clock the VideoPlayer observes to detect and correct drift. The VideoPlayer plays the video based on an external time source. External time sources include your own custom timers, or a system’s time. To set this, use VideoPlayer.externalReference...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_867d9fffa7ee
unity_docs
rendering
Explain 'SpeedTree Model tab reference' in Unity.
Use the Model tab to change the model settings for imported SpeedTree assets. To change materials settings for the SpeedTree model, see the Materials tab . The Model tab has these sections: (A) The Meshes , Material , Lighting , Additional Settings , and Wind sections allow you to adjust global import settings for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfc90eb4b2d4
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.DictationResultDelegate` in Unity? Explain its purpose and usage.
DictationRecognizer.DictationResultDelegate Declaration public delegate void DictationResultDelegate (string text , Windows.Speech.ConfidenceLevel confidence ); Parameters Parameter Description text The recognized text. confidence The confidence level at which the text was recognized. Description Call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2d5b9fc3d34
unity_docs
scripting
What is `Unity.Android.Types.DebugSymbolLevel` in Unity? Explain its purpose and usage.
DebugSymbolLevel enumeration Description The type of debug metadata which will be packaged. Additional resources: UserBuildSettings.DebugSymbols.level Additional resources: debugSymbolLevel Properties Property Description None No native debug metadata will be packaged. SymbolTable Only the symbol tables wil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d974778de88
unity_docs
scripting
What is `PlayModeWindow.SetCustomRenderingResolution` in Unity? Explain its purpose and usage.
PlayModeWindow.SetCustomRenderingResolution Declaration public static void SetCustomRenderingResolution (uint width , uint height , string baseName ); Parameters Parameter Description width The custom resolution width. height The custom resolution height. baseName The basename for the custom resolution...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_044f3fc3a4c1
unity_docs
rendering
What are the parameters of `Texture2DArray.GetPixels` in Unity?
Returns Color[] An array that contains the pixel colors. Description Gets the pixel color data for a mipmap level of a slice as Color structs. This method gets pixel data from the texture in CPU memory. Texture.isReadable must be true . The array contains the pixels row by row, starting at the bottom left of the textur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06bf4a64431e
unity_docs
ui
What is `Canvas.preWillRenderCanvases` in Unity? Explain its purpose and usage.
Canvas.preWillRenderCanvases Description Event that is called just before Canvas rendering happens. This allows you to delay processing / updating of canvas based elements until just before they are rendered.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f23e6d04887
unity_docs
xr
Give me an overview of the `RenderTextureCreationFlags` class in Unity.
RenderTextureCreationFlags enumeration Description Set of flags that control the state of a newly-created RenderTexture. Properties Property Description MipMap Set this flag to allocate mipmaps in the RenderTexture. See RenderTexture.useMipMap for more details. AutoGenerateMips Determines whether or not mipmap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d035c0c4a91
unity_docs
editor
What is `Terrain.preserveTreePrototypeLayers` in Unity? Explain its purpose and usage.
Terrain.preserveTreePrototypeLayers public bool preserveTreePrototypeLayers ; Description Allows you to specify how Unity chooses the layer for tree instances. Unity automatically assigns a layer to the tree instances on your terrain. This property allows you to specify whether the tree instances should hav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7199afcad043
unity_docs
math
What is `AI.NavMeshBuildSource.transform` in Unity? Explain its purpose and usage.
NavMeshBuildSource.transform public Matrix4x4 transform ; Description Describes the local to world transformation matrix of the build source. That is, position and orientation and scale of the shape.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e88f10ad835
unity_docs
scripting
What is `Video.VideoPlayer.playOnAwake` in Unity? Explain its purpose and usage.
VideoPlayer.playOnAwake public bool playOnAwake ; Description Whether the content will start playing back as soon as the component awakes. Note: This plays each time the component is enabled, not only once from Awake.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7798d95145c8
unity_docs
math
What is `Rendering.BatchCullingOutputDrawCommands.proceduralDrawCommands` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands.proceduralDrawCommands public BatchDrawCommandProcedural* proceduralDrawCommands ; Description The array that contains procedural draw commands to render as the result of the OnPerformCulling call. This can contain as many procedural commands as necessary, and each command can ren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1e9002985791
github
scripting
Write a Unity C# script called Play Mode Inspector Method Attribute
```csharp // // PlayMode Inspector for Unity. Copyright (c) 2015-2024 Peter Schraut (www.console-dev.de). See LICENSE.md // https://github.com/pschraut/UnityPlayModeInspector // using System; using UnityEngine; namespace Oddworm.Framework { /// <summary> /// Use this attribute to expose a method to the PlayMo...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_bb86ddab566e
unity_docs
rendering
What is `Material.SetTexture` in Unity? Explain its purpose and usage.
Material.SetTexture Declaration public void SetTexture (string name , Texture value ); Declaration public void SetTexture (int nameID , Texture value ); Declaration public void SetTexture (string name , RenderTexture value , Rendering.RenderTextureSubElement element ); Declaration public v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e9648764463
unity_docs
animation
Give me an overview of the `AnimatorRecorderMode` class in Unity.
AnimatorRecorderMode enumeration Description The mode of the Animator's recorder. The recorder can either be Offline, in Playback or in Record. Properties Property Description Offline The Animator recorder is offline. Playback The Animator recorder is in Playback. Record The Animator recorder is in Record.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b36069c6d61
unity_docs
editor
What are the parameters of `EditorGUI.TextField` in Unity?
Returns string The text entered by the user. Description Makes a text field. This works just like GUI.TextField , but correctly responds to select all, copy, paste etc. in the editor, and it can have an optional label in front. Text field in an Editor Window. ```csharp using UnityEngine; using UnityEditor;// Changes th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18b84eb52db7
unity_docs
scripting
What is `StaticBatchingUtility.Combine` in Unity? Explain its purpose and usage.
StaticBatchingUtility.Combine Declaration public static void Combine ( GameObject staticBatchRoot ); Parameters Parameter Description staticBatchRoot The GameObject that should become the root of the combined batch. Description Combines all children GameObjects of the staticBatchRoot for static batching...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1be43bd23cf1
unity_docs
networking
In Unity's 'Collecting performance data on an Android device', what is 'Profiling with Android Debug Bridge' and how does it work?
Android devices support profiling through Android Debug Bridge (adb) . To profile with Android Debug Bridge (adb), follow these steps: Put the device in Development mode and enable the USB debugging setting. Attach the device to your computer via cable and make sure that it’s displayed in the adb devices list. Open the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7fd340c05ff
unity_docs
rendering
What is `Texture2D.Apply` in Unity? Explain its purpose and usage.
Texture2D.Apply Declaration public void Apply (bool updateMipmaps = true, bool makeNoLongerReadable = false); Parameters Parameter Description updateMipmaps When the value is true , Unity recalculates mipmap levels, using mipmap level 0 as the source. The default value is true . makeNoLongerReadable W...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fa982d5d802
unity_docs
rendering
What is `Handles.ClearCamera` in Unity? Explain its purpose and usage.
Handles.ClearCamera Declaration public static void ClearCamera ( Rect position , Camera camera ); Parameters Parameter Description position Where in the Scene to clear. camera The camera to clear. Description Clears the camera. The camera used by the Handle class is cleared before being used. This m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55f42b1f9ada
unity_docs
scripting
What is `AsyncInstantiateOperation` in Unity? Explain its purpose and usage.
AsyncInstantiateOperation class in UnityEngine / Inherits from: AsyncOperation / Implemented in: UnityEngine.CoreModule Description Asynchronous instantiate operation on UnityEngine.Object type. The operation is used by Object.InstantiateAsync internally and usually wrapped by AsyncInstantiateOperation<T>. P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24ef6241bde4
unity_docs
physics
What is `WheelCollider.ConfigureVehicleSubsteps` in Unity? Explain its purpose and usage.
WheelCollider.ConfigureVehicleSubsteps Declaration public void ConfigureVehicleSubsteps (float speedThreshold , int stepsBelowThreshold , int stepsAboveThreshold ); Parameters Parameter Description speedThreshold The speed threshold of the sub-stepping algorithm. stepsBelowThreshold Amount of simulation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_877f69997aa9
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.ColorBySpeedModule.range`.
ParticleSystem.ColorBySpeedModule.range public Vector2 range ; Description Apply the color gradient between these minimum and maximum speeds. Additional resources: ParticleSystem.ColorBySpeedModule.color . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9afed315b465
github
scripting
Write a Unity C# script called Float Property
```csharp using UnityEngine; namespace LeakyAbstraction.ReactiveScriptables { [CreateAssetMenu(menuName = "Game Properties/Float Property")] public class FloatProperty : GameProperty<float> { } } ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_9be54d21798a
unity_docs
rendering
What is `Light.RemoveCommandBuffers` in Unity? Explain its purpose and usage.
Light.RemoveCommandBuffers Declaration public void RemoveCommandBuffers ( Rendering.LightEvent evt ); Parameters Parameter Description evt When to execute the command buffer during rendering. Description Remove command buffers from execution at a specified place. This function removes all command buffer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cbdebfa9a012
unity_docs
physics
In Unity's 'Importing a model with humanoid animations', what is 'Configure the Avatar' and how does it work?
If you want to check that Unity correctly mapped your model’s bones to the Avatar, or if Unity failed to create the Avatar for your model, you can click the Configure … button on the Rig tab to enter the Avatar configuration mode . If Unity successfully creates an Avatar, the Avatar appears as a sub-asset of the model ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.