id stringlengths 15 22 | source stringclasses 2
values | category stringclasses 12
values | instruction stringlengths 22 180 | response stringlengths 100 46.1k | system stringclasses 5
values |
|---|---|---|---|---|---|
local_man_f536b417492b | unity_docs | rendering | Explain 'Writing a custom shader in ShaderLab and HLSL' in Unity. | Resources and techniques for writing Shader objects, subshaders and shader passes in ShaderLab and HLSL.
Page Description Create a shader file
Create a customshader asset file either using the Unity Editor or manually.
Add a subshader in a custom shader
Use a SubShader block to add one or more sections that define diff... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0ce670dd493e | unity_docs | animation | What is `Animations.AnimationHumanStream.SetLookAtHeadWeight` in Unity? Explain its purpose and usage. | AnimationHumanStream.SetLookAtHeadWeight
Declaration
public void
SetLookAtHeadWeight
(float
weight
);
Parameters
Parameter
Description
weight
The LookAt head weight.
Description
Sets the LookAt head weight.
Determines how much the head is involved in the LookAt. Rotates the head transform so the forward v... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_efa2d06191bf | unity_docs | editor | What is `VersionControl.Plugin` in Unity? Explain its purpose and usage. | Plugin
class in
UnityEditor.VersionControl
Description
The plug-in class describes the currently active version control plug-in and its configuration options.
Properties
Property
Description
configFields
Configuration fields of the plugin.
name
The name of the currently active version control. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3d69867e0d04 | unity_docs | scripting | What is `Rendering.RenderPipelineAsset_1.pipelineType` in Unity? Explain its purpose and usage. | RenderPipelineAsset<T0>.pipelineType
public Type
pipelineType
;
Description
Returns a
RenderPipeline
type associated with the given
RenderPipelineAsset
instance.
The result is based on the generic parameter type of
RenderPipelineAsset<T0>
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e3f7eca0d37a | unity_docs | rendering | Explain 'Writing shaders in code' in Unity. | This section contains information on the following subjects:
Page Description Introduction to writing shaders in code
Learn about ShaderLab ,
Surface Shaders
, and High Level Shader Language (HLSL), and which languages and approaches to use for each
render pipeline
.
Shader object fundamentals
Understand the object tha... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_27f224dc62b6 | unity_docs | editor | What is `Build.Content.SerializationInfo` in Unity? Explain its purpose and usage. | SerializationInfo
class in
UnityEditor.Build.Content
Description
Container for holding object serialization order information for a build.
Note: this class and its members exist to provide low-level support for the
Scriptable Build Pipeline
package. This is intended for internal use only; use the
Scriptable Bu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6cd128f0bbb1 | unity_docs | physics | In Unity's 'Get started with Unity', what is 'First-time game developers' and how does it work? | If you’re new to game development, the best place to start is by completing some
Unity Learn
tutorials.
For a beginner tutorial on using the Editor and creating basic gameplay, refer to the
Unity Essentials pathway
.
For information on creating your first project, refer to
Create your first project
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2b15b86acc08 | unity_docs | editor | What is `GameObjectUtility.AreStaticEditorFlagsSet` in Unity? Explain its purpose and usage. | GameObjectUtility.AreStaticEditorFlagsSet
Declaration
public static bool
AreStaticEditorFlagsSet
(
GameObject
go
,
StaticEditorFlags
flags
);
Parameters
Parameter
Description
go
The GameObject to check.
flags
The flags you want to check.
Returns
bool
Whether the GameObject's static flags match the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_777245c9d256 | github | scripting | Write a Unity C# script called Command Data Resolver | ```csharp
using System;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Text.RegularExpressions;
using UnityEngine;
namespace InGame_Console.InGame_Console_System.Scripts
{
public static class CommandDataResolver
{
public static object GetData(string value, Type t... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_19cf96b63aea | unity_docs | math | What is `ComputeShader.SetTexture` in Unity? Explain its purpose and usage. | ComputeShader.SetTexture
Declaration
public void
SetTexture
(int
kernelIndex
,
string
name
,
Texture
texture
);
Declaration
public void
SetTexture
(int
kernelIndex
,
int
nameID
,
Texture
texture
);
Declaration
public void
SetTexture
(int
kernelIndex
,
string
name
,
Texture
texture
,
int
mipL... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4bdee6ac47eb | unity_docs | scripting | What is `ArticulationDrive.stiffness` in Unity? Explain its purpose and usage. | ArticulationDrive.stiffness
public float
stiffness
;
Description
The stiffness of the spring connected to this drive.
Units of measurement - N/m (newtons per meter) for linear and Nm/radian (newton-meters per radian) for angular motion. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_667a7ff0a2fc | unity_docs | rendering | Explain 'Global illumination Surface Shader example in the Built-In Render Pipeline' in Unity. | We’ll start with a Shader that mimics Unity’s built-in GI:
```csharp
Shader "Example/CustomGI_ToneMapped" {
Properties {
_MainTex ("Albedo (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
CGPROGRAM
#pragma surface surf StandardDefaultGI
#include "UnityPBSLighting.cginc"
sampler2D _Ma... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7f2db5c4382d | unity_docs | input | What is `UIElements.MouseMoveEvent.GetPooled` in Unity? Explain its purpose and usage. | MouseMoveEvent.GetPooled
Declaration
public static
UIElements.MouseMoveEvent
GetPooled
(
Event
systemEvent
);
Parameters
Parameter
Description
systemEvent
An IMGUI mouse event.
Returns
MouseMoveEvent
An initialized event.
Description
Gets an event from the event pool and initializes it with the g... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4800277df2fc | unity_docs | math | What are the parameters of `Mesh.AllocateWritableMeshData` in Unity? | Returns MeshDataArray Returns a MeshDataArray containing writeable MeshData structs. See MeshDataArray and MeshData . Description Allocates data structures for Mesh creation using C# Jobs. Use Mesh.AllocateWritableMeshData to obtain a MeshDataArray of writeable MeshData structs. You can access the resulting MeshDataArr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6768ae9255fc | unity_docs | rendering | Explain 'DOTS Instancing shaders in URP' in Unity. | To render large instance counts efficiently, BRG uses a new shader instancing mode called DOTS Instancing. Every shader that BRG uses must support DOTS Instancing. In traditional instanced shaders, the shader is passed an array for each instanced property in a constant or uniform buffer, such that each element in each ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_21c0fee56bda | unity_docs | animation | What is `AnimationUtility.OnCurveWasModified` in Unity? Explain its purpose and usage. | AnimationUtility.OnCurveWasModified
Declaration
public delegate void
OnCurveWasModified
(
AnimationClip
clip
,
EditorCurveBinding
binding
,
AnimationUtility.CurveModifiedType
type
);
Description
Triggered when an animation curve, in an animation clip, has been modified. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d5917eba9f76 | unity_docs | rendering | What is `Rendering.ShaderTagId.operator_string` in Unity? Explain its purpose and usage. | ShaderTagId.string
Parameters
Parameter
Description
tagId
The
ShaderTagId
to get the name of.
Description
Converts a
ShaderTagId
to a string.
Gets the name of the tag referred to by the shader tag id. This is equivalent to accesing the
name
property. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5825cd11a40f | unity_docs | scripting | What is `Unity.Android.Gradle.GradleSettingsFile` in Unity? Explain its purpose and usage. | GradleSettingsFile
class in
Unity.Android.Gradle
/
Inherits from:
Unity.Android.Gradle.BaseGradleFile
Description
The C# definition of
settings.gradle
file.
For more information about the file, see Android's documentation:
The Gradle settings file
Properties
Property
Description
DependencyResolutionManag... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0337be6d856e | unity_docs | math | What is `AndroidJNI.GetLongArrayElement` in Unity? Explain its purpose and usage. | AndroidJNI.GetLongArrayElement
Declaration
public static long
GetLongArrayElement
(IntPtr
array
,
int
index
);
Description
Returns the value of one element of a primitive array.
This function is a special case of GetLongArrayRegion(), called with region size set to 1.
Additional resources:
Java Native Interf... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_802ba26ab16f | unity_docs | editor | What are the parameters of `iOS.Xcode.PBXProject.GetEntitlementFilePathForTarget` in Unity? | Returns string The relative path to the entitlement file or null if it does not exist. Description Returns the relative path to the entitlement file for the specified build target. ```csharp
using UnityEngine;
using UnityEditor;
using System.IO;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;public class Samp... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_286dfb82718a | unity_docs | rendering | What is `Experimental.Rendering.GraphicsFormat` in Unity? Explain its purpose and usage. | GraphicsFormat
enumeration
Description
Use this format to create either Textures or RenderTextures from scripts.
```csharp
using UnityEngine;
using UnityEngine.Experimental.Rendering;public class ExampleScript : MonoBehaviour
{
TextureCreationFlags flags;
void Start()
{
// Create a new texture and assign it to... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_23b8b0ece5ae | unity_docs | scripting | Show me a Unity C# example demonstrating `Experimental.Rendering.GraphicsStateCollection.LoadFromFile`. | tion.LoadFromFile
Declaration
public bool
LoadFromFile
(string
filePath
);
Parameters
Parameter
Description
filePath
Location of the GraphicsStateCollection file.
Returns
bool
Returns true if the collection was successfully loaded, false otherwise.
Description
Load the GraphicsStateCollection at the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dec8cfbfb834 | unity_docs | scripting | Show me a Unity C# example demonstrating `Vector3.Index_operator`. | Vector3.this[int]
public float
this[int]
;
Description
Access the x, y, z components using [0], [1], [2] respectively.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
public Vector3 p; void Example()
{
// set p.y as 5.0f
p[1] = 5.0f;
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f0b8091da462 | unity_docs | xr | What is `MPE.ChannelClient` in Unity? Explain its purpose and usage. | ChannelClient
class in
UnityEditor.MPE
Description
ChannelClient is a WebSocket client that connects to Unity's
ChannelService
, which is a WebSocket server.
A ChannelClient is created on a specific channel. A channel name matches the last part of a WebSocket URL. For example: 127.0.0.1:9090/<channelName>.
The
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_53a242081300 | unity_docs | rendering | What is `TrailRenderer.widthMultiplier` in Unity? Explain its purpose and usage. | TrailRenderer.widthMultiplier
public float
widthMultiplier
;
Description
Set an overall multiplier that is applied to the
TrailRenderer.widthCurve
to get the final width of the trail.
```csharp
using UnityEngine;
using System.Collections;[RequireComponent(typeof(TrailRenderer))]
public class ExampleClass : M... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dfc5fe8b402f | unity_docs | scripting | Show me a Unity C# example demonstrating `Transform.SetSiblingIndex`. | of a GameObject is changed, its order in the Hierarchy window will also change. This is useful if you are intentionally ordering the children of a GameObject such as when using Layout Group components.
Layout Groups will also visually reorder the group by their index. To read more about Layout Groups see
AutoLayout
.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_99a2c9c67602 | unity_docs | rendering | Show me a Unity C# example demonstrating `Cubemap.SetPixelData`. | rmat data into a texture.
The size of the
data
array must be the width × height of the mipmap level, and the data layout must match the texture format, otherwise
SetPixelData
fails. You can use
byte
for
T
if you don't want to define a custom struct to match the texture format.
Unity throws an exception when
Se... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_240d283eeb7d | unity_docs | rendering | What is `Mesh.GetVertexAttributeDimension` in Unity? Explain its purpose and usage. | Mesh.GetVertexAttributeDimension
Declaration
public int
GetVertexAttributeDimension
(
Rendering.VertexAttribute
attr
);
Parameters
Parameter
Description
attr
Vertex data attribute to check for.
Returns
int
Dimensionality of the data attribute, or zero if it is not present.
Description
Get dimension... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2729e976e520 | unity_docs | math | Give me an overview of the `Ray` class in Unity. | Ray
struct in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Representation of rays.
A ray is an infinite line starting at
origin
and going in some
direction
.
Properties
Property
Description
direction
The direction of the ray.
origin
The origin point of the ray.
Constructors
Constru... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9c019228e1d3 | unity_docs | scripting | What is `Search.SearchUtils.SplitFileEntryComponents` in Unity? Explain its purpose and usage. | SearchUtils.SplitFileEntryComponents
Declaration
public static IEnumerable<string>
SplitFileEntryComponents
(string
path
,
ref char[]
entrySeparators
);
Parameters
Parameter
Description
path
Path to tokenize.
entrySeparators
Entry separators used to tokenize the path.
Returns
IEnumerable<string>
Retur... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_990b383cdbf1 | unity_docs | rendering | Show me a Unity C# example demonstrating `AssetDatabase.GenerateUniqueAssetPath`. | sets/Textures/hello.png
.
By default, Unity uses a space to separate the filename from the number it appends. For example, if you supply the path
Assets/Textures/hello.png
and that file already exists, Unity returns
Assets/Textures/hello 1.png
. To change this behavior, disable the Space Before Number in Asset Names... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a95825ea6071 | unity_docs | rendering | In Unity's 'JavaScript interface in Unity Web builds', what is 'Direct your project to your streaming assets' and how does it work? | If you need to host your streaming assets on a different CDN, you can adjust the streamingAssetsUrl property on the
createUnityInstance()
configuration object to point to the full URL where your streaming assets are.
```
var buildUrl = "Build";
var config = {
dataUrl: buildUrl + "/{{{ DATA_FILENAME }}}",
frameworkUrl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6186d2fdfdc6 | unity_docs | scripting | Show me a Unity C# example demonstrating `GUISettings.selectionColor`. | GUISettings.selectionColor
public
Color
selectionColor
;
Description
The color of the selection rect in text fields.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
string str = "This is a string with \n two lines of text"; void OnGUI()
{
GUI.skin.settings.selectionColor = Color.cyan;
s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e1a0e11fe761 | unity_docs | xr | What is `XR.InputDevice.SendHapticImpulse` in Unity? Explain its purpose and usage. | InputDevice.SendHapticImpulse
Declaration
public bool
SendHapticImpulse
(uint
channel
,
float
amplitude
,
float
duration
);
Parameters
Parameter
Description
channel
The channel to receive the impulse.
amplitude
The normalized (0.0 to 1.0) amplitude value of the haptic impulse to play on the device.
dura... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_58836435a321 | unity_docs | rendering | What is `ParticleSystemRingBufferMode` in Unity? Explain its purpose and usage. | ParticleSystemRingBufferMode
enumeration
Description
Control how particles are removed from the Particle System.
Properties
Property
Description
Disabled
Particles are removed when their age exceeds their lifetime.
PauseUntilReplaced
Particle ages pause at the end of their lifetime until they need to be remove... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b187ec0bc056 | unity_docs | scripting | Explain 'Registering a Search Provider' in Unity. | To add a new Search Provider, refer to the examples in the SearchProvider class.
These examples create a function and tag it with the SearchItemProvider attribute:
The function must return a new SearchProvider instance.
The SearchProvider instance must have the following:
A unique
type
. For example,
Asset
,
Menu
, or
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bfb0ef7a3b01 | unity_docs | scripting | What is `Vector4.operator_divide` in Unity? Explain its purpose and usage. | Vector4.operator /
public static
Vector4
operator /
(
Vector4
a
,
float
d
);
Description
Divides a vector by a number.
Divides each component of
a
by a number
d
.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//Prints (0.5, 1.0, 1.5, 2.5)
print(new Vector4(1, 2, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dac6d240fad4 | unity_docs | math | What is `Vector2.Equals` in Unity? Explain its purpose and usage. | Vector2.Equals
Declaration
public bool
Equals
(object
other
);
Description
Returns true if the given vector is exactly equal to this vector.
Due to floating point inaccuracies, this might return false for vectors which are essentially (but not exactly) equal. Use the
== operator
to test two vectors for appro... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_51b5ba36ab10 | unity_docs | audio | What is `AudioSpeakerMode.Mono` in Unity? Explain its purpose and usage. | AudioSpeakerMode.Mono
Description
The speakers are mono and contain one channel.
The Mono audio speaker mode contains one audio channel (channel count is set to 1).
Mono plays identical audio in the left and right channels, which makes it ideal for users with single-sided deafness, off‑center listening, or a missi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c7d3f016c860 | unity_docs | networking | What is `Android.AndroidConfiguration.uiModeType` in Unity? Explain its purpose and usage. | AndroidConfiguration.uiModeType
public
Android.AndroidUIModeType
uiModeType
;
Description
Mirrors the Android property
uiMode
based on the
UI_MODE_TYPE_MASK
value.
For information about this property, refer to the Android developer documentation on
uiMode
and
UI_MODE_TYPE_MASK
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1f7a98b0556f | unity_docs | scripting | What is `Resources.UnloadAsset` in Unity? Explain its purpose and usage. | Resources.UnloadAsset
Declaration
public static void
UnloadAsset
(
Object
assetToUnload
);
Description
Unloads
assetToUnload
from memory.
This function can only be called on Assets that are stored on disk.
The referenced asset (assetToUnload) will be unloaded from memory. The object will become invalid and ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_33f3d937bb24 | unity_docs | scripting | What is `PlayerSettings.SplashScreenLogo.CreateWithUnityLogo` in Unity? Explain its purpose and usage. | PlayerSettings.SplashScreenLogo.CreateWithUnityLogo
Declaration
public static
PlayerSettings.SplashScreenLogo
CreateWithUnityLogo
(float
duration
= k_MinLogoTime);
Parameters
Parameter
Description
duration
The total time in seconds that the logo will be shown. Note minimum time is 2 seconds.
Returns
Sp... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ed651ede6e31 | unity_docs | math | What is `AndroidJNI.SetBooleanArrayElement` in Unity? Explain its purpose and usage. | AndroidJNI.SetBooleanArrayElement
Declaration
public static void
SetBooleanArrayElement
(IntPtr
array
,
int
index
,
bool
val
);
Parameters
Parameter
Description
array
The array of native booleans.
index
Index of the array element to set.
val
The value to set.
Description
Sets the boolean value of one... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_38b1703e2023 | unity_docs | rendering | What is `PlayerSettings.SetDefaultShaderChunkCount` in Unity? Explain its purpose and usage. | PlayerSettings.SetDefaultShaderChunkCount
Declaration
public static void
SetDefaultShaderChunkCount
(int
chunkCount
);
Parameters
Parameter
Description
buildTarget
The build target to set the shader chunk count for.
chunkCount
The maximum number of chunks to keep in memory for each shader.
Description
S... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e26c836895ae | unity_docs | scripting | What is `Resources.FindObjectsOfTypeAll` in Unity? Explain its purpose and usage. | Resources.FindObjectsOfTypeAll
Declaration
public static T[]
FindObjectsOfTypeAll
();
Description
Returns a list of all objects of Type
T
.
This function can return any type of Unity object that is loaded, including game objects, prefabs, materials, meshes, textures, etc. It will also list internal objects, th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_31be0ed227f1 | unity_docs | physics | Explain 'Mesh collider component reference' in Unity. | The Mesh Collider
component takes a
mesh asset
and builds a collider that matches the geometry of that mesh.
Mesh colliders are a convenient way to represent complex shapes and can provide more accurate
collision detection
for complex geometry than primitives. However, for moving or dynamic objects, primitive colliders... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_234cb4cd644e | unity_docs | editor | Show me a Unity C# example demonstrating `Profiling.FrameDataView.GetCounterValueAsLong`. | FrameDataView.GetCounterValueAsLong
Declaration
public long
GetCounterValueAsLong
(int
markerId
);
Parameters
Parameter
Description
markerId
Marker identifier.
Returns
long
Returns the counter value as
long
.
Description
Gets the last value of a counter marker in the frame as a long data type.
Use ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3a6e3bd91853 | unity_docs | rendering | Show me a Unity code example for 'Branch based on shader model'. | SHADER_TARGET
is defined to a numeric value that matches the Shader target compilation model (that is, matching
#pragma target
directive). For example,
SHADER_TARGET is 30
when compiling into Shader model 3.0. You can use it in Shader code to do conditional checks. For example:
```
#if SHADER_TARGET < 30
// less than ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_103347a59c12_doc_12 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Stores the used to enable or disable 180° snap turns.
Signature:
```csharp
public Toggle enableTurnAroundToggle
``` | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_man_24b30cc27064 | unity_docs | rendering | In Unity's 'Color emojis', what is 'Set up color emojis' and how does it work? | Create a color emojis font asset and add it to the UITK Text Settings Fallback.
In your project, import a font file that has color emojis in it.
Right-click the font file, and then select
Create
>
Text Core
>
Font Asset
>
Color
. This ensures that you create the font asset with the correct shader (Sprite) and the corre... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d2f15f8b20b4 | unity_docs | scripting | What is `UIElements.Toggle.textUssClassName` in Unity? Explain its purpose and usage. | Toggle.textUssClassName
public static string
textUssClassName
;
Description
USS class name of Text elements in Toggle elements.
Unity adds this USS class to Text sub-elements of the
Toggle
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6b603804ffff | unity_docs | physics | What is `ConstantForce2D.force` in Unity? Explain its purpose and usage. | ConstantForce2D.force
public
Vector2
force
;
Description
The linear force applied to the rigidbody each physics update.
The
force
is specified in the global coordinate frame i.e. independent of the rigid-body rotation and is applied to the center-of-mass therefore no torque is generated. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3d7a9dbbdeb0 | unity_docs | rendering | What is `Windows.WebCam.PhotoCaptureFrame.TryGetCameraToWorldMatrix` in Unity? Explain its purpose and usage. | PhotoCaptureFrame.TryGetCameraToWorldMatrix
Declaration
public bool
TryGetCameraToWorldMatrix
(out
Matrix4x4
cameraToWorldMatrix
);
Parameters
Parameter
Description
cameraToWorldMatrix
A matrix to be populated by the Camera to world Matrix.
Returns
bool
True if a valid matrix is returned or false other... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8144168e842a | unity_docs | math | What is `Font.GetPathsToOSFonts` in Unity? Explain its purpose and usage. | Font.GetPathsToOSFonts
Declaration
public static string[]
GetPathsToOSFonts
();
Returns
string[]
An array of the file paths of all fonts installed on the machine.
Description
Gets the file paths of the fonts that are installed on the operating system.
This function lets you get the file paths and names of... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cb72b8722bba | unity_docs | rendering | What is `Camera.focusDistance` in Unity? Explain its purpose and usage. | Camera.focusDistance
public float
focusDistance
;
Description
The focus distance of the lens. To use this property, enable UsePhysicalProperties.
The focus distance of the lens. Certain Volume override components use this value the focus distance mode is set to Physical. Depth Of Field is one example. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d7815780b7f3 | unity_docs | rendering | What are the parameters of `Graphics.Blit` in Unity? | Description Uses a shader to copy the pixel data from a texture into a render target. This method copies pixel data from a texture on the GPU to a render texture or graphics texture on the GPU. This is one of the fastest ways to copy a texture. When you use Graphics.Blit , Unity does the following: Sets the active rend... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d89e9d2c6dde | unity_docs | scripting | Explain 'Text Mesh component reference' in Unity. | The Text Mesh
component generates 3D geometry that displays text strings.
Note:
The
Text Mesh
component has limited functionality. For information on more recent, full-featured ways of displaying text, see
Creating user interfaces (UI)
.
To create a new Text Mesh, go to
Component > Mesh > Text Mesh
.
## Text Mesh prop... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0d4f5499c924 | unity_docs | scripting | What is `AssetImporter.SupportsRemappedAssetType` in Unity? Explain its purpose and usage. | AssetImporter.SupportsRemappedAssetType
Declaration
public bool
SupportsRemappedAssetType
(Type
type
);
Parameters
Parameter
Description
type
The type of asset to check.
Returns
bool
Returns true if the importer supports remapping the given type. Otherwise, returns false.
Description
Checks if the As... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9c9a2b2492e3 | unity_docs | scripting | What is `EditorApplication.hierarchyWindowItemOnGUI` in Unity? Explain its purpose and usage. | EditorApplication.hierarchyWindowItemOnGUI
public static
EditorApplication.HierarchyWindowItemCallback
hierarchyWindowItemOnGUI
;
Description
Delegate for OnGUI events for every visible list item in the HierarchyWindow.
Additional resources:
HierarchyWindowItemCallback
,
EditorApplication.RepaintHierarchyWi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3d69cc00c603 | unity_docs | performance | What is `ParticleSystemJobs.ParticleSystemJobData.velocities` in Unity? Explain its purpose and usage. | ParticleSystemJobData.velocities
public
ParticleSystemJobs.ParticleSystemNativeArray3
velocities
;
Description
The velocity of each particle.
This array is stored in the Simulation Space of the Particle System, therefore it may contain data in either World or Local space. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8fddbd4050d7 | unity_docs | scripting | Give me an overview of the `SettingsScope` class in Unity. | SettingsScope
enumeration
Description
Sets the scope of a SettingsProvider. The Scope determines where it appears in the UI. For example, whether it appears with the Project settings in the Settings window, or in the Preferences window, or in both windows.
Additional resources:
SettingsProvider.scope
,
SettingsP... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_52bfe5d10be4 | unity_docs | physics | Show me a Unity C# example demonstrating `ShaderKeywordFilter.ApplyRulesIfNotGraphicsAPIAttribute`. | rKeywordFilter.GraphicsAPIConstraintAttribute
Description
Enable or disable shader keyword filter attributes based on the graphics API.
If you use this attribute, Unity enables
filter attributes
if the current build target doesn't match any of the
graphicsDeviceTypes
.
The following example builds only variants... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_24340d4d838e | unity_docs | scripting | What is `UIElements.Tab.closing` in Unity? Explain its purpose and usage. | Tab.closing
Description
This event is called before a tab is closed. Return true if the tab can be closed.
In the case where more than one event are assigned, all of them will be executed synchronously but only the
last value will be taken into account. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_87e36f65a512 | unity_docs | rendering | What is `ShaderUtil.GetMissShaderName` in Unity? Explain its purpose and usage. | ShaderUtil.GetMissShaderName
Declaration
public static string
GetMissShaderName
(
Rendering.RayTracingShader
s
,
int
shaderIndex
);
Parameters
Parameter
Description
s
The
RayTracingShader
instance.
shaderIndex
The miss Shader index for which to retrieve the name. The miss Shaders defined in a
RayTraci... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c23e8fa7dff5 | unity_docs | rendering | Explain 'Calculate the size of the frustum at a distance' in Unity. | A cross-section of the view frustum at a certain distance from the camera defines a rectangle in world space that frames the visible area. It is sometimes useful to calculate the size of this rectangle at a given distance, or find the distance where the rectangle is a given size. For example, if a moving camera needs t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ecb53e1bf9a3 | unity_docs | ui | Show me a Unity code example for 'Control textures of the dynamic atlas'. | ector window, select the options from
Dynamic Atlas Settings
>
Active Filters
dropdown list.
## Use custom filters
You can assign a custom filter to
PanelSettings.dynamicAtlasSettings.customFilter
to add or relax constraints on a global or per-texture basis.
The following custom filter example bypasses a large textur... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3d01d6939001 | unity_docs | animation | What is `Animations.AnimatorStateMachine.MakeUniqueStateName` in Unity? Explain its purpose and usage. | AnimatorStateMachine.MakeUniqueStateName
Declaration
public string
MakeUniqueStateName
(string
name
);
Parameters
Parameter
Description
name
Desired name for the state.
Description
Makes a unique state name in the context of the parent state machine. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_bb698bd4dbb9 | unity_docs | scripting | In Unity's 'Scene View preferences reference', what is 'General Scene view settings' and how does it work? | Property Function Create Objects with Constrained Proportions
Define the default behavior for Scale in the Transform component. When enabled, changing a
GameObject
’s scale on any axis changes the other axes by the same amount. You can disable and enable this option for individual GameObjects in the Inspector window.
A... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ba60614eefaf | unity_docs | scripting | What is `UIElements.TimeUnit` in Unity? Explain its purpose and usage. | TimeUnit
enumeration
Description
Describes how to interpret a
TimeValue
.
Properties
Property
Description
Second
Interprets the time value as seconds.
Millisecond
Interprets the time value as milliseconds. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1aed3e10bd2e | unity_docs | editor | What is `IMGUI.Controls.MultiColumnHeaderState.Column` in Unity? Explain its purpose and usage. | Column
class in
UnityEditor.IMGUI.Controls
Description
Column state.
Properties
Property
Description
allowToggleVisibility
Option to allow/disallow hiding the column from the context menu.
autoResize
Option to allow the column to resize automatically when resizing the entire MultiColumnHeader.
canSort
Is sor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ca293d0cbc96 | unity_docs | scripting | What is `Handles.DrawLines` in Unity? Explain its purpose and usage. | Handles.DrawLines
Declaration
public static void
DrawLines
(Vector3[]
lineSegments
);
Parameters
Parameter
Description
lineSegments
A list of pairs of points that represent the start and end of line segments.
Description
Draw a list of line segments.
"Draw multiple lines in sceneview.".
Below is an exampl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_df207bfc37a3 | unity_docs | editor | What are the parameters of `EditorGUILayout.LayerField` in Unity? | Returns int The layer selected by the user. Description Make a layer selection field. Set the layer of the selected GameObjects. ```csharp
// Simple editor script that lets you set the layer for the
// selected GameObjects.using UnityEngine;
using UnityEditor;public class LayerFieldExample : EditorWindow
{
static i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_85f84db811a1 | unity_docs | animation | In Unity's 'Introduction to the Asset Store', what is 'Access the Asset Store' and how does it work? | You can access the Asset Store website at
https://assetstore.unity.com/
.
In Unity 6.0 and later, you can open the Asset Store website in the Unity Editor from the
Asset Store
dropdown in the
toolbar
. You can also use this dropdown to open your downloaded assets in the
Package Manager Window
.
In all supported version... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2965b6905e84 | unity_docs | scripting | Show me a Unity C# example demonstrating `AI.NavMeshAgent.Raycast`. | rue value is returned and
the position and other details of the obstructing object are stored
in the
hit
parameter. This can be used to check if there is a clear
shot or line of sight between a character and a target object.
This function is preferable to the similar
Physics.Raycast
because the line tracing is perf... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7a638636a51d | unity_docs | physics | Show me a Unity code example for 'Conditional compilation in Unity'. | fer to Microsoft’s documentation on
C# preprocessor directives
.
Unity has a range of predefined symbols you can use in your scripts to selectively include or exclude sections of code from compilation. For example, the symbol that’s defined in project builds for Windows standalone platform is
UNITY_STANDALONE_WIN
. You... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9e396619492d | unity_docs | rendering | What is `SystemInfo.graphicsUVStartsAtTop` in Unity? Explain its purpose and usage. | SystemInfo.graphicsUVStartsAtTop
public static bool
graphicsUVStartsAtTop
;
Description
Returns true if the texture UV coordinate convention for this platform has Y starting at the top of the image.
This matches the UNITY_UV_STARTS_AT_TOP macro in shaders. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f873a214628c | unity_docs | math | What is `Windows.File.ReadAllBytes` in Unity? Explain its purpose and usage. | File.ReadAllBytes
Declaration
public static byte[]
ReadAllBytes
(string
path
);
Parameters
Parameter
Description
path
The file to open for reading.
Description
Opens a binary file, reads the contents of the file into a byte array, and then closes the file. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_101734d8a048 | unity_docs | scripting | What are the parameters of `Search.QueryEngineFilterAttribute.ctor` in Unity? | Description Create a filter with the corresponding token and supported operators. Declaration public QueryEngineFilterAttribute (string token ,
bool useRegularExpression ,
string[] supportedOperators ); Declaration public QueryEngineFilterAttribute (string token ,
bool useRegularExpression ,
stringComparison options ,
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_351cf42bbe90 | unity_docs | editor | What is `EditorUserBuildSettings.wsaUWPVisualStudioVersion` in Unity? Explain its purpose and usage. | EditorUserBuildSettings.wsaUWPVisualStudioVersion
public static string
wsaUWPVisualStudioVersion
;
Description
Sets and gets Visual Studio version to build Windows Store application with.
If the value of this property is empty or is not a valid installed Visual Studio version, Unity uses the latest Visual Studi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_68faa19b008e | unity_docs | scripting | What is `Pool.LinkedPool_1.Release` in Unity? Explain its purpose and usage. | LinkedPool<T0>.Release
Declaration
public void
Release
(T
item
);
Parameters
Parameter
Description
item
The instance to return to the pool.
Description
Returns the instance back to the pool.
If the pool has collection checks enabled and the instance is already held by the pool then an exception will be th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_3863f54e8078_doc_1 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | The ModBus connection object. Created using parameters set in the Inspector.
Signature:
```csharp
public ModBusConnection Connection
``` | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_man_ec6b9b7796ef | unity_docs | physics | In Unity's 'Emission module reference', what is 'Properties' and how does it work? | For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to
Vary Particle System properties over time
.
Property Function Rate over Time
The number of particles emitted per unit of time.
Rate over Distance
The number of particles emitted per un... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d6209ab3c181 | unity_docs | audio | Explain 'Activating and enabling Profiler modules' in Unity. | Profiler modules collect performance data about your application. For information about Profiler modules, refer to
Profiler modules introduction
.
Some Profiler modules have a large data collection overhead, such as the GPU, UI, and audio Profiler module. To prevent these modules from affecting your application’s perfo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_64eaa250a9dc | unity_docs | scripting | What is `Build.Content.GameManagerDependencyInfo.managerObjects` in Unity? Explain its purpose and usage. | GameManagerDependencyInfo.managerObjects
public ReadOnlyCollection<ObjectIdentifier>
managerObjects
;
Description
The project-wide identifiers for the game manager classes referenced in this collection of dependency information.
Note: the elements of the
managerObjects
and
includedTypes
lists correspond to ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1006f17b5f89 | unity_docs | scripting | What is `MPE.ChannelClient.RegisterMessageHandler` in Unity? Explain its purpose and usage. | ChannelClient.RegisterMessageHandler
Declaration
public
Unity.Android.Gradle.Manifest.Action
RegisterMessageHandler
(Action<string>
handler
);
Declaration
public
Unity.Android.Gradle.Manifest.Action
RegisterMessageHandler
(Action<byte[]>
handler
);
Parameters
Parameter
Description
handler
A handler ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1bf245b52bb1 | unity_docs | scripting | What is `AndroidJNI.ExceptionClear` in Unity? Explain its purpose and usage. | AndroidJNI.ExceptionClear
Declaration
public static void
ExceptionClear
();
Description
Clears any exception that is currently being thrown.
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_2c13cce15f4d | unity_docs | input | Give me an overview of the `KeyCode` class in Unity. | KeyCode
enumeration
Description
Key codes returned by
Event.keyCode
. These map directly to a physical key on the keyboard. If "Use Physical Keys" is enabled in
Input Manager settings
, these map directly to a physical key on the keyboard. If "Use Physical Keys" is disabled these map to language dependent mapping... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2f6b89a8239e | unity_docs | physics | What is `Collider2D.excludeLayers` in Unity? Explain its purpose and usage. | Collider2D.excludeLayers
public
LayerMask
excludeLayers
;
Description
The additional Layers that this
Collider2D
should exclude when deciding if a contact with another
Collider2D
should happen or not.
The Layer Collision Matrix defines which Layers can and cannot contact other Layers. This property allows... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1eb04c5d7ffe | unity_docs | xr | Explain 'Set up an Asset Store publisher profile' in Unity. | To create package drafts and upload assets to them you need a Unity ID and a publisher profile. A publisher profile is connected to your Unity account. Use it to create and publish packages, and manage sales and revenue.
## Create a Unity ID
To create a Unity ID:
Go to
Create a Unity ID
, or open the Unity
Asset Stor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5f46684d1b70 | unity_docs | scripting | What is `Playables.PlayableGraph.IsValid` in Unity? Explain its purpose and usage. | PlayableGraph.IsValid
Declaration
public bool
IsValid
();
Returns
bool
A boolean indicating if the graph is invalid or not.
Description
Returns true if the
PlayableGraph
has been properly constructed using PlayableGraph.CreateGraph and is not deleted. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9bc6e6f66f20 | unity_docs | scripting | Give me an overview of the `RenderPickingResult` class in Unity. | RenderPickingResult
struct in
UnityEditor
Description
This struct contains information to notify Unity the outcome of this render picking callback.
This struct type has to be returned from the
RenderPickingCallback
to notify Unity of:
The number of consecutive picking indices used during the callback
The
Res... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d72c51336977 | unity_docs | rendering | What is `TextureImporterSwizzle.R` in Unity? Explain its purpose and usage. | TextureImporterSwizzle.R
Description
Use the red color channel.
Additional resources:
TextureImporter.swizzleR
,
TextureImporter.swizzleG
,
TextureImporter.swizzleB
,
TextureImporter.swizzleA
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7613dab70788 | unity_docs | rendering | What is `Rendering.RayTracingGeometryInstanceConfig.lightProbeProxyVolume` in Unity? Explain its purpose and usage. | RayTracingGeometryInstanceConfig.lightProbeProxyVolume
public
LightProbeProxyVolume
lightProbeProxyVolume
;
Description
The
LightProbeProxyVolume
the ray tracing instance uses.
When you specify a
LightProbeProxyVolume
, you must set
lightProbeUsage
to
LightProbeUsage.UseProxyVolume
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0cbd26102e65 | unity_docs | scripting | What is `ModifiableContactPair.GetStaticFriction` in Unity? Explain its purpose and usage. | ModifiableContactPair.GetStaticFriction
Declaration
public float
GetStaticFriction
(int
i
);
Parameters
Parameter
Description
i
Index of the contact point.
Returns
float
The static friction coefficient at a contact point.
Description
Get the static friction coefficient at a particular point of the co... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_10f6b72147f3 | github | scripting | Write a Unity C# MonoBehaviour script called Gaussian Cutout | ```csharp
// SPDX-License-Identifier: MIT
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace GaussianSplatting.Runtime
{
public class GaussianCutout : MonoBehaviour
{
public enum Type
{
Ellipsoid,
Box
}
public Type m_Type = Type.Ellipsoi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_252b36bc2d3c | unity_docs | performance | Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorder.Dispose`. | ProfilerRecorder.Dispose
Declaration
public void
Dispose
();
Description
Releases unmanaged instance of the ProfilerRecorder.
When you no longer need to use the ProfilerRecorder always use this method to safely release the instance of it.
```csharp
using Unity.Profiling;
using UnityEngine;public class ExampleS... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_cd4da36e6e52 | github | scripting | Write a Unity C# XR/VR script for AR Object Spawner | ```csharp
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARSubsystems;
[RequireComponent(typeof(ARRaycastManager))]
public class ARObjectSpawner : MonoBehaviour
{
[SerializeField]
privat... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_a5597335d2ec | unity_docs | editor | Show me a Unity C# example demonstrating `Build.IProcessSceneWithReport.OnProcessScene`. | istic. Avoid random values, timestamps, or external changing data sources. For more information, refer to
Deterministic builds
.
Apply
BuildCallbackVersionAttribute
to callback types and increment the version whenever the callback logic changes to help Unity invalidate cached scene processing results when needed.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_617fcf6c2434 | unity_docs | performance | Explain 'Optimization' in Unity. | When you make an application in Unity, it’s important that you analyze and debug it to make sure that its bug-free, optimized, and runs correctly on the target device.
Topic Description Memory in Unity
Manage and optimize memory usage in Unity applications.
Unity Profiler
Analyze the performance of your application wit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0cc6de9ea2c4 | unity_docs | performance | What are the parameters of `Profiling.Recorder.Get` in Unity? | Returns Recorder Recorder object for the specified Sampler. Description Use this function to get a Recorder for the specific Profiler label. ```csharp
using UnityEngine;
using UnityEngine.Profiling;public class ExampleClass : MonoBehaviour
{
Recorder behaviourUpdateRecorder;
void Start()
{
behaviour... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.