id stringlengths 15 22 | source stringclasses 2
values | category stringclasses 12
values | instruction stringlengths 22 180 | response stringlengths 100 46.1k | system stringclasses 5
values |
|---|---|---|---|---|---|
local_sr_0504bb3d2298 | unity_docs | editor | What is `InitializeOnLoadAttribute` in Unity? Explain its purpose and usage. | InitializeOnLoadAttribute
class in
UnityEditor
Description
Allows you to initialize an Editor class when Unity loads, and when your scripts are recompiled.
Static constructors with this attribute are called when scripts in the project are recompiled, also known as a
Domain Reload
). This happens when:
Unity fir... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_815d7563e10f | unity_docs | scripting | What is `UIElements.BaseListView.headerTitle` in Unity? Explain its purpose and usage. | BaseListView.headerTitle
public string
headerTitle
;
Description
This property controls the text of the foldout header when using showFoldoutHeader.
If the makeHeader callback is set, this property gets overridden and the title is not shown. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b2893a4fb507 | unity_docs | xr | In Unity's 'Search for files', what is 'Use the Files provider with other providers' and how does it work? | To implicitly include find in searches by other providers, use the
Show more results
toggle in the View menu (
). This option adds results from an implicit
find:
search to the following tabs:
The Files tab, which is only available when
Show more results
is active.
The All ,
Project
, and Resources tabs.
If
Show more re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f2555790a8c5 | unity_docs | xr | What is `iOS.OnDemandResourcesRequest.loadingPriority` in Unity? Explain its purpose and usage. | OnDemandResourcesRequest.loadingPriority
public float
loadingPriority
;
Description
Sets the priority for request.
Value range is [0; 1] or greater than 1 to give the request special "urgent" status.
Equivalent to setting
NSBundleResourceRequest.loadingPriority
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d4241a741efd | unity_docs | scripting | Show me a Unity C# example demonstrating `MonoBehaviour.OnDrawGizmosSelected`. | MonoBehaviour.OnDrawGizmosSelected()
Description
Implement
OnDrawGizmosSelected
to draw a gizmo if the object is selected.
Gizmos
are drawn only when the object is selected. Gizmos are not pickable.
This is used to ease setup. For example an explosion script could draw a sphere
showing the explosion radius.
``... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ed146141835c | unity_docs | input | Show me a Unity code example for 'GUI Style (IMGUI System)'. | er layout.
## Details
GUIStyles are declared from scripts and modified on a per-instance basis. If you want to use a single or few Controls with a custom Style, you can declare this custom Style in the script and provide the Style as an argument of the Control function. This will make these Controls appear with the S... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_01781299d8ea | unity_docs | editor | What is `EditorSettings.cacheServerEnableDownload` in Unity? Explain its purpose and usage. | EditorSettings.cacheServerEnableDownload
public static bool
cacheServerEnableDownload
;
Description
Toggle whether to enable downloading from cache server.
This toggles whether to try to download an asset before starting an import. If asset is available on the cache server, the import will be skipped all togeth... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3276dad7586f | unity_docs | math | What is `AndroidJNI.CallStaticShortMethod` in Unity? Explain its purpose and usage. | AndroidJNI.CallStaticShortMethod
Declaration
public static short
CallStaticShortMethod
(IntPtr
clazz
,
IntPtr
methodID
,
jvalue[]
args
);
Description
Invokes the specified
methodID
static method on a Java object, optionally passing in an array of arguments (
args
).
Additional resources:
Java Native Inter... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_489464887601 | github | scripting | Write a Unity C# script called Awaitable | ```csharp
using System;
using UnityEngine;
/*Copyright (c) Created by Oleksii Volovich 2021*/
namespace Solid.Core
{
public abstract class Awaitable<TResult> : SolidBehaviour
{
public TResult Result { get; protected set; }
public event Action<TResult> Success;
public event Action<TResul... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_72b6db78e7cd | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormat.R16G16B16_SNorm` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormat.R16G16B16_SNorm
Description
A three-component, 48-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e48b97ee7dbe | unity_docs | editor | What is `SceneManagement.RemovedGameObject.Apply` in Unity? Explain its purpose and usage. | RemovedGameObject.Apply
Declaration
public void
Apply
(string
prefabAssetPath
,
InteractionMode
mode
);
Parameters
Parameter
Description
prefabAssetPath
The path of the Prefab Asset that the override should be applied to.
mode
The interaction mode for this action.
Description
See:
PrefabOverride.Appl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_672dd7dc5228 | unity_docs | editor | Show me a Unity C# example demonstrating `Input.GetPenEvent`. | The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, refer to
Input
.
On Windows, the pen event queue holds, in chronological order, any missed pen events as provided by GetPointerPenInfoHistory. The queue is cleared at... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_002a57d26341 | unity_docs | math | What is `AndroidJNI.NewObjectArray` in Unity? Explain its purpose and usage. | AndroidJNI.NewObjectArray
Declaration
public static IntPtr
NewObjectArray
(int
size
,
IntPtr
clazz
,
IntPtr
obj
);
Description
Constructs a new array holding objects in class
clazz
. All elements are initially set to
obj
.
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_413f5b1eb336 | unity_docs | scripting | Show me a Unity C# example demonstrating `Unity.Profiling.Memory.MemorySnapshotMetadata`. | MemorySnapshotMetadata
class in
Unity.Profiling.Memory
/
Implemented in:
UnityEngine.CoreModule
Description
Container for memory snapshot metadata.
Code that subscribes to the
MemoryProfiler.CreatingMetadata
event receives a MemorySnapshotMetadata object to populate with meta data for a memory snapshot that i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1e530f9a85cc | unity_docs | scripting | What is `ModelImporter.importBlendShapeNormals` in Unity? Explain its purpose and usage. | ModelImporter.importBlendShapeNormals
public
ModelImporterNormals
importBlendShapeNormals
;
Description
Blend shape normal import options.
Additional resources:
ModelImporterNormals
,
normalSmoothingSource
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a75cd0ba79dc | unity_docs | math | In Unity's 'Build a structure with prefabs', what is 'Create a block prefab asset' and how does it work? | To create a wall of blocks, you must first have a block prefab asset to create the wall with.
In the Hierarchy, right-click and select
3D Object
>
Cube
.
Drag the cube into the Assets folder in the
Project window
. Unity creates a prefab asset of the cube.
Rename the prefab asset to
Block
.
Delete the original cube ass... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_f14541f2a110 | github | scripting | Write a Unity C# script called Bool Variable | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MBT
{
[AddComponentMenu("")]
public class BoolVariable : Variable<bool>
{
protected override bool ValueEquals(bool val1, bool val2)
{
return val1 == val2;
}
}
[Sy... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_609adc47da5e | unity_docs | editor | What are the parameters of `Profiling.FrameDataView.GetMarkerMetadataInfo` in Unity? | Returns MarkerMetadataInfo[] Returns an array of metadata information structures. Description Gets Profiler marker metadata information for the specific marker identifier. Use to get name, unit type and value type for the metadata parameters which can be passed together with a Profiler sample associated with the identi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d37b4f48cc12 | unity_docs | scripting | What is `PrefabUtility.RevertObjectOverride` in Unity? Explain its purpose and usage. | PrefabUtility.RevertObjectOverride
Declaration
public static void
RevertObjectOverride
(
Object
instanceComponentOrGameObject
,
InteractionMode
action
);
Parameters
Parameter
Description
action
The interaction mode for this action.
instanceComponentOrGameObject
The object on the Prefab instance to reve... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_4ad6c2bacad5 | unity_docs | scripting | In Unity's 'FAQ for input and event systems with UI Toolkit', what is 'How do I know if the mouse is over a visual element from a runtime panel?' and how does it work? | To find if the mouse is over a
visual element
from a runtime panel, use one of the following two methods:
Method 1 uses the Event System for automatic detection and works well with mixed uGUI and UI Toolkit UI.
Method 2 gives you manual control and is useful if you need to handle multiple panels yourself. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_48bf5d6d35b7 | unity_docs | input | What is `Input.multiTouchEnabled` in Unity? Explain its purpose and usage. | Input.multiTouchEnabled
public static bool
multiTouchEnabled
;
Description
Property indicating whether the system handles multiple touches.
Note
: This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System pa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e8785279014d | unity_docs | math | In Unity's 'Debug Web builds in development', what is 'Create a development build to debug' and how does it work? | You might want to make a development build in Unity to debug your code. To make a development build:
Open the
Build Profiles window
.
Enable
Development Build
.
Development builds allow you to connect the profiler. Unity doesn’t minify the code, so the emitted JavaScript code still contains human-readable,
C++-mangled
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_fe93e08dc0ba | github | scripting | Write a Unity Editor script for Serialized Property Extensions | ```csharp
using System;
using UnityEditor;
using UnityEngine;
namespace Hudossay.AttributeEvents.Assets.Editor
{
public static class SerializedPropertyExtensions
{
public static object OriginalValue(this SerializedProperty property)
{
var currentFieldType = property.serializedObjec... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_7bf4750b1d4f | unity_docs | scripting | What is `Overlays.Layout` in Unity? Explain its purpose and usage. | Layout
enumeration
Description
Possible layouts for an overlay.
Properties
Property
Description
HorizontalToolbar
Contents will be sized to fit within a toolbar and arranged horizontally.
VerticalToolbar
Contents will be sized to fit within a toolbar and arranged vertically.
Panel
Contents will be presented a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ae821d83664a | unity_docs | scripting | Give me an overview of the `ILogger` class in Unity. | ILogger
interface in
UnityEngine
Implements interfaces:
ILogHandler
Description
Interface for custom logger implementation.
Additional resources:
Logger
,
Debug.unityLogger
ILogHandler
.
Properties
Property
Description
filterLogType
To selective enable debug log message.
logEnabled
To runtime toggle deb... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d1e32946f179 | unity_docs | scripting | Explain 'Display camera views on multiple monitors' in Unity. | You can use multi-display to display up to eight different Camera views of your application on up to eight different monitors at the same time. You can use this for setups such as PC games, arcade game machines, or public display installations.
Unity supports multi-display on:
Desktop platforms (Windows, macOS X, and L... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_2939c818d565 | unity_docs | rendering | In Unity's 'Use HLSL and ShaderLab in a compute shader', what is 'Use keywords' and how does it work? | You can use keywords to produce multiple variants of compute shaders, the same as you can for graphics shaders.
For general information on variants, see
Shader variants
. For information on how to implement these features in compute shaders, see
Declaring and using shader keywords in HLSL
and the
ComputeShader API docu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a9a6029c8285 | unity_docs | scripting | What is `AndroidJNI.DeleteWeakGlobalRef` in Unity? Explain its purpose and usage. | AndroidJNI.DeleteWeakGlobalRef
Declaration
public static void
DeleteWeakGlobalRef
(IntPtr
obj
);
Description
Deletes the global weak reference pointed to by
obj
.
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_man_805712e946a6 | unity_docs | rendering | In Unity's 'Enable Enlighten Realtime Global Illumination', what is 'Light Probes and Enlighten Realtime Global Illumination' and how does it work? | Note that
Light Probes
behave differently when you enable Enlighten Realtime Global Illumination.
In order to react to runtime changes in Scene lighting, they sample lighting iteratively at runtime.
When you disable Enlighten Realtime Global Illumination in a Scene, Light Probes only use baked lighting data. This means... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f1c8a31448bb | unity_docs | scripting | What is `Experimental.GraphView.MiniMap.BuildContextualMenu` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
MiniMap.BuildContextualMenu
Declaration
public void
BuildContextualMenu
(
UIElements.ContextualMenuPopulateEvent
evt
);
Parameters
Parameter
Description
evt
The event holding the menu to populate.
Description
Add menu ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f60c292c0084 | unity_docs | performance | What is `Unity.Jobs.IJobParallelForExtensions.RunByRef` in Unity? Explain its purpose and usage. | IJobParallelForExtensions.RunByRef
Declaration
public static void
RunByRef
(ref T
jobData
,
int
arrayLength
);
Parameters
Parameter
Description
jobData
The job and data to execute.
arrayLength
The number of iterations to execute the for loop over.
Description
Performs the job's Execute method immediatel... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_317f42f8ed50 | unity_docs | editor | What is `EditorGUILayout.PrefixLabel` in Unity? Explain its purpose and usage. | EditorGUILayout.PrefixLabel
Declaration
public static void
PrefixLabel
(string
label
,
GUIStyle
followingStyle
= "Button");
Declaration
public static void
PrefixLabel
(string
label
,
GUIStyle
followingStyle
,
GUIStyle
labelStyle
);
Declaration
public static void
PrefixLabel
(
GUIContent
label
,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_596215d8d015 | unity_docs | scripting | What is `UIElements.CallbackEventHandler.NotifyPropertyChanged` in Unity? Explain its purpose and usage. | CallbackEventHandler.NotifyPropertyChanged
Declaration
protected void
NotifyPropertyChanged
(ref
UIElements.BindingId
property
);
Parameters
Parameter
Description
property
The property that has changed.
Description
Informs the data binding system that a property of a control has changed. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_79266a35849e | unity_docs | rendering | What is `Rendering.ShadowCastingMode.ShadowsOnly` in Unity? Explain its purpose and usage. | ShadowCastingMode.ShadowsOnly
Description
Object casts shadows, but is otherwise invisible in the Scene.
This is useful for certain effects or optimization purposes; essentially this makes an object that only casts shadows, but is otherwise invisible.
Additional resources:
Renderer.shadowCastingMode
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a5b43af05c8e | unity_docs | math | What is `TerrainData.GetHeights` in Unity? Explain its purpose and usage. | TerrainData.GetHeights
Declaration
public float[,]
GetHeights
(int
xBase
,
int
yBase
,
int
width
,
int
height
);
Parameters
Parameter
Description
xBase
First index of heightmap samples to retrieve along the Terrain's x axis.
yBase
First index of heightmap samples to retrieve along the Terrain's z axis.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_42734158d73f | unity_docs | scripting | What are the parameters of `GUILayout.TextArea` in Unity? | Returns string The edited string. Description Make a multi-line text field where the user can edit a string. Text area in the Game View. ```csharp
using UnityEngine;public class ExampleScript : MonoBehaviour
{
string stringToEdit = "Hello World\nI've got 2 lines..."; void OnGUI()
{
// Make a multilin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ad538c71ae41 | unity_docs | rendering | What is `Rendering.BuiltinShaderDefine.UNITY_ENABLE_DETAIL_NORMALMAP` in Unity? Explain its purpose and usage. | BuiltinShaderDefine.UNITY_ENABLE_DETAIL_NORMALMAP
Description
UNITY_ENABLE_DETAIL_NORMALMAP is set if Detail Normal Map should be sampled if assigned.
Additional resources:
TierSettings.detailNormalMap
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f5a04ce01c26 | unity_docs | physics | In Unity's 'Constant Force component reference', what is 'Properties' and how does it work? | For all values, a higher value produces a stronger force, which in turn produces a faster initial velocity.
Property:
Function:
Force
Define the direction of the linear force. The XYZ vectors refer to the
scene
’s global axes.
Relative Force
Define the direction of the linear force. The XYZ vectors refer to the Rigidbo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_31e2195e184b | unity_docs | math | Show me a Unity C# example demonstrating `Mathf.Round`. | Mathf.Round
Declaration
public static float
Round
(float
f
);
Description
Returns
f
rounded to the nearest integer.
If the number ends in .5 so it is halfway between two integers, one of which is even and the other odd, the even number is returned.
```csharp
using UnityEngine;
using System.Collections;publ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0ec00c435e5d | unity_docs | performance | What is `Profiling.FrameDataView.GetMarkerFlags` in Unity? Explain its purpose and usage. | FrameDataView.GetMarkerFlags
Declaration
public
Unity.Profiling.LowLevel.MarkerFlags
GetMarkerFlags
(int
markerId
);
Parameters
Parameter
Description
markerId
Marker identifier.
Returns
MarkerFlags
Returns Profiler marker flags.
Description
Gets Profiler marker flags for the specific marker identif... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dfd00ce96225 | unity_docs | rendering | What are the parameters of `Search.ObjectIndexer.IndexProperty` in Unity? | Description Adds a property value to the index. A property is specified with a key and a string value. The value will be stored with multiple variations. The following example indexes a new boolean property named testismobilefriendly that will be used to search textures that match testismobilefriendly=true or testismob... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_814f21c63bdd | unity_docs | scripting | What is `VideoEncodingProfile` in Unity? Explain its purpose and usage. | VideoEncodingProfile
enumeration
Description
Use the options in this enumeration to change the encoder profile.
H.264 profiles (Baseline, Main, and High) are compression and encoding standards that determine how the
MediaEncoder
compresses and encodes video files during recording. You can use the
MediaEncoder
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c12944321bfc | unity_docs | rendering | Show me a Unity C# example demonstrating `ParticleSystem.LightsModule.intensity`. | ParticleSystem.LightsModule.intensity
public
ParticleSystem.MinMaxCurve
intensity
;
Description
Define a curve to apply custom intensity scaling to particle Lights.
Additional resources:
MinMaxCurve
.
```csharp
using UnityEngine;
using System.Collections;// For best results, use Deferred Rendering (see Cam... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b6ee3ae2e572 | unity_docs | scripting | What is `UIElements.Wrap` in Unity? Explain its purpose and usage. | Wrap
enumeration
Description
By default, items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.
Properties
Property
Description
NoWrap
All items will be on one line. Default Value.
Wrap
All items will be on one line. Default Value.
Wra... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7421efcf2c67 | unity_docs | scripting | What is `XR.MeshGenerationStatus` in Unity? Explain its purpose and usage. | MeshGenerationStatus
enumeration
Description
The status of a
XRMeshSubsystem.GenerateMeshAsync
.
XRMeshSubsystem.GenerateMeshAsync
will always invoke the provided delegate when the generation completes. This enum contains information about whether the generation was successful, or if an error occurred.
Addition... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_85c9337d1882 | unity_docs | scripting | What are the parameters of `Application.OpenURL` in Unity? | Description Opens the URL specified, subject to the permissions and limitations of your app’s current platform and environment. This is handled in different ways depending on the nature of the URL, and with different security restrictions, depending on the runtime platform. Note : The OpenURL method can be used to open... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_faa4b289704c | unity_docs | scripting | What is `PhysicsDebugWindow` in Unity? Explain its purpose and usage. | PhysicsDebugWindow
class in
UnityEditor
/
Inherits from:
EditorWindow
Description
Displays the Physics Debug Visualization options.
The Physics Debug Visualization is only displayed if this window is visible.
Additional resources:
PhysicsVisualizationSettings
.
Inherited Members
Static Properties Property Des... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8431f3bd3cd1 | unity_docs | scripting | What is `TextMesh.anchor` in Unity? Explain its purpose and usage. | TextMesh.anchor
public
TextAnchor
anchor
;
Description
Which point of the text shares the position of the Transform.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
GetComponent<TextMesh>().anchor = TextAnchor.MiddleCenter;
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_495a732d5bc0 | unity_docs | xr | What is `Unity.IO.LowLevel.Unsafe.ReadHandle.GetBytesRead` in Unity? Explain its purpose and usage. | ReadHandle.GetBytesRead
Declaration
public long
GetBytesRead
();
Returns
long
The total number of bytes read by the asynchronous file read request.
Description
Returns the total number of bytes read by all the
ReadCommand
operations the asynchronous file read request.
This may not be equal to the sum of... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_aec720ae2fb3 | unity_docs | scripting | What is `Camera.OnPreCull` in Unity? Explain its purpose and usage. | Camera.OnPreCull()
Description
Event function
that Unity calls before a Camera culls the scene.
In the Built-in Render Pipeline, Unity calls
OnPreCull
on MonoBehaviours that are attached to the same GameObject as an enabled Camera component, just before performing the culling operation that determines what that... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ac71c763c144 | unity_docs | physics | Show me a Unity C# example demonstrating `PhysicsShapeGroup2D.vertexCount`. | PhysicsShapeGroup2D.vertexCount
public int
vertexCount
;
Description
The total number of vertices in the shape group used to represent all
PhysicsShape2D
within it. (Read Only)
```csharp
using UnityEngine;
using UnityEngine.Assertions;public class Example : MonoBehaviour
{
private const int ShapeCount = 10; ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_bdaa2f35c4af | unity_docs | scripting | Explain 'Scene View preferences reference' in Unity. | Use the Scene View preferences to customize object placement and visibility while editing. To open the preferences, go to
Edit > Preferences > Scene View
(macOS:
Unity > Settings > Scene View
).
## General Scene view settings
Property Function Create Objects with Constrained Proportions
Define the default behavior fo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_839127d677e7 | unity_docs | physics | In Unity's 'Uses of layers in Unity', what is 'Use the Camera culling mask with layers' and how does it work? | You can render only the objects in a particular layer, or selection of layers, if you use the
Camera
’s
culling mask
. To change the culling mask, select the camera you want to use, and select the
Culling Mask
dropdown in the Inspector window. If you clear the checkbox of a layer, it doesn’t render in the
scene
.
Note
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_59569b3db46b | unity_docs | physics | What is `ConfigurableJoint.angularXMotion` in Unity? Explain its purpose and usage. | ConfigurableJoint.angularXMotion
public
ConfigurableJointMotion
angularXMotion
;
Description
Allow rotation around the X axis to be Free, completely Locked, or Limited according to Low and High Angular XLimit. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c114b29badf9 | unity_docs | scripting | Show me a Unity C# example demonstrating `Video.VideoTimeReference`. | VideoTimeReference
enumeration
Description
The clock that the
VideoPlayer
observes to detect and correct drift.
Use these settings to control how the playback time of the video is synchronized with time sources.
```csharp
// This script changes the video playback speed based on a custom timer.
// Attach this s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f20fa1fabf22 | unity_docs | physics | What are the parameters of `Awaitable.WaitForSecondsAsync` in Unity? | Description Resumes execution after the specified number of seconds. This method can only be called from the main thread and always completes on main thread. Note: : Awaitable.WaitForSecondsAsync throws OperationCanceledException if the provided CancellationToken is canceled during the wait. This aborts the wait rather... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d5982b8707d1 | unity_docs | physics | Give me an overview of the `PhysicsShapeGroup2D` class in Unity. | PhysicsShapeGroup2D
class in
UnityEngine
/
Implemented in:
UnityEngine.Physics2DModule
Description
Represents a group of
PhysicsShape2D
and their geometry.
A shape group represents multiple
PhysicsShape2D
of the same or mixed
PhysicsShapeType2D
along with their geometry. It is comprised of a single list o... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4e5b9f4998c5 | unity_docs | scripting | What is `UIElements.UQueryBuilder_1.Last` in Unity? Explain its purpose and usage. | UQueryBuilder<T0>.Last
Declaration
public T
Last
();
Returns
T
The last element matching all the criteria, or null if none was found.
Description
Convenience overload, shorthand for Build().Last(). | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_08714dda046f | unity_docs | rendering | What is `Search.SearchAction.execute` in Unity? Explain its purpose and usage. | SearchAction.execute
public Action<SearchItem[]>
execute
;
Description
Executes an action on a set of items.
```
new SearchAction("scene", "toggle_cast_shadows", new GUIContent("Toggle Cast Shadows", null, "Toggle Cast Shadows on a Mesh"))
{
// Only enable this action if any of the selected items are actually ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c7c5d28f6279 | unity_docs | scripting | What is `RigidbodyConstraints` in Unity? Explain its purpose and usage. | RigidbodyConstraints
enumeration
Description
Use these flags to constrain motion of Rigidbodies.
Additional resources:
Rigidbody.constraints
. This enables you to freeze positions and rotations on all axes.
```csharp
//This example shows how RigidbodyConstraints is used to freeze the position and rotation of a R... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9d760777b18c | unity_docs | scripting | Show me a Unity C# example demonstrating `Profiling.Profiler.BeginSample`. | riptRunBehaviourUpdate
in the Profiler Hierarchy and Timeline views. If you supply a
targetObject
, then you can click on the sample in the Profiler Timeline to select that object in the Editor (when profiling from the Editor Play mode).
Profiler.BeginSample is conditionally compiled away using ConditionalAttribute.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ae5d389b8170 | unity_docs | rendering | What is `Texture.IncrementUpdateCount` in Unity? Explain its purpose and usage. | Texture.IncrementUpdateCount
Declaration
public void
IncrementUpdateCount
();
Description
Increment the update counter.
Call this method when you update a Texture from the GPU side, or you want to explicitly increment the counter.
```csharp
using UnityEngine;public class RenderSomething
{
RenderTexture m_RT; ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_29c38571f34c | unity_docs | animation | In Unity's 'Create a new Animation Clip', what is 'Create another Animation Clip' and how does it work? | If the selected GameObject already has one or more Animation Clips assigned and you open the Animation window, the Create button is not displayed. Instead, one of the animation clips assigned to the selected GameObject is displayed.
To switch between Animation Clips, use the menu in the top-left of the Animation window... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_accf75c6043d | unity_docs | rendering | Show me a Unity code example for 'Additional Search filters'. | s on the exact Asset path:
assets/images/particles/p_smoke.png
.
Reference Name
ref:<asset name>
ref:p_smo
Searches all Assets that have direct dependencies on an Asset whose name contains the word
p_smo
.
ref:p_smoke.png
Searches all Assets that have direct dependencies on an Asset named
p_smoke.png
.
## Search for n... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_e3638f791235_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Base settings object for
Signature:
```csharp
public abstract class BaseCodeGeneratorSettings<T> : ScriptableObject where T : BaseScriptTemplate
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_83d0ff55c65c | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormat.RGBA_DXT1_UNorm` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormat.RGBA_DXT1_UNorm
Description
A three-component, block-compressed format (also known as BC1). Each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data. This format has a 1 bit ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_91f73484f13f | unity_docs | ui | Show me a Unity C# example demonstrating `GUIStyle.margin`. | GUIStyle.margin
public
RectOffset
margin
;
Description
The margins between elements rendered in this style and any other GUI elements.
This only has effect when using automatic layout (Additional resources:
GUILayout
).
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Prints the left,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9e0e10aaa20b | unity_docs | rendering | In Unity's 'Control when a Custom Render Texture updates', what is 'Double Buffered Custom Textures' and how does it work? | You can double-buffer Custom Render Textures. To do this, enable
Double Buffered
in the
Custom Render Textures component
, or use
CustomRenderTexture.doubleBuffered
.
Double-buffering means that inside one Custom Render Texture there are two textures which Unity can swap after each update. This allows you to read the r... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e35b9bff74f0 | unity_docs | physics | Explain 'Aspect Ratio Fitter' in Unity. | ## Properties
Property:
Function:
Aspect Mode
How the rectangle is resized to enforce the aspect ratio.
None
Do not make the rect fit the aspect ratio.
Width Controls Height
The height is automatically adjusted based on the width.
Height Controls Width
The width is automatically adjusted based on the height.
Fit In Pa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_5dc8f2350816 | unity_docs | input | In Unity's 'Manipulators', what is 'Create an ExampleDragger manipulator' and how does it work? | The following example creates a manipulator that moves an element when you click and drag it:
```csharp
using UnityEngine;
using UnityEngine.UIElements;
public class ExampleDragger : PointerManipulator
{
private Vector3 m_Start;
protected bool m_Active;
private int m_PointerId;
private Vector2 m_StartSize;
publi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4df8340f306b | unity_docs | scripting | Show me a Unity C# example demonstrating `Unity.IO.LowLevel.Unsafe.AsyncReadManager.OpenFileAsync`. | Handle of the file being opened. Use the FileHandle to check the status of the open operation, to read the file, and to close the file when done.
Description
Opens the file asynchronously.
Note:
WebGL builds do not support using
AsyncReadManager
to open files from a remote web server; for example, from the path... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4220989b21ea | unity_docs | rendering | What is `ShaderUtil.GetShaderInfo` in Unity? Explain its purpose and usage. | ShaderUtil.GetShaderInfo
Declaration
public static
ShaderInfo
GetShaderInfo
(
Shader
shader
);
Parameters
Parameter
Description
shader
The shader to get information about.
Returns
ShaderInfo
Returns an instance of
ShaderInfo
for the given shader.
Description
Gets
ShaderInfo
for the given shade... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bfc3e32c9a99 | unity_docs | rendering | What is `Rendering.ShaderKeyword.IsValid` in Unity? Explain its purpose and usage. | ShaderKeyword.IsValid
Declaration
public bool
IsValid
();
Returns
bool
Returns true if the global shader keyword exists. Otherwise, returns false.
Description
Checks whether the global shader keyword exists.
Declaration
public bool
IsValid
(
ComputeShader
shader
);
Parameters
Parameter
Description... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_cd7468f31466 | unity_docs | rendering | Explain 'HLSL shader examples in the Built-in Render Pipeline' in Unity. | This section contains example source code for hand-coded custom shaders that are compatible with the Built-in
Render Pipeline
.
Page Description Single color shader example
Example of a shader that renders a single color.
Checkerboard pattern shader example
Example of a shader that renders a checkerboard pattern.
Simpl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e3d358e9e054 | unity_docs | rendering | What is `TextureImporterShape.Texture2DArray` in Unity? Explain its purpose and usage. | TextureImporterShape.Texture2DArray
Description
Import the texture as a 2D Array texture.
The input image is split into a number of columns and rows controlled by
TextureImporterSettings.flipbookColumns
and
TextureImporterSettings.flipbookRows
. Each cell is imported into its own 2D array layer.
Additional resou... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3f67c9f9fd05 | unity_docs | editor | What is `AssetDatabase.CreateAsset` in Unity? Explain its purpose and usage. | AssetDatabase.CreateAsset
Declaration
public static void
CreateAsset
(
Object
asset
,
string
path
);
Parameters
Parameter
Description
asset
Object to use in creating the asset.
path
Project relative path for the new asset.
Description
Creates a new asset in a native Unity format.
Use this method to cr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9088a89de3a9 | unity_docs | physics | Show me a Unity C# example demonstrating `Physics.CheckCapsule`. | the capsule.
layermask
A
Layer mask
that is used to selectively ignore colliders when casting a capsule.
queryTriggerInteraction
Specifies whether this query should hit Triggers.
Description
Checks if any colliders overlap a capsule-shaped volume in world space.
The capsule is defined by the two spheres with
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b9024d8b89a8 | unity_docs | rendering | What is `MaterialPropertyBlock.GetVector` in Unity? Explain its purpose and usage. | MaterialPropertyBlock.GetVector
Declaration
public
Vector4
GetVector
(string
name
);
Declaration
public
Vector4
GetVector
(int
nameID
);
Parameters
Parameter
Description
nameID
The name ID of the property retrieved by
Shader.PropertyToID
.
name
The name of the property.
Description
Get a vector... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_24bf8eb80c15 | unity_docs | rendering | What are the parameters of `LightTransport.BufferID.Slice` in Unity? | Returns BufferSlice<T> A typed slice aliasing the BufferID. Description Constructs a typed slice from the BufferID. Creates a BufferSlice that provides a typed view into the buffer starting at the specified offset. This is a convenience method equivalent to constructing a BufferSlice manually. The offset is measured in... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8356f87eb280 | unity_docs | scripting | In Unity's 'Web Build folder', what is 'Build folder structure' and how does it work? | The Build folder has the name you specify in the
Build Profiles
window. The folder contains the following files, where
[ExampleBuild]
represents the name of the target build folder.
File name
Description
[ExampleBuild].loader.js
The JavaScript code that the web page needs to load the Unity content.
[ExampleBuild].frame... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d0773e396d1d | unity_docs | rendering | Explain 'DOTS Instancing shader examples in URP' in Unity. | Examples of using built-in macros to access per-instance data and constant data in DOTS Instancing
shaders
.
Page Description Example of a DOTS Instancing shader that accesses per-instance data
An example of accessing per-instance color data in a DOTS Instancing shader.
Example of a DOTS Instancing shader that accesses... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2109eb80bab8 | unity_docs | scripting | What is `iOS.Xcode.XcScheme.ReadFromFile` in Unity? Explain its purpose and usage. | XcScheme.ReadFromFile
Declaration
public void
ReadFromFile
(string
path
);
Parameters
Parameter
Description
path
Path of the file.
Description
Reads the scheme from a file identified by the given path.
The existing values of this XcScheme instance are discarded and replaced with the values read from the f... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_918d9ba1544c | unity_docs | scripting | Show me a Unity C# example demonstrating `Assertions.Assert.IsNull`. | sert.IsNull
Declaration
public static void
IsNull
(
Object
value
,
string
message
);
Declaration
public static void
IsNull
(T
value
);
Declaration
public static void
IsNull
(T
value
,
string
message
);
Parameters
Parameter
Description
value
The
Object
or
type
being checked for.
message
The... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_da051d6aa518 | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.ForceOverLifetimeModule.xMultiplier`. | ParticleSystem.ForceOverLifetimeModule.xMultiplier
public float
xMultiplier
;
Description
Defines the x-axis multiplier.
Changing this property is more efficient than accessing the entire curve, if you only want to change the overall x-axis multiplier.
```csharp
using UnityEngine;
using System.Collections;[Re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a7e41dd24263 | unity_docs | rendering | What is `Material.SetMatrix` in Unity? Explain its purpose and usage. | Material.SetMatrix
Declaration
public void
SetMatrix
(string
name
,
Matrix4x4
value
);
Declaration
public void
SetMatrix
(int
nameID
,
Matrix4x4
value
);
Parameters
Parameter
Description
nameID
Property name ID, use
Shader.PropertyToID
to get it.
name
Property name, e.g. "_CubemapRotation".
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_5cc5903fed58 | unity_docs | rendering | In Unity's 'Creating models for optimal performance', what is 'Minimize the polygon count' and how does it work? | The number of polygons you should use depends on the visual quality you require and the platform you are targeting. These two competing facts are equally true:
The fewer the polygons you use in your meshes, the faster your application runs. This is because every vertex, edge, or face requires computing resources.
The m... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_094066deba77 | unity_docs | scripting | What is `Unity.Android.Gradle.Manifest.Unit` in Unity? Explain its purpose and usage. | Unit
enumeration
Description
Enum value of possible unit types for the attribute.
Properties
Property
Description
Px
Pixel px.
In
Inch in.
Mm
Millimeter mm.
Pt
Point pt.
Dp
Density-independent pixel dp.
Sp
Scale-independent pixel sp. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fc64c8edc2dd | unity_docs | physics | Show me a Unity C# example demonstrating `CapsulecastCommand`. | N in the command buffer are stored at index N * maxHits in the results buffer.
Capsulecast command also allows you to control whether or not Trigger colliders and back-face triangles generate a hit. Use
QueryParameters
to control hit flags.
Note: Only BatchQuery.ExecuteCapsulecastJob is logged into the profiler. Quer... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_528ed83fca1a | unity_docs | rendering | What is `TerrainTools.PaintContext.CreateFromBounds` in Unity? Explain its purpose and usage. | PaintContext.CreateFromBounds
Declaration
public static
TerrainTools.PaintContext
CreateFromBounds
(
Terrain
terrain
,
Rect
boundsInTerrainSpace
,
int
inputTextureWidth
,
int
inputTextureHeight
,
int
extraBorderPixels
= 0,
bool
sharedBoundaryTexel
= true,
bool
fillOutsideTerrain
= true);
Parameters... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_94b2c1bc4711 | unity_docs | physics | What is `Physics.Simulate` in Unity? Explain its purpose and usage. | Physics.Simulate
Declaration
public static void
Simulate
(float
step
);
Parameters
Parameter
Description
step
The time to advance physics by.
Description
Simulate physics in the Scene.
Call this to simulate physics manually when the simulation mode is set to Script. Simulation includes all the stages of c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_feb0dc280569 | unity_docs | scripting | Give me an overview of the `ObjectChangeEventStream` class in Unity. | ObjectChangeEventStream
struct in
UnityEditor
Description
Represents a stream of events that describes the changes applied to objects in memory over the course of a frame.
Properties
Property
Description
isCreated
Indicates whether the ObjectChangeEventStream has an allocated memory buffer.
length
The number ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_65c197611092 | unity_docs | rendering | What is `MaterialPropertyBlock.CopySHCoefficientArraysFrom` in Unity? Explain its purpose and usage. | MaterialPropertyBlock.CopySHCoefficientArraysFrom
Declaration
public void
CopySHCoefficientArraysFrom
(List<SphericalHarmonicsL2>
lightProbes
);
Declaration
public void
CopySHCoefficientArraysFrom
(SphericalHarmonicsL2[]
lightProbes
);
Parameters
Parameter
Description
lightProbes
The array of SH values ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1422de7694f7 | unity_docs | editor | What are the parameters of `VersionControl.VersionControlAttribute.ctor` in Unity? | Description Constructs VersionControlAttribute. Display name is optional. Regular name will be used if not specified. ```csharp
using UnityEditor.VersionControl;[VersionControl("Custom", "Custom VCS")]
public class CustomVersionControlObject : VersionControlObject
{
}
``` Additional resources: VersionControlAttribute ,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_77481b348ec0 | unity_docs | scripting | In Unity's 'Windows Player: IL2CPP Scripting Backend', what is 'IL2CPP build files' and how does it work? | A project using the IL2CPP scripting backend typically produces these files:
The following files are common to projects that use IL2CPP:
File:
Description:
a_Data
Folder with game data.
a.exe
Main game executable.
UnityCrashHandler64.exe
Crash handler executable.
UnityPlayer.dll
Unity Player library containing all nati... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_b3ed9f412a0e_doc_1 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | The offset from the pointer to the pointer-mounted object.
Signature:
```csharp
private Vector3 pointerOffset = Vector3.zero;
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_0d30afb3f64f | unity_docs | xr | What is `Camera.ResetStereoViewMatrices` in Unity? Explain its purpose and usage. | Camera.ResetStereoViewMatrices
Declaration
public void
ResetStereoViewMatrices
();
Description
Reset the camera to using the Unity computed view matrices for all stereoscopic eyes.
If Camera.SetStereoViewMatrices or
Camera.SetStereoViewMatrix
were used to provide custom view matrices, this method reverts the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0d699f43d2ac | unity_docs | performance | Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorder.CurrentValue`. | ProfilerRecorder.CurrentValue
public long
CurrentValue
;
Description
Gets current value of the Profiler metric.
Use to obtain immediate profiler counter value or marker timing.
If the current value is the only data you are interested in, there is no need to start ProfilerRecorder or allocate sample storage. In ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_47f66e7e7a0c | unity_docs | scripting | Show me a Unity C# example demonstrating `MonoBehaviour.OnPreRender`. | t if you make a change that affects what the Camera sees, the change will take effect from the next frame. To make a change to what the Camera sees in the current frame, use
MonoBehaviour.OnPreCull
.
When Unity calls
OnPreRender
, the Camera's render target and depth textures are not yet set up. If you need to access... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4e0b6381bee0 | unity_docs | animation | What is `AnimationUtility.TangentMode` in Unity? Explain its purpose and usage. | TangentMode
enumeration
Description
The TangentMode option for each
Keyframe
.
The Curve Editor uses the TangentMode to calculate
Keyframe.inTangent
and
Keyframe.outTangent
.
Additional resources:
AnimationUtility.SetKeyRightTangentMode
,
AnimationUtility.SetKeyLeftTangentMode
,
AnimationUtility.SetKeyBroke... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_66aad319be6f | unity_docs | animation | What is `Animator.CrossFadeInFixedTime` in Unity? Explain its purpose and usage. | Animator.CrossFadeInFixedTime
Declaration
public void
CrossFadeInFixedTime
(int
stateHashName
,
float
fixedTransitionDuration
,
int
layer
= -1,
float
fixedTimeOffset
= 0.0f,
float
normalizedTransitionTime
= 0.0f);
Declaration
public void
CrossFadeInFixedTime
(string
stateName
,
float
fixedTransitionDu... | 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.