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_32705ec369bd | unity_docs | rendering | In Unity's 'Managing importers with scripts', what is 'Create a scripted importer' and how does it work? | The following code example imports asset files with the extension cube into a prefab with a cube primitive as the main asset and a default material and color. It then assigns its position from a value read from the asset file:
```csharp
using UnityEngine;
using UnityEditor.AssetImporters;
using System.IO;
// The impor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f72197b4eea8 | unity_docs | math | Show me a Unity C# example demonstrating `HandleUtility.placeObjectCustomPasses`. | HandleUtility.placeObjectCustomPasses
Description
Subscribe to this event to handle object placement in the
SceneView
.
This delegate is invoked by
PlaceObject
when drag and dropping objects from the Hierarchy and Project views.
```csharp
using UnityEditor;
using UnityEngine;static class PlaceObjectExample
{
s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_88fa1bcd8103 | unity_docs | editor | What is `Editor.DrawFoldoutInspector` in Unity? Explain its purpose and usage. | Editor.DrawFoldoutInspector
Declaration
public static void
DrawFoldoutInspector
(
Object
target
,
ref
Editor
editor
);
Parameters
Parameter
Description
target
The object to display the Inspector for.
editor
The reference to a variable of type
Editor
.
Description
Draws the inspector GUI with a foldo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3d948e437b0a | unity_docs | physics | What is `CharacterJoint.swingAxis` in Unity? Explain its purpose and usage. | CharacterJoint.swingAxis
public
Vector3
swingAxis
;
Description
The secondary axis around which the joint can rotate.
CharacterJoint.swing1Limit
are the limits of the rotation allowed around this axis. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5001f1796cff | unity_docs | scripting | Give me an overview of the `GUIContent` class in Unity. | GUIContent
class in
UnityEngine
/
Implemented in:
UnityEngine.IMGUIModule
Description
The contents of a GUI element.
This works closely in relation with
GUIStyle
. GUIContent defines
what
to render and
GUIStyle
defines
how
to render it.
Additional resources:
GUIStyle
.
Static Properties
Property
Desc... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_13ca1a773f21 | unity_docs | scripting | Show me a Unity code example for 'Avoid C# reflection overhead'. | r
The following example shows how to scan assemblies in the Editor, serialize the data, and use it at runtime without reflection. Suppose you want to find all types that implement an interface called IMyFeature and use that information at runtime. You can write an Editor script that scans for all types implementing IM... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_50b7f68a2efd | unity_docs | scripting | What is `Camera.fieldOfView` in Unity? Explain its purpose and usage. | Camera.fieldOfView
public float
fieldOfView
;
Description
The vertical field of view of the Camera, in degrees.
This is the vertical field of view; horizontal field of view depends on the viewport's aspect ratio. For for more information, see
VerticalToHorizontalFieldOfView
.
If
Camera.orthographic
is
true... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_056f8285d57a | unity_docs | scripting | What is `VideoCodec.Auto` in Unity? Explain its purpose and usage. | VideoCodec.Auto
Description
Choose the codec that supports hardware decoding on the target platform.
Unity automatically selects the best available codec based on the current platform and video file format. This is the default setting.
For more information about video encoding, refer to
Video encoding compatibilit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_405a89c3ac24 | unity_docs | editor | Show me a Unity code example for 'Set up live debugging for Unity'. | plication runtime.
If you prefer to use crash dump files to debug your application, refer to
Set up forensic debugging for Unity
.
## Set up automatic exception and crash debugging
Follow these steps to enable your debugger to debug your application or the Editor while it runs.
Open a text editor (like Notepad) and s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_00d4b675e923 | unity_docs | rendering | Explain 'Update lightmaps at runtime with Enlighten Realtime Global Illumination' in Unity. | Resources for using Enlighten to precalculate visibility information, then update lightmaps at runtime.
Page Description Realtime Global Illumination using Enlighten
Learn about when to use Enlighten Realtime
Global Illumination
, and how it generates lightmaps.
Enable Enlighten Realtime Global Illumination
Enable real... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3fceb84f2f41 | unity_docs | scripting | What is `UIElements.Columns.Index_operator` in Unity? Explain its purpose and usage. | Columns.this[int]
public
UIElements.Column
this[int]
;
public
UIElements.Column
this[string]
;
Parameters
Parameter
Description
index
The index of the colum to locate.
Returns
Column
The column at the specified index.
Description
Returns the column at the specified index. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_f522b91ce703_doc_15 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Represents an object which can receive four arguments as part of its initialization process.Base interface of .
Signature:
```csharp
public interface IFourArguments
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
gh_a5889bb29b1c_doc_7 | github | scripting | What does `Init` do in this Unity script? Explain its purpose and signature. | Initializes the content of the GameObjectBrush.Size of the GameObjectBrush.
Signature:
```csharp
public void Init(Vector3Int size)
``` | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_a254894415c3 | unity_docs | scripting | Give me an overview of the `index` class in Unity. | Welcome to the Unity Scripting Reference!
This section of the documentation contains details of the scripting API that Unity provides. To use this information, you should be familiar with the basic theory and practice of scripting in Unity which is explained in the
Scripting section
of our manual.
The scripting ref... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_85c9b8acdab1 | unity_docs | rendering | What is `UIElements.PanelSettings.SetScreenToPanelSpaceFunction` in Unity? Explain its purpose and usage. | PanelSettings.SetScreenToPanelSpaceFunction
Declaration
public void
SetScreenToPanelSpaceFunction
(Func<Vector2,Vector2>
screentoPanelSpaceFunction
);
Parameters
Parameter
Description
screentoPanelSpaceFunction
The translation function. Set to
null
to revert to the default behavior.
Description
Sets the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_890916232f04 | unity_docs | scripting | What is `LowLevel.PlayerLoopSystem.loopConditionFunction` in Unity? Explain its purpose and usage. | PlayerLoopSystem.loopConditionFunction
public IntPtr
loopConditionFunction
;
Description
The loop condition for a native engine system. To get a valid value for this, you must copy it from one of the
PlayerLoopSystem
s returned by
PlayerLoop.GetDefaultPlayerLoop
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_c21c87a6764f | github | scripting | Write a Unity C# script called Example Pop Up | ```csharp
using Solid.Attributes;
using Solid.Core;
using Solid.UI;
using UnityEngine;
namespace Solid.Examples.PopUps
{
[ResourcePath("PopUps/ExamplePopUp")]
public class ExamplePopUp : PopUp
{
[SerializeField] private float showTime = 5f;
protected override void OnAwake(params object[] pa... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_5763c562081b | unity_docs | physics | Show me a Unity C# example demonstrating `Search.ObjectIndexer.IndexNumber`. | ex
Document where the indexed value was found.
name
Key used to retrieve the value.
number
Number value to store in the index.
Description
Adds a key-number value pair to the index. The key won't be added with variations.
The following example uses
IndexNumber
to index a number
testsize
property that can b... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_046de71b9c08 | unity_docs | physics | What is `PhysicsVisualizationSettings.GetShowMeshColliders` in Unity? Explain its purpose and usage. | PhysicsVisualizationSettings.GetShowMeshColliders
Declaration
public static bool
GetShowMeshColliders
(
PhysicsVisualizationSettings.MeshColliderType
colliderType
);
Description
Should MeshColliders be shown.
Convex and non-convex MeshColliders are controlled separately by
colliderType
.
Additional resources... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ac4381ff2e2e | unity_docs | physics | What are the parameters of `Physics.SphereCast` in Unity? | Returns bool True when the sphere sweep intersects any collider, otherwise false. Description Casts a sphere along a ray and returns detailed information on what was hit. This is useful when a Raycast does not give enough precision, because you want to find out if an object of a specific size,
such as a character, will... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f3f126804fef | unity_docs | scripting | What is `Playables.PlayableOutputExtensions.IsOutputNull` in Unity? Explain its purpose and usage. | PlayableOutputExtensions.IsOutputNull
Declaration
public static bool
IsOutputNull
(U
output
);
Parameters
Parameter
Description
output
The
PlayableOutput
used by this operation.
Description
Returns true if the
PlayableOutput
is null, false otherwise. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e604c65b55a0 | unity_docs | ui | What is `UIElements.Slider.ctor` in Unity? Explain its purpose and usage. | Slider Constructor
Declaration
public
Slider
();
Description
Creates a new instance of a Slider.
Declaration
public
Slider
(float
start
,
float
end
,
UIElements.SliderDirection
direction
,
float
pageSize
);
Parameters
Parameter
Description
start
The minimum value that the slider encodes.
end
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a6487c82799e | unity_docs | math | What are the parameters of `UIElements.NavigationMoveEvent.GetPooled` in Unity? | Returns NavigationMoveEvent An initialized navigation event. Description Gets an event from the event pool and initializes it with the given values.
Use this function instead of creating new events.
Events obtained from this method should be released back to the pool using Dispose(). Declaration public static UIEleme... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c8a9e20a8541 | unity_docs | audio | In Unity's 'Audio Normalize Effect', what is 'Properties' and how does it work? | Property:
Function:
Fade in time
Fade in time of the effect in milliseconds (range 0 to 20000.0, default = 5000.0 milliseconds).
Lowest volume
(range 0.0 to 1.0, default = 0.10).
Maximum amp
Maximum amplification (range 0.0 to 100000.0, default = 20 x). | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cd29b9a76af2 | unity_docs | animation | What is `Animations.MuscleHandle` in Unity? Explain its purpose and usage. | MuscleHandle
struct in
UnityEngine.Animations
/
Implemented in:
UnityEngine.AnimationModule
Description
Handle for a muscle in the
AnimationHumanStream
.
MuscleHandle can only be used on
AnimationHumanStream
, otherwise an
InvalidOperationException
is thrown.
```csharp
using UnityEngine;
using UnityEngine.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_48052b869459 | unity_docs | scripting | What is `AndroidDeviceFilterData.androidOsVersionString` in Unity? Explain its purpose and usage. | AndroidDeviceFilterData.androidOsVersionString
public string
androidOsVersionString
;
Description
The Android operating system version the device runs on.
Filter based on the version of the Android OS. For example,
14
.
Note
: This property only accepts a valid regular expression. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_051267984d63 | unity_docs | rendering | What is `LightTransport.ReferenceContext.DestroyEvent` in Unity? Explain its purpose and usage. | ReferenceContext.DestroyEvent
Declaration
public void
DestroyEvent
(
LightTransport.EventID
id
);
Parameters
Parameter
Description
id
ID of the event to destroy.
Description
Destroy the event with the given ID. You should call this to free temporary resources associated with an event. Attempting to use th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7cfbf4d83070 | unity_docs | physics | What is `IMGUI.Controls.JointAngularLimitHandle.xHandleColor` in Unity? Explain its purpose and usage. | JointAngularLimitHandle.xHandleColor
public
Color
xHandleColor
;
Description
Returns or specifies the color to use for the handle limiting motion around the x-axis. Defaults to
Handles.xAxisColor
.
This value is multiplied with the value of
Handles.color
.
Additional resources:
yHandleColor
,
zHandleColor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_bff20825761c | unity_docs | physics | In Unity's 'Prepare a Mesh for Mesh colliders', what is 'Make a Mesh read/write enabled' and how does it work? | To make a Mesh read/write enabled, the Mesh must have a
Mesh.isReadable
value of
true
. To apply this via the Editor:
In the
Project window
, select the
model file
(for example, the FBX file) that contains the Mesh.
In the Inspector , select
Model
.
In the Meshes section, enable
Read/Write
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_765fab2cd9a7 | unity_docs | rendering | What is `Rendering.BatchRendererGroup.RegisterMesh` in Unity? Explain its purpose and usage. | BatchRendererGroup.RegisterMesh
Declaration
public
Rendering.BatchMeshID
RegisterMesh
(
Mesh
mesh
);
Parameters
Parameter
Description
mesh
Unity mesh.
Returns
BatchMeshID
BatchRendererGroup mesh ID.
Description
Registers a mesh in
BatchRendererGroup
and returns its
BatchMeshID
. Each registrati... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ef244638a0fc | unity_docs | scripting | What is `Rect.x` in Unity? Explain its purpose and usage. | Rect.x
public float
x
;
Description
The X coordinate of the rectangle.
This value is the same as
xMin
, but setting it will move the rectangle rather than resize it.
```csharp
using UnityEngine;public class RectExample : MonoBehaviour
{
// Use this for initialization
void Start()
{
Rect rect = new Rect(10... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3904a8592393 | unity_docs | scripting | What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.EnumToInt` in Unity? Explain its purpose and usage. | UnsafeUtility.EnumToInt
Declaration
public static int
EnumToInt
(T
enumValue
);
Parameters
Parameter
Description
enumValue
Enum value to convert.
Returns
int
Returns the integer representation of the enum value.
Description
Gets the integer representation of an enum value without boxing. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6f54f78a94d7 | unity_docs | xr | What are the parameters of `Networking.DownloadHandlerAssetBundle.ctor` in Unity? | Description Standard constructor for non-cached asset bundles. This constructor will bypass the caching system and simply download the AssetBundle from url . If the crc argument is non-zero, then the crc argument will be compared to the checksum of the downloaded data. If the CRCs do not match, an error will be logged,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_354176be2146 | unity_docs | scripting | What is `Input.GetButtonDown` in Unity? Explain its purpose and usage. | Input.GetButtonDown
Declaration
public static bool
GetButtonDown
(string
buttonName
);
Description
Returns true during the frame the user pressed down the virtual button identified by
buttonName
.
Note
: This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_c997d6cf4023 | github | scripting | Write a Unity C# UI script for Update Sprite | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UpdateSprite : MonoBehaviour
{
/*
public Texture2D cardFace;
// public TextureRenderer textureRenderer;
// private Selectable selectable;
private Solitaire solitaire;
public Texture2D cardBack;
... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_1a1eea343521 | unity_docs | scripting | Show me a Unity C# example demonstrating `Vector3.SmoothDamp`. | default value is
Time.deltaTime
, such that
SmoothDamp
is called once per frame.
Description
Gradually changes a vector towards a desired goal over time.
The vector is smoothed by a spring-like damper function, such that the speed slows as it nears the target position. The motion doesn't overshoot the target posi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_48e2d56f8b2c | unity_docs | scripting | What is `UIElements.Foldout.textUssClassName` in Unity? Explain its purpose and usage. | Foldout.textUssClassName
public static string
textUssClassName
;
Description
The USS class name for the Label element in a Foldout.
Unity adds this USS class to the
Label
in the
Toggle
sub-element of every
Foldout
. Any styling applied to this class affects every foldout container located beside, or
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b92bf14492fd | unity_docs | editor | Explain 'Import trees from SpeedTree' in Unity. | SpeedTree
provides prebuilt tree assets and modeling software focused specifically on trees. SpeedTree supports all
render pipelines
.
Topic Description SpeedTree model import
Learn how the Unity Editor processes SpeedTree models when you import them.
SpeedTree Import Settings window
Change settings for SpeedTree model... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3ca03c8fffcb | unity_docs | rendering | What is `Rendering.RayTracingGeometryInstanceConfig.dynamicGeometry` in Unity? Explain its purpose and usage. | RayTracingGeometryInstanceConfig.dynamicGeometry
public bool
dynamicGeometry
;
Description
Whether Unity considers the geometry animated or not.
Set this value to
True
if (for example) a compute shader on the GPU animates the geometry. In this case the acceleration structure associated with the geometry rebui... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_36075e036c13 | unity_docs | scripting | In Unity's 'Reference type management', what is 'Avoid repeated string concatenation' and how does it work? | Strings in C# are
immutable reference types
. Unity allocates reference types on the managed heap and they are subject to garbage collection. Because strings are immutable and can’t change once created, avoid creating temporary strings wherever possible.
The following example code combines an array of strings into a si... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9d681441eda7 | unity_docs | scripting | In Unity's 'Create a binding with the Inspector', what is 'Create the Inspector UI with binding' and how does it work? | Create a C# script to register the custom Inspector for
TankScript
. You don’t need to call the
Bind()
method as binding in the Inspector window is implicit.
Create a C# script named
TankEditor.cs
and replace its contents with the following:
```csharp
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c54aec5d2dc8 | unity_docs | rendering | Show me a Unity C# example demonstrating `Rendering.CommandBuffer.DispatchRays`. | hader is compatible. Replace <value> with one of the values:
native16bit
,
int64
,
int64bufferatomics
.
#pragma disable_ray_payload_size_checks
- disables ray payload size compatibility checks between different ray tracing shader types. Use this carefully, because removing the check can cause corrupt ray payload d... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e6fd17e17faf | unity_docs | scripting | Show me a Unity C# example demonstrating `Bounds.size`. | Bounds.size
public
Vector3
size
;
Description
The total size of the box. This is always twice as large as the
extents
.
size.x
is the width,
size.y
is the height and
size.z
is the depth of the box. Note that
size
is given in world size. A Bound surrounding a tall human might have
size.y
approximatel... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c5aee21d4648 | unity_docs | performance | What is `Jobs.TransformAccessArray.ctor` in Unity? Explain its purpose and usage. | TransformAccessArray Constructor
Declaration
public
TransformAccessArray
(Transform[]
transforms
,
int
desiredJobCount
);
Declaration
public
TransformAccessArray
(int
capacity
,
int
desiredJobCount
);
Parameters
Parameter
Description
transforms
Transforms.
desiredJobCount
Desired job count.
capacit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d1dbca143071 | unity_docs | rendering | What is `Mesh.GetIndexBuffer` in Unity? Explain its purpose and usage. | Mesh.GetIndexBuffer
Declaration
public
GraphicsBuffer
GetIndexBuffer
();
Returns
GraphicsBuffer
The mesh index buffer as a
GraphicsBuffer
.
Description
Retrieves a
GraphicsBuffer
to the GPU index buffer.
Most of the
Mesh
methods work on a CPU copy of the mesh data, which Unity then uploads to the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_70c1a1ddccd3 | unity_docs | physics | What is `RigidbodyInterpolation.Extrapolate` in Unity? Explain its purpose and usage. | RigidbodyInterpolation.Extrapolate
Description
Extrapolation will predict the position of the rigidbody based on the current velocity.
If you have fast moving objects this can lead to rigidbodies passing
through colliders for one frame and then snapping back.
Additional resources:
Rigidbody.interpolation
variable... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_baf2c5f19403 | unity_docs | rendering | What is `SceneView.SetSceneViewShaderReplace` in Unity? Explain its purpose and usage. | SceneView.SetSceneViewShaderReplace
Declaration
public void
SetSceneViewShaderReplace
(
Shader
shader
,
string
replaceString
);
Parameters
Parameter
Description
shader
The replacement shader.
replaceString
The replacement shader tag.
Description
Sets a replacement shader for rendering this Scene view. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_5c1f5ed3e385 | unity_docs | audio | Explain 'Profiler introduction' in Unity. | Analyze the performance of your application with the Profiler.
The Profiler records multiple areas of your application’s performance, and displays that information to you. You can use this information to decide what you might need to optimize in your application, and to test the performance of changes you make.
To open... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b2306a833b0b | unity_docs | editor | What is `EditorAnalyticsSessionInfo.userId` in Unity? Explain its purpose and usage. | EditorAnalyticsSessionInfo.userId
public static string
userId
;
Description
A random GUID uniquely identifying an Editor installation.
Unity generates the userId GUID immediately after installation. The userId value is only regenerated if the user re-installs the Unity Editor. Each instance of Unity on the same... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7af3ff376fb8 | unity_docs | editor | What is `Search.ISearchView.SetSelection` in Unity? Explain its purpose and usage. | ISearchView.SetSelection
Declaration
public void
SetSelection
(params int[]
selection
);
Parameters
Parameter
Description
selection
Array of item indices to select.
Description
Updates the search view with a new selection.
.
```csharp
using UnityEditor;
using UnityEditor.Search;
static class Example_ISe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_20371df5af33 | unity_docs | editor | In Unity's 'Create variations of prefabs', what is 'Create a prefab variant' and how does it work? | You can create a prefab variant in the Project window, or from the Hierarchy view.
To create a prefab variant from the Project window:
Navigate to the prefab in the
Project window
.
Right click on the prefab and select
Create > Prefab Variant
.
Unity creates a variant of the prefab in the same folder as the original pr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4e32532d3240 | unity_docs | scripting | What is `Device.Application.runInBackground` in Unity? Explain its purpose and usage. | Application.runInBackground
public static bool
runInBackground
;
Description
This has the same functionality as
Application.runInBackground
. At the moment, the Device Simulator doesn't support simulation of this property. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_581bd51251af | unity_docs | math | What is `Device.Screen.MoveMainWindowTo` in Unity? Explain its purpose and usage. | Screen.MoveMainWindowTo
Declaration
public static
AsyncOperation
MoveMainWindowTo
(ref
DisplayInfo
display
,
Vector2Int
position
);
Parameters
Parameter
Description
display
The target display where the window should move to.
position
The position the window moves to. Relative to the top left corner ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d37f23542579 | unity_docs | scripting | What is `PlayerSettings.WebGL.memorySize` in Unity? Explain its purpose and usage. | PlayerSettings.WebGL.memorySize
public static int
memorySize
;
Description
Memory size for WebGL builds in Megabyte.
Size of the memory available for WebGL builds. This setting has been deprecated and does not have any effect on WebAssembly builds. For information on Unity WebGL memory, refer to
Memory Consid... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3eb110dcb0f0 | unity_docs | animation | What is `Animations.AnimatorControllerPlayable.CrossFade` in Unity? Explain its purpose and usage. | AnimatorControllerPlayable.CrossFade(string,float,int,float,float)
Parameters
Parameter
Description
stateName
The name of the state.
stateHashName
The hash name of the state.
normalizedTransitionDuration
The duration of the transition (normalized).
layer
The layer where the crossfade occurs.
normalizedTime... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b17b08dfa054 | unity_docs | editor | Explain 'Profile Analyzer' in Unity. | com.unity.performance.profile-analyzer
## Description
The Profile Analyzer tool supports the standard Unity Profiler. You can use it to analyze multiple frames and multiple data sets of the CPU data in the Profiler.
Main features:
Multi-frame analysis of a single set of Profiler CPU data
Comparison of two multi-frame... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_12b6a062bea2 | unity_docs | rendering | What is `Search.FuzzySearch.FuzzyMatch` in Unity? Explain its purpose and usage. | FuzzySearch.FuzzyMatch
Declaration
public static bool
FuzzyMatch
(string
pattern
,
string
origin
,
ref long
outScore
,
List<int>
matches
);
Declaration
public static bool
FuzzyMatch
(string
pattern
,
string
origin
,
List<int>
matches
);
Parameters
Parameter
Description
pattern
The pattern that the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d91ca3bccad6 | unity_docs | ui | What is `UIElements.TreeView.unbindItem` in Unity? Explain its purpose and usage. | TreeView.unbindItem
public Action<VisualElement,int>
unbindItem
;
Description
Callback for unbinding a data item from the VisualElement.
The method called by this callback receives the VisualElement to unbind, and the index of the
element to unbind it from.
Note:
: Setting this callback without also sett... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_043fef3319ff | unity_docs | editor | What is `Profiling.FrameDataView.GetCounterValueAsInt` in Unity? Explain its purpose and usage. | FrameDataView.GetCounterValueAsInt
Declaration
public int
GetCounterValueAsInt
(int
markerId
);
Parameters
Parameter
Description
markerId
Marker identifier.
Returns
int
Returns the counter value as
int
.
Description
Gets the last value of a counter marker in the frame as an int data type'.
Use to r... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_90811b80a1ec | unity_docs | editor | What is `PrefabUtility.UnpackAllInstancesOfPrefab` in Unity? Explain its purpose and usage. | PrefabUtility.UnpackAllInstancesOfPrefab
Declaration
public static void
UnpackAllInstancesOfPrefab
(
GameObject
prefabRoot
,
PrefabUnpackMode
unpackMode
,
InteractionMode
action
);
Parameters
Parameter
Description
prefabRoot
The root GameObject of a Prefab Asset used to find all Prefab instances in op... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c1870e846353 | unity_docs | physics | What is `ModelImporterClipAnimation.maskNeedsUpdating` in Unity? Explain its purpose and usage. | ModelImporterClipAnimation.maskNeedsUpdating
public bool
maskNeedsUpdating
;
Description
Returns true when the source AvatarMask has changed. This only happens when
ModelImporterClipAnimation.maskType
is set to
ClipAnimationMaskType.CopyFromOther
To force a reload of the mask, simply set
ModelImporterClipAn... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_06bdced33c37 | unity_docs | scripting | Show me a Unity C# example demonstrating `Video.VideoClip.GetAudioSampleRate`. | econd a sample of audio is captured. Higher sample rates usually result in more realistic sounds and better sound quality, but files are larger.
This is useful to know so that you can cater your audio to different devices. A VideoClip could have multiple audio tracks for different quality levels, which you can change ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_4370d38e47d7 | unity_docs | scripting | Explain 'Main module reference' in Unity. | The Particle System module contains global properties that affect the whole system. Most of these properties control the initial state of newly created particles.
The name of the module appears in the inspector as the name of the GameObject that the
Particle System component
is attached to.
## Properties
For some pro... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ec8d6d425c88 | unity_docs | scripting | What is `U2D.SpriteAtlasAsset.Save` in Unity? Explain its purpose and usage. | SpriteAtlasAsset.Save
Declaration
public static void
Save
(
U2D.SpriteAtlasAsset
asset
,
string
assetPath
);
Parameters
Parameter
Description
asset
The SpriteAtlasAsset object to be saved.
assetPath
The path of the SpriteAtlasAsset file on disk.
Description
Saves SpriteAtlasAsset to disk. File extensio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_74ce76e52988 | unity_docs | rendering | In Unity's 'Navigating the CPU Usage Profiler module', what is 'Enable full call stacks' and how does it work? | You can enable full call stacks for samples that
GC.Alloc
,
UnsafeUtility.Malloc
, and
JobHandle.Complete
emit. To enable these call stacks:
Enable the
Call Stacks
button in the Profiler’s
toolbar
. By default, this enables the call stacks for
GC.Alloc
samples.
To enable other call stacks, select the dropdown arrow and... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_af8f268a5973 | unity_docs | editor | What is `Build.Content.PreloadInfo` in Unity? Explain its purpose and usage. | PreloadInfo
class in
UnityEditor.Build.Content
Description
Container for holding a list of preload objects for a Scene to be built.
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 Build Pip... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dc37834f824b | unity_docs | input | Show me a Unity C# example demonstrating `GameObject.SetGameObjectsActive`. | ive
);
Parameters
Parameter
Description
instanceIDs
Instance IDs of GameObjects to activate or deactive.
active
The active state to set, where
true
sets the GameObjects to active and
false
sets them to inactive.
Description
Activates or deactivates multiple GameObjects identified by instance ID.
Use
Se... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_01bfeb419226 | unity_docs | scripting | What is `IMGUI.Controls.TreeView.DragAndDropArgs.dragAndDropPosition` in Unity? Explain its purpose and usage. | TreeView.DragAndDropArgs.dragAndDropPosition
public
IMGUI.Controls.TreeView.DragAndDropPosition
dragAndDropPosition
;
Description
When dragging items the current drag can have the following 3 positions relative to the items: Upon an item, Between two items or Outside items.
Use these enum values to determine ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7d691f1b3f10 | unity_docs | physics | What is `LowLevelPhysics.IGeometry` in Unity? Explain its purpose and usage. | IGeometry
interface in
UnityEngine.LowLevelPhysics
Description
All basic geometric shapes implement this interface.
Additional resources:
BoxGeometry
,
SphereGeometry
,
CapsuleGeometry
,
ConvexMeshGeometry
,
TriangleMeshGeometry
,
TerrainGeometry
.
Properties
Property
Description
GeometryType
Return th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7bd36c19c504 | unity_docs | rendering | What is `MaterialGlobalIlluminationFlags` in Unity? Explain its purpose and usage. | MaterialGlobalIlluminationFlags
enumeration
Description
How the material interacts with lightmaps and lightprobes.
Additional resources:
Material.globalIlluminationFlags
.
Properties
Property
Description
None
The emissive lighting does not affect Global Illumination at all.
RealtimeEmissive
The emissive ligh... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9c143dbdad13 | unity_docs | rendering | Explain 'Video Clip Importer reference' in Unity. | Configure the settings of the Video Clip Importer to transcode video files into different formats, ensuring compatibility with your target platforms.
Note:
The transcoding process can result in longer build times and lower video quality.
## Video Clip Importer settings
The following settings are available in the Insp... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a42ad42f66ce | unity_docs | math | Show me a Unity code example for 'Place Light Probes with a script'. | Placing
Light Probes
over large levels by hand can be time consuming. You can automate the placing of light probes by writing your own editor
scripts
. Your script can create a new GameObject with a LightProbeGroup component, and you can add probe positions individually according to any rules that you choose to program... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fdee2e1c47a1 | unity_docs | rendering | What is `ObjectChangeKind.CreateAssetObject` in Unity? Explain its purpose and usage. | ObjectChangeKind.CreateAssetObject
Description
A change of this type indicates that an asset object has been created. This happens for example when
Undo.RegisterCreatedObjectUndo
is used with an instance of an asset (e.g.
Texture
). Note that this only covers creation of asset objects in memory and not creation o... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_efe272b2c3b0 | unity_docs | scripting | Explain 'Block Subgraph asset' in Unity. | A Subgraph is an Asset that contains part of a Visual Effect Graph. A Subgraph appears as a single Node that you can use in another Visual Effect Graph or Subgraph. A Block Subgraph is a Subgraph that contains a set of Operators and Blocks packaged together to use as a Block.
This Asset only works when you install the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_d53bd0590cab | github | scripting | Write a Unity C# UI script for Ros Status | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Robotics.ROSTCPConnector;
using UnityEngine.UI;
using TMPro;
public class RosStatus : MonoBehaviour
{
ROSConnection ros;
public GameObject ipSetting;
public GameObject portSetting;
public Numpad numpad;... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_man_4135c95a4b1c | unity_docs | performance | Explain 'Memory in Unity Web' in Unity. | Memory constraints in Unity Web can restrict the complexity of the content you run.
Web content runs in the browser. The browser allocates the memory in its memory space that your application needs to run your content.
The amount of available memory varies depending on:
The device you use
The operating system you use
T... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_712e7a98d874 | unity_docs | editor | What is `Device.SystemInfo.deviceType` in Unity? Explain its purpose and usage. | SystemInfo.deviceType
public static
DeviceType
deviceType
;
Description
This has the same functionality as
SystemInfo.deviceType
and also mimics platform-specific behavior in the Unity Editor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_822ed47061b1 | unity_docs | rendering | What is `Windows.WebCam.WebCam` in Unity? Explain its purpose and usage. | WebCam
class in
UnityEngine.Windows.WebCam
/
Implemented in:
UnityEngine.CoreModule
Description
Contains general information about the current state of the web camera.
Static Properties
Property
Description
Mode
Specifies what mode the Web Camera is currently in. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7cca04b266f6 | unity_docs | scripting | What is `UIElements.BaseListViewController.NeedsDragHandle` in Unity? Explain its purpose and usage. | BaseListViewController.NeedsDragHandle
Declaration
public bool
NeedsDragHandle
(int
index
);
Parameters
Parameter
Description
index
Item index.
Returns
bool
Whether or not the drag handle is needed.
Description
Returns whether this item needs a drag handle or not with the Animated drag mode. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d57353cf1320 | unity_docs | rendering | What is `SystemInfo.supportsInlineRayTracing` in Unity? Explain its purpose and usage. | SystemInfo.supportsInlineRayTracing
public static bool
supportsInlineRayTracing
;
Description
Is inline ray tracing (ray query) supported? (Read Only)
Inline ray tracing is an alternative form of ray tracing available in compute shaders and rasterization stages through the
RayQuery
HLSL object. In DirectX 12 ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c115951f4ae2 | unity_docs | editor | In Unity's 'Memory Manager API for low-level native plug-ins', what is 'Memory management limitations' and how does it work? | This API enables you to use Unity’s memory management system when you develop native plug-ins. This has major benefits as described above, but there are still limitations. Unity’s memory management system:
Isn’t automatically managed; you need to allocate and deallocate the memory yourself.
Isn’t tracked and cleaned up... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d52f9964e533 | unity_docs | physics | In Unity's 'Sub Emitters 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
.
The Sub Emitters module contains the following settings.
Property Function Spawn condition
Determines when a parent particle emits additiona... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_548b5b3702f4 | unity_docs | scripting | What is `Object` in Unity? Explain its purpose and usage. | Object
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Base class for all objects Unity can reference.
UnityEngine.Object
is the base class for all built-in Unity objects. Don't derive from or instantiate this class directly. Instead, use the appropriate subclass such as
GameObject
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7a7dce445bc0 | unity_docs | audio | In Unity's 'Web request low-level API reference', what is 'Download handlers' and how does it work? | Specialist download handlers allow you to handle specific download cases and control the processing of incoming data. The following download handlers are available, which all specialize the base DownloadHandler class:
Handler type Description DownloadHandlerBuffer
Used for simple data storage. This download handler is ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_23a94f460878 | unity_docs | editor | What is `EditorApplication.applicationPath` in Unity? Explain its purpose and usage. | EditorApplication.applicationPath
public static string
applicationPath
;
Description
Gets the path to the Unity Editor application. (Read Only)
The path to the Unity Editor can vary depending on your configuration. If you installed the 2021.3 Editor from the Hub on Windows, you might have a path like this:
C:/... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fd422922f619 | unity_docs | audio | What is `Audio.AudioPlayableOutput.Create` in Unity? Explain its purpose and usage. | AudioPlayableOutput.Create
Declaration
public static
Audio.AudioPlayableOutput
Create
(
Playables.PlayableGraph
graph
,
string
name
,
AudioSource
target
);
Parameters
Parameter
Description
graph
The
PlayableGraph
that will contain the
AnimationPlayableOutput
.
name
The name of the output.
target... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1f5d23c694ef | unity_docs | scripting | In Unity's 'Create prefabs', what is 'Create an instance of a prefab' and how does it work? | To create an instance of a prefab asset:
Select the prefab asset in the Project window.
Drag the prefab asset into the Hierarchy or Scene view.
You can also create instances of prefabs at runtime using scripting. For more information, refer to
Instantiating prefabs
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c24b1b799aeb | unity_docs | physics | What is `Physics2D.IgnoreCollision` in Unity? Explain its purpose and usage. | Physics2D.IgnoreCollision
Declaration
public static void
IgnoreCollision
(
Collider2D
collider1
,
Collider2D
collider2
,
bool
ignore
= true);
Parameters
Parameter
Description
collider1
The first Collider to compare to
collider2
.
collider2
The second Collider to compare to
collider1
.
ignore
Whet... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b556db1a5e7d | unity_docs | rendering | In Unity's 'SpeedTree model import', what is 'Casting and receiving real-time shadows' and how does it work? | To make billboards cast shadows correctly, Unity rotates billboards during the shadow caster pass to make them face the light direction (or light position in the case of point light) instead of facing the
camera
.
To enable these options, select the Billboard LOD level in the Inspector of a SpeedTree Asset, check
Cast ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c2dcffe843d5 | unity_docs | rendering | What is `Shader.SetGlobalFloat` in Unity? Explain its purpose and usage. | Shader.SetGlobalFloat
Declaration
public static void
SetGlobalFloat
(string
name
,
float
value
);
Declaration
public static void
SetGlobalFloat
(int
nameID
,
float
value
);
Parameters
Parameter
Description
nameID
The name ID of the property retrieved by
Shader.PropertyToID
.
name
The name of the p... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f944ec5ffceb | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.ColorBySpeedModule.color`. | ParticleSystem.ColorBySpeedModule.color
public
ParticleSystem.MinMaxGradient
color
;
Description
The gradient that controls the particle colors.
Additional resources:
MinMaxGradient
.
```csharp
using UnityEngine;
using System.Collections;[RequireComponent(typeof(ParticleSystem))]
public class ExampleClass ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5a411f971606 | unity_docs | performance | What is `Profiling.Profiler.GetTotalReservedMemoryLong` in Unity? Explain its purpose and usage. | Profiler.GetTotalReservedMemoryLong
Declaration
public static long
GetTotalReservedMemoryLong
();
Returns
long
Memory reserved by Unity in bytes. This returns 0 if the Profiler is not available.
Description
The total memory Unity has reserved.
This function returns the total memory Unity has reserved for ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fe2436f59149 | unity_docs | rendering | What is `Rendering.DefaultReflectionMode` in Unity? Explain its purpose and usage. | DefaultReflectionMode
enumeration
Description
Default reflection mode.
Unity can use a custom texture or generate a specular reflection texture from the skybox.
Additional resources:
RenderSettings.defaultReflectionMode
,
Lighting Window
.
Properties
Property
Description
Skybox
Skybox-based default reflectio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_764846cb0189 | unity_docs | scripting | What is `Rendering.SynchronisationStage` in Unity? Explain its purpose and usage. | SynchronisationStage
enumeration
Description
The stages of the draw call processing on the GPU.
Use
SynchronisationStage
to wait for a draw call stage to complete, for example when you create a
GraphicsFence
.
Properties
Property
Description
VertexProcessing
The stage where the GPU processes vertices.
Pixe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e0a6d496a354 | unity_docs | physics | Explain 'Sweep-based CCD' in Unity. | Sweep-based CCD is the CCD algorithm for the Continuous and
Continuous Dynamic
modes.
Use Continuous on physics bodies that only collide with stationary static colliders (that is, GameObjects that don’t have a Rigidbody).
Use
Continuous Dynamic
on physics bodies that collide with moving dynamic colliders (that is, Game... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_4ab84d40b5dd | unity_docs | rendering | In Unity's 'GLSL in Unity', what is 'External OES textures' and how does it work? | Unity does some preprocessing during Shader compilation; for example,
texture2D/texture2DProj
functions may be replaced to
texture/textureProj
, based on graphics API (GlES3, GLCore). Some extensions don’t support new convention, most notably
GL_OES_EGL_image_external
.
If you want to sample external textures in GLSL s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_22c8ac47a8f6 | unity_docs | scripting | Show me a Unity C# example demonstrating `SystemInfo.operatingSystemFamily`. | SystemInfo.operatingSystemFamily
public static
OperatingSystemFamily
operatingSystemFamily
;
Description
Returns the operating system family the game is running on (Read Only).
This API is used by UI code to distinguish between desktop OS families with different UI conventions. For all non-desktop platforms i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1dd295269fc5 | unity_docs | ui | In Unity's 'Class selectors', what is 'Example' and how does it work? | To demonstrate how simple selectors match elements, here is an example UI Document.
```
<UXML xmlns="UnityEngine.UIElements">
<VisualElement name="container1">
<VisualElement name="container2" class="yellow">
<Button name="OK" class="yellow" text="OK" />
<Button name="Cancel" text="Cancel" />
</VisualElement>
</V... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_db8e06bc91dc | unity_docs | rendering | Explain 'Optimize reflections' in Unity. | Rendering a
reflection probe
’s cubemap takes a significant amount of processor time for a number of reasons:
Each of the six cubemap faces must be rendered separately using a “
camera
” at the probe’s origin.
The probes will need to be rendered a separate time for each reflection bounce level (see documentation on
Adv... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fcab668802d4 | unity_docs | editor | What is `Display.displays` in Unity? Explain its purpose and usage. | Display.displays
public static Display[]
displays
;
Description
The list of connected displays.
In a built application, Unity populates this list when the application starts. It always contains at least one (main) display.
In the Unity Editor,
displays
is not supported;
displays.Length
always has a value of... | 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.