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_3de3f49743d1
unity_docs
rendering
What is `Rendering.BatchDrawCommand.lightmapIndex` in Unity? Explain its purpose and usage.
BatchDrawCommand.lightmapIndex public ushort lightmapIndex ; Description The index of the baked lightmap used in this draw command. If BatchDrawCommandFlags.UseLegacyLightmapsKeyword is not set, this value is ignored. Additional resources: BatchDrawCommandFlags.UseLegacyLightmapsKeyword , Renderer.lightmapI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de44b0b92d8a
unity_docs
scripting
What is `PenStatus.None` in Unity? Explain its purpose and usage.
PenStatus.None Description The pen is in a neutral state. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event m_Event = Event.current; if (m_Event.type == EventType.MouseDown) { if (m_Event.pointerType == PointerType.Pen) //Check if it's a pen event. { if (m_Event.penStatu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5d98a8ba0d58
unity_docs
rendering
Explain 'Upgrade to Unity 2023.1' in Unity.
This page lists changes in Unity 2023.1 which might affect existing projects when you upgrade them from a 2022 LTS version to 2023.1. ## Page outline Render pipelines Gaussian Filter Radius properties from LightingSettings are now floating point values Improvements to light probe energy conservation Enlighten Baked G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fc3e14d2026
unity_docs
audio
What is `AudioCurveRendering.DrawFilledCurve` in Unity? Explain its purpose and usage.
AudioCurveRendering.DrawFilledCurve Declaration public static void DrawFilledCurve ( Rect r , AudioCurveRendering.AudioCurveEvaluator eval , Color curveColor ); Declaration public static void DrawFilledCurve ( Rect r , AudioCurveRendering.AudioCurveAndColorEvaluator eval ); Parameters Parameter ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8114389bf0c1
github
scripting
Write a Unity C# script called Pack Array
```csharp using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PackArray<T> { protected List<T> _content; protected List<int> _nextId; protected int _nextFreeId = -1; public PackArray(int capacity) { _content = new List<T>(capacity); ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_a2c5536808e8
unity_docs
rendering
What is `Rendering.RayTracingInstanceMaterialConfig.optionalShaderTags` in Unity? Explain its purpose and usage.
RayTracingInstanceMaterialConfig.optionalShaderTags public RayTracingInstanceCullingShaderTagConfig[] optionalShaderTags ; Description An array of Shader Tags used to determine the Material type. Additional resources: RayTracingAccelerationStructure.CullInstances .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0316bc42dae5
unity_docs
scripting
What is `AudioType.MPEG` in Unity? Explain its purpose and usage.
AudioType.MPEG Description The audio file you want to stream has the MPEG (MP2 or MP3) audio file format. Use this enumeration value to ensure the format type of the audio file has the MPEG audio file format. Use this audio type for files with the extension .mp2 or .mp3 . If the audio file has a different format, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1b3d2918106
unity_docs
rendering
What is `ParticleSystem.useAutoRandomSeed` in Unity? Explain its purpose and usage.
ParticleSystem.useAutoRandomSeed public bool useAutoRandomSeed ; Description Controls whether the Particle System uses an automatically-generated random number to seed the random number generator. If set to true, the Particle System will generate a new random seed each time it is played. If set to false, Part...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_daa725b5b035
unity_docs
scripting
What is `Search.ObjectField.SetValueWithoutNotify` in Unity? Explain its purpose and usage.
ObjectField.SetValueWithoutNotify Declaration public void SetValueWithoutNotify ( Object newValue ); Parameters Parameter Description newValue Selected object. Description Set the object field selected objects.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbfb787be5a1
unity_docs
animation
What is `SkinnedMeshRenderer.updateWhenOffscreen` in Unity? Explain its purpose and usage.
SkinnedMeshRenderer.updateWhenOffscreen public bool updateWhenOffscreen ; Description If enabled, the Skinned Mesh will be updated when offscreen. If disabled, this also disables updating animations. Additional resources: Skinned Mesh Renderer component .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82545ee867e1
unity_docs
physics
What is `Compilation.CompilationPipeline.compilationStarted` in Unity? Explain its purpose and usage.
CompilationPipeline.compilationStarted Parameters Parameter Description context A token generated by Unity, which uniquely identifies a single compilation cycle and is valid only for the duration of that cycle. Description An event that is invoked on the main thread when the compilation of assemblies starts. C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_95c71f24d65e_doc_2
github
scripting
What does `AssertIsContextWithLocator` do in this Unity script? Explain its purpose and signature.
Some demos require this type. Centralize the warning logging herefor consistency. Signature: ```csharp public static void AssertIsContextWithLocator(IContext context) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e178f75ff444
unity_docs
scripting
What is `Time.unscaledTimeAsDouble` in Unity? Explain its purpose and usage.
Time.unscaledTimeAsDouble public static double unscaledTimeAsDouble ; Description The double precision timeScale-independent time for this frame (Read Only). This is the time in seconds since the start of the game. Double precision version of unscaledTime . This offers more precision than a float or single val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_133313957281
unity_docs
editor
What are the parameters of `AssetDatabase.ImportAsset` in Unity?
Description Import asset at path. Import an asset at the specified path. Calling this method triggers a number of callbacks including AssetModificationProcessor.OnWillSaveAssets and AssetPostprocessor.OnPostprocessAllAssets . All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png" Addit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9549b4b75747
unity_docs
scripting
What is `Build.Content.WriteResult.includedSerializeReferenceFQN` in Unity? Explain its purpose and usage.
WriteResult.includedSerializeReferenceFQN public ReadOnlyCollection<string> includedSerializeReferenceFQN ; Description SerializeReference instances fully qualified name which were included in the serialized file. Internal use only. See WriteResult .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6010651e9d86
unity_docs
rendering
What is `ComputeShader.HasKernel` in Unity? Explain its purpose and usage.
ComputeShader.HasKernel Declaration public bool HasKernel (string name ); Parameters Parameter Description name The name of the kernel to look for. Returns bool True if the kernel is found, false otherwise. Description Checks whether a shader contains a given kernel.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2973be7fae45
unity_docs
rendering
What is `TextureImporter.swizzleA` in Unity? Explain its purpose and usage.
TextureImporter.swizzleA public TextureImporterSwizzle swizzleA ; Description Specifies the source for the texture's alpha color channel data. By default, values for the imported texture's alpha channel come from the source image's alpha channel. To reorder or invert color channels at import time, change thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_250f30e06c25
github
scripting
Write a Unity C# ScriptableObject for Attack Data
```csharp using System; using System.Collections.Generic; using SmartReference.Runtime; using UnityEngine; namespace SmartReference.Samples { [Serializable] public class AttackData { public float baseDamage; public float damageMultiplier; public SmartReference<GameObject> effect; }...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_33f0dfe42086
unity_docs
ui
What is `UIElements.PointerEventBase_1.penStatus` in Unity? Explain its purpose and usage.
PointerEventBase<T0>.penStatus public PenStatus penStatus ; Description Specifies the state of the pen. For example, whether the pen is in contact with the screen or tablet, whether the pen is inverted, and whether buttons are pressed. On macOS, penStatus will not reflect changes to button mappings.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc76f45b94b4
unity_docs
editor
What is `EditorGUIUtility.IconContent` in Unity? Explain its purpose and usage.
EditorGUIUtility.IconContent Declaration public static GUIContent IconContent (string name , string text = null); Parameters Parameter Description name Name of the desired icon. text Tooltip for hovering over the icon. Description Fetch the GUIContent from the Unity builtin resources with the given...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa9b22a8f6c1
unity_docs
math
What is `Vector3.Equals` in Unity? Explain its purpose and usage.
Vector3.Equals Declaration public bool Equals (object other ); Description Returns true if the given vector is exactly equal to this vector. Due to floating point inaccuracies, this might return false for vectors which are essentially (but not exactly) equal. Use the == operator to test two vectors for appro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d7e774c97ce
unity_docs
editor
What is `MouseCursor.RotateArrow` in Unity? Explain its purpose and usage.
MouseCursor.RotateArrow Description Arrow with the rotate symbol next to it for the sceneview. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This disp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4978b62f55d0
unity_docs
scripting
Give me an overview of the `ModelImporterSkinWeights` class in Unity.
ModelImporterSkinWeights enumeration Description Skin weights options for ModelImporter . In order to import more than 4 skin weights per vertex, set ModelImporter.skinWeights to ModelImporterSkinWeights.Custom and set ModelImporter.maxBonesPerVertex to the required number. You may also limit the number of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06753319df1f
unity_docs
rendering
Show me a Unity C# example demonstrating `GL.PushMatrix`.
GL.PushMatrix Declaration public static void PushMatrix (); Description Saves the model, view and projection matrices to the top of the matrix stack. Changing the model, view or projection matrices overrides the current rendering matrices. It is good practice to save and restore these matrices using GL.PushMat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27b0a88ed429
unity_docs
scripting
Give me an overview of the `AnimationEvent` class in Unity.
AnimationEvent class in UnityEngine / Implemented in: UnityEngine.AnimationModule Description AnimationEvent lets you call a script function similar to SendMessage as part of playing back an animation. Animation events support functions that take zero or one parameter. The parameter can be a float, an int, a st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e9d070d02bec
unity_docs
physics
In Unity's 'Optimizing arrays', what is 'Avoid repeated access to array-valued Unity APIs' and how does it work?
One cause of unintended allocations on arrays is the repeated accessing of Unity APIs that return arrays. All Unity APIs that return arrays create a new copy of the array each time they’re accessed. If your code accesses an array-valued Unity API more often than necessary, it can affect the performance of your applicat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_961f4872587e
unity_docs
rendering
Explain 'Cubemap Skybox Shader Material Inspector Window reference' in Unity.
For information on how to create a Material that uses this skybox Shader , as well as details on how to render the skybox in your Scene , see Using skyboxes . ## Render pipeline compatibility Feature Built-in Render Pipeline Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Cubemap skybox Yes Yes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c157ab6851d6
unity_docs
rendering
What is `Camera.AddCommandBufferAsync` in Unity? Explain its purpose and usage.
Camera.AddCommandBufferAsync Declaration public void AddCommandBufferAsync ( Rendering.CameraEvent evt , Rendering.CommandBuffer buffer , Rendering.ComputeQueueType queueType ); Parameters Parameter Description evt The point during the graphics processing at which this command buffer should commence ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c9412004539
unity_docs
scripting
What is `Undo.DestroyObjectImmediate` in Unity? Explain its purpose and usage.
Undo.DestroyObjectImmediate Declaration public static void DestroyObjectImmediate ( Object objectToUndo ); Parameters Parameter Description objectToUndo The object that will be destroyed. Description Destroys the object and records an undo operation so that it can be recreated. Destroys the object with t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b6a47ef0978a
unity_docs
rendering
In Unity's 'Reflective Bumped Diffuse', what is 'Reflective Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader will simulate reflective surfaces such as cars, metal objects etc. It requires an environment Cubemap which will define what exactly is reflected. The main texture’s alpha channel defines the strength of reflection on the object’s surf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7375de3ea7fc_doc_2
github
scripting
What does `AddPackageAndEmbed` do in this Unity script? Explain its purpose and signature.
Adds a package dependency to the Project. This is the equivalent of installing a package.--- To install the latest compatible version of a package, specify only the package.--- To install a git package, specify a git url --- To install a local package, specify a value in the format "file:pathtopackagefolder".--- To ins...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_573683c00a15
github
scripting
Write a Unity C# script called Singleton
```csharp using UnityEngine; namespace GrimTools.Runtime.Core { public enum SingletonInitializationStatus { None, Initializing, Initialized } public interface ISingleton { public void InitializeSingleton(); public void DestroySingleton(); } public c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d58850ddd344
unity_docs
performance
In Unity's 'Memory in Unity introduction', what is 'C# unmanaged memory' and how does it work?
The C# unmanaged memory layer allows you to access the native memory layer to fine-tune memory allocations, with the convenience of writing C# code. You can use the Unity.Collections namespace (including NativeArray ) in the Unity core API, the data structures in the Unity Collections package , and UnsafeUtility.Malloc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89b9b6ad2a98
unity_docs
rendering
What is `Experimental.GlobalIllumination.LightDataGI.mode` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LightDataGI.mode public Experimental.GlobalIllumination.LightMode mode ; Description The lightmap mode for the light.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ad78d57294fe_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This wizard helps creating a set of fixed Animation Clips using HandTrackingto be used in a skinned synthetic hand with an Animator.Assign a HandSkeletonVisual and click the buttons as you perform the relevantposes with your tracked hand. The output will be an Animator that can be directlyused in a Skinned hand. Once y...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_8c64f3a142b1
unity_docs
math
What is `SceneVisibilityManager.EnablePicking` in Unity? Explain its purpose and usage.
SceneVisibilityManager.EnablePicking Declaration public void EnablePicking ( GameObject gameObject , bool includeDescendants ); Declaration public void EnablePicking (GameObject[] gameObjects , bool includeDescendants ); Parameters Parameter Description includeDescendants Whether to include descendan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_73e92ee41a11
github
scripting
Write a Unity C# UI script for Root Lifetime Scope
```csharp using AntiMonoBehaviour.Processes; using AntiMonoBehaviour.Processes.Installers; using UnityEngine; using UnityEngine.SceneManagement; using VContainer; using VContainer.Unity; namespace AntiMonoBehaviour { public class RootLifetimeScope : LifetimeScope { [SerializeField] SplashScreenInstalle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3db2d35d9679
unity_docs
scripting
What is `Search.SearchMonitorView.StoreAlias` in Unity? Explain its purpose and usage.
SearchMonitorView.StoreAlias Declaration public void StoreAlias ( Search.PropertyDatabaseRecordKey key , string alias ); Parameters Parameter Description key Property key. alias Alias to be set. Description Store a property alias in the property string table.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9b8eda22ce7d
github
scripting
Write a Unity C# ScriptableObject for Singleton Scriptable Object
```csharp using System.Collections; using System.Linq; using UnityEngine; namespace Waker { public static class SingletonScriptableObjectAccessor<T> where T : ScriptableObject { internal static T instance; public static T GetInstance() { if (instance != null) {...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_057f10af82ae
unity_docs
scripting
What is `Rendering.BatchDrawCommandProceduralIndirect.flags` in Unity? Explain its purpose and usage.
BatchDrawCommandProceduralIndirect.flags public Rendering.BatchDrawCommandFlags flags ; Description Specifies rendering options for the draw command. This includes rendering options like whether Unity should individually depth sort the instances in the draw command, or whether to render instances into per-obj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_89ebd41b4c9b
unity_docs
input
Explain 'Input' in Unity.
Input in Unity refers to users sending signals from the outside world to your game or app using a physical device. Unity supports input from many types of device, such as gamepads, mouse, keyboard, touchscreen, joystick, movement-sensors like accelerometers or gyroscopes, and VR and AR controllers. Almost every project...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6c92a7d1e332
github
scripting
Write a Unity C# audio script for Play Quick Sound
```csharp using UnityEngine; /// <summary> /// Play a simple sounds using Play one shot with volume, and pitch /// </summary> [RequireComponent(typeof(AudioSource))] public class PlayQuickSound : MonoBehaviour { [Tooltip("The sound that is played")] public AudioClip sound = null; [Tooltip("The volume of ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_46eccbe2a54d
unity_docs
editor
What is `Device.Application.exitCancellationToken` in Unity? Explain its purpose and usage.
Application.exitCancellationToken public static CancellationToken exitCancellationToken ; Description Cancellation token raised on exiting play mode (editor) or on quitting the application (Read Only).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1ab4c049a76
unity_docs
scripting
What is `AndroidJNI.SetCharField` in Unity? Explain its purpose and usage.
AndroidJNI.SetCharField Declaration public static void SetCharField (IntPtr obj , IntPtr fieldID , char val ); Description Sets the value of an instance field of the specified object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5538b571a4e3
unity_docs
input
What is `AccelerationEvent` in Unity? Explain its purpose and usage.
AccelerationEvent struct in UnityEngine / Implemented in: UnityEngine.InputLegacyModule Description Structure describing acceleration status of the device. Properties Property Description acceleration Value of acceleration. deltaTime Amount of time passed since last accelerometer measurement.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8da9d9848def
github
scripting
Write a Unity C# UI script for Toggle Button
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class ToggleButton : MonoBehaviour { // Start is called before the first frame update public Sprite activeSprite; public Sprite inactiveSprite; public GameObject icon; void Start() { icon.Ge...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_93c590200ce3
unity_docs
editor
Show me a Unity C# example demonstrating `InitializeOnEnterPlayModeAttribute`.
InitializeOnEnterPlayModeAttribute class in UnityEditor Description Allow an editor class method to be initialized when Unity enters Play Mode. Use to reset static fields in Editor classes on Enter Play Mode without Domain Reload. ```csharp using UnityEngine; using UnityEditor;class MyAnotherClass { static int ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8ec92216b1aa
unity_docs
performance
In Unity's 'Copying NativeContainer structures', what is 'Static views of dynamic native containers' and how does it work?
A dynamic native container is one which has a variable size that you can continue to add elements to, such as NativeList<T> (which is available in the Collections package). This is in contrast to a static native container like NativeArray<T> , which has a fixed size that you can’t change. When you use a dynamic native ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ffc262f0cbdd
unity_docs
scripting
What is `Mesh.MeshData.SetSubMesh` in Unity? Explain its purpose and usage.
Mesh.MeshData.SetSubMesh Declaration public void SetSubMesh (int index , Rendering.SubMeshDescriptor desc , Rendering.MeshUpdateFlags flags ); Parameters Parameter Description index The index of the sub-mesh to set data for. See subMeshCount . If you specify an out of range index, Unity throws an exc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_feabfb2235bd
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.UpdateNeeded` in Unity? Explain its purpose and usage.
Hierarchy.UpdateNeeded public bool UpdateNeeded ; Description Whether the hierarchy requires an update. An update is required when changes in registered hierarchy node handlers are pending.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b44b0f7b194f
unity_docs
rendering
Give me an overview of the `AndroidBlitType` class in Unity.
AndroidBlitType enumeration Description Describes the method for how content is displayed on the screen. Options are as follows: Use Always to render offscreen and blit to the backbuffer. Use Never to render directly to the backbuffer. Use Auto or automatically choose the most appropriate option. Depending o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c3356546b2b
unity_docs
editor
What is `Overlays.Overlay.OnCreated` in Unity? Explain its purpose and usage.
Overlay.OnCreated Declaration public void OnCreated (); Description OnCreated is invoked when an Overlay is instantiated in an Overlay Canvas. Overlays are usually initialized and destroyed with the EditorWindow in which they exist.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f8dc39e808c5
unity_docs
audio
Explain 'Audio SFX Reverb Effect' in Unity.
The SFX Reverb Effect takes the output of an Audio Mixer group and distorts it to create a custom reverb effect. ## Properties Property: Function: Dry Level Mix level of dry signal in output in mB. Ranges from –10000.0 to 0.0. Default is 0 mB. Room Room effect level at low frequencies in mB. Ranges from –10000.0 to 0...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71335c74af21
unity_docs
scripting
What is `ModifiableContactPair.GetBounciness` in Unity? Explain its purpose and usage.
ModifiableContactPair.GetBounciness Declaration public float GetBounciness (int i ); Parameters Parameter Description i Index of the contact point. Returns float Bounciness value for the specified contact point. Description Get the restitution value for the specified contact point in this contact pai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8f292843899
unity_docs
rendering
What is `Search.SearchContextAttribute.ctor` in Unity? Explain its purpose and usage.
SearchContextAttribute Constructor Declaration public SearchContextAttribute (string query ); Declaration public SearchContextAttribute (string query , Search.SearchViewFlags flags ); Declaration public SearchContextAttribute (string query , string providerIdsCommaSeparated ); Declaration public S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc5d6b4370f3
unity_docs
physics
Show me a Unity C# example demonstrating `AI.NavMesh.Raycast`.
t a ray from the characters location to multiple directions to find a spot where the character can dodge to. The Raycast is different from physics ray cast because it works on “2.5D”, on the NavMesh. The difference to physics ray casts is that NavMesh ray casts can detect all kinds of navigation obstructions, such as h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7cbed7392adf
github
scripting
Write a Unity C# animation script for Path Spline Track
```csharp using UnityEngine; using System.Collections; using DentedPixel; // This project demonstrates how you can use the spline behaviour for a multi-track game (like an endless runner style) public class PathSplineTrack : MonoBehaviour { public GameObject car; public GameObject carInternal; public GameObject ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_2f50a1fb8d9f
unity_docs
physics
What is `Rigidbody2D.IsTouchingLayers` in Unity? Explain its purpose and usage.
Rigidbody2D.IsTouchingLayers Declaration public bool IsTouchingLayers (int layerMask = Physics2D.AllLayers); Parameters Parameter Description layerMask Any colliders on any of these layers count as touching. Returns bool Whether any of the collider(s) attached to this rigidbody are touching any collider...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c35c289f2b05
unity_docs
rendering
Give me an overview of the `Random` class in Unity.
Random class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Easily generate random data for games. This static class provides several easy game-oriented ways of generating pseudorandom numbers . The generator is an Xorshift 128 algorithm, based on the paper Xorshift RNGs by George Mar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8b7a2c8bb9bc
unity_docs
editor
In Unity's 'Profiler Module Editor reference', what is 'Profiler Module Editor panels' and how does it work?
Property Description Profiler Modules Contains all the available modules you can add to the Profiler Window. Built-in modules are greyed-out in the list, indicating that you can’t edit their contents. You can drag and drop the modules to reorder their appearance in the Profiler window. When you create your own custom P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec0ba388f8aa
unity_docs
scripting
What is `UIElements.CallbackEventHandler.HasTrickleDownHandlers` in Unity? Explain its purpose and usage.
CallbackEventHandler.HasTrickleDownHandlers Declaration public bool HasTrickleDownHandlers (); Returns bool True if the object has event handlers for the TrickleDown phase. Description Returns true if event handlers, for the event propagation TrickleDown phase, are attached to this object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d1cfc4b2d36
unity_docs
rendering
Give me an overview of the `TextureImporterSingleChannelComponent` class in Unity.
TextureImporterSingleChannelComponent enumeration Description Selects which Color/Alpha channel Single Channel Textures uses. Properties Property Description Alpha Use the Alpha channel. Red Use the red Color channel.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b806611237b7
unity_docs
rendering
Give me an overview of the `Texture2D` class in Unity.
Texture2D class in UnityEngine / Inherits from: Texture / Implemented in: UnityEngine.CoreModule Description Class that represents textures in C# code. Use this class to create textures, or to modify existing texture assets . The ImageConversion class provides extension methods to this class that handle im...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0c907e6f4fd
unity_docs
math
What is `Vector3.RotateTowards` in Unity? Explain its purpose and usage.
Vector3.RotateTowards Declaration public static Vector3 RotateTowards ( Vector3 current , Vector3 target , float maxRadiansDelta , float maxMagnitudeDelta ); Parameters Parameter Description current The vector being managed. target The vector. maxRadiansDelta The maximum angle in radians allowed ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c50d54b90b4c
unity_docs
ui
What is `UIElements.GenericDropdownMenu` in Unity? Explain its purpose and usage.
GenericDropdownMenu class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description GenericDropdownMenu allows you to display contextual menus with default textual options or any VisualElement . The GenericDropdownMenu is a generic implementation of a dropdown menu that you can u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6859e805ba0e
unity_docs
ui
In Unity's 'Migrate from Immediate Mode GUI (IMGUI) to UI Toolkit', what is 'Code-driven versus UI-driven' and how does it work?
IMGUI is code-driven by calls to the OnGUI function in a C# script that implements it. UI Toolkit provides more options for Editor UI creation. With UI Toolkit, you define the behaviors in C# scripts . However, when defining UI elements and styles, in addition to C#, you can visually define UI controls in UI Builder or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5608622688ce
unity_docs
scripting
Give me an overview of the `SimulationMode` class in Unity.
SimulationMode enumeration Description A selection of modes that control when Unity executes the physics simulation. Additional resources: Physics.simulationMode . ```csharp // SimulationMode.FixedUpdate is the default setting in Unity. // Attach this script to a gameObject and enter runtime mode.using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e0eb99adb9b
unity_docs
rendering
Explain 'Vulkan' in Unity.
Vulkan is a modern graphics API that works across multiple platforms including mobile and desktop. Unity supports Vulkan allowing you to target Vulkan-capable devices and providing direct control over the GPU. ## Platform compatibility Unity supports the Vulkan API for developing applications on the following platfor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6a459ae2eaf9
unity_docs
performance
In Unity's 'Unmanaged C# memory', what is 'Allocator types' and how does it work?
You can use certain native Allocator types with native container types in the Unity.Collections namespace. The allocator types available in this way are: Temp : A temporary allocator type for short-lived allocations. TempJob : A temporary allocator type for longer-lived allocations passed from job to job. Persistent : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcaf09cd60de
unity_docs
scripting
What is `Application.unloading` in Unity? Explain its purpose and usage.
Application.unloading Description Unity raises this event when the Player is unloading. Add an event handler to this event if you want to trigger events to Application.Unload calls. The event is raised after a call to Application.Unload is made, right before the unloading starts. Note: The Application.unloadi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d638bc29420
unity_docs
math
What is `Mesh.GetBindposes` in Unity? Explain its purpose and usage.
Mesh.GetBindposes Declaration public NativeArray<Matrix4x4> GetBindposes (); Returns NativeArray<Matrix4x4> The array of bind poses belonging to the Mesh. Description Gets the bind poses of the Mesh. The bind pose at each index corresponds to the bone with the same index. Additional resources: SkinnedMe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57b07d5b7765
unity_docs
rendering
Explain 'Creating a hierarchy of materials' in Unity.
To create a hierarchy of materials that uses property inheritance, use material variants. If you create hundreds of materials, material variants are easier to manage than duplicating materials. Topic Description Material variants Learn about the benefits and limitations of using material variants to manage materials. C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4f11a39475e
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchProvider.id`.
SearchProvider.id public string id ; Description Search provider unique ID. ```csharp using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class SearchProvider_id { internal static string id = "exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4966dada7b09
unity_docs
rendering
What is `ParticleSystem.Particle.startSize3D` in Unity? Explain its purpose and usage.
ParticleSystem.Particle.startSize3D public Vector3 startSize3D ; Description The initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules. This is particle's size in meters in world space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e7b448dec0e
unity_docs
scripting
What is `GridLayout.CellSwizzle` in Unity? Explain its purpose and usage.
CellSwizzle enumeration Description Swizzles cell positions to other positions. Properties Property Description XYZ Keeps the cell positions at XYZ. XZY Swizzles the cell positions from XYZ to XZY. YXZ Swizzles the cell positions from XYZ to YXZ. YZX Swizzles the cell positions from XYZ to YZX. ZXY Swizzles...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c813428f275
unity_docs
math
What is `TerrainData.SetTreeInstances` in Unity? Explain its purpose and usage.
TerrainData.SetTreeInstances Declaration public void SetTreeInstances (TreeInstance[] instances , bool snapToHeightmap ); Parameters Parameter Description instances The array of TreeInstance objects. snapToHeightmap Specifies whether to snap Trees to the Terrain heightmap. Description Sets the Tree In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54dd8c2020d1
unity_docs
editor
What is `Android.AndroidProjectFiles.AdditionalLibrariesBuildGradleFiles` in Unity? Explain its purpose and usage.
AndroidProjectFiles.AdditionalLibrariesBuildGradleFiles public IReadOnlyDictionary<string,ModuleBuildGradleFile> AdditionalLibrariesBuildGradleFiles ; Description A representation of the build.gradle files that were added to plug-ins (libraries) that didn't have a build.gradle file. Files are located in un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_08034654d380
unity_docs
scripting
Explain 'Naming scripts' in Unity.
It’s important to choose names for your script files and the classes declared inside them carefully. Using appropriate file names and organizing your classes under namespaces helps ensure the compiler can identify your classes without errors. ## Script file names The file name you enter on creation of a script will a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d4f0a56e7af
unity_docs
scripting
What is `UIElements.TreeViewExpansionChangedArgs.isAppliedToAllChildren` in Unity? Explain its purpose and usage.
TreeViewExpansionChangedArgs.isAppliedToAllChildren public bool isAppliedToAllChildren ; Description Indicates whether the expandAllChildren or collapsedAllChildren is applied when expanding the item.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e54bcacf9e1c
unity_docs
editor
What is `Tilemaps.Tilemap.ClearAllTiles` in Unity? Explain its purpose and usage.
Tilemap.ClearAllTiles Declaration public void ClearAllTiles (); Description Clears all Tile s that are placed in the Tilemap . This will also resize the Tilemap to its default values. In the Editor, this will also clear all editor preview Tile s.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fb052fdaeec5_doc_11
github
scripting
What does `ConvertColumn` do in this Unity script? Explain its purpose and signature.
Convert single column data by header index. Signature: ```csharp public static IList ConvertColumn(Type dataType, string csvContent, int headerIndex = 0, char cellSeparator = CSVDataHelper.CommaCharacter, bool supportCellMultiline = true) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_1a2f1e10526c
unity_docs
rendering
Explain 'Write HLSL for different graphics APIs' in Unity.
There are differences in how graphics rendering behaves between different graphics APIs. Most of the time the Unity Editor hides the differences, but there are some situations where Unity can’t do this for you. ## Check floating point exception handling Desktop platforms and mobile platforms can handle exceptions dif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66be444b1a55
unity_docs
scripting
What is `Font.ascent` in Unity? Explain its purpose and usage.
Font.ascent public int ascent ; Description The ascent of the font. The ascent of the font is the distance from the baseline to the top line of the font, as defined in the font's original data file.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0634b652215a
unity_docs
editor
What is `IMGUI.Controls.PrimitiveBoundsHandle.midpointHandleDrawFunction` in Unity? Explain its purpose and usage.
PrimitiveBoundsHandle.midpointHandleDrawFunction public Handles.CapFunction midpointHandleDrawFunction ; Description An optional CapFunction to use when displaying the control handles. Defaults to Handles.DotHandleCap if no value is specified. Additional resources: midpointHandleSizeFunction .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_739bf12451e5
unity_docs
scripting
Show me a Unity C# example demonstrating `LayerMask.operator_int`.
LayerMask.LayerMask Description Implicitly converts an integer to a LayerMask. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Converts an int to a layer mask and prints all the layer names. // As the value is 3, it will print "Default" and "TransparentFX". // 2^0 + 2^1 = 1...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_84039e91fb29
unity_docs
scripting
Explain 'Deliver applications to the Mac App Store' in Unity.
This page has information about Mac App Store delivery requirements. ## Delivery requirements If you want to distribute your application to the Mac App Store, then the upload process includes a similar content validation to notarization , which means that you don’t have to notarize your application. However, when you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a945b66fd438
unity_docs
scripting
What is `SystemLanguage.ChineseTraditional` in Unity? Explain its purpose and usage.
SystemLanguage.ChineseTraditional Description ChineseTraditional. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Traditional Chinese language if (Application.systemLanguage == SystemLanguage.ChineseTraditional) { //...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_179cfa0bec50
unity_docs
editor
What is `Handles.DrawTexture3DVolume` in Unity? Explain its purpose and usage.
Handles.DrawTexture3DVolume Declaration public static void DrawTexture3DVolume ( Texture texture , float opacity = 1.0f, float qualityModifier = 1.0f, FilterMode filterMode = FilterMode.Bilinear, bool useColorRamp = false, Gradient customColorRamp = null); Parameters Parameter Description textu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be3ab79f3ee5
unity_docs
scripting
What is `OcclusionArea.center` in Unity? Explain its purpose and usage.
OcclusionArea.center public Vector3 center ; Description Center of the occlusion area relative to the transform. ```csharp using UnityEngine;[RequireComponent(typeof(OcclusionArea))] public class Example : MonoBehaviour { // Sets the center of the occlusion area to the center of the transform void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19c5b28df6d4
unity_docs
scripting
What is `FrameTimingManager.GetCpuTimerFrequency` in Unity? Explain its purpose and usage.
FrameTimingManager.GetCpuTimerFrequency Declaration public static ulong GetCpuTimerFrequency (); Returns ulong CPU timer frequency for current platform. Description This returns the frequency of CPU timer on the current platform, used to interpret timing results. If the platform does not support returning ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_783f4bb29b83
unity_docs
scripting
What is `Application.LowMemoryCallback` in Unity? Explain its purpose and usage.
Application.LowMemoryCallback Declaration public delegate void LowMemoryCallback (); Description This is the delegate function when a mobile device notifies of low memory. Additional resources: Application.lowMemory .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_912c4a1a5bb3
unity_docs
scripting
What are the parameters of `Networking.UnityWebRequest.PostWwwForm` in Unity?
Returns UnityWebRequest A UnityWebRequest configured to send form data to uri via POST . Description Creates a UnityWebRequest configured to send form data to a server via HTTP POST . This method creates a UnityWebRequest, sets the uri and sets the method to POST . The Content-Type header will be set to application/x-w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5e8e68b501c
unity_docs
rendering
Explain 'Introduction to Reflection Probes' in Unity.
A Reflection Probe is rather like a camera that captures a spherical view of its surroundings in all directions. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. Several reflection probes can be used in a given scene and objects can be set to use the cubemap produced...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbe779ca246a
unity_docs
scripting
Show me a Unity C# example demonstrating `RigidbodyConstraints.FreezeAll`.
RigidbodyConstraints.FreezeAll Description Freeze rotation and motion along all axes. ```csharp //Attach this script to a GameObject with a Rigidbody. Press the up and down keys to move the Rigidbody up and down. //Press the space key to freeze all positions and rotations.using UnityEngine;public class Example : Mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8617bef2039c
unity_docs
xr
Show me a Unity C# example demonstrating `Application.runInBackground`.
OS : iOS ignores this property because the operating system manages the application life cycle. For more information, refer to Managing your app's life cycle . Web : On Web, the update loop runs at approximately one update per second when the application is running in the background. In addition, mobile browsers might...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_791cc38ea2e5
unity_docs
scripting
What is `Experimental.GraphView.Group` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Group class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.Scope Implements interfaces: ICollectibleElement Description Allows interactive insertion of elements in a named scope. Properties P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2938cb5641c5
unity_docs
physics
In Unity's 'Moving objects with vectors', what is 'Addition' and how does it work?
When two vectors are added together, the result is equivalent to taking the original vectors as “steps”, one after the other. Note that the order of the two parameters doesn’t matter, since the result is the same either way. If the first vector is taken as a point in space then the second can be interpreted as an offse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3e3222cdb53f_doc_3
github
scripting
What does `ScaleToWidth` do in this Unity script? Explain its purpose and signature.
Scaling function to scale to a specifc width while retaining aspect.The to width.Width in pixels. Signature: ```csharp public static ScalingFunction ScaleToWidth(int widthInPixels) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_ab8fbbd1119d
unity_docs
scripting
What is `Search.PropertyDatabaseRecordKey.Equals` in Unity? Explain its purpose and usage.
PropertyDatabaseRecordKey.Equals Declaration public bool Equals ( Search.PropertyDatabaseRecordKey other ); Declaration public bool Equals (object obj ); Parameters Parameter Description other A record key. obj A record key. Returns bool True if they are equal, otherwise false. Description Te...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cab2f37cd17d
unity_docs
rendering
What is `Rendering.LocalKeyword.isOverridable` in Unity? Explain its purpose and usage.
LocalKeyword.isOverridable public bool isOverridable ; Description Whether this local shader keyword can be overridden by a global shader keyword. (Read Only). When the state of a local shader keyword and a global shader keyword with the same name contradict each other, Unity uses this value to determine whethe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.