id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_542b4c12d292
unity_docs
editor
In Unity's 'Create an aspect ratio custom control', what is 'Create the custom control class' and how does it work?
Create a C# class that inherits from VisualElement with two attributes: width and height . The width and height attributes are used to calculate the aspect ratio. Create a Unity project with any template. Create a C# script named AspectRatio.cs with the following content: ```csharp using UnityEngine; using UnityEngine....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3d13c89661d4_doc_6
github
scripting
What does `GetKeyFromIndexInternal` do in this Unity script? Explain its purpose and signature.
Implements the public interface .Zero-based index of entry in ordered dictionary.The key.If is out of range. Signature: ```csharp protected abstract object GetKeyFromIndexInternal(int index); ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_037ff70b9afa
unity_docs
physics
What is `PhysicsJobOptions2D` in Unity? Explain its purpose and usage.
PhysicsJobOptions2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description A set of options that control how physics operates when using the job system to multithread the physics simulation. Multithreaded physics is currently an experimental feature. As such, many options are exposed th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8f557667278
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.DictationCompletedDelegate` in Unity? Explain its purpose and usage.
DictationRecognizer.DictationCompletedDelegate Declaration public delegate void DictationCompletedDelegate ( Windows.Speech.DictationCompletionCause cause ); Parameters Parameter Description cause The cause of dictation session completion. Description Delegate for DictationComplete event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb8288056b5a
unity_docs
rendering
What is `TextureFormat.RGBAFloat` in Unity? Explain its purpose and usage.
TextureFormat.RGBAFloat Description RGB color and alpha texture format, 32-bit floats per channel. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_36a081800d2d
unity_docs
rendering
Show me a Unity code example for 'Control scaling with Dynamic Resolution'.
Timing Stats checkbox. For more information about the functionality behind the Enable Frame Timing Stats property, see FrameTimingManager . Clicking the mouse, or tapping the screen with one finger, lowers the height and width resolution by the amount in the scaleWidthIncrement and scaleHeightIncrement variables respec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c02f1fb2c60e
unity_docs
rendering
Explain '2D game development' in Unity.
2D games in Unity differ on their game perspective and art style. Use this quickstart guide to create a 2D game in Unity . Topic Description Setup a project for 2D games Set up a project to create a 2D game. 2D game creation workflow Follow this workflow to learn how to create a 2D game in Unity. 2D game perspectives r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fc53ec099ba
unity_docs
scripting
Show me a Unity C# example demonstrating `ForceMode.VelocityChange`.
function call. In contrast to ForceMode.Impulse , VelocityChange will change the velocity of every rigidbody the same way regardless of differences in mass. This mode is useful for something like a fleet of differently-sized space ships that you want to control without accounting for differences in mass. In this mode,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1f63cc9d6fbf
unity_docs
xr
Explain 'Handle Android crashes' in Unity.
Crash handling for Unity applications on Android works as a chain of crash handlers. The crash handler at the start of the chain receives the crash first and it can process the crash and also forward the crash to the next crash handler in the chain. The order of the crash handlers in the chain is defined by the order i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e61713db20c
unity_docs
physics
What is `Collider2D.bounds` in Unity? Explain its purpose and usage.
Collider2D.bounds public Bounds bounds ; Description The world space bounding area of the collider. Note that this will be an empty bounding box if the collider is disabled or the game object is inactive.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d26003045fed
unity_docs
rendering
Show me a Unity C# example demonstrating `Texture.updateCount`.
Texture.updateCount public uint updateCount ; Description This counter is incremented when the Texture is updated. Note: If you perform an update from the GPU side, you should increment the counter yourself. (For instance, when blitting into a RenderTexture ). (see IncrementUpdateCount ). ```csharp using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e80e5dbd02e1
unity_docs
physics
What is `MonoBehaviour.OnMouseDrag` in Unity? Explain its purpose and usage.
MonoBehaviour.OnMouseDrag() Description OnMouseDrag is called when the user has clicked on a Collider and is still holding down the mouse. OnMouseDrag is called every frame while the mouse is down. This event is sent to all scripts attached to the Collider . This function is not called on objects that belong to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b37557214e52
unity_docs
math
What is `Vector2.ToString` in Unity? Explain its purpose and usage.
Vector2.ToString Declaration public string ToString (); Declaration public string ToString (string format ); Declaration public string ToString (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0525f8c0a2d
unity_docs
scripting
Give me an overview of the `ForceMode2D` class in Unity.
ForceMode2D enumeration Description Option for how to apply a force using Rigidbody2D.AddForce . Use this to apply a certain type of force to a 2D RigidBody. There are two types of forces to apply: Force mode and Impulse Mode. For a 3D Rigidbody see ForceMode . ```csharp //This script adds force to a Rigidbody....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3fc186c84eea_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Spawns an object at an 's raycast hit position when a trigger is activated. Signature: ```csharp public class ARInteractorSpawnTrigger : MonoBehaviour ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9bf3ccca59c
unity_docs
scripting
Show me a Unity C# example demonstrating `Material.CopyMatchingPropertiesFromMaterial`.
rd states and settings from mat to this material, but only if they exist in both materials. This method copies the following properties if they exist in both materials: Serialized material properties. Keyword states, if the keywords exist in both shaders. Material settings: Material.doubleSidedGI , Material.ena...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b08775c0054b
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.DrawWireOverlay` in Unity? Explain its purpose and usage.
ScriptableRenderContext.DrawWireOverlay Declaration public void DrawWireOverlay ( Camera camera ); Parameters Parameter Description camera The Scene view Camera to draw the overlay for. Description Schedules the drawing of a wireframe overlay for a given Scene view Camera. Note that DrawWireOverlay wor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e7a56fbd127a
unity_docs
xr
In Unity's 'Property bags', what is 'Included members' and how does it work?
Both methods of generating property bags generate properties for the following type members: Public fields. Private or internal fields tagged with [SerializeField] , [SerializeReference] , or [CreateProperty] . Public, private, or internal properties tagged with [Unity.Properties.CreateProperty] . Adding the [DontCreat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dda35524df15
unity_docs
editor
What is `TypeCache.MethodCollection` in Unity? Explain its purpose and usage.
MethodCollection struct in UnityEditor Description Represents a read-only collection of MethodInfo and implements an IList interface. Note: All IList methods which might alter the collection always throw NotSupportedException . Properties Property Description Count The number of elements in MethodCollecti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_276243eeb5ed
unity_docs
scripting
What is `FrameTimingManager.GetVSyncsPerSecond` in Unity? Explain its purpose and usage.
FrameTimingManager.GetVSyncsPerSecond Declaration public static float GetVSyncsPerSecond (); Returns float Number of vsyncs per second of the current platform. Description This returns the number of vsyncs per second on the current platform, used to interpret timing results. If the platform does not suppor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d72195655c78
unity_docs
rendering
In Unity's 'Marking textures as “Virtual Texturing Only”', what is 'Standard texture artifacts' and how does it work?
By default, Unity adds all textures sampled in Shader Graph to the build as standard texture artifacts. Additionally, Virtual Texturing imports all Texture Stack textures into a tiled streaming file, which Unity also includes in the build. If you mark a texture as Virtual Texture Only , Unity doesn’t include it as a st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dca7937d5c52
unity_docs
math
What is `AndroidJNI.CallStaticShortMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticShortMethodUnsafe Declaration public static short CallStaticShortMethodUnsafe (IntPtr clazz , IntPtr methodID , jvalue* args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Java N...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed6e929e012a
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGB_A1_ETC2_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGB_A1_ETC2_UNorm Description A four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d34653f34afb
unity_docs
scripting
What is `ScriptingImplementation` in Unity? Explain its purpose and usage.
ScriptingImplementation enumeration Description Scripting implementation (backend). Certain platforms might offer multiple scripting backends. Properties Property Description Mono2x The standard Mono 2.6 runtime. IL2CPP Unity's .NET runtime. WinRTDotNET Microsoft's .NET runtime.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb0d871beeb4
unity_docs
animation
Explain 'Recorder' in Unity.
com.unity.recorder ## Description The Recorder allows you to capture and save data from the Unity Editor during Play mode: animations, videos, images, audio, AOVs, and more. ## Released for Unity Package version 5.1.6 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be848de92fc5
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.Log10`.
Mathf.Log10 Declaration public static float Log10 (float f ); Description Returns the base 10 logarithm of a specified number. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // logarithm of 100 in base 10 // Prints 2 print(Mathf.Log10(100)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_150fd94ece56
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.TextField`.
text field. label Optional label to display in front of the text field. text The text to edit. style Optional GUIStyle . 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...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6f61b68adff0
github
scripting
Write a Unity C# ScriptableObject for Singleton Test
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; [Singleton] public class SingletonTest : ScriptableObject { private static SingletonTest instance = null; public string startTime = System.DateTime.Now.ToString(); public static SingletonTes...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_0a8b9b7e508d
unity_docs
animation
In Unity's 'Differences between package types', what is 'Guidelines for package creators' and how does it work?
If you’re creating a package, follow these guidelines to help you determine which format to choose: Use UPM when you need version control , dependency management, or plan to share or maintain the package across multiple projects. The UPM format is more suited for code and reusable elements. Use Asset package (.unitypac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7ce3b6794ea
unity_docs
scripting
What is `Vector3.y` in Unity? Explain its purpose and usage.
Vector3.y public float y ; Description Y component of the vector. ```csharp // Attach this script to a GameObject // Create two Input Fields in the Scene (Create>UI>Input Field) // Click on the GameObject and attach both Input Fields in the Inspector windowusing UnityEngine; using UnityEngine.UI;public class Ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bbd2bd748b1
unity_docs
editor
What is `MPE.ProcessService.Launch` in Unity? Explain its purpose and usage.
ProcessService.Launch Declaration public static int Launch (string roleName , params string[] keyValuePairs ); Parameters Parameter Description roleName The name that corresponds to the RoleProviderAttribute of the process to start. keyValuePairs Arguments passed to the slave process. Returns int Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc01d9fdb336
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.DiffIsValid`.
tion public static bool DiffIsValid ( VersionControl.AssetList assets ); Parameters Parameter Description assets List of assets. Description Returns true if starting a Diff task is a valid operation for at least one asset in the given AssetList . When all of the assets in the list are not added to version...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0d67f2b8a675
unity_docs
editor
Explain 'LiveOps Building Blocks prerequisites' in Unity.
To use the LiveOps Unity Building Blocks, set up the following in your project: Link your project to the Unity Dashboard Set a target environment Set up deployment ## Link your project to the Unity Dashboard To use Unity Cloud, follow the instructions to Configure a project for Unity Cloud . ## Set a target environm...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b48f00daecb8
unity_docs
scripting
What is `ModelImporterAvatarSetup.CopyFromOther` in Unity? Explain its purpose and usage.
ModelImporterAvatarSetup.CopyFromOther Description Copy the Avatar from another model. Use this enum value to copy the Avatar of another asset. This enum value does not create an Avatar sub-asset but still adds an Animator component to the root of the generated GameObject. Additional resources: ModelImporter.avata...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_103347a59c12_doc_5
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores the used to enable or disable gravity on continuous movement. Signature: ```csharp public Toggle useGravityToggle ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_978d63668b2b
unity_docs
xr
What is `XR.HapticCapabilities` in Unity? Explain its purpose and usage.
HapticCapabilities struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description Describes the haptic capabilities of the device at an XRNode in the XR input subsystem. Properties Property Description bufferFrequencyHz The frequency (in Hz) that this device plays back buffered haptic data. b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_042358479ea9
unity_docs
rendering
What is `UIElements.DynamicAtlasFilters.FilterMode` in Unity? Explain its purpose and usage.
DynamicAtlasFilters.FilterMode Description Excludes textures that use a filter mode that the atlas does not support. This filter is disabled by default. You can enable it to prevent artifacts that might occur when the atlas does not support the texture's filter mode, and cannot sample the texture correctly. Howev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b6b19de7647e
unity_docs
rendering
Explain 'Low-level native plug-in interface' in Unity.
Native Plug-ins in Unity can receive callbacks when certain events happen. You can use this to implement low-level rendering in your plug-in so it can work with Unity’s multithreaded rendering. ## Interface Registry To handle main Unity events, a plug-in must export UnityPluginLoad and UnityPluginUnload functions. IU...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a61dbdd8393b
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemInfo.processorModel`.
essorModel and SystemInfo.processorManufacturer values, you can categorize the devices running Unity applications to gather accurate performance metrics. You can use this data to test and optimize your application for improved performance. Returns unknown on WebGL platforms and IOS platforms platforms which don't ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ab1a07e5549
unity_docs
rendering
What is `Rendering.VertexAttribute.TexCoord7` in Unity? Explain its purpose and usage.
VertexAttribute.TexCoord7 Description Additional texture coordinate. UVs usually use Vector2 format. Vector2 uses two 32-bit floats; 8 bytes in total. This vertex attribute maps to the TEXCOORD7 semantic in HLSL. This UV channel is also commonly called "UV7". It corresponds to Mesh.uv8 . Additional resources: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_27e8c9e5dfff_doc_4
github
scripting
What does `OnDestroyed` do in this Unity script? Explain its purpose and signature.
Called when the object is destroyed and removed from the pool.This method must be implemented by the derived class to specify custom behavior during object destruction. Signature: ```csharp public abstract void OnDestroyed(); ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_5b59a2e23469
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.ReadHandle` in Unity? Explain its purpose and usage.
ReadHandle struct in Unity.IO.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description You can use this handle to query the status of an asynchronous read operation. Note: To avoid a memory leak, you must call Dispose. Properties Property Description JobHandle JobHandle that completes when the re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e4157bdee8b
unity_docs
physics
What is `SoftJointLimit.bounciness` in Unity? Explain its purpose and usage.
SoftJointLimit.bounciness public float bounciness ; Description When the joint hits the limit, it can be made to bounce off it. Bounciness determines how much to bounce off an limit. range { 0, 1 }.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e50baaf2ad0
unity_docs
math
Show me a Unity C# example demonstrating `GeometryUtility.CalculateBounds`.
d the Cube appears rotated. Scene mode shows the Cube rotated in the x, y and z axes, and shows in the Local tool handle . Rotating the Cube changes the positions of the eight LightProbeGroup Light Probes. The Scene mode rotates and zooms to show the Light Probes. Also, the Cube rotates and the LightProbe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2501d4ea1cfd
unity_docs
physics
What is `CharacterJoint.projectionDistance` in Unity? Explain its purpose and usage.
CharacterJoint.projectionDistance public float projectionDistance ; Description Set the linear tolerance threshold for projection. If the joint separates by more than this distance along its locked degrees of freedom, the solver will move the bodies to close the distance. Setting a very small tolerance may res...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee03f763fe15
unity_docs
rendering
What is `XR.XRDisplaySubsystem.XRRenderPass.GetRenderParameter` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.XRRenderPass.GetRenderParameter Declaration public void GetRenderParameter ( Camera camera , int renderParameterIndex , out XR.XRDisplaySubsystem.XRRenderParameter renderParameter ); Parameters Parameter Description camera Camera for the basis of the view and projection. renderParam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19e7336ee156
unity_docs
scripting
Give me an overview of the `ChangeGameObjectParentEventArgs` class in Unity.
ChangeGameObjectParentEventArgs struct in UnityEditor Description A change of this type indicates that the parent of a GameObject has changed. This happens when Undo.SetTransformParent or SceneManager.MoveGameObjectToScene is used. Properties Property Description instanceId The instance ID of the GameObj...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e42156faf5a5
unity_docs
scripting
Explain 'Scene picking controls' in Unity.
You can toggle the scene picking status of a GameObject to choose which GameObjects are selectable in the Scene view . By default, all GameObjects are pickable, which means you can select them in the Scene view. You can disable the pickability of a GameObject to prevent that GameObject from being added to selections in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c99cc4d7b250
unity_docs
xr
What is `RenderTextureCreationFlags` in Unity? Explain its purpose and usage.
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_man_f9bdcac37f31
unity_docs
physics
In Unity's 'fixed-updates', what is 'Fixed updates' and how does it work?
Unlike the main frame update , Unity’s physics system updates at a fixed time interval, which is important for the accuracy and consistency of physics simulations. The interval between fixed updates is often referred to as the fixed timestep . You can read or change the fixed timestep in two ways: In code, by setting t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2b3e7cb666c2
unity_docs
animation
Explain 'Playables Examples' in Unity.
## PlayableGraph Visualizer The examples on this page use the PlayableGraph Visualizer to illustrate the trees and nodes created by the Playables API. The PlayableGraph Visualizer is a tool available through GitHub. Note : The PlayableGraph Visualizer is a discontinued experimental package that may not work with your ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9398a44b347f
unity_docs
performance
What is `ParticleSystemJobs.ParticleSystemJobData.rotationalSpeeds` in Unity? Explain its purpose and usage.
ParticleSystemJobData.rotationalSpeeds public ParticleSystemJobs.ParticleSystemNativeArray3 rotationalSpeeds ; Description The angular velocity of each particle. When using 3D rotation, all three axes contain data, otherwise only the z-axis contains angular velocity data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af707a312680
unity_docs
rendering
What is `Experimental.GlobalIllumination.FalloffType.InverseSquared` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. FalloffType.InverseSquared Description Inverse squared distance falloff model. This is a physically based falloff model for point and spot lights. The falloff model falls off with the inverse squared distance between the light a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57c8a399d7af
unity_docs
scripting
What is `AI.NavMesh.IsLinkOccupied` in Unity? Explain its purpose and usage.
NavMesh.IsLinkOccupied Declaration public static bool IsLinkOccupied ( AI.NavMeshLinkInstance handle ); Parameters Parameter Description handle The link instance whose state to query. Returns bool True if an agent is currently traversing the link, otherwise false. Description Determines whether or n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0ec5b11defa
unity_docs
scripting
What are the parameters of `Caching.RemoveCache` in Unity?
Returns bool Returns true if the Cache is removed. Description Removes the Cache from cache list. ```csharp using System.IO; using UnityEngine;public class Example : MonoBehaviour { void RemoveCacheExample() { Directory.CreateDirectory("Cache1"); Directory.CreateDirectory("Cache2"); Dire...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94d68f67ccff
github
scripting
Write a Unity Editor script for Generated Singletons Menu
```csharp // Dynamically generated by SingletonAttribute using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public static class GeneratedSingletonsMenu { #if UNITY_EDITOR [UnityEditor.MenuItem("Window/Singletons/UnitySingleton")] public static void...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_5c681d53028a
unity_docs
rendering
Give me an overview of the `Texture` class in Unity.
Texture class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Base class for Texture handling. Static Properties Property Description allowThreadedTextureCreation Allow Unity internals to perform Texture creation on any thread (rather than the dedicated render th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77e047777291
unity_docs
scripting
What is `UIElements.PanelTextSettings` in Unity? Explain its purpose and usage.
PanelTextSettings class in UnityEngine.UIElements / Inherits from: ScriptableObject / Implemented in: UnityEngine.UIElementsModule Description Represents text rendering settings for a specific UI panel. PanelSettings.textSettings Inherited Members Properties Property Description hideFlags Should the obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d06ba708050
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.DoesChildrenNeedsSorting` in Unity? Explain its purpose and usage.
Hierarchy.DoesChildrenNeedsSorting Declaration public bool DoesChildrenNeedsSorting (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node. Returns bool true if the child nodes of a hierarchy node need to be sorted, false otherwise. Description Gets w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8459c80ffb34
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.Android.splitApplicationBinary`.
data separately in an APK Expansion File (.obb). For more information, refer to APK expansion files . AAB : Generates an AAB that contains a base module and one or more asset packs. The base module contains the executable (Java and Native) code (~10MB), and the data for the first scene. Asset packs contain the rest of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a108867659d3
unity_docs
editor
What is `Search.SearchSelection.MinIndex` in Unity? Explain its purpose and usage.
SearchSelection.MinIndex Declaration public int MinIndex (); Returns int Returns the lowest selected index. Description Lowest selected index of any item in the selection. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_AddSelection { static ISe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89ff2e392e3b
unity_docs
editor
Give me an overview of the `CameraEditorUtils` class in Unity.
CameraEditorUtils class in UnityEditor Description Utilities for cameras. Static Properties Property Description GameViewAspectRatio The aspect ratio of the game view. virtualCameraPreviewInstantiator Override this function to pass your own Camera provider to generate previews for virtual cameras. Static Met...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_efe73719b725
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.IsNativeAsset`.
et, otherwise false. Description Determines whether the asset is a native asset. A native asset is a file produced directly by Unity's serialization system (for example, a .mat material file is a native asset) Scenes, prefabs and assembly definitions aren't native assets. For more information, refer to Native ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0c9b75c3b6b1
unity_docs
rendering
In Unity's 'Parallax Diffuse', what is 'Parallax Normal mapped Properties' and how does it work?
Parallax Normal mapped is the same as regular Normal mapped , but with a better simulation of “depth”. The extra depth effect is achieved through the use of a Height Map . The Height Map is contained in the alpha channel of the Normal map . In the alpha, black is zero depth and white is full depth. This is most often u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65aa5d3d9de8
unity_docs
scripting
What is `Build.Reporting.PackedAssets` in Unity? Explain its purpose and usage.
PackedAssets class in UnityEditor.Build.Reporting / Inherits from: Object Description An extension to the BuildReport class that tracks how Assets contribute to the size of the build. The build process generates a PackedAssets report for each .sharedAssets or .resource file, or for each AssetBundle. Properti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50b1fc473634
unity_docs
rendering
What is `TextureImporterSettings.mipMapsPreserveCoverage` in Unity? Explain its purpose and usage.
TextureImporterSettings.mipMapsPreserveCoverage public bool mipMapsPreserveCoverage ; Description Enables or disables coverage-preserving alpha mipmapping. Enable this to rescale the alpha values of computed mipmaps so coverage is preserved. This means a higher percentage of pixels passes the alpha test and low...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f9ff62d84992
unity_docs
rendering
Explain 'Set up transparent videos in Unity' in Unity.
Import and prepare per-pixel transparent videos for use with Unity and edit global transparency levels of your videos. You can control the transparency of an entire video (global alpha), or, with certain video formats, you can use different transparency levels for each pixel (per-pixel alpha). This information covers h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0567d5752f7f
unity_docs
scripting
What is `UIElements.PanelSettings.referenceSpritePixelsPerUnit` in Unity? Explain its purpose and usage.
PanelSettings.referenceSpritePixelsPerUnit public float referenceSpritePixelsPerUnit ; Description Sprites have a Pixels Per Unit value that controls the pixel density of the sprite. For sprites that have the same Pixels Per Unit value as the Reference Pixels Per Unit value in the PanelSettings asset, the pix...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ff8d9827ae7
unity_docs
performance
What is `Unity.Collections.NativeArray_1.CopyFrom` in Unity? Explain its purpose and usage.
NativeArray<T0>.CopyFrom Declaration public void CopyFrom (T[] array ); Declaration public void CopyFrom (NativeArray<T> array ); Parameters Parameter Description array The array to copy elements from. Description Copies all the elements from a NativeArray<T0> or a managed array of the same length.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3cbf158b6758
unity_docs
animation
What is `Animations.AnimatorController.MakeUniqueLayerName` in Unity? Explain its purpose and usage.
AnimatorController.MakeUniqueLayerName Declaration public string MakeUniqueLayerName (string name ); Parameters Parameter Description name The desired name of the AnimatorLayer. Description Creates a unique name for the layers.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_214ef84c0021
unity_docs
rendering
What is `ShaderGUI` in Unity? Explain its purpose and usage.
ShaderGUI class in UnityEditor Description Abstract class to derive from for defining custom GUI for shader properties and for extending the material preview. Derive from this class for controlling how shader properties should be presented. For a shader to use this custom GUI use the 'CustomEditor' property in th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3be89fd23512
unity_docs
rendering
What are the parameters of `Search.SearchService.CreateIndex` in Unity?
Description Create a new search index. ``` static string EnsureDecalPropertyIndexing() { var materialDb = SearchService.EnumerateDatabases().FirstOrDefault(IsIndexingMaterialProperties); if (materialDb != null) return materialDb.name; if (!EditorUtility.DisplayDialog("Create decal material index", ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2228b24fe55
unity_docs
rendering
Give me an overview of the `ShaderData` class in Unity.
ShaderData class in UnityEditor Description This class describes a shader. Properties Property Description ActiveSubshader Returns the active subshader or null if none is currently active. ActiveSubshaderIndex Returns the index of the active subshader or -1 if none is currently active. SerializedSubshaderCou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa10da229774
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystemJobs.IJobParticleSystem.Execute`.
IJobParticleSystem.Execute Declaration public void Execute ( ParticleSystemJobs.ParticleSystemJobData jobData ); Parameters Parameter Description jobData Contains the particle properties. Description Implement this method to access and modify particle properties. You can use the following script to attra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_303e60302bc1
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3Int.ctor`.
Vector3Int Constructor Declaration public Vector3Int (int x , int y , int z ); Parameters Parameter Description x The X component of the Vector3Int. y The Y component of the Vector3Int. z The Z component of the Vector3Int. Description Initializes and returns an instance of a new Vector3Int with x, y,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3deacdf16db3
unity_docs
scripting
What is `Handheld.GetActivityIndicatorStyle` in Unity? Explain its purpose and usage.
Handheld.GetActivityIndicatorStyle Declaration public static int GetActivityIndicatorStyle (); Description Gets the current activity indicator style. See ActivityIndicatorStyle and AndroidActivityIndicatorStyle for the available activity indicator style options.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a824834aadd
unity_docs
networking
What is `Networking.MultipartFormFileSection.ctor` in Unity? Explain its purpose and usage.
MultipartFormFileSection Constructor Declaration public MultipartFormFileSection (string name , byte[] data , string fileName , string contentType ); Parameters Parameter Description name Name of this form section. data Raw contents of the file to upload. fileName Name of the file uploaded by this for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_feef4f49f650
unity_docs
ui
In Unity's 'Develop a native DSP audio plug-in', what is '2. Define your parameters in your audio plug-in file' and how does it work?
Create a list of parameters that would be useful for your user to interact with when they use your plug-in. To add your parameters to your plug-in: In your plug-in .cpp file, define your parameters as enum values. For example: ``` enum Param { P_FREQ, //Frequency parameter P_MIX, //Mix parameter P_NUM //An extra val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f0dfa04cd10
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.BuildConfigByName`.
rameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . name The name of the build configuration. Returns string The GUID of the build configuration or null if it doesn't exist. Description Returns the GUID of build configuration with the given nam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7235c6d2d122
unity_docs
editor
What is `RuntimePlatform.OSXEditor` in Unity? Explain its purpose and usage.
RuntimePlatform.OSXEditor Description In the Unity editor on macOS. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.OSXEditor) { Debug.Log("Do something spec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08e1d625a699
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.Vector2Field`.
rameter Description label Label to display above the field. value The value to edit. options An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the style . Returns Vector2 The value entered by the user. Description Make an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2235053a6341
unity_docs
editor
Explain 'Create a build from the Editor' in Unity.
Unity can build your application for different platforms with unique build configurations using build profiles in the Unity Editor. Note : The Build Profiles window was previously named Build Settings . Topic Description Introduction to build profiles Introduces build profiles and the profile types. Create and manage b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c96cfeee8ee
unity_docs
rendering
Show me a Unity C# example demonstrating `TrailRenderer.textureScale`.
TrailRenderer.textureScale public Vector2 textureScale ; Description A multiplier for the UV coordinates of the trail texture. ```csharp using UnityEditor; using UnityEngine; using System.Collections;[RequireComponent(typeof(TrailRenderer))] public class ExampleClass : MonoBehaviour { public LineTextureMode...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2144f1e6840a
unity_docs
editor
Show me a Unity C# example demonstrating `Android.AndroidPluginImporterUtilities.SetAndroidSharedLibraryType`.
AndroidPluginImporterUtilities.SetAndroidSharedLibraryType Declaration public static void SetAndroidSharedLibraryType ( PluginImporter importer , Android.AndroidSharedLibraryType type ); Description Sets the type of content that the shared library contains. This is only applicable for plugins that use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_607c8b982265
unity_docs
scripting
Explain 'Parent Constraint component' in Unity.
A Parent Constraint moves and rotates a GameObject as if it is the child of another GameObject in the Hierarchy window. It has certain advantages that are impossible when you make one GameObject the parent of another: A Parent Constraint doesn’t affect scale. A Parent Constraint can link to multiple GameObjects. A Game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_033a185dc710
unity_docs
input
What is `tvOS.Remote.allowRemoteRotation` in Unity? Explain its purpose and usage.
Remote.allowRemoteRotation public static bool allowRemoteRotation ; Description Configures if Apple TV Remote should autorotate all the inputs when Remote is being held in horizontal orientation. Default is false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e35835d09c0
unity_docs
scripting
What is `MonoBehaviour.LateUpdate` in Unity? Explain its purpose and usage.
MonoBehaviour.LateUpdate() Description LateUpdate is called every frame, if the Behaviour is enabled. LateUpdate is called after all Update functions have been called. This is useful to order script execution. For example a follow camera should always be implemented in LateUpdate because it tracks objects that m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe30221d6574
unity_docs
scripting
In Unity's 'Direct reference asset management', what is 'C# object references' and how does it work?
By default, Unity serializes any objects not derived from UnityEngine.Object by value. This means that it embeds the entire data of the object directly into the serialized data of the object that holds the reference. You can use the [SerializeReference] attribute to change this behavior and instruct Unity to store refe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_887dbd9f7220
unity_docs
rendering
Explain 'Optimize lighting in the Built-In Render Pipeline' in Unity.
To optimize the lights in your scene , avoid Unity using multiple render passes to render GameObjects , or doing too much work to render lighting. This reduces the number of the draw calls the CPU sends, and the number of vertices and pixels the GPU processes. Do the following: Use lightmapping to light static objects,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_040e797e3704
unity_docs
editor
What is `EditorGUI.IntPopup` in Unity? Explain its purpose and usage.
EditorGUI.IntPopup Declaration public static int IntPopup ( Rect position , int selectedValue , string[] displayedOptions , int[] optionValues , GUIStyle style = EditorStyles.popup); Declaration public static int IntPopup ( Rect position , int selectedValue , GUIContent[] displayedOptions , int[] o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_34921c449849
unity_docs
scripting
Explain 'Manage scenes in a build' in Unity.
Use the Scene List to organize the scenes in a build. Unity builds scenes in the order they appear in the list. You can add, exclude, remove, and reorder scenes in the list. Access the scene list by navigating to File > Build Profiles > Platforms > Scene List . Use the following actions to manage the scene list: List a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7abf326fc76f
unity_docs
physics
What is `Effector2D.colliderMask` in Unity? Explain its purpose and usage.
Effector2D.colliderMask public int colliderMask ; Description The mask used to select specific layers allowed to interact with the effector. Any Collider2D used by the effector will only interact with colliders on the specified layers. The layer of this GameObject will not be used by these colliders.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2c99b972d2cc_doc_3
github
scripting
What does `UpdateLoader` do in this Unity script? Explain its purpose and signature.
Refreshes the BuildTargetGroup XR Loader Signature: ```csharp private static void UpdateLoader(BuildTargetGroup buildTargetGroup) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_d7e79ceb7dad
unity_docs
scripting
What is `DragAndDrop.RemoveDropHandler` in Unity? Explain its purpose and usage.
DragAndDrop.RemoveDropHandler Declaration public static void RemoveDropHandler ( DragAndDrop.ProjectBrowserDropHandler handler ); Declaration public static void RemoveDropHandler ( DragAndDrop.SceneDropHandler handler ); Declaration public static void RemoveDropHandler ( DragAndDrop.HierarchyDropHandler ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7a4a0082cce
unity_docs
rendering
What is `Rendering.ScriptableCullingParameters.numIterationsEnclosingSphere` in Unity? Explain its purpose and usage.
ScriptableCullingParameters.numIterationsEnclosingSphere public int numIterationsEnclosingSphere ; Description When ScriptableCullingParameters.conservativeEnclosingSphere is true , the algorithm for calculating the position and size of the culling sphere is a conservative iterative solution. This property c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_223f7eba2c33
unity_docs
scripting
What is `Experimental.GraphView.GraphView.canPasteSerializedData` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.canPasteSerializedData public Experimental.GraphView.GraphView.CanPasteSerializedDataDelegate canPasteSerializedData ; Description Ask whether or not the serialized data can be pasted.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cc00e6b7c11
unity_docs
editor
What are the parameters of `VersionControl.Provider.Revert` in Unity?
Description Reverts the specified assets by undoing any changes done since the last time you synced. The last sync time is usually when Provider.GetLatest was last issued but may differ if an external version control client is used at the same time. Note that after this operation is completed, Asset Database is not ref...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c32ce6b3a8f9
unity_docs
scripting
Show me a Unity C# example demonstrating `Events.UnityAction`.
UnityAction Declaration public delegate void UnityAction (); Description Zero argument delegate used by UnityEvents. Use this to create some dynamic functionality in your scripts. Unity Actions allow you to dynamically call multiple functions. Since Unity Actions have no arguments, functions they call must also...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cda2751edaab
unity_docs
input
Show me a Unity C# example demonstrating `GUI.changed`.
GUI.changed public static bool changed ; Description Returns true if any controls changed the value of the input data. ```csharp // Draws a text field and when it gets modified prints a message using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public string stringToEdit = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d7682f413214
unity_docs
animation
Explain 'Animator Controller Asset' in Unity.
Use an Animator Controller asset to maintain a set of animations for a character or object. Animator Controller assets are created from the Assets menu, or from the Create menu in the Project window . In most situations, it’s normal to have multiple animations and transition between them when certain game conditions oc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.