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_e06acde6a45d
unity_docs
rendering
What is `ScalableBufferManager.heightScaleFactor` in Unity? Explain its purpose and usage.
ScalableBufferManager.heightScaleFactor public static float heightScaleFactor ; Description Height scale factor to control dynamic resolution. This is a scale factor between epsilon and 1.0 that is applied to the height of all render textures that you have marked as DynamicallyScalable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fbff8373d1b9
unity_docs
scripting
In Unity's 'C# compiler and language version reference', what is 'C# 9.0' and how does it work?
Suppress emitting localsinit flag Covariant return types Module Initializers Extensible calling conventions for unmanaged function pointers Init only setters If you try to use unsupported features in your project, compilation generates errors.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20e4180f1dcc
unity_docs
rendering
What is `LightTransport.ReferenceContext.Initialize` in Unity? Explain its purpose and usage.
ReferenceContext.Initialize Declaration public bool Initialize (); Returns bool True if the device context was initialized successfully. Description Initialize the device context. Initialize the ReferenceContext .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfb48aa7fddb
unity_docs
scripting
What is `AI.NavMeshAgent.isStopped` in Unity? Explain its purpose and usage.
NavMeshAgent.isStopped public bool isStopped ; Description Use this property to set, or get, whether the NavMesh agent stops or continues its movement along the current path. If set to True, the NavMesh agent's movement stops along its current path. If set to False after the NavMesh agent has stopped, the NavMe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7429fdae31d
unity_docs
editor
What are the parameters of `Build.IPostprocessBuildWithReport.OnPostprocessBuild` in Unity?
Description Implement this function to receive a callback after the build is complete. This callback is invoked during Player builds, but not during AssetBundle builds. If the build stops early, due to a failure or cancellation, then the callback is not invoked. Additional resources: BuildPipeline.B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92c2f65d70f2
unity_docs
audio
What is `AudioCurveRendering.DrawCurve` in Unity? Explain its purpose and usage.
AudioCurveRendering.DrawCurve Declaration public static void DrawCurve ( Rect r , AudioCurveRendering.AudioCurveEvaluator eval , Color curveColor ); Parameters Parameter Description r Rectangle determining the size of the graph. eval Curve evaluation function. curveColor Solid fill color of the cu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d28cc3642ae8
unity_docs
scripting
What is `UIElements.DataBinding.UpdateSource` in Unity? Explain its purpose and usage.
DataBinding.UpdateSource<TValue>(BindingContext,TValue) Parameters Parameter Description context Context object containing the necessary information to resolve a binding. value The resolved value from the data source. Returns void A BindingResult indicating if the binding update succeeded or not. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27b6aac7cf7a
unity_docs
physics
What is `PlayerSettings.actionOnDotNetUnhandledException` in Unity? Explain its purpose and usage.
PlayerSettings.actionOnDotNetUnhandledException public static ActionOnDotNetUnhandledException actionOnDotNetUnhandledException ; Description Sets the crash behavior on .NET unhandled exception. The options are `ActionOnDotNetUnhandledException.Crash` (the application crashes hardly and forces iOS to generat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a2811b5715bb
github
scripting
Write a Unity Editor script for A Prefab Pool
```csharp #if (UNITY_EDITOR || DEVELOPMENT_BUILD) && !PREFAB_POOL_NO_DEBUG_LOGS #define PREFAB_POOL_DEBUG_LOGS #endif using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using Gilzoide.PrefabPool.Extensions; using UnityEngine; using Debug =...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_8b57f21fa8d1
unity_docs
physics
Explain 'Image' in Unity.
Use the Image element to add graphical assets to your application. It’s a versatile and powerful tool for displaying visual content in your UI, such as image galleries, product listings, a rendering preview, and user profiles. ## Create an image You must use either UXML or C# code to add an Image element in your UI a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b205bcfb1fc8
unity_docs
rendering
What is `RenderTextureFormat.RFloat` in Unity? Explain its purpose and usage.
RenderTextureFormat.RFloat Description Scalar (R) render texture format, 32 bit floating point. Note that not all graphics cards support floating point render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f65b07816086
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.SubEmittersModule.AddSubEmitter`.
ameter Description subEmitter The sub-emitter to add. type The event that creates new particles. properties The properties of the new particles. emitProbability The probability that the sub-emitter emits particles. Accepts values from 0 to 1, where 0 is never and 1 is always. Description Add a new sub-emitte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5165ef55593
unity_docs
rendering
What is `ParticleSystem.LifetimeByEmitterSpeedModule.curveMultiplier` in Unity? Explain its purpose and usage.
ParticleSystem.LifetimeByEmitterSpeedModule.curveMultiplier public float curveMultiplier ; Description Use this property to change the curve multiplier. If you only want to change the overall curve multiplier, using this property is more efficient than accessing the whole curve.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e804c3ef086a
unity_docs
editor
Explain 'Predefined assemblies reference' in Unity.
Unity compiles scripts in four separate phases, based on where the script file is located within the project folder structure. Unity creates a separate C# project file (.csproj) and a predefined assembly for each phase. If there are no scripts eligible for a compilation phase, Unity doesn’t create the corresponding pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bd11201ee686
unity_docs
xr
In Unity's 'Create an XR project', what is 'XR templates' and how does it work?
The quickest way to create a new XR project is with one of the XR templates in the Unity Hub. Projects you create with these templates are already configured with the XR Plug-in Management system, common XR plug-in and support packages, and a starting scene set up with the XR components. The XR templates available for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7338f0d2828d
unity_docs
rendering
Show me a Unity C# example demonstrating `ComputeShader.SetTextureFromGlobal`.
s read in the compute shader, or an output texture that is written into by the shader. For an output texture, it has to be a RenderTexture with random write flag enabled, see RenderTexture.enableRandomWrite . Buffers and textures are set per-kernel. Use FindKernel to find kernel index by function name. Additional ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_927640c6fb65
unity_docs
editor
Show me a Unity C# example demonstrating `SceneManagement.SceneManager.loadedSceneCount`.
SceneManager.loadedSceneCount public static int loadedSceneCount ; Description The number of loaded Scenes. Returns the current number of loaded Scenes. This doesn't include the Scenes that are currently loading or unloading. For the total number of Scenes see SceneManager.sceneCount . ```csharp using UnityEn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42e1299e12a2
unity_docs
scripting
What are the parameters of `Networking.UnityWebRequest.Post` in Unity?
Returns UnityWebRequest A UnityWebRequest configured to send string to uri via POST . Description Creates a UnityWebRequest configured to send form data to a server via HTTP POST . This method creates a UnityWebRequest, sets the url to the string uri argument and sets the method to POST . The Content-Type header will b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Checks to see if the Wrld map controlled camera is currently undergoing a transition. Signature: ```csharp public bool IsTransitioning ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_e2f8c0446cd8
unity_docs
physics
Show me a Unity C# example demonstrating `PlayerSettings.Android.forceSDCardPermission`.
PlayerSettings.Android.forceSDCardPermission public static bool forceSDCardPermission ; Description Force SD card permission. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class ForceSDCardPermissionSample : MonoBehaviour { [MenuItem("Build/ForceSDCardPermission Sample")] pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af33f79cc40a
unity_docs
physics
What is `PhysicsShapeGroup2D.SetShapeRadius` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D.SetShapeRadius Declaration public void SetShapeRadius (int shapeIndex , float radius ); Parameters Parameter Description shapeIndex The index of the shape stored in the PhysicsShapeGroup2D . The shape index is zero-based with the shape group having a quantity of shapes specified by sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8208c80f40a6
unity_docs
scripting
What is `ShortcutManagement.ShortcutStage` in Unity? Explain its purpose and usage.
ShortcutStage enumeration Description Represents the stage at which a shortcut action was invoked. This is used for clutch shortcuts (see ClutchShortcutAttribute ) to determine if the shortcut action was invoked due to pressing the binding ( Begin ) or releasing the binding ( End ). Properties Property Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b3628f7df16
unity_docs
rendering
What is `Rendering.CommandBuffer.IssuePluginEventAndData` in Unity? Explain its purpose and usage.
CommandBuffer.IssuePluginEventAndData Declaration public void IssuePluginEventAndData (IntPtr callback , int eventID , IntPtr data ); Parameters Parameter Description callback Native code callback to queue for Unity's renderer to invoke. data Custom data to pass to the native plugin callback. eventID B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b4674950c80
unity_docs
audio
Show me a Unity C# example demonstrating `AudioEchoFilter.decayRatio`.
AudioEchoFilter.decayRatio public float decayRatio ; Description Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (i.e. simple 1 line delay). Default = 0.5. ```csharp using UnityEngine;[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioEchoFilter))] public class Example : Mono...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_519c47350c3e
unity_docs
math
What is `SceneManagement.Scene.GetRootGameObjects` in Unity? Explain its purpose and usage.
Scene.GetRootGameObjects Declaration public GameObject[] GetRootGameObjects (); Returns GameObject[] An array of game objects. Description Returns all the root game objects in the Scene. Declaration public void GetRootGameObjects (List<GameObject> rootGameObjects ); Parameters Parameter Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c531f59c1dec
unity_docs
rendering
What is `Experimental.GlobalIllumination.LightMode` in Unity? Explain its purpose and usage.
LightMode enumeration Description The lightmode. A light can be real-time, mixed, baked or unknown. Unknown lights will be ignored by the baking backends. Properties Property Description Realtime The light is real-time. No contribution will be baked in lightmaps or light probes. Mixed The light is mixed. Mixed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d4ce626b1fb7
unity_docs
scripting
Explain 'Dynamic Resolution' in Unity.
Resources for rendering at a lower resolution dynamically, to reduce the amount of work for the GPU. Page Description Introduction to Dynamic Resolution Learn about how Dynamic Resolution scales down the resolution when the frame rate of the application decreases. Control scaling with Dynamic Resolution Calculate the w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf241f3302f4
unity_docs
rendering
What is `Rendering.BatchRendererGroup.SetErrorMaterial` in Unity? Explain its purpose and usage.
BatchRendererGroup.SetErrorMaterial Declaration public void SetErrorMaterial ( Material material ); Parameters Parameter Description material The material to display when there is a problem with a shader or material. If this value is null , Unity does not display anything. Description Set the error mater...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f67064901bf
unity_docs
math
What is `HumanPose.bodyRotation` in Unity? Explain its purpose and usage.
HumanPose.bodyRotation public Quaternion bodyRotation ; Description The human body orientation for that pose. Average body orientation. The average body orientation up vector is computed out of the hips and shoulders middle points. The front vector is then the cross product of the up vector and average left/r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f8c736d08e2
unity_docs
physics
What is `Rigidbody2D.totalForce` in Unity? Explain its purpose and usage.
Rigidbody2D.totalForce public Vector2 totalForce ; Description The total amount of force that has been explicitly applied to this Rigidbody2D since the last physics simulation step. When adding force to the Rigidbody2D using Rigidbody2D.AddForce , Rigidbody2D.AddForceAtPosition or Rigidbody2D.AddRelat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6aaac73783f0
unity_docs
physics
What is `PhysicsShapeGroup2D.GetShape` in Unity? Explain its purpose and usage.
PhysicsShapeGroup2D.GetShape Declaration public PhysicsShape2D GetShape (int shapeIndex ); Parameters Parameter Description shapeIndex The index of the shape stored the PhysicsShapeGroup2D . The shape index is zero-based with the shape group having a quantity of shapes specified by shapeCount . Returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9d843cf981e
unity_docs
math
What is `ArticulationBody.linearVelocity` in Unity? Explain its purpose and usage.
ArticulationBody.linearVelocity public Vector3 linearVelocity ; Description Linear velocity of the body defined in world space. Setting a specific velocity only affects the root articulation body. Unit of measurement - m/s (meters per second).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4480e5388c75
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.SignedAngle`.
ative. Note that changing the order of from and to reverses the direction of the rotation angle. The following diagram shows the relationships between the input vectors and the rotation and direction axes. The from and to vectors lie in the blue plane. Both the rotation axis and the direction axis point...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8f57c9c1185
unity_docs
scripting
What is `FullScreenMode` in Unity? Explain its purpose and usage.
FullScreenMode enumeration Description Sets the full-screen mode. For information on platform compatibility, refer to the description of each mode. Additional resources: Screen.fullScreenMode , PlayerSettings.fullScreenMode , PlayerSettings.Android.fullscreenMode Properties Property Description ExclusiveFul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd4767306ad2
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.SplitResizeUpDown`.
MouseCursor.SplitResizeUpDown Description Up-Down resize arrows for window splitters. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a sm...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7f680af229e
unity_docs
math
What is `AssetBundleBuild.addressableNames` in Unity? Explain its purpose and usage.
AssetBundleBuild.addressableNames public string[] addressableNames ; Description Addressable name used to load an asset. To provide custom addressable names for assets in the bundle, this array needs to be the same size as AssetBundleBuild.assetNames . Each entry in this array will be matched to the asset in a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_103347a59c12_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores the used to enable or disable continuous movement locomotion. Signature: ```csharp public Toggle continuousMoveToggle ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_bcc21639f683
unity_docs
rendering
Show me a Unity C# example demonstrating `Unity.Profiling.Editor.ProfilerModuleMetadataAttribute.IconPath`.
a Profiler module’s icon next to its name in the Profiler window. The recommended icon size at the specified path is 16x16 pixels. To provide a retina icon use the “@2x” suffix, as shown in the example below. To provide a dark-mode icon, use the “d_” prefix, as shown in the example below. If you're working in a packa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bb89e417e18
unity_docs
scripting
Give me an overview of the `HashUnsafeUtilities` class in Unity.
HashUnsafeUtilities class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Utilities to compute hashes with unsafe code. Static Methods Method Description ComputeHash128 Compute a 128 bit hash based on a data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34da468f19c7
unity_docs
rendering
What is `Experimental.GlobalIllumination.DiscLight` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. DiscLight struct in UnityEngine.Experimental.GlobalIllumination / Implemented in: UnityEngine.CoreModule Description A helper structure used to initialize a LightDataGI structure as a disc light. Properties Property Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1409e81141b
unity_docs
rendering
What is `MaterialEditor.GetFlexibleRectBetweenFieldAndRightEdge` in Unity? Explain its purpose and usage.
MaterialEditor.GetFlexibleRectBetweenFieldAndRightEdge Declaration public static Rect GetFlexibleRectBetweenFieldAndRightEdge ( Rect r ); Parameters Parameter Description r Field Rect. Returns Rect A sub rect of the input Rect. Description Utility method for GUI layouting ShaderGUI. Used e.g for t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40f9b7aaa8bf
unity_docs
scripting
Show me a Unity C# example demonstrating `Collision2D.contacts`.
Collision2D.contacts public ContactPoint2D[] contacts ; Description The specific points of contact with the incoming Collider2D. You should avoid using this as it produces memory garbage. Use GetContact or GetContacts instead. Additional resources: Collider2D class. ```csharp using UnityEngine; using Sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a220ea463021
unity_docs
scripting
What is `Event.current` in Unity? Explain its purpose and usage.
Event.current public static Event current ; Description The current event that's being processed right now. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Debug.Log("Current detected event: " + Event.current); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_64bb76c4d666
unity_docs
rendering
Explain '2D Pixel Perfect' in Unity.
com.unity.2d.pixel-perfect ## Description The 2D Pixel Perfect package contains the Pixel Perfect Camera component which ensures your pixel art remains crisp and clear at different resolutions, and stable in motion. It is a single component that makes all the calculations needed to scale the viewport with resolution ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8aa95d49da74
unity_docs
scripting
What is `UIElements.RadioButton` in Unity? Explain its purpose and usage.
RadioButton class in UnityEngine.UIElements / Inherits from: UIElements.BaseBoolField / Implemented in: UnityEngine.UIElementsModule Description A control that allows users to select a single option inside a RadioButtonGroup . For more information, refer to UXML element RadioButton . Static Properties P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_02781610edb1
unity_docs
rendering
Explain 'Texture types' in Unity.
## Albedo texture maps Albedo texture maps contain the base colors of a material. Make sure albedo textures don’t contain any lighting or shadows, because Unity adds lighting based on the positions of the object and the lights. ## Normal maps Normal maps are used by normal map Shaders to make low-polygon models look...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e5f6d5a276ed
github
scripting
Write a Unity C# XR/VR script for ONSP Version
```csharp /************************************************************************************ Filename : ONSPVersion.cs Content : Get version number of plug-in Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved. Licensed under the Oculus SDK Version 3.5 (the "...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_2e44387df4b3
unity_docs
scripting
What is `WSA.Launcher.LaunchUri` in Unity? Explain its purpose and usage.
Launcher.LaunchUri Declaration public static void LaunchUri (string uri , bool showWarning ); Parameters Parameter Description uri The URI. showWarning Displays a warning that the URI is potentially unsafe. Description Starts the default app associated with the URI scheme name for the specified URI, usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9bedd02526e9
unity_docs
xr
What is `iOS.Device` in Unity? Explain its purpose and usage.
Device class in UnityEngine.iOS / Implemented in: UnityEngine.CoreModule Description Interface into iOS specific functionality. Static Properties Property Description advertisingIdentifier Advertising ID. advertisingTrackingEnabled Is advertising tracking enabled. deferSystemGesturesMode Defer system gestu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0d351936d75b
github
scripting
Write a Unity C# UI script for User Input Recorder UI Controller
```csharp // Copyright (c) Mixed Reality Toolkit Contributors // Licensed under the BSD 3-Clause using UnityEngine; namespace MixedReality.Toolkit.Examples { /// <summary> /// This script controls the UI state of the user recording and playback control system. /// </summary> [AddComponentMenu("Script...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_8f9fa7244aca
github
scripting
Write a Unity C# XR/VR script for Video Time Scrub Control
```csharp using System; using System.Collections; using TMPro; using UnityEngine; using UnityEngine.UI; using UnityEngine.Video; namespace Unity.VRTemplate { /// <summary> /// Connects a UI slider control to a video player, allowing users to scrub to a particular time in th video. /// </summary> [Requi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab38c22a3a38
unity_docs
performance
What is `Profiling.RawFrameDataView.GetSampleMetadataAsFloat` in Unity? Explain its purpose and usage.
RawFrameDataView.GetSampleMetadataAsFloat Declaration public float GetSampleMetadataAsFloat (int sampleIndex , int metadataIndex ); Parameters Parameter Description sampleIndex Index of the Profiler sample. metadataIndex Metadata index. Returns float Returns float representation of sample metadata val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e2f8538abbc
unity_docs
scripting
What is `Pool.PooledObject_1.ctor` in Unity? Explain its purpose and usage.
PooledObject<T0> Constructor Declaration public PooledObject<T0> (T value , IObjectPool<T> pool ); Parameters Parameter Description value Object to manage pool Pool owning the object Description Initializes the pooled object with a managed object and specifies the pool to which the instance is return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b1d28c9d6f85
unity_docs
xr
Explain 'XR architecture' in Unity.
Unity supports XR development through its plug-in framework and a set of feature and tool packages. Go to the XR Plug-in Management category in Project Settings to enable XR support in a Unity project and to choose the plug-ins for the XR platforms that your project supports. Use the Unity Package Manager to install th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce1d6b5735c8
unity_docs
scripting
What is `AudioReverbFilter` in Unity? Explain its purpose and usage.
AudioReverbFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Reverb Filter takes an Audio Clip and distorts it to create a custom reverb effect. Additional resources: Audio Reverb Filter information. Properties Property Description de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cd2c0876914
unity_docs
editor
Show me a Unity C# example demonstrating `Profiling.Sampler.GetRecorder`.
Declaration public Profiling.Recorder GetRecorder (); Returns Recorder Recorder object associated with the Sampler. Description Returns Recorder associated with the Sampler. Each Sampler has only one recorder. Multiple calls to GetRecorder return references that control the same native Recorder object...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ad2900bfbaa
unity_docs
rendering
What is `ParticleSystemRenderer.GetMeshWeightings` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.GetMeshWeightings Declaration public int GetMeshWeightings (out float[] weightings ); Parameters Parameter Description weightings An array this function populates with the list of Mesh weightings the ParticleSystemRenderer uses for particle Mesh selection. If the array is smaller than ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c91475d9fe6
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.up`.
een axis) of the transform in world space. Unlike Vector3.up , Transform.up moves the GameObject while also considering its rotation. When a GameObject is rotated, the green arrow representing the Y axis of the GameObject also changes direction. Transform.up moves the GameObject in the green arrow’s axis (Y). For ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bc942a3e640a
github
scripting
Write a Unity C# script called Body Lean Pose Provider
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SpatialTracking; using UnityEngine.Experimental.XR.Interaction; public class BodyLeanPoseProvider : BasePoseProvider { [Tooltip("Distance in the horizontal plane that the head can move before this body posi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a3e9ed7c83c6
unity_docs
math
What is `Vector2.operator_eq` in Unity? Explain its purpose and usage.
Vector2.operator == public static bool operator == ( Vector2 lhs , Vector2 rhs ); Description Returns true if two vectors are approximately equal. To allow for floating point inaccuracies, the two vectors are considered equal if the magnitude of their difference is less than 1e-5.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_477909dcdd55
unity_docs
rendering
In Unity's 'Bumped Diffuse', what is 'Creating Normal maps' and how does it work?
You can import normal maps created outside of Unity, or you can import a regular grayscale image and convert it to a Normal Map from within Unity. (This page refers to a legacy shader which has been superseded by the Standard Shader , but you can learn more about how to use Normal Maps in the Standard Shader )
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ba0ef330a81e
unity_docs
rendering
In Unity's 'Transparent Parallax Diffuse', what is 'Transparent Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is completely transparent while 255 (white) is completely opaque. If your main texture does not have an alp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_816cc4fd4ab2
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.IsColumnVisible` in Unity? Explain its purpose and usage.
MultiColumnHeader.IsColumnVisible Declaration public bool IsColumnVisible (int columnIndex ); Parameters Parameter Description columnIndex Column index. Description Check if a column is currently visible in the MultiColumnHeader.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dac55ce37e8
unity_docs
scripting
What is `ColorPickerHDRConfig.ctor` in Unity? Explain its purpose and usage.
ColorPickerHDRConfig Constructor Declaration public ColorPickerHDRConfig (float minBrightness , float maxBrightness , float minExposureValue , float maxExposureValue ); Parameters Parameter Description minBrightness Minimum brightness value allowed when using the Color Picker. maxBrightness Maximum brig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e4ab8c848a17
unity_docs
rendering
In Unity's 'Use Animation curves', what is 'The Property list' and how does it work?
In an Animation Clip , if an animatable property has Animation Curve , this means that the value of the property changes over time. In the property list area of the Animation View (on the left), all the currently animated properties are listed. With the Animation View in Dope Sheet mode, the animated values for each pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9bf93be5b828
unity_docs
scripting
In Unity's 'MaskField', what is 'Example' and how does it work?
The following UXML example creates a MaskField: ``` <UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements"> <uie:MaskField label="UXML Field" name="the-uxml-field" /> </UXML> ``` The following C# example illustrates some of the customizable functionalities of the MaskField: ``` /// <sample> var choice...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15b88112e13b
unity_docs
input
What is `UIElements.FloatField` in Unity? Explain its purpose and usage.
FloatField class in UnityEngine.UIElements / Inherits from: UIElements.TextValueField_1 / Implemented in: UnityEngine.UIElementsModule Description Makes a text field for entering a float. For more information, refer to UXML element FloatField . Static Properties Property Description inputUssClassName ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_751dd5538288
unity_docs
editor
In Unity's 'Get started with UI Toolkit', what is 'Add UI controls to the window' and how does it work?
You can add UI controls to your window in the following ways: Use the UI Builder to visually add the UI controls Use an XML-like text file (UXML) to add the UI controls Use C# script to add the UI controls You can use any of these methods individually, or combine. The following examples create three sets of labels, but...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed20775e1957
unity_docs
scripting
What is `Handles.CylinderHandleCap` in Unity? Explain its purpose and usage.
Handles.CylinderHandleCap Declaration public static void CylinderHandleCap (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 H...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3e2234bb9608
github
scripting
Write a Unity C# script called Toy Belt Scenario Minimap Source
```csharp using FactoryMustScale.Runtime.Visualization; using FactoryMustScale.Simulation; using UnityEngine; namespace FactoryMustScale.Runtime.Visualization.Toy { /// <summary> /// TOY ONLY: deterministic fake belt source for visualization experiments. /// Not authoritative simulation and must not be use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af96f1fea221
unity_docs
scripting
Show me a Unity C# example demonstrating `Experimental.Rendering.GraphicsStateCollection.SaveToFile`.
csStateCollection.SaveToFile Declaration public bool SaveToFile (string filePath ); Parameters Parameter Description filePath Output location of GraphicsStateCollection serialized data. Returns bool Returns true if collection successfully saved, false otherwise. Description Save GraphicsStateCollecti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d425ce2fca61
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.GetRealPathsOfAllFiles`.
alPathsOfAllFiles ( iOS.Xcode.PBXSourceTree sourceTree ); Parameters Parameter Description sourceTree The source tree the path is relative to. The default source tree is PBXSourceTree.Source . This does not support the PBXSourceTree.Group . Returns IReadOnlyList<string> Returns paths of all project files...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2bcf2b8db838
unity_docs
scripting
Explain 'Modify GameActivity bridge code' in Unity.
GameActivity interacts with Unity via a bridge that you can modify to make changes and implement additional features. The code that makes up the bridge is written in C++ and during the build process, GameActivity builds it into a shared library called libgame.so . You can’t modify bridge code within Unity itself; you m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_caee3b8cdbd7
unity_docs
scripting
What is `Rendering.BatchDrawCommand.submeshIndex` in Unity? Explain its purpose and usage.
BatchDrawCommand.submeshIndex public ushort submeshIndex ; Description Specifies which sub-mesh of the Mesh identified by BatchDrawCommand.meshID to use to render the instances in this draw command.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3de90b74367
unity_docs
scripting
What is `Experimental.GraphView.PlacematContainer.GetTopZOrder` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PlacematContainer.GetTopZOrder Declaration public int GetTopZOrder (); Returns int Returns a ZOrder value. Description Retrieves the ZOrder value greater than the top-most placemat. For example, if the top-most placemat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dbf76842a86
unity_docs
rendering
What is `LightTransport.IProbeIntegrator.ResultType` in Unity? Explain its purpose and usage.
ResultType enumeration Description Result of an integrator operation. Properties Property Description Success The integration succeeded. Cancelled The integration was cancelled. JobFailed The integration failed due to an internal job error. OutOfMemory The integration failed because it ran out of memory. In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bc7e4635f53
unity_docs
scripting
What is `Playables.PlayableOutputExtensions.SetSourcePlayable` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.SetSourcePlayable Declaration public static void SetSourcePlayable (U output , V value , int port ); Parameters Parameter Description output The PlayableOutput used by this operation. value The new source Playable. port The new output port value. Description Sets which play...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_647e702f90f9
unity_docs
rendering
Explain 'Include sprites in text' in Unity.
To use sprites in your rich text tags, such as emojis, you need a sprite asset. You create sprite assets from atlas textures that contain a set of sprites. You can use as many sprite atlases and assets as you want. However, if you use multiple atlases per text object results in multiple draw calls for that object and c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ea3558d08a4
unity_docs
xr
What is `XR.XRDisplaySubsystem.TryGetDisplayRefreshRate` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.TryGetDisplayRefreshRate Declaration public bool TryGetDisplayRefreshRate (out float displayRefreshRate ); Parameters Parameter Description hmdRefreshRate Outputs the display refresh rate in Hz. Returns bool Returns true if the display refresh rate is available. Returns false if that r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3863f54e8078_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Whether the ModBus connection is currently operational. Signature: ```csharp public bool IsConnected ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ce12cf1a4cb
unity_docs
math
What is `Mesh.SetBoneWeights` in Unity? Explain its purpose and usage.
Mesh.SetBoneWeights Declaration public void SetBoneWeights (NativeArray<byte> bonesPerVertex , NativeArray<BoneWeight1> weights ); Parameters Parameter Description bonesPerVertex Bone count for each vertex in the Mesh. weights BoneWeight1 structs for each vertex, sorted by vertex index. Description Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2dbefd2ffca9
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.PasswordField`.
GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns string The password entered by the user. Description Make a text field where the user can enter a password. This works just like GUILayout.PasswordField , but correctly responds to select all, etc. in the editor, and it can have an optional label in fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ade616947453
unity_docs
rendering
What are the parameters of `ParticleSystemRenderer.SetActiveTrailVertexStreams` in Unity?
Description Enables a set of Vertex Shader streams on the ParticleSystemRenderer for particle trails. Additional resources: ParticleSystemRenderer.GetActiveTrailVertexStreams . ```csharp using UnityEngine; using UnityEditor; using System.Collections.Generic;[RequireComponent(typeof(ParticleSystem))] public class Exampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_651788f06069
unity_docs
rendering
What is `Rendering.BatchFilterSettings` in Unity? Explain its purpose and usage.
BatchFilterSettings struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents settings that Unity applies to draw commands in this draw range . For more information, see BatchRendererGroup . Properties Property Description allDepthSorted Indicates whether all draw com...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_af62ea1d9473
unity_docs
xr
In Unity's 'Purchase or download an Asset Store package', what is 'Find packages on the Asset Store' and how does it work?
When you open the Asset Store, the main page displays current sales promotions and a curated list of Popular Assets . You can browse through the suggestions, or search for something specific. If you’re looking for a specific asset, you can use any of these searching, filtering, and sorting methods alone or in combinati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0eec76c0d148
unity_docs
rendering
What is `RenderTextureMemoryless.Color` in Unity? Explain its purpose and usage.
RenderTextureMemoryless.Color Description Render texture color pixels are memoryless when RenderTexture.antiAliasing is set to 1. Note that memoryless render textures are only supported on iOS/tvOS 10.0+ Metal and Vulkan. Render textures are read/write protected and stored in CPU or GPU memory on other platforms....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_735a4c794ca3
unity_docs
ui
What is `UnityEngine.UIElementsModule` in Unity? Explain its purpose and usage.
UnityEngine.UIElementsModule Description The UIElements module implements the UIElements retained mode UI framework. Classes Class Description AbstractProgressBar Abstract base class for the ProgressBar. AlignmentUtils Static class containing utility methods for aligning visual elements. AttachToPanelE...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34a63bd3f534
unity_docs
rendering
What are the parameters of `MaterialPropertyBlock.CopySHCoefficientArraysFrom` in Unity?
Description This function converts and copies the entire source array into 7 Vector4 property arrays named unity_SHAr , unity_SHAg , unity_SHAb , unity_SHBr , unity_SHBg , unity_SHBb and unity_SHC for use with instanced light probe rendering. If the array properties don't exist on the MaterialPropertyBlock, they will b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9a6e12c1c05
unity_docs
performance
What is `Unity.Profiling.LowLevel.ProfilerMarkerDataType.InstanceId` in Unity? Explain its purpose and usage.
ProfilerMarkerDataType.InstanceId Description Indicates that ProfilerMarkerData.Ptr points to a value of type int that represents an instance ID of Unity Object. Use FrameDataView.GetUnityObjectInfo to obtain further information about the object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2329a7941cc1_doc_8
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Line renderer that is associated with this state Signature: ```csharp public XRInteractorLineVisual m_LineRenderer; ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_0d444a260c44
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.GetFrameworksBuildPhaseByTarget`.
eworksBuildPhaseByTarget Declaration public string GetFrameworksBuildPhaseByTarget (string targetGuid ); Parameters Parameter Description targetGuid The GUID of the target, such as one returned by TargetGuidByName . Returns string Returns the GUID of the existing phase or null if it does not exist. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd43c4ceefb2
unity_docs
editor
Show me a Unity C# example demonstrating `ConsoleWindowUtility.GetConsoleLogCounts`.
ConsoleWindowUtility.GetConsoleLogCounts(out int, out int, out int) Description Retrieve the current counts of messages in the Console Window. Returns the current number of Error, Warning, and Log messages that are currently present in the Console Window. ```csharp using UnityEngine; using UnityEditor;public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf498494f7fa
unity_docs
rendering
What is `Rendering.BatchDrawCommandProcedural` in Unity? Explain its purpose and usage.
BatchDrawCommandProcedural struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents a procedural draw command for a BatchRendererGroup . This type of draw command has a reference to a material, but all vertex data is fetched procedurally by the shader. Properties Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59a6e61202eb
unity_docs
scripting
What is `AssetPostprocessor.OnPreprocessSpeedTree` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPreprocessSpeedTree() Description Add this function to a subclass to get a notification just before a SpeedTree asset (.spm file) is imported. This function behaves much like OnPreprocessModel where you can control the SpeedTree asset import settings through code.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6939f5951d9
unity_docs
rendering
Show me a Unity C# example demonstrating `Cubemap.format`.
Cubemap.format public TextureFormat format ; Description The format of the pixel data in the texture (Read Only). Use this to determine the format of the texture. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Print the format of a given cubemap. public Cubemap cubeMap; void Start() ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa55729834a2
unity_docs
scripting
What is `UIElements.Experimental.StyleValues.bottom` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StyleValues.bottom public float bottom ; Description Bottom distance from the element's box during layout.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c5df8812a7a
unity_docs
editor
What is `EditorGUI.DelayedFloatField` in Unity? Explain its purpose and usage.
EditorGUI.DelayedFloatField Declaration public static float DelayedFloatField ( Rect position , float value , GUIStyle style = EditorStyles.numberField); Declaration public static float DelayedFloatField ( Rect position , string label , float value , GUIStyle style = EditorStyles.numberField); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_977e9e1805db
unity_docs
animation
Show me a Unity code example for 'USS properties reference'.
The following table lists the USS properties in UI Toolkit. The table indicates which properties are inherited and their animatability . For an inherited property, the element gets the value from its parent element if you don’t specify a value for it. The following example uses an inherited property to set the font for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dec934fe6154
unity_docs
xr
What is `Accessibility.IAccessibilityNotificationDispatcher.SendScreenChanged` in Unity? Explain its purpose and usage.
IAccessibilityNotificationDispatcher.SendScreenChanged Declaration public void SendScreenChanged ( Accessibility.AccessibilityNode nodeToFocus ); Parameters Parameter Description nodeToFocus Optional node to be focused by the screen reader. Description Sends a notification to the screen reader when the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_958503f9802d
unity_docs
rendering
What is `Device.SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders` in Unity? Explain its purpose and usage.
SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders public static bool hasDynamicUniformArrayIndexingInFragmentShaders ; Description This has the same functionality as SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders 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.