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_f7c3308eae28
unity_docs
rendering
What is `Texture.height` in Unity? Explain its purpose and usage.
Texture.height public int height ; Description Height of the Texture in pixels (Read Only). This value is the height of the Texture at the highest resolution that PlayerSettings.mipStripping allows. In the Unity Editor, this returns the height of the Texture at full resolution. At run time, if PlayerSettings...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_701d8bccb385
unity_docs
editor
What is `TerrainTools.PaintDetailsToolUtility` in Unity? Explain its purpose and usage.
PaintDetailsToolUtility class in UnityEditor.TerrainTools Description Provides utility methods for painting details. Static Methods Method Description ClampedDetailPatchesGUI Gets data on the clamped detail patches for displaying their GUI within a terrain. CopyDetailPrototype Copies a detail prototype betwee...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_665e41847f97
unity_docs
rendering
What is `ComputeBuffer.SetData` in Unity? Explain its purpose and usage.
ComputeBuffer.SetData Declaration public void SetData (Array data ); Declaration public void SetData (List<T> data ); Declaration public void SetData (NativeArray<T> data ); Parameters Parameter Description data Array of values to fill the buffer. Description Set the buffer with values from an ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b33cc9d79f82
unity_docs
xr
Explain 'Manual license activation' in Unity.
The Unity Hub is the preferred method for activating a Unity license. The command line is an alternate method for activating a Unity license. If those methods fail, you can activate your license manually if you have a serial key. Note : The manual activation method doesn’t work with floating license subscriptions or Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28ffd3d2d81b
unity_docs
scripting
What is `Compilation.Assembly.allReferences` in Unity? Explain its purpose and usage.
Assembly.allReferences public string[] allReferences ; Description Returns Assembly.assemblyReferences and Assembly.compiledAssemblyReferences combined. This returns all assemblies that are passed to the compiler when building this assembly,.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44b4b9393292
unity_docs
editor
Show me a Unity C# example demonstrating `BuildAssetBundleOptions.DisableWriteTypeTree`.
st be present for Web platforms, therefore Unity will reject to build an AssetBundle if you specify this flag when building for BuildTarget.WebPlayer, for example. AssetBundles built without type trees cannot be loaded in the Editor. This flag is useful for AssetBundles that are included in the player build and are reb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2135d6267058
unity_docs
ui
In Unity's 'Screen configuration', what is 'Screen orientation' and how does it work?
You can control the screen orientation of your application on Android devices. Detecting a change in orientation or forcing a specific orientation is useful for creating behaviors that depend on how the user holds the device. To retrieve the current application orientation, access Screen.orientation property. The avail...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eaf5fd42cba1
unity_docs
editor
What is `Device.SystemInfo.npotSupport` in Unity? Explain its purpose and usage.
SystemInfo.npotSupport public static NPOTSupport npotSupport ; Description This has the same functionality as SystemInfo.npotSupport 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_f49627dbceb2
unity_docs
rendering
Give me an overview of the `MaterialGlobalIlluminationFlags` class in Unity.
MaterialGlobalIlluminationFlags enumeration Description How the material interacts with lightmaps and lightprobes. Additional resources: Material.globalIlluminationFlags . Properties Property Description None The emissive lighting does not affect Global Illumination at all. RealtimeEmissive The emissive ligh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4894720fa20e
unity_docs
scripting
What is `Build.Content.ContentBuildFlags` in Unity? Explain its purpose and usage.
ContentBuildFlags enumeration Description Build options for content. Note: this enum and its values exist to provide low-level support for the Scriptable Build Pipeline package. This is intended for internal use only; use the Scriptable Build Pipeline package to implement a fully featured build pipeline. You c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5af6189487f3_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This script either forces the selection or deselection of an interactable objects by the interactor this script is on. Signature: ```csharp public class ManuallySelectObject : MonoBehaviour ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_d1af5f508c49
unity_docs
rendering
Explain 'Audio overview' in Unity.
A game would be incomplete without some kind of audio, be it background music or sound effects. Unity’s audio system can import most standard audio file formats, play sounds in 3D space, and apply optional effects such as echo and filtering. Unity can also record audio from any available microphone on your machine for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8196ce0eb5f
unity_docs
scripting
Show me a Unity C# example demonstrating `PropertyAttribute.order`.
PropertyAttribute.order public int order ; Description Optional field to specify the order that multiple DecorationDrawers should be drawn in. ```csharp using UnityEngine;public class Example : MonoBehaviour { [Space(10, order = 0)] [Header("Header with some space around it", order = 1)] [Space(40, order = 2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b3e2e495d1e
unity_docs
editor
Show me a Unity code example for 'Create a drag-and-drop UI inside a custom Editor window'.
er-friendly. Create a project in Unity with any template. Right-click in the Assets folder and select Create > UI Toolkit > Editor Window . In UI Toolkit Editor Window Creator , enter DragAndDropWindow . Click Confirm . This automatically creates three files: DragAndDropWindow.cs , DragAndDropWindow.uxml , and DragAndD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0bcbfaf4cc6e
unity_docs
editor
In Unity's 'Customize the asset package cache location', what is 'Using the environment variable' and how does it work?
In scenarios that involve automation or continuous integration, it’s less practical and more error prone to configure settings in a configuration file or a preferences window. In such scenarios, you might consider setting the ASSETSTORE_CACHE_PATH environment variable to override the default location of the asset packa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_983cb9579222_doc_13
github
scripting
What does `DestroyInstance` do in this Unity script? Explain its purpose and signature.
Destroy an instance.Object that should be destroyed Signature: ```csharp private static void DestroyInstance(Object instance) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3629e75ffed9
unity_docs
rendering
In Unity's 'Verified Solutions onboarding process', what is 'Custom EULA' and how does it work?
You can distribute a Verified Solution through the Unity Asset Store with either the standard Asset Store end user license agreement (EULA) or a custom EULA. The standard Unity Asset Store EULA is appropriate for asset type packages, including 3D and 2D objects , game templates, and audio packs. Tool- or SDK-type packa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_117c801b909e
unity_docs
scripting
What is `MonoBehaviour.Update` in Unity? Explain its purpose and usage.
MonoBehaviour.Update() Description Update is called every frame, if the MonoBehaviour is enabled. Update is the most commonly used function to implement any kind of game script. Not every MonoBehaviour script needs Update . ```csharp using UnityEngine; using System.Collections;// The ExampleClass starts wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0690bdde2a20
unity_docs
scripting
What is `Pool.UnsafeGenericPool_1` in Unity? Explain its purpose and usage.
UnsafeGenericPool<T0> class in UnityEngine.Pool / Implemented in: UnityEngine.CoreModule Description Provides a static implementation of ObjectPool<T0> . This is an alternative to GenericPool<T0> which has collection checks disabled. Some objects generate garbage when they are compared during the collection ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d2cf8d0be35
unity_docs
rendering
What is `Rendering.RealtimeGICPUUsage` in Unity? Explain its purpose and usage.
RealtimeGICPUUsage enumeration Description How much CPU usage to assign to the final lighting calculations at runtime. How many CPU worker threads to create for Enlighten Realtime Global Illumination lighting calculations in the Player. Increasing this makes the system react faster to changes in lighting at a cost...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f47e475ce439
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnPostRender`.
ject as a Camera component, see Camera.onPostRender . Note : OnPostRender depends on the Built-in Render Pipeline and won't be called in projects using the Scriptable or Universal Render Pieplines. For similar functionality in the Scriptable Render Pipeline, refer to RenderPipelineManager . To execute code after Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c840581657b
unity_docs
editor
Show me a Unity C# example demonstrating `AssetImporter.assetBundleName`.
n the .meta file for the Asset, and inside the AssetDatabase . Alternatively, AssetBundle contents can also be defined programmatically by filling in an array of AssetBundleBuild structures when calling BuildPipeline.BuildAssetBundles . Additional resources: AssetBundleBuild.assetBundleName , AssetDatab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_58e6921047cc
unity_docs
scripting
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.Malloc` in Unity? Explain its purpose and usage.
UnsafeUtility.Malloc Declaration public static void* Malloc (long size , int alignment , Unity.Collections.Allocator allocator ); Parameters Parameter Description size The number of bytes to allocate. Ensure this size matches the memory required for your data. alignment The alignment for the allocated ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e20072e4fc93
unity_docs
scripting
What is `PlayerSettings.SetIl2CppCodeGeneration` in Unity? Explain its purpose and usage.
PlayerSettings.SetIl2CppCodeGeneration Declaration public static void SetIl2CppCodeGeneration ( Build.NamedBuildTarget buildTarget , Build.Il2CppCodeGeneration value ); Parameters Parameter Description buildTarget The NamedBuildTarget . value Code generation option. Description Sets the code genera...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9dcba2433472
unity_docs
scripting
What is `Playables.PlayableExtensions.SetSpeed` in Unity? Explain its purpose and usage.
PlayableExtensions.SetSpeed Declaration public static void SetSpeed (U playable , double value ); Parameters Parameter Description playable The Playable used by this operation. value The new speed. Description Changes the speed multiplier that is applied to the the current Playable . This affects th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d7232e6a39eb
unity_docs
ui
In Unity's 'Test conditional compilation', what is 'Test instructions' and how does it work?
Open the Build Profiles window (menu: File > Build Profiles ). Check that the platform you want to test your code on is the Active platform profile. If it isn’t, select your preferred platform and click Switch Profile . Create a script and copy and paste the sample code . In the Game view toolbar , click the Play butto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0cb196f2f03
unity_docs
rendering
What are the parameters of `Rendering.CommandBuffer.DrawProceduralIndirect` 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. The amount of geometry to draw is read from a ComputeBuffer . Typical use case is generating an arbitrary amount of data from a ComputeShader and then renderi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d53ebaeb10b
unity_docs
scripting
What is `SceneView.AlignViewToObject` in Unity? Explain its purpose and usage.
SceneView.AlignViewToObject Declaration public void AlignViewToObject ( Transform t ); Parameters Parameter Description t The transform to frame in the Scene view. Description Moves the Scene view to frame a transform. This sets the scene pivot, rotation, and size to look at a transform.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_aefd8dcbcc07
github
scripting
Write a Unity C# script called Player Loop Info Exporter
```csharp using System.IO; using System.Text; using UnityEngine; using UnityEngine.LowLevel; namespace UnityPlayerLooper.Utility { public class PlayerLoopInfoExporter { public static void Export() { var sb = new StringBuilder(); sb.AppendLine($"Unity {Application.unityV...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7e1e6daca9fb
unity_docs
editor
What is `AI.NavMeshBuildDebugFlags.PolygonMeshesDetail` in Unity? Explain its purpose and usage.
NavMeshBuildDebugFlags.PolygonMeshesDetail Description The triangulated meshes with height details that better approximate the source geometry. Additional resources: NavMeshBuildSettings.debug , NavMeshEditorHelpers.DrawBuildDebug .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4b67205c6fc3
github
scripting
Write a Unity C# XR/VR script for XR Button
```csharp using UnityEngine; using UnityEngine.Events; using UnityEngine.EventSystems; namespace TapLive.UI { /// <summary> /// XR-enabled button with hover and click interactions /// Works with XR raycasting and pointer events /// </summary> public class XRButton : MonoBehaviour, IPointerEnterHand...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_bf1f182aba3f
unity_docs
scripting
What is `Time.timeScale` in Unity? Explain its purpose and usage.
Time.timeScale public static float timeScale ; Description The scale at which time passes. This can be used for slow motion effects or to speed up your application. When timeScale is 1.0, time passes as fast as real time. When timeScale is 0.5 time passes 2x slower than realtime. When timeScale is set to zero ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ef2e6b67da8
unity_docs
ui
In Unity's 'Develop a native DSP audio plug-in', what is '3. Instantiate your native audio DSP plug-in' and how does it work?
To create the instance of your plug-in, use the CreateCallback function. Unity calls the CreateCallback function as soon as it creates your plug-in. It can be null. ``` struct EffectData { struct Data { float p[P_NUM]; // Parameters float s; // Sine output of oscillator float c; // Cosine output of oscillator }; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5566784efb38
unity_docs
scripting
What are the parameters of `Logger.LogWarning` in Unity?
Description A variant of Logger.Log that logs an warning message. ```csharp using UnityEngine; using System.Collections;public class MyGameClass : MonoBehaviour { private static ILogger logger = Debug.unityLogger; private static string kTAG = "MyGameTag"; private Transform tr; void MyGameMethod() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37d38a0640dd
unity_docs
scripting
What is `AsyncOperation.completed` in Unity? Explain its purpose and usage.
AsyncOperation.completed Parameters Parameter Description value Action< AsyncOperation > handler - function signature for completion event handler. Description Event that is invoked upon operation completion. An event handler that is registered in the same frame as the call that creates it will be invoked next ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_43f169c2e1b3
unity_docs
rendering
Explain 'Shadows in the Built-In Render Pipeline' in Unity.
Resources for configuring and troubleshooting shadows in the Built-In Render Pipeline . Page Description Configure shadow resolution Configure the shadow resolution of lights. Add ambient occlusion Add an effect to darken creases, holes, intersections, and surfaces that are close to each other.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Utility that controls internal Unity Project Settings Signature: ```csharp public static class UnityProjectSettingsUtility ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_28db278e1798
unity_docs
ui
What is `EditorGUI.IntSlider` in Unity? Explain its purpose and usage.
EditorGUI.IntSlider Declaration public static int IntSlider ( Rect position , int value , int leftValue , int rightValue ); Declaration public static int IntSlider ( Rect position , string label , int value , int leftValue , int rightValue ); Declaration public static int IntSlider ( Rect positi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_35f8fb3212ea_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Simple toggle button component with persistent on/off state.Toggles between ON and OFF states on each click, maintaining visual state via button colors. Signature: ```csharp public class LynxToggleButton : Button, IPointerUpHandler, IPointerDownHandler, IDragHandler, IBeginDragHandler, IEndDragHandler, IInitializePote...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_1807950848ca
unity_docs
editor
Show me a Unity code example for 'WinRT API in C# scripts for UWP'.
d configure them. For more information, refer to Import and configure plug-ins . To use WinRT API in your Unity scripts: Your scripts must be written in C#. All the code that uses WinRT API must be under the ENABLE_WINMD_SUPPORT directive . This is necessary because the Editor uses Mono , which doesn’t support WinRT AP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c228e6c29ace
unity_docs
scripting
What is `UIElements.TemplateContainer.templateId` in Unity? Explain its purpose and usage.
TemplateContainer.templateId public string templateId ; Description The local ID of the template in the parent UXML file (Read Only). This value is null, unless the TemplateContainer represents a UXML template within another UXML file.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf4e04cf9153
unity_docs
editor
What are the parameters of `Search.ObjectIndexer.IndexWordComponents` in Unity?
Description Splits a word into multiple variations. See IndexPropertyComponents for some examples on how a value can be split into multiple variations. IndexWordComponents performs the same task for words. ```csharp using UnityEditor; using UnityEditor.Search; static class Example_ObjectIndexer_IndexWordComponents { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6be60d511adc
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.D32_SFloat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.D32_SFloat Description A one-component, 32-bit signed floating-point format that has 32-bits in the depth component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb44081c1452
unity_docs
rendering
What is `Rendering.LocalKeywordSpace.keywordCount` in Unity? Explain its purpose and usage.
LocalKeywordSpace.keywordCount public uint keywordCount ; Description The number of local shader keywords in this local keyword space. (Read Only) This property enables you to query the number of local shader keywords in this LocalKeywordSpace without any allocations. Additional resources: Shader variants an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_977c7955c035
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.GradientField`.
ers Parameter Description position Rectangle on the screen to use for the field. label Optional label to display in front of the field. gradient The gradient to edit. hdr Display the HDR Gradient Editor. colorSpace Display the gradient and Gradient Editor in this color space. Returns Gradient The gradie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b92e3bb53ae4
unity_docs
ui
What is `Mathf.Clamp` in Unity? Explain its purpose and usage.
Mathf.Clamp Declaration public static float Clamp (float value , float min , float max ); Parameters Parameter Description value The floating point value to restrict inside the range defined by the minimum and maximum values. min The minimum floating point value to compare against. max The maximum flo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e1748c82803
unity_docs
editor
What is `IMGUI.Controls.ArcHandle.radiusHandleColor` in Unity? Explain its purpose and usage.
ArcHandle.radiusHandleColor public Color radiusHandleColor ; Description Returns or specifies the color of the radius control handle. This value is multiplied with the value of Handles.color at the time DrawHandle is called. If Color.a is 0 then the radius handle is disabled. This property is Color.c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fd16af9039e
unity_docs
input
What is `PlayerSettings.WSA` in Unity? Explain its purpose and usage.
WSA class in UnityEditor Description Provides access to Microsoft Store App-specific player settings. You can use these properties and methods to programmatically access Universal Windows Platform-specific build settings . Static Properties Property Description applicationDescription The description text th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f256825dcca3
unity_docs
scripting
What is `UIElements.WhiteSpace` in Unity? Explain its purpose and usage.
WhiteSpace enumeration Description Controls how white space and line breaks within an element's text are handled. Properties Property Description Normal Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is the default behavior. NoWrap Sequences of whit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f40cd7da4212
unity_docs
ui
What is `UIElements.PointerCaptureHelper.HasPointerCapture` in Unity? Explain its purpose and usage.
PointerCaptureHelper.HasPointerCapture Declaration public static bool HasPointerCapture ( UIElements.IEventHandler handler , int pointerId ); Parameters Parameter Description handler The VisualElement being tested. pointerId The captured pointer. Returns bool True if element captured the pointer. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_607d5755f229
unity_docs
scripting
What are the parameters of `PlayerPrefs.GetString` in Unity?
Returns string The string corresponding to the given key , string.Empty if no string is found for the given key . Description Gets the string that corresponds to key in the player preferences. Returns string.Empty if no string is found for the given key . Declaration public static string GetString (string key , string ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4166254cdf42
unity_docs
animation
What is `Animations.AnimationStream` in Unity? Explain its purpose and usage.
AnimationStream struct in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Description The stream of animation data passed from one Playable to another. The AnimationStream structure is passed through the animation Playable structures, like AnimationClipPlayable and AnimationMixerPlay...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7a29eeaae25f
unity_docs
scripting
In Unity's 'Modify GameActivity bridge code', what is 'Expand GameActivity bridge code' and how does it work?
You can add extra source files to the existing GameActivity bridge files which are then compiled together. For example (You can find an example project here ): Create C# script in Unity and name it SendMessageReceiver.cs . ```csharp using UnityEngine; public class SendMessageReceiver : MonoBehaviour { public void Sen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_352d32cb5251
unity_docs
rendering
What is `LightTransport.IWorld` in Unity? Explain its purpose and usage.
IWorld interface in UnityEngine.LightTransport Description Interface for integration world data structures used by light transport calculations. This interface provides an abstraction for world space data structures used by integrators, such as acceleration structures, lookup tables, and other optimized data that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25ecbe654be8
unity_docs
rendering
What is `Rendering.ShadowSplitData.shadowCascadeBlendCullingFactor` in Unity? Explain its purpose and usage.
ShadowSplitData.shadowCascadeBlendCullingFactor public float shadowCascadeBlendCullingFactor ; Description A multiplier applied to the radius of the culling sphere. Values must be in the range 0 to 1. With higher values, Unity culls more objects. Lower makes the cascades share more rendered objects. Using lower...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_810612f6a975
unity_docs
audio
What is `AudioImporter.loadInBackground` in Unity? Explain its purpose and usage.
AudioImporter.loadInBackground public bool loadInBackground ; Description Corresponding to the "Load In Background" flag in the AudioClip inspector, when this flag is set, the loading of the clip will happen delayed without blocking the main thread.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_199088eaff41
unity_docs
editor
What is `Search.QueryValidationOptions.skipIncompleteFilters` in Unity? Explain its purpose and usage.
QueryValidationOptions.skipIncompleteFilters public bool skipIncompleteFilters ; Description Boolean indicating if incomplete filters should be skipped. If true, incomplete filters are skipped. If false and validateFilters is true, incomplete filters will generate errors when parsed. ```csharp using System.G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_009379acf32c
unity_docs
rendering
What is `ShaderData` in Unity? Explain its purpose and usage.
ShaderData class in UnityEditor Description This class describes a shader. Properties Property Description ActiveSubshader Returns the active subshader or null if none is currently active. ActiveSubshaderIndex Returns the index of the active subshader or -1 if none is currently active. SerializedSubshaderCou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e8b792b5e06
unity_docs
scripting
What is `Experimental.GraphView.EdgeControl.ComputeControlPoints` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeControl.ComputeControlPoints Declaration protected void ComputeControlPoints (); Description Compute the edge's control points.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b2452152eb8
unity_docs
rendering
What is `UIElements.UIRenderer` in Unity? Explain its purpose and usage.
UIRenderer class in UnityEngine.UIElements / Inherits from: Renderer / Implemented in: UnityEngine.UIElementsModule Description A renderer Component that should be added next to a UIDocument Component to allow world-space rendering. This Component is added automatically by the UIDocument when the PanelSetti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc7b235d3c46
unity_docs
editor
What is `GUILayout.ScrollViewScope` in Unity? Explain its purpose and usage.
ScrollViewScope class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Disposable helper class for managing BeginScrollView / EndScrollView . Automatically laid out scrollviews will take whatever content you have inside them and display normally. If it doesn't fit, scrollbars will appear....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8e08a103b0c
unity_docs
scripting
What is `Rendering.PassIdentifier.operator_eq` in Unity? Explain its purpose and usage.
PassIdentifier.operator == public static bool operator == ( Rendering.PassIdentifier lhs , Rendering.PassIdentifier rhs ); Description Returns true if the pass identifiers are the same. Otherwise, returns false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_1
github
scripting
What does `InitWithAddressablesLoader` do in this Unity script? Explain its purpose and signature.
Use this method to initialize the loader if you want to use Unity Addressables for loading assets. Signature: ```csharp public static void InitWithAddressablesLoader() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_5242dfca4b88_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Test ScriptableObject type used in PlayMode.Keeping it in test assembly is OK for editor PlayMode tests. Signature: ```csharp public sealed class SmartReferenceTestSO : ScriptableObject ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75d21dd00eae
unity_docs
scripting
What is `MPE.ProcessEvent` in Unity? Explain its purpose and usage.
ProcessEvent enumeration Description Enum that represents the events a RoleProvider can receive. Properties Property Description Create A new Process is created. Initialize A new Process is initialized. AfterDomainReload Domain reload occurs. Shutdown A new Process is about to shut down.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3dd1d1a2b1f3
unity_docs
editor
What are the parameters of `UIElements.DropdownMenu.AppendAction` in Unity?
Description Adds an item that executes an action in the dropdown menu. The item is added to the end of the current item list. ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements;public class ContextMenuWindow : EditorWindow { [MenuItem("My/Context Menu Window")] static void ShowMe() => ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e911ab45a81
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerMarker.Begin`.
scription Begin profiling a piece of code marked with a custom name defined by this instance of ProfilerMarker . Always use End to close a started section of an instrumented code. Code marked with Begin and End will show up in the Profiler hierarchy. Use Recorder to obtain per-frame timings in the Player. N...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0b8bfe6de8a1
unity_docs
rendering
Show me a Unity code example for 'Build assets into AssetBundles'.
wing script is an example of an AssetBundle build script. It adds a menu item at the bottom of the Assets menu called Build AssetBundles . When you select Build AssetBundles the BuildAllAssetBundles method is called. A progress bar appears while the build takes all the assets you labeled with an AssetBundle name and us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18596bdf6946
unity_docs
rendering
What is `SpeedTreeImporter.MaterialLocation` in Unity? Explain its purpose and usage.
MaterialLocation enumeration Description Material import location options. Additional resources: SpeedTreeImporter.materialLocation . Properties Property Description External Extract the materials and textures from the model. InPrefab Unity imports materials as sub-assets.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_11d0ab2ffa49
unity_docs
scripting
In Unity's 'Java Native Interface APIs in Unity', what is 'High-level API' and how does it work?
The high-level AndroidJavaObject , AndroidJavaClass , and AndroidJavaProxy classes automate a lot of tasks required for JNI calls. They also use caching to make calls to Java faster. The combination of AndroidJavaObject and AndroidJavaClass is built on top of AndroidJNI and AndroidJNIHelper , but they also contain addi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_54274f3a5d34
unity_docs
scripting
In Unity's 'Analyzer scope and diagnostics', what is 'Analyzer scope' and how does it work?
You can limit the scope of analyzers in your project by using assembly definitions, so that they only analyze certain portions of your code. Unity applies analyzers to all assemblies in your project’s Assets folder, or in any subfolder whose parent folder doesn’t contain an assembly definition file . If an analyzer is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8b96f91d5de1
unity_docs
xr
Explain 'Project manifest file' in Unity.
When Unity loads a project, the Unity Package Manager reads the project manifest so that it can compute a list of which packages to retrieve and load. When a user installs or uninstalls a package through the Package Manager window , the Package Manager stores those changes in the project manifest file. The project mani...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d27e9a28e59e
unity_docs
editor
What is `SceneManagement.PrefabStage.IsPartOfPrefabContents` in Unity? Explain its purpose and usage.
PrefabStage.IsPartOfPrefabContents Declaration public bool IsPartOfPrefabContents ( GameObject gameObject ); Parameters Parameter Description gameObject The GameObject to check. Returns bool True if the GameObject is part of the Prefab contents. Description Returns true if the given GameObject is pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5292819dd393
unity_docs
scripting
In Unity's 'Object', what is 'Custom equality operators' and how does it work?
For types that inherit from UnityEngine.Object , Unity uses a custom version of the C# equality and inequality operators . This means the null check myGameObject == null can evaluate true (and conversely myGameObject != null can evaluate false ) even if myGameObject technically holds a valid C# object reference. This h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b91526984861
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.OpenAsset`.
olumnNumber The column number to open the text editor at, if appropriate. instanceID The InstanceID of the asset. target The asset object. Returns bool Returns true if the asset opened successfully, otherwise false. Description Opens the asset with associated application. Opens asset in an external editor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3bf39837a67
unity_docs
scripting
What is `ForceMode.Force` in Unity? Explain its purpose and usage.
ForceMode.Force Description Add a continuous force to the rigidbody, using its mass. Apply the force in each FixedUpdate over a duration of time. This mode depends on the mass of rigidbody so more force must be applied to push or twist higher-mass objects the same amount as lower-mass objects. This mode is useful f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ebd00c94480
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetrics` in Unity? Explain its purpose and usage.
AsyncReadManagerMetrics class in Unity.IO.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Manages the recording and retrieval of metrics from the AsyncReadManager . The metrics manager records the states and timings of individual read operations, as well as additional, contextual informat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c93e21c4520
unity_docs
scripting
What is `Handles.RectangleHandleCap` in Unity? Explain its purpose and usage.
Handles.RectangleHandleCap Declaration public static void RectangleHandleCap (int controlID , Vector3 position , Quaternion rotation , float size , EventType eventType ); Parameters Parameter Description controlID The control ID for the handle. position The position of the handle in the space of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61caab95b24e
unity_docs
editor
What is `Android.IPostGenerateGradleAndroidProject.OnPostGenerateGradleAndroidProject` in Unity? Explain its purpose and usage.
IPostGenerateGradleAndroidProject.OnPostGenerateGradleAndroidProject Declaration public void OnPostGenerateGradleAndroidProject (string path ); Parameters Parameter Description path The path to the root of the Unity library Gradle project. Note: when exporting the project, this parameter holds the path to th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_eb3107fd8cf7
unity_docs
editor
Explain 'Multiplay' in Unity.
com.unity.services.multiplay ## Description The Multiplay SDK provides functionality to facilitate Multiplay services. ## Released for Unity Package version 1.2.5 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_26229b15abd9
unity_docs
ui
What is `UIElements.ToggleButtonGroup.ctor` in Unity? Explain its purpose and usage.
ToggleButtonGroup Constructor Declaration public ToggleButtonGroup (); Description Constructs a ToggleButtonGroup. Declaration public ToggleButtonGroup (string label ); Parameters Parameter Description label The text used as a label. Description Constructs a ToggleButtonGroup. Declaration publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ca0118e57418
unity_docs
xr
In Unity's 'AssetBundle compression formats', what is 'LZ4 compression' and how does it work?
LZ4 uses a chunk based algorithm which decompresses the AssetBundle in chunks. While writing the AssetBundle, Unity individually compresses each 128 KB chunk of the content before saving it. This approach means the total AssetBundle file size is larger than LZMA compression. However, you can selectively retrieve and lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da7c1ee6520e
unity_docs
scripting
What is `Physics.ContactModifyEvent` in Unity? Explain its purpose and usage.
Physics.ContactModifyEvent Parameters Parameter Description value A delegate to call. Description Subscribe to this event to be able to customize the collision response for contact pairs. Each subscriber to this event gets invoked with a physics scene and a native array of contact pairs to process. Each contac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81fb45845ad3
unity_docs
rendering
What is `Rendering.ShaderParamType` in Unity? Explain its purpose and usage.
ShaderParamType enumeration Description Options for the data type of a shader constant's members. Properties Property Description Float A float. Int An integer. Bool A boolean. Half A half-precision float. Short A short. UInt An unsigned integer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0f2352d9d660
unity_docs
rendering
Explain 'Example of Particle System GPU instancing in the Built-In Render Pipeline' in Unity.
Here is a complete working example of a Custom Shader using particle system GPU instancing. This custom shader adds a feature which the standard particle shader does not have - a fade between the individual frames of a texture sheet animation . ``` Shader "Instanced/ParticleMeshesCustom" { Properties { _MainTex("Alb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65dc0a375a87
unity_docs
scripting
Show me a Unity C# example demonstrating `UIElements.PopupWindow`.
PopupWindow class in UnityEngine.UIElements / Inherits from: UIElements.TextElement / Implemented in: UnityEngine.UIElementsModule Description Styled visual text element. This element doesn't have any functionality. It's just a container with a border and a title, rather than a window or popup. For more infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5a5072a19330
unity_docs
ui
Explain 'Avatar Muscle & Settings tab reference' in Unity.
Unity’s animation system allows you to control the range of motion of different bones using Muscles . Once the Avatar has been properly configured , the animation system “understands” the bone structure and allows you to start using the Muscles & Settings tab of the Avatar ’s Inspector . Use the Muscles & Settings tab ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e1a543009ab
unity_docs
physics
What is `Search.ObjectIndexer.IndexNumber` in Unity? Explain its purpose and usage.
ObjectIndexer.IndexNumber Declaration public void IndexNumber (int documentIndex , string name , double number ); Parameters Parameter Description documentIndex Document where the indexed value was found. name Key used to retrieve the value. number Number value to store in the index. Description Adds...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4335d6590b7f
unity_docs
rendering
Show me a Unity C# example demonstrating `Vector4.operator_Vector2`.
Vector4.Vector4 Description Converts a Vector2 to a Vector4. Vector2s can be implicitly converted to Vector4 (z and w is set to zero in the result). ```csharp using UnityEngine; using System.Collections.Generic; public class ExampleScript : MonoBehaviour { void Start() { Renderer renderer = GetComponent<Rende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_baba552da235
unity_docs
editor
What is `PrefabUtility.GetRemovedGameObjects` in Unity? Explain its purpose and usage.
PrefabUtility.GetRemovedGameObjects Declaration public static List<RemovedGameObject> GetRemovedGameObjects ( GameObject prefabInstance ); Parameters Parameter Description prefabInstance The Prefab instance to get information about. Returns List<RemovedGameObject> List of objects with information about ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e409bbfbc602
unity_docs
rendering
What is `MonoBehaviour.OnBecameInvisible` in Unity? Explain its purpose and usage.
MonoBehaviour.OnBecameInvisible() Description Called when the renderer is no longer visible to any camera. This message is sent to all scripts attached to the renderer. OnBecameVisible and OnBecameInvisible are useful to avoid computations that are only necessary when the object is visible. The Scene view came...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b81a509a8ee6
unity_docs
editor
Show me a Unity C# example demonstrating `EditorApplication.isUpdating`.
.isUpdating public static bool isUpdating ; Description True if the Editor is currently refreshing the AssetDatabase. During AssetDatabase refreshing time, the editor checks to see if any files have changed, whether they need to be reimported, and reimports them. The isUpdating property will return true or fa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dd62e928a65
unity_docs
scripting
What is `ParticleSystem.ForceOverLifetimeModule.randomized` in Unity? Explain its purpose and usage.
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_2ff68f1fb4bc
unity_docs
scripting
What is `AndroidJNI.GetStaticDoubleField` in Unity? Explain its purpose and usage.
AndroidJNI.GetStaticDoubleField Declaration public static double GetStaticDoubleField (IntPtr clazz , IntPtr fieldID ); Description Returns the value of a static field of an 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_7ce2ef600535
unity_docs
physics
Give me an overview of the `SimulationMode2D` class in Unity.
SimulationMode2D enumeration Description A selection of modes that control when Unity executes the 2D physics simulation. Additional resources: Physics2D.simulationMode . Properties Property Description FixedUpdate Use this enumeration to specify to Unity that it should execute the physics simulation immediat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06f2623b4412
unity_docs
scripting
Show me a Unity C# example demonstrating `Application.isPlaying`.
ng is accessed in the class constructor or its value is assigned to a variable. Note : In the Editor for ScriptableObject assets, this property returns false in OnEnable. After reloading the domain, when reloading assemblies, Unity invokes OnEnable on all ScriptableObject instances. This happens before isPlaying i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_63ddedf454f9
unity_docs
rendering
In Unity's 'Visualizing vertex data shader examples in the Built-In Render Pipeline', what is 'Visualizing normals' and how does it work?
The following shader uses the vertex position and the normal as the vertex shader inputs (defined in the structure appdata ). The normal’s X,Y & Z components are visualized as RGB colors. Because the normal components are in the –1 to 1 range, we scale and bias them so that the output colors are displayable in the 0 to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1394d9b9e1e1
unity_docs
editor
What are the parameters of `Search.QueryEngine_1.ParseQuery` in Unity?
Returns ParsedQuery<TData> ParsedQuery operation of type TData. Description Parses a query string into a ParsedQuery operation. This ParsedQuery operation can then be used to filter any data set of type TData. ```csharp using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Search; us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_489b6ddb336f
unity_docs
editor
Give me an overview of the `DragAndDropWindowTarget` class in Unity.
DragAndDropWindowTarget struct in UnityEditor Description IDs for core windows. These are used by the DragAndDrop.RemoveHandler API. Static Properties Property Description hierarchy ID to target the Hierarchy. inspector ID to target the Inspector. projectBrowser ID to target the Project browser. sceneView I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc2a775ffdd4
unity_docs
scripting
What is `Rendering.BatchCullingContext.projectionType` in Unity? Explain its purpose and usage.
BatchCullingContext.projectionType public Rendering.BatchCullingProjectionType projectionType ; Description The projection of the view from which the culling is invoked. Usage example: take different culling paths for orthographic vs perspective views. Additional resources: BatchCullingProjectionType enum.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.