id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_a3414e4b8cf8
unity_docs
input
What is `Experimental.GraphView.ContentDragger.OnMouseUp` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ContentDragger.OnMouseUp Declaration protected void OnMouseUp ( UIElements.MouseUpEvent e ); Parameters Parameter Description e The event. Description Called on mouse up event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88f962cb10dc
unity_docs
scripting
What is `FFTWindow` in Unity? Explain its purpose and usage.
FFTWindow enumeration Description Spectrum analysis windowing types. Use this to reduce leakage of signals across frequency bands. Properties Property Description Rectangular W[n] = 1.0. Triangle W[n] = 1 - abs(2n/N - 1). Hamming W[n] = 0.54 - 0.46 * cos(2π * n/N). Hanning W[n] = 0.5 * (1.0 - cos(2π * n/N))...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49ac1b168753
unity_docs
scripting
What is `UIElements.IMGUIContainer` in Unity? Explain its purpose and usage.
IMGUIContainer class in UnityEngine.UIElements / Inherits from: UIElements.VisualElement / Implemented in: UnityEngine.UIElementsModule Description Element that draws IMGUI content. For more information, refer to UXML element IMGUIContainer . Static Properties Property Description ussClassName USS cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_238e7bc9b4ea
unity_docs
physics
Show me a Unity C# example demonstrating `AssetPostprocessor.OnPreprocessAudio`.
AssetPostprocessor.OnPreprocessAudio() Description Add this function to a subclass to get a notification just before an audio clip is being imported. This lets you control the import settings trough code. ```csharp using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine;pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f7d36a23a6f
unity_docs
math
What is `Rendering.CommandBuffer.SetRayTracingFloatParams` in Unity? Explain its purpose and usage.
CommandBuffer.SetRayTracingFloatParams Declaration public void SetRayTracingFloatParams ( Rendering.RayTracingShader rayTracingShader , string name , params float[] values ); Declaration public void SetRayTracingFloatParams ( Rendering.RayTracingShader rayTracingShader , int nameID , params float[] value...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9616bae22b1
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.Translate`.
ativeTo = Space.Self); Description Moves the transform in the direction and distance of translation . If relativeTo is left out or set to Space.Self the movement is applied relative to the transform's local axes. (the x, y and z axes shown when selecting the object inside the Scene View.) If relativeTo is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee5fe9c84cd3
unity_docs
scripting
What is `GUISettings.selectionColor` in Unity? Explain its purpose and usage.
GUISettings.selectionColor public Color selectionColor ; Description The color of the selection rect in text fields. ```csharp using UnityEngine;public class Example : MonoBehaviour { string str = "This is a string with \n two lines of text"; void OnGUI() { GUI.skin.settings.selectionColor = Color.cyan; s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f15931f80e63
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.ForceOverLifetimeModule.randomized`.
ParticleSystem.ForceOverLifetimeModule.randomized public bool randomized ; Description When randomly selecting values between two curves or constants, this flag causes the system to choose a new random force on each frame. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ef25d5a553f
unity_docs
scripting
What is `Windows.Speech.KeywordRecognizer` in Unity? Explain its purpose and usage.
KeywordRecognizer class in UnityEngine.Windows.Speech / Inherits from: Windows.Speech.PhraseRecognizer / Implemented in: UnityEngine.CoreModule Description KeywordRecognizer listens to speech input and attempts to match uttered phrases to a list of registered keywords. There can be many keyword recognizers ac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_97e53f9fcc07_doc_4
github
scripting
What does `GetInstance` do in this Unity script? Explain its purpose and signature.
Returns singleton instance related to specific scene.Singleton Thrown when argument scene is not loaded. Signature: ```csharp public static T GetInstance(Scene scene) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_053ab1b6711b
unity_docs
scripting
What is `Playables.PlayableExtensions.GetSpeed` in Unity? Explain its purpose and usage.
PlayableExtensions.GetSpeed Declaration public static double GetSpeed (U playable ); Parameters Parameter Description playable The Playable used by this operation. Returns double The current speed. Description Returns the speed multiplier that is applied to the the current Playable . Use this tem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a64e3d3fe67
unity_docs
rendering
What is `Rendering.CommandBuffer.BeginRenderPass` in Unity? Explain its purpose and usage.
CommandBuffer.BeginRenderPass Declaration public void BeginRenderPass (int width , int height , int samples , NativeArray<AttachmentDescriptor> attachments , int depthAttachmentIndex , NativeArray<SubPassDescriptor> subPasses ); Declaration public void BeginRenderPass (int width , int height , int volum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eb8e2ff4c707
unity_docs
editor
Show me a Unity code example for 'Wrap content inside a scroll view'.
ple . Select Confirm . This creates three files: ScrollViewExample.cs , ScrollViewExample.uxml , and ScrollViewExample.uss . ## Create the scroll view Define the basic scroll view structure in the UI Document (UXML file), style the visual elements in the USS file, and add 15 buttons inside the second scroll view in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9aaa64abbd7d
unity_docs
rendering
What is `Rendering.CommandBuffer.ReleaseTemporaryRT` in Unity? Explain its purpose and usage.
CommandBuffer.ReleaseTemporaryRT Declaration public void ReleaseTemporaryRT (int nameID ); Parameters Parameter Description nameID Shader property name for this texture. Description Add a "release a temporary render texture" command. Releases a temporary render texture with given name. Presumably you have...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45bb4438aa5e
unity_docs
scripting
Give me an overview of the `SerializedObject` class in Unity.
SerializedObject class in UnityEditor Description SerializedObject and SerializedProperty are classes for editing serialized fields on Unity objects in a completely generic way. These classes automatically handle dirtying individual serialized fields so they will be processed by the Undo system and styled co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d626ebbb1136
unity_docs
scripting
Explain 'Diff tool support' in Unity.
You can use the Revision Control Diff/Merge setting to set an installed diff tool as the default revision tool. You can also use this setting to define a custom revision tool with specific layouts. If you want to change the diff tool that Unity uses, open the Preferences window, and navigate to the External Tools secti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_511bcea32f01
unity_docs
rendering
What is `Experimental.Rendering.GraphicsStateCollection.AddGraphicsStateForVariant` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsStateCollection.AddGraphicsStateForVariant Declaration public bool AddGraphicsStateForVariant ( Shader shader , Rendering.PassIdentifier passId , LocalKeyword[] keywords , Experimental.Rendering.GraphicsStateCollec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_095870bdcf44
unity_docs
rendering
What is `TerrainTools.TerrainPaintUtility.BeginPaintHoles` in Unity? Explain its purpose and usage.
TerrainPaintUtility.BeginPaintHoles Declaration public static TerrainTools.PaintContext BeginPaintHoles ( Terrain terrain , Rect boundsInTerrainSpace , int extraBorderPixels = 0, bool fillOutsideTerrain = true); Parameters Parameter Description terrain Reference Terrain tile. boundsInTerrainSpace ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7645e996db3d
unity_docs
math
What is `AndroidJNI.ToShortArray` in Unity? Explain its purpose and usage.
AndroidJNI.ToShortArray Declaration public static IntPtr ToShortArray (short[] array ); Description Converts a managed array of System.Int16 to a Java array of short . Additional resources: AndroidJNI.NewShortArray , AndroidJNI.SetShortArrayElement .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_902eb82eff52
unity_docs
editor
Show me a Unity C# example demonstrating `BuildPipeline.BuildAssetBundles`.
cifying a targetPlatform that isn't the active platform causes Unity to change to the new platform and reimport assets. This can cause issues if you create a build in batch mode. To avoid this issue, use the -buildTarget command line argument to set the target platform and then call BuildAssetBundles . Additional ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8f02c6d1454
unity_docs
animation
What is `Animations.TransformStreamHandle.SetPosition` in Unity? Explain its purpose and usage.
TransformStreamHandle.SetPosition Declaration public void SetPosition ( Animations.AnimationStream stream , Vector3 position ); Parameters Parameter Description position The position of the transform in world space. stream The AnimationStream that holds the animated values. Description Sets the pos...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4ca898e9196f
unity_docs
rendering
Show me a Unity code example for 'Add a shader pass in a custom shader'.
s Material.FindPass , Material.GetPassName , or ShaderData.Pass.Name . Note: Material.GetShaderPassEnabled and Material.SetShaderPassEnabled do not reference Passes by name; instead, they reference Passes using the value of the LightMode tag . ## Example This example code demonstrates the syntax for creating a Shader...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82c3d3f65f6d
unity_docs
input
What are the parameters of `Search.SearchExpression.GetFormatString` in Unity?
Returns bool Returns true if the SearchExpression was succesfully converted to a format string. Description Extract a format string from a given expression. This function should be used to extract a format string from an input parameter of a SearchExpression. For example: the evaluator print{"this is it: @label"} takes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6347fb1f1e5d
unity_docs
editor
Show me a Unity C# example demonstrating `AssetImporter.AddRemap`.
e) to an external Asset of the same type. Apply changes by writing the metadata and reimporting the Asset. Instances of the Asset automatically use the mapped object once you have reimported the Asset. If the type of the external asset does not match the type of the sub-asset, or if the reference is null, instances of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_08ed8507c021
github
scripting
Write a Unity Editor script for Global Links Report Builder
```csharp #if UNITY_EDITOR using Hudossay.AttributeEvents.Assets.Runtime.EventLinks; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace Hudossay.AttributeEvents.Assets.Runtime.Static { internal static class GlobalLinksReportBuilder { public static stri...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_00e8c5c24dc1
unity_docs
xr
Explain 'Use passphrase-protected SSH keys with SSH Git URLs' in Unity.
When you use Git to access a private repository over SSH, Git uses an SSH client to establish a secure connection with the server. While establishing the connection, Git uses your configured SSH key during the SSH handshaking phase. During this phase, the SSH client needs to be able to read your key. However, if you en...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a23d3e25de14
unity_docs
scripting
What is `AscentCalculationMode` in Unity? Explain its purpose and usage.
AscentCalculationMode enumeration Description Method used for calculating a font's ascent. The ascent is the distance from the baseline to the top of the font. Font designers define this differently within the metrics of various fonts: some fonts will use the bounding box height, some will use cap height, and othe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc000e8c34ed
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.SetViewController` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.SetViewController Declaration public void SetViewController ( UIElements.CollectionViewController controller ); Parameters Parameter Description controller The controller to use with this view. Description Assigns the view controller for this view and registers all events requi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b66c979693f6
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Arabic`.
SystemLanguage.Arabic Description Arabic. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Arabic language if (Application.systemLanguage == SystemLanguage.Arabic) { //Outputs into console that the system is Arabic D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67473a3626d5
unity_docs
editor
What is `Device.SystemInfo.GetGraphicsFormat` in Unity? Explain its purpose and usage.
SystemInfo.GetGraphicsFormat Declaration public static Experimental.Rendering.GraphicsFormat GetGraphicsFormat ( Experimental.Rendering.DefaultFormat format ); Description This has the same functionality as SystemInfo.GetGraphicsFormat 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_sr_c615fe201cdf
unity_docs
rendering
What is `RenderTexture.sRGB` in Unity? Explain its purpose and usage.
RenderTexture.sRGB public bool sRGB ; Description Does this render texture use sRGB read/write conversions? (Read Only). When Linear color space is used, render textures can perform Linear to sRGB conversions when rendering into them and sRGB to Linear conversions when sampling them in the shaders. The value...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7285ada2b3c
unity_docs
editor
What is `SerializedProperty.managedReferenceValue` in Unity? Explain its purpose and usage.
SerializedProperty.managedReferenceValue public object managedReferenceValue ; Description The object assigned to a field with SerializeReference attribute. For use when propertyType is SerializedPropertyType.ManagedReference . The value object must be a type that is compatible with the base type of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bb2953c2afed
github
scripting
Write a Unity Editor script for Default Field Search Settings Editor
```csharp using FieldSearch.Helpers.Cache; using FieldSearch.Settings.Base; using UnityEditor; using UnityEngine; namespace FieldSearch.Settings.Editor { /// <summary> /// Editor for <see cref="BaseFieldSearchSettings"/> /// </summary> [CustomEditor(typeof(BaseFieldSearchSettings), true)] public c...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_40fc92a497c3
unity_docs
audio
What is `MonoBehaviour.OnAudioFilterRead` in Unity? Explain its purpose and usage.
MonoBehaviour.OnAudioFilterRead(float[], int) Parameters Parameter Description data An array of floats comprising the audio data. channels An int that stores the number of channels of audio data passed to this delegate. Description If OnAudioFilterRead is implemented, Unity will insert a custom filter in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49d159dcab94
unity_docs
scripting
What is `QualitySettings.useLegacyDetailDistribution` in Unity? Explain its purpose and usage.
QualitySettings.useLegacyDetailDistribution public static bool useLegacyDetailDistribution ; Description Use the legacy pre-2022.2 algorithm for distributing details on terrain. If set, this uses the algorithm for details distribution used before Unity 2022.2. Only use this if you want exact details placement ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5aa171f2e3c0
unity_docs
xr
Explain 'XR' in Unity.
XR is an umbrella term that includes the following types of applications: Virtual Reality (VR): The application simulates a self-contained environment around the user. Mixed Reality (MR): The application combines its own environment with the user’s real-world environment and allows them to interact with each other. Aug...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e42a2a74d4dd
unity_docs
rendering
What is `RenderTexture.GenerateMips` in Unity? Explain its purpose and usage.
RenderTexture.GenerateMips Declaration public void GenerateMips (); Description Generate mipmap levels of a render texture. Use this function to manually re-generate mipmap levels of a render texture. The render texture has to have mipmaps ( useMipMap set to true), and automatic mip generation turned off ( au...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d585d54188c4_doc_10
github
scripting
What does `AbortPackageUpload` do in this Unity script? Explain its purpose and signature.
Cancel the uploading task for a package with the provided package id Signature: ```csharp public static void AbortPackageUpload(string packageId) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bbf93294a89b_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Links one event from broadcaster GameObject to one method from listener GameObject's MoonoBehaviour. Signature: ```csharp public class EventLink<T1, T2, T3, T4> : EventLinkBase ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0874716d59d5
unity_docs
physics
What is `NPOTSupport` in Unity? Explain its purpose and usage.
NPOTSupport enumeration Description NPOT textures support. Properties Property Description Restricted Limited NPOT support: no mipmaps and clamp wrap mode will be forced. Full Full NPOT support.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e5e8d6ad50e
unity_docs
scripting
Explain 'Getting started with Android' in Unity.
Set up a project for Android development. Install Android-specific dependencies and configure settings to get you started on your Unity project for Android. Topic Description Android environment setup Explains how to set up a Unity project for Android development. Android Player settings Reference documentation for And...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbcc481bbedb
unity_docs
rendering
What is `ModelImporterMaterialLocation.External` in Unity? Explain its purpose and usage.
ModelImporterMaterialLocation.External Description Extract the materials and textures from the model. Unity extracts the materials to the Materials folder, at the same level as the model file. Unity also extracts the embedded textures to the folder named <modelName>.fbm. For example, if the model is Assets/Model/My...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e6a33c5ba7b
unity_docs
scripting
What is `Rendering.VertexAttributeFormat.SInt8` in Unity? Explain its purpose and usage.
VertexAttributeFormat.SInt8 Description 8-bit signed integer. This format matches the @sbyte@ data type in C#, with values ranging from -128 to 127. Additional resources: Mesh class, VertexAttribute enum, Mesh.GetVertexAttributeFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2992db1ab046
unity_docs
editor
What is `EditorGUILayout.GradientField` in Unity? Explain its purpose and usage.
EditorGUILayout.GradientField Declaration public static Gradient GradientField ( Gradient value , params GUILayoutOption[] options ); Declaration public static Gradient GradientField (string label , Gradient value , params GUILayoutOption[] options ); Declaration public static Gradient Gradient...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_41fbeac61fe0
unity_docs
editor
Give me an overview of the `UndoPropertyModification` class in Unity.
UndoPropertyModification struct in UnityEditor Description Additional resources: Undo.postprocessModifications . Properties Property Description currentValue The current value of the modified property. Additional resources: PropertyModification. keepPrefabOverride Indicates whether to retain modificatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91ac64679912
unity_docs
math
What is `Rendering.VisibleReflectionProbe` in Unity? Explain its purpose and usage.
VisibleReflectionProbe struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Holds data of a visible reflection reflectionProbe. After ScriptableRenderContext.Cull is done, CullingResults.visibleReflectionProbes will contain an array of reflection reflectionProbes that are vis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_537c1f6a5354
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.gradientValue`.
SerializedProperty.gradientValue public Gradient gradientValue ; Description Value of a gradient property. Additional resources: propertyType , SerializedPropertyType.Gradient , Gradient . ```csharp using System; using UnityEditor; using UnityEngine;[CreateAssetMenu] public class SerializedPropertyGradien...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88256f81dc2c
unity_docs
editor
What is `EditorGUILayout.BoundsIntField` in Unity? Explain its purpose and usage.
EditorGUILayout.BoundsIntField Declaration public static BoundsInt BoundsIntField ( BoundsInt value , params GUILayoutOption[] options ); Declaration public static BoundsInt BoundsIntField (string label , BoundsInt value , params GUILayoutOption[] options ); Declaration public static BoundsInt ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_51b33c1047b4
unity_docs
rendering
In Unity's 'Pass information to shader compilers in HLSL', what is 'Add a #define directive' and how does it work?
Unity supports the standard HLSL #define directive. For more information, see [#define directive] (https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-pre-define) in the Microsoft HLSL documentation. For example: ``` Shader "Custom/ExampleShader" { SubShader { Pass { HLSLPROGRAM ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_203a620d92e8
unity_docs
input
What is `NVIDIA.OptimalDLSSSettingsData` in Unity? Explain its purpose and usage.
OptimalDLSSSettingsData struct in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description Represents the performance settings that DLSS recommends based on the system's graphics card and the size of the input and output color buffers. Additional resources: GraphicsDevice.GetOptimalSettings Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43287aec9d9a
unity_docs
scripting
What is `Build.Reporting.BuildReport.SummarizeErrors` in Unity? Explain its purpose and usage.
BuildReport.SummarizeErrors Declaration public string SummarizeErrors (); Description Returns a string summarizing any errors that occurred during the build Convenience method for summarizing errors (or exceptions) that occurred during a build into a single line of text. If no error was logged this returns an e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5125075fa73
unity_docs
math
What is `Rendering.RayTracingAccelerationStructure.Dispose` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.Dispose Declaration public void Dispose (); Description Destroys this RayTracingAccelerationStructure and frees the GPU memory used for storing acceleration structure data. Additional resources: RayTracingAccelerationStructure.Release .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fc9912422b1
unity_docs
scripting
What is `GameObject.FindWithTag` in Unity? Explain its purpose and usage.
GameObject.FindWithTag Declaration public static GameObject FindWithTag (string tag ); Parameters Parameter Description tag The tag to search for. Description Retrieves the first active GameObject tagged with the specified tag. Returns null if no GameObject has the tag. Tags must be declared in the t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b2db381557c7
unity_docs
scripting
Show me a Unity code example for 'Technical limitations'.
to this limitation, anything in the C# System.Threading namespace isn’t supported. For example, use of the System.Threading.Timer class doesn’t trigger in Web builds. As well, any timeouts specified in System.Threading.CancellationTokenSource don’t actually time out, because the cancellation mechanism is based on Syste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0482229507d4
unity_docs
scripting
What is `GUISettings.cursorFlashSpeed` in Unity? Explain its purpose and usage.
GUISettings.cursorFlashSpeed public float cursorFlashSpeed ; Description The speed of text field cursor flashes. This is how many flashes / second. If you set it to 0, flashing will be disabled. If you set it to -1, the flashing speed will match the system default of the end user. ```csharp using UnityEngine;p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dab61ed8eb1f
unity_docs
scripting
What is `Camera.current` in Unity? Explain its purpose and usage.
Camera.current public static Camera current ; Description The camera we are currently rendering with, for low-level render control only (Read Only). Most of the time you will want to use Camera.main instead. Use this function only when implementing one of the following events: MonoBehaviour.OnRenderImage ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd0fda700ba9
unity_docs
rendering
What are the parameters of `Texture2D.SetPixels` in Unity?
Description Sets the pixel colors of an entire mipmap level. This method sets pixel data for the texture in CPU memory. Texture.isReadable must be true , and you must call Apply after SetPixels to upload the changed pixels to the GPU. Apply is an expensive operation because it copies all the pixels in the texture even ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae81f4f3ea1f
unity_docs
rendering
What is `LightProbeProxyVolume.RefreshMode` in Unity? Explain its purpose and usage.
RefreshMode enumeration Description An enum that describes how Unity refreshes a Light Probe Proxy Volume in the Player. Additional resources: Light Probe Proxy Volume . Properties Property Description Automatic Automatically updates the Light Probe Proxy Volume when its volume or configuration changes or wh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_71fef7be23ed
unity_docs
physics
In Unity's 'Sub Emitters module reference', what is 'Spawn condition dropdown' and how does it work?
The Spawn condition dropdown contains the following settings. Spawn condition Function Birth Emits particles from the start to the end of a parent particle’s lifetime. Collision Emits particles when a parent particle collides with another GameObject . For more information on how to control particle collisions, refer to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c018cb24811
unity_docs
scripting
What is `GUILayout.MinHeight` in Unity? Explain its purpose and usage.
GUILayout.MinHeight Declaration public static GUILayoutOption MinHeight (float minHeight ); Description Option passed to a control to specify a minimum height. Minimum height for a window. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a window you can resize between 80px...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b745a32da6d6
unity_docs
math
What is `CanvasRenderer.AddUIVertexStream` in Unity? Explain its purpose and usage.
CanvasRenderer.AddUIVertexStream(List<UIVertex>,List<Vector3>,List<Color32>,List<Vector2>,List<Vector2>,List<Vector3>,List<Vector4>) Parameters Parameter Description verts The UIVertex list to split. positions The destination list for the verts positions. colors The destination list for the verts colors. uv0...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_077949390520
unity_docs
scripting
What is `UIElements.UxmlTypeAttributeDescription_1.GetValueFromBag` in Unity? Explain its purpose and usage.
UxmlTypeAttributeDescription<T0>.GetValueFromBag Declaration public Type GetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc ); Parameters Parameter Description bag The attribute bag. cc The context in which the method retrieves attribute values. Returns Type The attrib...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ec81ae902f57
unity_docs
editor
Explain 'Get started with UI Toolkit' in Unity.
Want to create your first UI with UI Toolkit? Use this basic UI Toolkit workflow example to get started. Note : For demonstration purposes, this guide describes how to add UI controls for the Editor UI. However, the instructions on adding UI controls to a UI Document also apply to runtime UI. For more information, refe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5addc858b194
unity_docs
physics
In Unity's 'Create a compound collider', what is 'Build a compound collider' and how does it work?
Create or choose the parent GameObject. In most cases, this is the GameObject that contains the Mesh and Mesh Renderer . Add a Rigidbody to the parent GameObject, and configure it as needed for your project (see Introduction to rigid body physics ). Create an empty GameObject as a child of the parent GameObject. Right-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a821cc27972
unity_docs
animation
What is `UIElements.Experimental.IValueAnimation` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IValueAnimation interface in UnityEngine.UIElements.Experimental Description Base interface for transition animations. Properties Property Description durationMs Duration of the transition in milliseconds. isRunning...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_597d964a8a58
unity_docs
ui
What is `GUI.VerticalSlider` in Unity? Explain its purpose and usage.
GUI.VerticalSlider Declaration public static float VerticalSlider ( Rect position , float value , float topValue , float bottomValue ); Declaration public static float VerticalSlider ( Rect position , float value , float topValue , float bottomValue , GUIStyle slider , GUIStyle thumb ); Parame...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_479b60623713
unity_docs
scripting
Explain 'Place a Reflection Probe' in Unity.
You can add the Reflection Probe component to any object in a Scene but it’s standard to add each probe to a separate empty GameObject. The usual workflow is: Create a new empty GameObject (menu: GameObject > Create Empty ) and then add the Reflection Probe component to it (menu: Component > Rendering > Reflection Prob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8bae54969831
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.RegisterCompleteObjectUndo`.
n, for that you should use the dedicated functions. See Undo.SetTransformParent , Undo.AddComponent , Undo.DestroyObjectImmediate . If the object is part of the current Scene (e.g. a game object in the Hierarchy or a component attached to such game object), calling this function will immediately mark the Scene as mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_36c485456114
unity_docs
editor
Show me a Unity code example for 'Assembly Definition file format reference'.
he expression defining the version or range of versions of the resource. define :string – The symbol to define. For more information, refer to Version Defines . ## Example with assembly names and included platforms The following example Assembly Defintion JSON uses assembly names for references to other Assembly Defi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e37afcda7c91
unity_docs
scripting
What is `Rendering.BatchDrawCommandProcedural.indexBufferHandle` in Unity? Explain its purpose and usage.
BatchDrawCommandProcedural.indexBufferHandle public GraphicsBufferHandle indexBufferHandle ; Description Handle of an index buffer to use for indexed drawing. If no buffer is provided the draws will be non indexed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bef49693579
unity_docs
rendering
What are the parameters of `AssetDatabase.RemoveObjectFromAsset` in Unity?
Description Removes object from its asset (Additional resources: AssetDatabase.AddObjectToAsset ). ```csharp using System.Collections.Generic; using UnityEditor; using UnityEngine;public class Scriptable : ScriptableObject { } public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Remove Obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db15c8c3f7a8
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddFrameworksBuildPhase` in Unity? Explain its purpose and usage.
PBXProject.AddFrameworksBuildPhase Declaration public string AddFrameworksBuildPhase (string targetGuid ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . Returns string Returns the GUID of the new phase. Description Creates a new fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e65392ac0a40
unity_docs
scripting
What is `iOS.Xcode.PBXProject.unityPostprocessTargetPhonyBuildPhaseName` in Unity? Explain its purpose and usage.
PBXProject.unityPostprocessTargetPhonyBuildPhaseName public string unityPostprocessTargetPhonyBuildPhaseName ; Description The name of the placeholder build phase, which Unity adds to indicate a place to add post-processing actions. Any build phases added after the placeholder build phase can safely assume th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf83b7dee6a1
unity_docs
rendering
Show me a Unity C# example demonstrating `LineRenderer.useWorldSpace`.
LineRenderer.useWorldSpace public bool useWorldSpace ; Description If enabled, the lines are defined in world space. This means the object's position is ignored, and the lines are rendered around world origin. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Creates a line renderer at th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c7bfc1776c55
github
scripting
Write a Unity C# MonoBehaviour script called Singleton
```csharp using UnityEngine; namespace BcoffeeDev.Patterns { public class Singleton<T> : MonoBehaviour where T : MonoBehaviour { private static T _instance; public static T Instance { get { if (_instance != null) retur...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_1c110389fc2b
unity_docs
rendering
Give me an overview of the `ShadowmaskMode` class in Unity.
ShadowmaskMode enumeration Description The rendering mode of Shadowmask. Set whether static shadow casters should be rendered into real-time shadow maps. Additional resources: QualitySettings.shadowmaskMode , QualitySettings.shadowDistance . Properties Property Description Shadowmask Static shadow casters w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af0c8028e453
unity_docs
scripting
What is `Windows.Speech.SemanticMeaning` in Unity? Explain its purpose and usage.
SemanticMeaning struct in UnityEngine.Windows.Speech / Implemented in: UnityEngine.CoreModule Description Semantic meaning is a collection of semantic properties of a recognized phrase. These semantic properties can be specified in SRGS grammar files. Properties Property Description key A key of semantic mea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_979a98de76dc
unity_docs
math
What is `AndroidJNI.NewLongArray` in Unity? Explain its purpose and usage.
AndroidJNI.NewLongArray Declaration public static IntPtr NewLongArray (int size ); Description Constructs a new primitive array object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebc62aecff85
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnApplicationFocus`.
et to true because the Game view regains focus when Unity regains focus. The second time, OnApplicationFocus is called with hasFocus set to false because the Game view loses focus to the Editor tab that was clicked. To minimize the number of times OnApplicationFocus is called when the Editor is in Play mode, and yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52653ff812e7
unity_docs
input
What is `Input.GetMouseButtonDown` in Unity? Explain its purpose and usage.
Input.GetMouseButtonDown Declaration public static bool GetMouseButtonDown (int button ); Description Returns true during the frame the user pressed the given mouse button. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9605f042a605
unity_docs
rendering
What is `Experimental.GlobalIllumination.LightmapperUtils` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LightmapperUtils class in UnityEngine.Experimental.GlobalIllumination / Implemented in: UnityEngine.CoreModule Description Utility class for converting Unity Lights to light types recognized by the baking backends. Static Me...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d91a19144bb8
unity_docs
scripting
What is `Compilation.CompilationPipeline.GetAssemblyDefinitionReferenceType` in Unity? Explain its purpose and usage.
CompilationPipeline.GetAssemblyDefinitionReferenceType Declaration public static Compilation.AssemblyDefinitionReferenceType GetAssemblyDefinitionReferenceType (string reference ); Parameters Parameter Description reference The given assembly definition file reference. Returns AssemblyDefinitionReference...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2648b9761b6
unity_docs
physics
What is `Rigidbody2D.SlideMovement.useSimulationMove` in Unity? Explain its purpose and usage.
Rigidbody2D.SlideMovement.useSimulationMove public bool useSimulationMove ; Description Controls whether the Rigidbody2D is instantly moved to the calculated position or is moved with Rigidbody2D.MovePosition . When a slide movement is complete, a new Rigidbody2D position has been calculated however, the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_52857d590c97
unity_docs
scripting
In Unity's 'Managed stack traces on iOS', what is 'Source code line numbers' and how does it work?
IL2CPP call stacks don’t include source code line number information by default in debug or release configurations. You can enable source code line numbers using the following steps: Navigate to Edit > Project Settings > Player > iOS settings > Other Settings . In the Configuration section, set IL2CPP Stacktrace Inform...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74534cfdfc71
unity_docs
scripting
Show me a Unity C# example demonstrating `Renderer.bounds`.
nding volume no longer automatically tracks Transform component changes. If there is a local space bounding volume override ( localBounds ) active at the same time, it is ignored and the custom world space bounds are used. Use ResetBounds to remove the custom bounds override. Note that the custom world bounds value i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ee2c2101494
unity_docs
scripting
What is `Handles.DrawLine` in Unity? Explain its purpose and usage.
Handles.DrawLine Declaration public static void DrawLine ( Vector3 p1 , Vector3 p2 , float thickness = 0.0f); Parameters Parameter Description p1 The position of the first line's end point in world space. p2 The position of the second line's end point in world space. thickness Line thickness in UI ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5e4fdc3c8439
github
scripting
Write a Unity C# MonoBehaviour script called Child Object Test5
```csharp using UnityEngine; public class ChildObjectTest5 : MonoBehaviourExtended, ITest { [Child("Raptor")] private GameObject go; private void Start() { if (!Test()) { Debug.LogError("Test failed: " + this); } } public bool Test() { if (go !=...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49b67a56e043
unity_docs
rendering
What is `Unity.Android.Gradle.Manifest.SupportsGlTexture` in Unity? Explain its purpose and usage.
SupportsGlTexture class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <supports-gl-texture> Android Manifest element. For more information about the element, see Android's documentation: SupportsGlTexture element Properties...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dff24923cc94
unity_docs
rendering
Explain 'Instrument all function calls' in Unity.
The Profiler only profiles code timings that are explicitly wrapped in Profiler markers . This includes the first call stack depth of invocations from Unity’s native code into your scripting code, such as MonoBehaviour.Start , MonoBehaviour.Update , or similar methods. The only samples you can visualize as child sample...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87c52adb98cf
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.ReplaceFile`.
Description fileGuid The GUID of the file reference. path The physical path to the new file on the filesystem. source The source tree the path is relative to. By default it's PBXSourceTree.Source . The PBXSourceTree.Group tree is not supported. Description Replaces a specified file with a new file. The path...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5eb8a84c99e0
unity_docs
editor
Explain 'Entities Graphics' in Unity.
com.unity.entities.graphics ## Description The Entities Graphics package provides systems and components for drawing meshes using DOTS, including support for instanced mesh rendering and LOD. ## Released for Unity Package version 1.4.18 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_90ab4df24283
unity_docs
rendering
Give me an overview of the `ParticleSystemAnimationTimeMode` class in Unity.
ParticleSystemAnimationTimeMode enumeration Description Control how animation frames are selected. Additional resources: ParticleSystem.textureSheetAnimation.timeMode, ParticleSystem.textureSheetAnimation.frameOverTime, ParticleSystem.textureSheetAnimation.fps, ParticleSystem.textureSheetAnimation.speedRange. Pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5a87c3ff7f9
unity_docs
rendering
What is `MaterialEditor.OnEnable` in Unity? Explain its purpose and usage.
MaterialEditor.OnEnable Declaration public void OnEnable (); Description Called when the editor is enabled, if overridden please call the base OnEnable() to ensure that the material inspector is set up properly.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30f391a35cbe
unity_docs
editor
What is `Tilemaps.Tilemap.GetEditorPreviewColor` in Unity? Explain its purpose and usage.
Tilemap.GetEditorPreviewColor Declaration public Color GetEditorPreviewColor ( Vector3Int position ); Parameters Parameter Description position Position of the Tile on the Tilemap . Returns Color Color of the editor preview Tile at the XYZ coordinate. Description Gets the Color of an editor p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e1f6e450cce
unity_docs
math
What is `Shader.GetGlobalMatrixArray` in Unity? Explain its purpose and usage.
Shader.GetGlobalMatrixArray Declaration public static Matrix4x4[] GetGlobalMatrixArray (string name ); Declaration public static Matrix4x4[] GetGlobalMatrixArray (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bb639909a19
unity_docs
performance
What is `Unity.Jobs.IJobExtensions.RunByRef` in Unity? Explain its purpose and usage.
IJobExtensions.RunByRef Declaration public static void RunByRef (ref T jobData ); Parameters Parameter Description jobData The job and data to run. Description Performs the job's Execute method immediately on the same thread by reference. Additional resources: IJob .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cc89a27b97c
unity_docs
math
What is `UIElements.UxmlValueBounds` in Unity? Explain its purpose and usage.
UxmlValueBounds class in UnityEngine.UIElements / Inherits from: UIElements.UxmlTypeRestriction / Implemented in: UnityEngine.UIElementsModule Description Restricts the value of an attribute to be within the specified bounds. Properties Property Description excludeMax True if the bounds exclude max. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0d9cbb6ec1a
unity_docs
scripting
What is `UIElements.ConverterGroups.TrySetValueGlobal` in Unity? Explain its purpose and usage.
ConverterGroups.TrySetValueGlobal Declaration public static bool TrySetValueGlobal (ref TContainer container , ref Unity.Properties.PropertyPath path , TValue value , out Unity.Properties.VisitReturnCode returnCode ); Parameters Parameter Description container The container whose property needs to be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_484f4e9882e4
unity_docs
rendering
What is `ParticleSystem.MinMaxCurve.curveMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.MinMaxCurve.curveMultiplier public float curveMultiplier ; Description Set a multiplier to apply to the curves. Additional resources: ParticleSystem.MinMaxCurve.curve , ParticleSystem.MinMaxCurve.curveMin , ParticleSystem.MinMaxCurve.curveMax .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7254587bb31f
unity_docs
scripting
Give me an overview of the `MultilineAttribute` class in Unity.
MultilineAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Attribute to make a string be edited with a multi-line textfield. Constructors Constructor Description MultilineAttribute Attribute used to make a string value be shown in a multi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.