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_923f0212c2db
unity_docs
ui
In Unity's 'Selector lists', what is 'Syntax' and how does it work?
A selector list consists of multiple selectors separated by commas: ``` selector1, selector2 {...} ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_71fd2e4392f8
unity_docs
editor
Explain 'Code and scene reload on entering Play mode' in Unity.
Authoring your application in Edit mode and then switching to Play mode to preview its runtime behavior is a core feature of iterative development in the Unity Editor. By default the Editor reloads both your code and scene assets as part of the transition from Edit mode to Play mode. It’s important to understand what U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1fd926147387
github
scripting
Write a Unity Editor script for Dependencies
```csharp using System; using System.IO; using System.Linq; using System.Text; using UnityEditor; using UnityEditor.PackageManager; using UnityEditor.PackageManager.Requests; using UnityEngine; namespace MagicLeap.SetupTool.Editor.Utilities { public static class MagicLeapRegistryPackageImporter { private static r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bc8bd75ea70
unity_docs
math
What is `Rendering.BatchDrawCommand.sortingPosition` in Unity? Explain its purpose and usage.
BatchDrawCommand.sortingPosition public int sortingPosition ; Description Together with BatchDrawCommand.flags , this specifies how to depth sort the instances in this draw command. If BatchDrawCommandFlags.HasSortingPosition is set, this contains the index of the first position in the BatchCullingOutputDr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42e84994c68b
unity_docs
ui
What is `UIElements.VisualElement.ClearClassList` in Unity? Explain its purpose and usage.
VisualElement.ClearClassList Declaration public void ClearClassList (); Description Removes all classes from the class list of this element. AddToClassList This method might cause unexpected results for built-in Unity elements, since they might rely on classes to be present in their list to function.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_030f7d947dba
unity_docs
networking
What is `Experimental.Rendering.GraphicsStateCollection.SendToEditor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsStateCollection.SendToEditor Declaration public bool SendToEditor (string fileName ); Parameters Parameter Description fileName Name of the GraphicsStateCollection file saved by the Editor. Returns bool Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94ab3b3932d7
unity_docs
scripting
Show me a Unity C# example demonstrating `Light.spotAngle`.
Light.spotAngle public float spotAngle ; Description The angle of the spot light's cone in degrees. This is used primarily for Spot lights and has no effect for Point lights Additional resources: Light component . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Change spot angle ra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59127d6c97db
unity_docs
scripting
What is `Serialization.ManagedReferenceUtility` in Unity? Explain its purpose and usage.
ManagedReferenceUtility class in UnityEngine.Serialization / Implemented in: UnityEngine.CoreModule Description Utility functions related to SerializeReference manipulation and access. Additional resources: SerializeReference , SerializedProperty , SerializationUtility . Static Properties Property Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df21ec0be36e
unity_docs
scripting
What is `HandleUtility.nearestControl` in Unity? Explain its purpose and usage.
HandleUtility.nearestControl public static int nearestControl ; Description The controlID of the nearest Handle to the mouse cursor. ```csharp using UnityEngine; using UnityEditor; public class ExampleScript : MonoBehaviour { public float value = 1.0f; } // A tiny custom editor for ExampleScript component. [...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e79a98e2b5a
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioType.MOD`.
AudioType.MOD Description The audio file you want to stream has the Protracker / Fasttracker MOD audio file format. Use this enumeration value to ensure the format type of the audio file has the MOD audio file format. Use this audio type for files with the extension .mod . 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_man_2541bd80a8af
unity_docs
editor
In Unity's 'Additional IL2CPP compiler arguments', what is 'IPreprocessBuildWithContext hook' and how does it work?
You can use the IPreprocessBuildWithContext callback to build scripts or the Build dialog to set the additional arguments: ```csharp class MyCustomPreprocessBuild: IPreprocessBuildWithReport { public int callbackOrder { get { return 0; } } public void OnPreprocessBuild(BuildReport report) { string addlArgs = ""; i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f75bf2f92dc
unity_docs
scripting
What is `Color.green` in Unity? Explain its purpose and usage.
Color.green public static Color green ; Description Solid green. RGBA is (0, 1, 0, 1). ```csharp //Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options to create a GameObject with a Renderer automatically attached). //This script changes the Color of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b0569977c08b
unity_docs
input
Explain 'IntegerField' in Unity.
An IntegerField lets users input a numerical integer value. It accepts and displays text input. You can set placeholder text to provide hints or instructions to the user on what to enter. You can also add validation functions to ensure that the entered data meets certain requirements. Note : To align an IntegerField wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_41a90a71abf9
unity_docs
rendering
In Unity's 'Transparent Bumped Specular', what is 'Creating Normal maps' and how does it work?
You can import normal maps created outside of Unity, or you can import a regular grayscale image and convert it to a Normal Map from within Unity. (This page refers to a legacy shader which has been superseded by the Standard Shader , but you can learn more about how to use Normal Maps in the Standard Shader )
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a90c32df9e44
unity_docs
scripting
Show me a Unity C# example demonstrating `EditorGUILayout.Vector4Field`.
defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns Vector4 The value entered by the user. Description Make an X, Y, Z & W field ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ab7606ff147
unity_docs
scripting
What is `UIElements.FloatField.StringToValue` in Unity? Explain its purpose and usage.
FloatField.StringToValue Declaration protected float StringToValue (string str ); Parameters Parameter Description str The string to convert. Returns float The float parsed from the string. Description Converts a string to a float.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_925a89679e32
unity_docs
scripting
Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.Malloc`.
The Malloc method allocates a block of unmanaged memory. It allows developers to specify the size in bytes and the alignment of the memory block. This method is critical in performance-critical applications where precise memory control is required. The memory allocated is not initialized to zero. Ensure that you free...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b37c9416744b
unity_docs
physics
What is `MonoBehaviour.OnMouseDown` in Unity? Explain its purpose and usage.
MonoBehaviour.OnMouseDown() Description OnMouseDown is called when the user presses the left mouse button while over the Collider . This event is sent to all scripts of the GameObject with Collider . Scripts of the parent or child objects do not receive this event. When multiple cameras are present, to determin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cca53cd724d8
unity_docs
scripting
What is `MultilineAttribute.ctor` in Unity? Explain its purpose and usage.
MultilineAttribute Constructor Declaration public MultilineAttribute (); Declaration public MultilineAttribute (int lines ); Parameters Parameter Description lines How many lines of text to make room for. Default is 3. Description Attribute used to make a string value be shown in a multiline textarea.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65445f56788d
unity_docs
scripting
What is `Application.memoryUsageChanged` in Unity? Explain its purpose and usage.
Application.memoryUsageChanged Description Informs about significant changes in the application's memory usage. This event occurs when there are significant changes in the application's memory usage, such as an increase to a dangerous level or a drop to a much safer level. You can use this event to balance your app...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e675e1f4c8c
unity_docs
input
What is `UIElements.MouseLeaveEvent.ctor` in Unity? Explain its purpose and usage.
MouseLeaveEvent Constructor Declaration public MouseLeaveEvent (); Description Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64b6cb207bc8
unity_docs
rendering
What are the parameters of `Rendering.CommandBuffer.DrawProcedural` in Unity?
Description Add a "draw procedural geometry" command. When the command buffer executes, this will do a draw call on the GPU, without any vertex or index buffers. This is mainly useful on Shader Model 4.5 level hardware where shaders can read arbitrary data from ComputeBuffer buffers. In the vertex shader, you'd typical...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_04644dcf19d0
unity_docs
rendering
In Unity's 'Use 16-bit precision in shaders', what is 'Create a 16-bit variable' and how does it work?
To use 16-bit precision in a shader, use half when you declare a scalar, a vector, or a matrix. For example: ``` half _Glossiness; half4 _Color; half4x4 _Matrix; ``` Note: Unity doesn’t support HLSL floating point suffixes. For example if you use 2.0h to create a half precision float, Unity treats it as a high precisio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c5cf6709424
unity_docs
math
Show me a Unity C# example demonstrating `Rendering.BlendShapeBufferLayout.PerShape`.
that belong to another blend shape, and so on The contiguous blend shape vertex data is stored as an array of 32-bit values. You must manually convert the data to an appropriate type. To determine which data relates to which blend shape, use Mesh.GetBlendShapeBufferRange . Unity creates this buffer when it creates the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89d2f15c7b95
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLight.color` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLight.color public Experimental.GlobalIllumination.LinearColor color ; Description The direct light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62c849c8edda
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.SizeOf` in Unity? Explain its purpose and usage.
UnsafeUtility.SizeOf Declaration public static int SizeOf (); Declaration public static int SizeOf (Type type ); Parameters Parameter Description type The type whose byte size is to be determined. Returns int The total size in bytes of the specified type, including any alignment padding required for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20491a1634e5
unity_docs
rendering
What is `Rendering.LocalKeyword.ctor` in Unity? Explain its purpose and usage.
LocalKeyword Constructor Declaration public LocalKeyword ( Shader shader , string name ); Parameters Parameter Description shader The Shader to use. name The name of the local shader keyword. Description Initializes and returns a LocalKeyword struct that represents an existing local shader keyword for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab253be4cadc
unity_docs
scripting
What is `IMGUI.Controls.TreeViewSelectionOptions.None` in Unity? Explain its purpose and usage.
TreeViewSelectionOptions.None Description If this flag is passed to TreeView.SetSelection no extra logic is be performed after setting selection. Additional resources: FireSelectionChanged , RevealAndFrame .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d40922297302
unity_docs
math
What is `NVIDIA.DLSSFeatureFlags` in Unity? Explain its purpose and usage.
DLSSFeatureFlags enumeration Description Options that represent subfeatures of DLSS. Properties Property Description None Disables every subfeature. IsHDR Indicates whether the input buffer uses high dynamic range. If set, the input buffer is raw luminance, if not set, the input buffer is normalized color. MV...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_2
github
scripting
What does `Create` do in this Unity script? Explain its purpose and signature.
Initializes the API instance. This starts up the streaming system. Preferably, this should be called from within Awake() and before accessing the Api.Instance. Any subsequent calls to Api.Create will throw an exception.Your WRLD API keyThe world space map behaviour. Cannot be changed once map is loaded.Parent object to...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_02e8dd62f2b3_doc_9
github
scripting
What does `CanAddNewEntry` do in this Unity script? Explain its purpose and signature.
Determines whether the current new entry can be added to the specified control.Unique identifier of the specified control.A value of true if the current new entry can be added to the specifiedcontrol; otherwise, a value of false. Signature: ```csharp public static bool CanAddNewEntry(Guid controlID) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_e9d4a03718bc
unity_docs
ui
Explain 'Scene template settings' in Unity.
To access the scene template Project settings, open the Project Settings window (menu: Edit > Project Settings ) and choose Scene Template from the category list. ## New Scene Menu settings The New Scene Menu setting (1) controls what happens when you create a new scene from the File menu: ( File > New Scene ) or usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c79525cbd22a
unity_docs
rendering
Explain 'Tree Editor concepts' in Unity.
The Tree Editor tool lets you create trees directly within the Unity Editor. Use the Tree Editor to create new trees, then use the Terrain system to add the trees to your world. For most uses, the SpeedTree Modeler replaces the Tree Editor. For backward compatibility with content created before SpeedTree was introduced...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fd209920ac12
unity_docs
rendering
In Unity's 'Draw and configure a line in 3D space', what is 'Set the Line Renderer Material' and how does it work?
By default, a Line Renderer uses the built-in Material, Default-Line . You can make many changes to the appearance of the line without changing this Material, such as editing the color gradient or width of the line. For other effects, such as applying a texture to the line, you will need to use a different Material. If...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_79599f03be34
github
scripting
Write a Unity C# script called Tooltip
```csharp using System; using shadcnui.GUIComponents.Core.Base; using shadcnui.GUIComponents.Core.Styling; using shadcnui.GUIComponents.Core.Theming; using shadcnui.GUIComponents.Core.Utils; using UnityEngine; namespace shadcnui.GUIComponents.Display { public class Tooltip : BaseComponent { private con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ae4c67d03148
unity_docs
audio
In Unity's 'Video file compatibility with target platforms', what is 'Recommendations for codec support' and how does it work?
Follow the vendor recommendations for your platform for codec support: Windows: Supported Media Formats , H.265 UWP: Supported Codecs Android: Supported Media Formats iOS: Compare iPhone Models Note: On older mobile platforms, codec choices are limited. You might need to inspect and convert or re-encode videos that you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4d9e9edac14
unity_docs
editor
What is `UIElements.IPanel.scaledPixelsPerPoint` in Unity? Explain its purpose and usage.
IPanel.scaledPixelsPerPoint public float scaledPixelsPerPoint ; Description Gives the current scaled pixels per point value of the panel. Return the resulting scaling that considers all effective inputs like the screen scaling factor from the operating system and the customizable scaling factor. The screen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa409f2a3f39
unity_docs
scripting
What is `Gizmos.DrawIcon` in Unity? Explain its purpose and usage.
Gizmos.DrawIcon Declaration public static void DrawIcon ( Vector3 center , string name , bool allowScaling = true); Declaration public static void DrawIcon ( Vector3 center , string name , bool allowScaling = true, Color tint = Color(255,255,255,255)); Parameters Parameter Description center ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6529c66f54ce
unity_docs
math
What is `ComputeShader` in Unity? Explain its purpose and usage.
ComputeShader class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.CoreModule Description Compute Shader asset. Compute shaders are programs that run on the GPU outside of the normal rendering pipeline. They correspond to compute shader assets in the project (.compute files). Compute sh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc92d2091464
unity_docs
physics
What is `PhysicsMaterialCombine2D.Average` in Unity? Explain its purpose and usage.
PhysicsMaterialCombine2D.Average Description Uses an Average algorithm when combining friction or bounciness. Given two friction or bounciness values, the Average algorithm used is: (valueA + valueB) * 0.5 .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42a1fd9b7fbd
unity_docs
rendering
What is `Camera.commandBufferCount` in Unity? Explain its purpose and usage.
Camera.commandBufferCount public int commandBufferCount ; Description Number of command buffers set up on this camera (Read Only). Additional resources: CommandBuffer , AddCommandBuffer , RemoveCommandBuffer , GetCommandBuffers .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_329c60a1b97f
unity_docs
scripting
What is `Camera.ScreenToWorldPoint` in Unity? Explain its purpose and usage.
Camera.ScreenToWorldPoint Declaration public Vector3 ScreenToWorldPoint ( Vector3 position ); Declaration public Vector3 ScreenToWorldPoint ( Vector3 position , Camera.MonoOrStereoscopicEye eye ); Parameters Parameter Description position A 2D screen space point in pixels, plus a z coordinate ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d60136a0e8d4
unity_docs
scripting
Give me an overview of the `FingerDof` class in Unity.
FingerDof enumeration Description Enumeration of all the muscles in a finger. These muscles are a sub-part of a human part. Additional resources: HumanPartDof . Properties Property Description ProximalDownUp The proximal down-up muscle. ProximalInOut The proximal in-out muscle. IntermediateCloseOpen The int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73fade92e6d5
unity_docs
input
Show me a Unity C# example demonstrating `KeyCode.Mouse5`.
KeyCode.Mouse5 Description Additional (or sixth) mouse button. Use this for detecting mouse button presses. The “5” mouse button is the sixth button on the user’s mouse if this additional button exists. Unity defines this as the "5" Mouse button, as the mouse Button numbering begins at 0. ```csharp using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f84050434cd
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.SubEmittersModule.GetSubEmitterEmitProbability`.
tersModule.GetSubEmitterEmitProbability Declaration public float GetSubEmitterEmitProbability (int index ); Parameters Parameter Description index The index of the sub-emitter. Returns float The emission probability for the sub-emitter Description Gets the probability that the sub-emitter emits part...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf2f74f5e0ed
unity_docs
scripting
What is `AssetBundle.LoadFromFile` in Unity? Explain its purpose and usage.
AssetBundle.LoadFromFile Declaration public static AssetBundle LoadFromFile (string path ); Declaration public static AssetBundle LoadFromFile (string path , uint crc ); Declaration public static AssetBundle LoadFromFile (string path , uint crc , ulong offset ); Parameters Parameter Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ccc313f3cb3
unity_docs
physics
What is `Physics.CapsuleCastAll` in Unity? Explain its purpose and usage.
Physics.CapsuleCastAll Declaration public static RaycastHit[] CapsuleCastAll ( Vector3 point1 , Vector3 point2 , float radius , Vector3 direction , float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseG...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_98251ee58fd3
github
scripting
Write a Unity C# MonoBehaviour script called Identification Manager
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace PlainSaveLoad { /// <summary> /// This is a very basic way of attaching an integer ID to a GameObject, /// but for this demo, it is sufficient. /// </summary> public class IdentificationManager : Mon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_706bf6c40007
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.NextPowerOfTwo`.
Mathf.NextPowerOfTwo Declaration public static int NextPowerOfTwo (int value ); Description Returns the next power of two that is equal to, or greater than, the argument. ```csharp using UnityEngine;public class ExampleClass : MonoBehaviour { void Start() { //Prints 8 to the console Debug.Log(Mathf.NextPo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c98004d7130
unity_docs
rendering
Give me an overview of the `ParticleSystemShapeTextureChannel` class in Unity.
ParticleSystemShapeTextureChannel enumeration Description The texture channel. Properties Property Description Red The red channel. Green The green channel. Blue The blue channel. Alpha The alpha channel.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd91edff1497
unity_docs
rendering
What is `Sprites.Packer` in Unity? Explain its purpose and usage.
Packer class in UnityEditor.Sprites Description Sprite Packer helpers. Static Properties Property Description atlasNames Array of Sprite atlas names found in the current atlas cache. Static Methods Method Description GetAlphaTexturesForAtlas Returns all alpha atlas textures generated for the specified atla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4a42c327e520
unity_docs
rendering
In Unity's 'Particle rendering and shading', what is 'Mesh Distribution: Non-uniform Random' and how does it work?
When Mesh Distribution is set to Non-uniform Random , you can customize how often Unity randomly assigns specific meshes to particles. To do this, you use the Meshes list and the Mesh Weighting field. In the Meshes list, the field on the left contains the mesh you want the Particle System to use, and the field on the r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_024df8d81102_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Creates a clone of the given TComponent as a child transform.IHierarchyBehaviour's will be initialized.The GameObject to clone.The type of Component that is being cloned.The new TComponent Signature: ```csharp public static TComponent CreateChild<TComponent>(this GameObject parent, TComponent toClone) where TCompon...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_e8e1f2177da0
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.Rotate`.
ot aligned with the world axis by default. Use the xAngle, yAngle and zAngle values exposed in the inspector to see how different rotation values apply to both cubes. You might notice the way the cubes visually rotate is dependant on the current orientation and Space option used. Play around with the values while selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79957d797840
unity_docs
scripting
What is `Vector4.Index_operator` in Unity? Explain its purpose and usage.
Vector4.this[int] public float this[int] ; Description Access the x, y, z, w components using [0], [1], [2], [3] respectively. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Vector4 p = new Vector4(); p[3] = 5; // the same as p.w = 5 } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c977b33ee019
unity_docs
rendering
What is `Search.SearchProvider.onDisable` in Unity? Explain its purpose and usage.
SearchProvider.onDisable public Unity.Android.Gradle.Manifest.Action onDisable ; Description Called when the SearchWindow is closed. Allows the search provider to release cached resources. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9107b8948e61
unity_docs
editor
What is `Device.SystemInfo.supportsGpuRecorder` in Unity? Explain its purpose and usage.
SystemInfo.supportsGpuRecorder public static bool supportsGpuRecorder ; Description This has the same functionality as SystemInfo.supportsGpuRecorder and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7be2d4a28d7e
unity_docs
rendering
In Unity's 'Self-Illuminated Vertex-Lit', what is 'Self-Illuminated Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the object that “emit” light by themselves, even when no light is shining on it. In the alpha channel, black is zer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c8c23a217143
unity_docs
rendering
Explain 'Changing how shaders work using keywords' in Unity.
Resources and techniques for adding shader keywords, using them to create branches and shader variants, and toggling them in the Unity Editor or in a script. Page Description Shader keywords workflow Learn about defining shader keywords to create shaders that share some common code, but have different functionality whe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0881578638c7
unity_docs
rendering
What is `TerrainTools.PaintContext.oldRenderTexture` in Unity? Explain its purpose and usage.
PaintContext.oldRenderTexture public RenderTexture oldRenderTexture ; Description (Read Only) The value of RenderTexture.active at the time CreateRenderTargets is called. PaintContext.Cleanup uses this value to restore the active RenderTexture to its original value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_374eabeec965
unity_docs
ui
Show me a Unity C# example demonstrating `Input.GetKeyUp`.
nput, refer to Input . Call this function from the Update function, since the state gets reset each frame. It will not return true until the user has pressed the key and released it again. For the list of key identifiers see Conventional Game Input . When dealing with input it is recommended to use Input.GetAxis ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6250962b128c
unity_docs
scripting
What is `Playables.PlayableGraph.GetOutput` in Unity? Explain its purpose and usage.
PlayableGraph.GetOutput Declaration public Playables.PlayableOutput GetOutput (int index ); Parameters Parameter Description index The output index. Returns PlayableOutput The PlayableOutput at this given index, otherwise null. Description Get PlayableOutput at the given index in the graph.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d346becd4ad8
unity_docs
physics
What is `Physics.IgnoreLayerCollision` in Unity? Explain its purpose and usage.
Physics.IgnoreLayerCollision Declaration public static void IgnoreLayerCollision (int layer1 , int layer2 , bool ignore = true); Description Makes the collision detection system ignore all collisions between any collider in layer1 and any collider in layer2 . Note that IgnoreLayerCollision will reset the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_733d2d063287
unity_docs
scripting
What is `SubsystemsImplementation.SubsystemProvider` in Unity? Explain its purpose and usage.
SubsystemProvider class in UnityEngine.SubsystemsImplementation / Implemented in: UnityEngine.SubsystemsModule Description A provider that supplies data to a subsystem, generally for platform-specific implementations. This is typically for use in platform-support packages.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1171b2715550
unity_docs
scripting
What is `ScriptableSingleton_1.GetFilePath` in Unity? Explain its purpose and usage.
ScriptableSingleton<T0>.GetFilePath Declaration protected static string GetFilePath (); Returns string The file path where this ScriptableSingleton is saved to. Description Get the file path where this ScriptableSingleton is saved to. If you call this function and your class has no FilePathAttribute , th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04517e97f0ec
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Screen` in Unity? Explain its purpose and usage.
Screen class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <screen> Android Manifest element. For more information about the element, see Android's documentation: Screen element Properties Property Description Attributes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f40d2dea3a7
unity_docs
editor
What are the parameters of `GameObjectUtility.SetStaticEditorFlags` in Unity?
Description Sets the StaticEditorFlags of the specified GameObject. StaticEditorFlags determine which Unity systems consider a GameObject as static, and include the GameObject in their precomputations in the Unity Editor. Setting StaticEditorFlags at runtime has no effect on these systems. For more information, see the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4df8613f1595
unity_docs
rendering
What is `TerrainData.CopyActiveRenderTextureToHeightmap` in Unity? Explain its purpose and usage.
TerrainData.CopyActiveRenderTextureToHeightmap Declaration public void CopyActiveRenderTextureToHeightmap ( RectInt sourceRect , Vector2Int dest , TerrainHeightmapSyncControl syncControl ); Parameters Parameter Description sourceRect The part of the active Render Texture to copy. dest The X and Y co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_deb37448364e
unity_docs
scripting
What is `Experimental.Lightmapping` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Lightmapping class in UnityEditor.Experimental Description Experimental lightmapping features. Additional resources: Lightmapping . Static Properties Property Description probesIgnoreDirectEnvironment If enabled ignores t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a33165f1e1ff
unity_docs
physics
Explain 'Use build callbacks' in Unity.
You can implement build callbacks to insert custom behavior into the Player build process. Unity invokes these callbacks whether you trigger the Player build from the Build Profiles window, from a custom menu, or from a command line build . Build callbacks are useful when adding custom build behavior for a package used...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_90170c8883c4
unity_docs
scripting
In Unity's 'Deploy a QNX project', what is 'Setup' and how does it work?
Use the following instructions to deploy QNX. Use one of the methods to locate the graphics.conf file that your screen loads: Start screen with the -c [path/to/graphics.conf] option. Let your screen automatically find the graphics.conf file in the folder inside GRAPHICS_ROOT . Make sure the folder that contains graphic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e797bcc6ff92
unity_docs
scripting
Show me a Unity C# example demonstrating `PlayerPrefs.GetFloat`.
Parameter Description key The key used to retrieve the corresponding float value in the player preferences. Returns float The float value corresponding to the given key . Returns 0,0f if no float value is found for the given key . Description Returns the float value that corresponds to key in the playe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3726e94d7731
unity_docs
scripting
Show me a Unity C# example demonstrating `Keyframe.inTangent`.
e.inTangent public float inTangent ; Description Sets the incoming tangent for this key. The incoming tangent affects the slope of the curve from the previous key to this key. The incoming tangent matches the incoming slope of the curve. A positive value for inTangent results in a downward tangent, while a ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0343ba9cad3e
unity_docs
rendering
What is `TextureMipmapLimitGroups.HasGroup` in Unity? Explain its purpose and usage.
TextureMipmapLimitGroups.HasGroup Declaration public static bool HasGroup (string groupName ); Parameters Parameter Description groupName Name of the texture mipmap limit group to verify. Returns bool Returns true if a texture mipmap limit group named groupName exists in the project. If that is not t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c784375ef148
unity_docs
rendering
What are the parameters of `Profiling.FrameDataView.GetGfxResourceInfo` in Unity?
Returns bool Returns true if resource exists in the frame and the information is available. Description Gets information for a given graphics resource identifier. Use this function to retrieve information about related Unity Objects for the graphics resource in the Profiler capture. On the Render Thread, the Profiler c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_384450982bd0
unity_docs
rendering
Explain 'Add a shader pass in a custom shader' in Unity.
A Pass is the fundamental element of a Shader object. It contains instructions for setting the state of the GPU, and the shader programs that run on the GPU. Simple Shader objects might contain only a single Pass, but more complex shaders can contain multiple Passes. You can use separate Passes to define parts of your ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6972ed559b0e
unity_docs
scripting
In Unity's 'PopupWindow', what is 'Inherited UXML attributes' and how does it work?
This element inherits the following attributes from its base class: Name Type Description binding-path string Path of the target property to be bound. display-tooltip-when-elided boolean When true, a tooltip displays the full version of elided text, and also if a tooltip had been previously provided, it will be overwri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a7755aef282
unity_docs
scripting
Show me a Unity C# example demonstrating `AssetBundle.LoadFromStream`.
s might be better for uncompressed Asset Bundles and reading lots of small assets or if the Asset Bundles has lots of assets in it and the asset are loaded in a random order. Do not dispose the Stream object while loading the AssetBundle or any assets from the bundle. Its lifetime should be longer than the AssetBundle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6cc2782b547
unity_docs
scripting
What is `Rendering.SplashScreen.StopBehavior` in Unity? Explain its purpose and usage.
StopBehavior enumeration Description The behavior to apply when calling Stop . Properties Property Description StopImmediate Immediately stop rendering the SplashScreen. FadeOut Jumps to the final stage of the Splash Screen and performs a fade from the background to the game.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3335e2823bbf_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The View handles user interface and user input Signature: ```csharp public class CountUpView: MonoBehaviour, IView ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_f67fe25c9407
unity_docs
editor
What is `AssetImporter.userData` in Unity? Explain its purpose and usage.
AssetImporter.userData public string userData ; Description Get or set any user data. This can be useful during asset post processing if you want to associate eg. a model with an auxillary xml file to control some parts of the importing or you can put your xml data directly in to the userData field. ```cshar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dccbdb9e3bc8
unity_docs
rendering
What is `ShaderUtil.GetRangeLimits` in Unity? Explain its purpose and usage.
ShaderUtil.GetRangeLimits Declaration public static float GetRangeLimits ( Shader s , int propertyIdx , int defminmax ); Parameters Parameter Description defminmax Which value to get: 0 = default, 1 = min, 2 = max. s The shader to check against. propertyIdx The property index to use. Description Get...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a5224d1fec1
unity_docs
scripting
What is `Progress.GetOptions` in Unity? Explain its purpose and usage.
Progress.GetOptions Declaration public static Progress.Options GetOptions (int id ); Parameters Parameter Description id The progress indicator's unique ID. Returns Options The progress indicator's option flags. Description Gets the options that you specified when you started the progress indicator...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b0d6d8fe782
unity_docs
scripting
What is `MPE.ChannelService.GetOrCreateChannel` in Unity? Explain its purpose and usage.
ChannelService.GetOrCreateChannel Declaration public static Unity.Android.Gradle.Manifest.Action GetOrCreateChannel (string channelName , Action<int,byte[]> handler ); Parameters Parameter Description channelName The name of the channel to retrieve. handler The channel handler to register. Returns Act...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_539ba51c4bb9
unity_docs
rendering
What is `TextureImporterSettings.singleChannelComponent` in Unity? Explain its purpose and usage.
TextureImporterSettings.singleChannelComponent public TextureImporterSingleChannelComponent singleChannelComponent ; Description Color or Alpha component Single Channel Textures uses. Single Channel Textures can have either an Alpha or a red Color channel. Additional resources: TextureImporterSingleChannel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3804c0d99db0
unity_docs
editor
Give me an overview of the `MessageType` class in Unity.
MessageType enumeration Description User message types. Additional resources: EditorGUI.HelpBox , EditorGUILayout.HelpBox . Properties Property Description None Neutral message. Info Info message. Warning Warning message. Error Error message.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42f7d4d0a4a2
unity_docs
scripting
What is `ChangeGameObjectParentEventArgs.newParentInstanceId` in Unity? Explain its purpose and usage.
ChangeGameObjectParentEventArgs.newParentInstanceId public int newParentInstanceId ; Description The instance ID of the GameObject that is the new parent of the target. Note that this is not the instance ID of its Transform .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77d65a834330
unity_docs
physics
Give me an overview of the `CompositeCollider2D` class in Unity.
CompositeCollider2D class in UnityEngine / Inherits from: Collider2D / Implemented in: UnityEngine.Physics2DModule Description A Collider that can merge other Colliders together. A CompositeCollider2D merges other Colliders together when their Collider2D.compositeOperation is anything other than Collider...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_24a8b8afada1
github
scripting
Write a Unity C# MonoBehaviour script called Random Light
```csharp using UnityEngine; using System.Collections; public class RandomLight : MonoBehaviour { public float rate = 1f; public float chance = 1f; protected float min = 0f; protected float max = 100f; void Start() { InvokeRepeating("ToggleLight", rate, rate); } void ToggleLigh...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_d1423774e647
unity_docs
rendering
In Unity's 'Particle rendering and shading', what is 'Render Mode' and how does it work?
Use Render Mode to choose between several 2D Billboard graphic modes and a Mesh mode. 3D Meshes give particles extra authenticity when they represent solid GameObjects , such as rocks, and can also improve the sense of volume for clouds, fireballs and liquids. Meshes must be read/write enabled to work in the Particle S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a8306c9f5e7b
unity_docs
rendering
In Unity's 'Introduction to GPU instancing', what is 'Indirect lighting compatibility' and how does it work?
GPU instancing supports the following types of GameObject: Dynamic GameObjects that get lighting from Light Probes . Static GameObjects that get lighting from lightmaps , if they have Contribute GI enabled in their Static Editor Flags , and they bake to the same lightmap texture. GameObjects that use Light Probe Proxy ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6831c8dbba38
unity_docs
physics
What are the parameters of `MonoBehaviour.InvokeRepeating` in Unity?
Description Invokes the specified method after a specified delay, then repeatedly at the specified rate. To cancel InvokeRepeating , use MonoBehaviour.CancelInvoke . The time and repeatRate parameters depend on Time.timeScale . For example, a Time.timeScale of 2 effectively halves the real-time values of time and repea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7e2133d01d2
unity_docs
editor
What is `Experimental.GraphView.EdgeDragHelper_1` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper<T0> class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.EdgeDragHelper Description Edge drag helper class. Properties Property Description draggedPort The port the edge is be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_76c284b1125d
unity_docs
rendering
In Unity's 'TabView', what is 'Create a TabView' and how does it work?
You can create a TabView with UI Builder, UXML, or C#. To create a TabView with C#, create a new instance of the TabView object and then add Tab elements to it. For example: ``` var tabView = new TabView("Title text"); var tab1 = new Tab("Tab 1"); var tab2 = new Tab("Tab 2"); var tab3 = new Tab("Tab 3"); tabView.Add(ta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83c8cb34a349
unity_docs
math
What is `LightTransport.RadeonRaysProbeIntegrator.Prepare` in Unity? Explain its purpose and usage.
RadeonRaysProbeIntegrator.Prepare Declaration public void Prepare ( LightTransport.IDeviceContext context , LightTransport.IWorld world , BufferSlice<Vector3> positions , float pushoff , int bounceCount ); Parameters Parameter Description world World. positions BufferSlice containing the probe posit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76d89fcce7e9
unity_docs
scripting
What is `Experimental.GraphView.StackNode.AddElement` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StackNode.AddElement Declaration public void AddElement ( Experimental.GraphView.GraphElement element ); Parameters Parameter Description element The GraphElement to add. Description Adds the specified GraphElement to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96da9bb37ec3
unity_docs
rendering
What is `ModelImporter.materialImportMode` in Unity? Explain its purpose and usage.
ModelImporter.materialImportMode public ModelImporterMaterialImportMode materialImportMode ; Description Material creation options. Determines the method used to handle materials during the import process. Additional resources: ModelImporterMaterialImportMode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ab0a66b07dc
unity_docs
scripting
What is `VideoClipImporter.GetTargetSettings` in Unity? Explain its purpose and usage.
VideoClipImporter.GetTargetSettings Declaration public VideoImporterTargetSettings GetTargetSettings (string platform ); Parameters Parameter Description platform Platform name. Returns VideoImporterTargetSettings The platform-specific import settings. Throws an exception if the platform is unknown. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91464d99f7b7
unity_docs
editor
Show me a Unity C# example demonstrating `InspectorOrderAttribute`.
InspectorOrderAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Shows sorted enum values in the Inspector enum UI dropdowns i.e. EditorGUI.EnumPopup , PropertyField etc. This attribute can be applied to enum types only. Note: this attribute...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_77a69772d39d
unity_docs
scripting
In Unity's 'tvOS Player Settings', what is 'Icon' and how does it work?
Use the Icon settings to customize the branding for your Apple TV app. Apple TV images consist of between two and five layers. Unity only provides two layers for Apple TV icons. For more information on layering images for Apple TV, see the Apple Developer documentation on Layered Images . Setting Function App icons Bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.