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_7f83b7b1e6d3 | unity_docs | rendering | What is `ShaderKeywordFilter.RemoveOrSelectAttribute.ctor` in Unity? Explain its purpose and usage. | RemoveOrSelectAttribute Constructor
Declaration
public
RemoveOrSelectAttribute
(object
condition
,
bool
overridePriority
,
string
filePath
,
int
lineNumber
,
params string[]
keywordNames
);
Parameters
Parameter
Description
condition
Unity compares the data field to this value. The outcome determines the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f28ef4bec897 | unity_docs | scripting | What is `KeyCode.B` in Unity? Explain its purpose and usage. | KeyCode.B
Description
'b' key.
```csharp
//Attach this to a GameObject
//This script tells when the B arrow key is pressed down and when it is released
using UnityEngine;public class Example : MonoBehaviour
{
void Update()
{
//Detect when the B arrow key is pressed down
if (Input.GetKeyDown(KeyCode.B))
Debug.L... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f91efc585f76 | unity_docs | scripting | What is `Windows.Speech.GrammarRecognizer.ctor` in Unity? Explain its purpose and usage. | GrammarRecognizer Constructor
Declaration
public
GrammarRecognizer
(string
grammarFilePath
);
Declaration
public
GrammarRecognizer
(string
grammarFilePath
,
Windows.Speech.ConfidenceLevel
minimumConfidence
);
Parameters
Parameter
Description
grammarFilePath
Path of the grammar file.
minimumConfidenc... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_404ea3809f42_doc_3 | github | scripting | What does `PreInit` do in this Unity script? Explain its purpose and signature. | The method prepares the view for initialization stepA reference to IWorldContext implementation
Signature:
```csharp
public void PreInit(IWorldContext worldContext)
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_man_3c3a1bee2165 | unity_docs | rendering | In Unity's 'Get started with UI Builder', what is 'Create the parent container' and how does it work? | Create a new VisualElement underneath the root element. This element becomes the parent container for the left and right sections of the UI.
Drag VisualElement from Library to the root VisualElement in the Hierarchy panel.
Add a child VisualElement
Select the element from the Hierarchy panel.
In the Inspector panel, se... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3a35a541687b | unity_docs | physics | What is `HumanDescription.upperArmTwist` in Unity? Explain its purpose and usage. | HumanDescription.upperArmTwist
public float
upperArmTwist
;
Description
Defines how the upper arm's roll/twisting is distributed between the shoulder and elbow joints.
When the upper arm needs to twist or roll based on IK,
upperArmTwist
(a weighted range of 0..1) determines how much rotation is applied to the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9dac4f67c210 | unity_docs | scripting | What are the parameters of `GridLayout.CellToLocal` in Unity? | Returns Vector3 Local position of the cell position. Description Converts a cell position to local position space. ```csharp
// Snap the GameObject to parent GridLayout
using UnityEngine;public class ExampleClass : MonoBehaviour
{
void Start()
{
GridLayout gridLayout = transform.parent.GetComponent<Grid... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_42ae9bb25538 | unity_docs | editor | What is `VersionControl.Provider.GetActiveConfigFields` in Unity? Explain its purpose and usage. | Provider.GetActiveConfigFields
Declaration
public static ConfigField[]
GetActiveConfigFields
();
Description
Returns the configuration fields for the currently active version control plugin.
The task can be useful if, for example, you need to change the version control plugin's credentials.
```csharp
using Sys... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3da7322509d1 | unity_docs | editor | Show me a Unity C# example demonstrating `MouseCursor.MoveArrow`. | MouseCursor.MoveArrow
Description
Arrow with the move symbol next to it for the sceneview.
```csharp
//Create a folder and name it “Editor” if this doesn’t already exist
//Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_632303a98513 | unity_docs | scripting | In Unity's 'Audio Listener', what is 'Details' and how does it work? | The Audio Listener works in conjunction with
Audio Sources
, allowing you to create the aural experience for your games. When the Audio Listener is attached to a GameObject in your scene, any Sources that are close enough to the Listener will be picked up and output to the computer’s speakers. Each scene can only have ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_953adf03f2d2 | unity_docs | scripting | What is `Device.Application.identifier` in Unity? Explain its purpose and usage. | Application.identifier
public static string
identifier
;
Description
This has the same functionality as
Application.identifier
. 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_9d34a1850e53 | unity_docs | editor | What is `Compilation.ScriptCompilerOptions.EditorAssembliesCompatibilityLevel` in Unity? Explain its purpose and usage. | ScriptCompilerOptions.EditorAssembliesCompatibilityLevel
public
EditorAssembliesCompatibilityLevel
EditorAssembliesCompatibilityLevel
;
Description
EditorAssembliesCompatibilityLevel
for Editor Assemblies. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_fd4450400e58 | unity_docs | ui | In Unity's 'ToggleButtonGroup', what is 'Example' and how does it work? | The following UXML example creates a ToggleButtonGroup with Buttons:
```
<UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
<ToggleButtonGroup label="UXML Toggle Button Group">
<Button text="A"/>
<Button text="B"/>
<Button text="C"/>
<Button text="D"/>
<Button text="E"/>
</ToggleButtonGroup... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_eedf55ae2ab2 | unity_docs | rendering | In Unity's 'Surface Shaders and rendering paths in the Built-In Render Pipeline', what is 'Rendering paths' and how does it work? | In
Forward Rendering
,
ForwardBase and ForwardAdd
passes are used.
In
Deferred Shading
,
Deferred
pass is used.
In
legacy Vertex Lit
,
Vertex
,
VertexLMRGBM and VertexLM
passes are used.
In any of the above, to render Shadows or a depth texture,
ShadowCaster
pass is used. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fb5092680c26 | unity_docs | editor | What is `iOSDeviceRequirement` in Unity? Explain its purpose and usage. | iOSDeviceRequirement
class in
UnityEditor
Description
A device requirement description used for configuration of App Slicing.
Properties
Property
Description
values
The values of the device requirement description.
Constructors
Constructor
Description
iOSDeviceRequirement
Constructs new device requirement ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_313e57615cac | unity_docs | audio | What is `Experimental.Audio.AudioSampleProvider.channelCount` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
AudioSampleProvider.channelCount
public ushort
channelCount
;
Description
The number of audio channels per sample frame.
This property does not change throughout the AudioSampleProvider' life scope. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e5b231372321 | unity_docs | editor | What is `AppleTV.tvOSPlatformIconKind` in Unity? Explain its purpose and usage. | tvOSPlatformIconKind
class in
UnityEditor.AppleTV
Description
Contains the Apple TV
PlatformIconKind
values supported by Unity.
For more information on Apple TV icons, refer to
tvOS app icon sizes
.
Static Properties
Property
Description
App
Includes all App icons required by tvOS.
TopShelfImage
Includes ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_21317159d019 | unity_docs | scripting | What is `Animations.GameObjectRecorder.BindComponentsOfType` in Unity? Explain its purpose and usage. | GameObjectRecorder.BindComponentsOfType
Declaration
public void
BindComponentsOfType
(
GameObject
target
,
bool
recursive
);
Declaration
public void
BindComponentsOfType
(
GameObject
target
,
Type
componentType
,
bool
recursive
);
Parameters
Parameter
Description
target
root
or any of its children... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_af2f3a702925 | unity_docs | physics | What is `PhysicsShapeGroup2D.SetShapeVertex` in Unity? Explain its purpose and usage. | PhysicsShapeGroup2D.SetShapeVertex
Declaration
public void
SetShapeVertex
(int
shapeIndex
,
int
vertexIndex
,
Vector2
vertex
);
Parameters
Parameter
Description
shapeIndex
The index of the shape stored in the
PhysicsShapeGroup2D
. The shape index is zero-based with the shape group having a quantity of s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1c4f7665f6eb | unity_docs | rendering | What is `ParticleSystem.AllocateMeshIndexAttribute` in Unity? Explain its purpose and usage. | ParticleSystem.AllocateMeshIndexAttribute
Declaration
public void
AllocateMeshIndexAttribute
();
Description
Ensures that the
meshIndices
particle attribute array is allocated.
This is important if you want to use this attribute in a job, such as
IJobParticleSystem
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_becf89a78ea7 | unity_docs | animation | What is `Animations.AnimatorJobExtensions` in Unity? Explain its purpose and usage. | AnimatorJobExtensions
class in
UnityEngine.Animations
/
Implemented in:
UnityEngine.AnimationModule
Description
Static class providing extension methods for
Animator
and the animation C# jobs.
The extension methods in this class can directly be used on an
Animator
.
Additional resources:
IAnimationJobPlayab... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_99703b1baa6e | unity_docs | scripting | Show me a Unity C# example demonstrating `Serialization.ManagedReferenceUtility.GetManagedReference`. | on the specified host and identified with provided Id. Returns null if no reference object is found.
Description
Retrieves an object based on its managed reference Id.
Use this method to efficiently retrieve a specific referenced object when, for example, its exact location within an array or graph is unknown.
A... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0908edcd39f3 | unity_docs | editor | Show me a Unity C# example demonstrating `Android.AndroidProjectFilesModifier`. | ion on when Unity invokes methods in this class, refer to
How Unity builds Android applications
.
In the
Setup
method, you can specify paths to the Gradle files that you want to create in your custom Gradle module. The following example demonstrates how you can specify these paths for the custom module
mycustommodu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_bc45e862aa0d | github | scripting | Write a Unity C# script called FB Directory Receive Callback Android | ```csharp
#if UNITY_EDITOR || UNITY_ANDROID
using UnityEngine;
namespace SimpleFileBrowser
{
public class FBDirectoryReceiveCallbackAndroid : AndroidJavaProxy
{
private readonly FileBrowser.AndroidSAFDirectoryPickCallback callback;
private readonly FBCallbackHelper callbackHelper;
public FBDirectoryReceiveCa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5dc77d55065f | unity_docs | scripting | Give me an overview of the `ColorGamutUtility` class in Unity. | ColorGamutUtility
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Utility class to query properties of a
ColorGamut
.
Static Methods
Method
Description
GetColorPrimaries
Returns the color primaries mapped to the color space used by the given gamut.
GetTransferFunction
Returns the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d9d3444f161d | unity_docs | physics | What is `RaycastHit2D.point` in Unity? Explain its purpose and usage. | RaycastHit2D.point
public
Vector2
point
;
Description
The world space position where the physics query shape intersected with the detected
Collider2D
surface.
Additional resources:
RaycastHit2D.normal
and
RaycastHit2D.fraction
.
```csharp
using UnityEngine;public class ExampleClass : MonoBehaviour
{
pu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_798245fd8a46 | unity_docs | scripting | What is `AudioClip.loadInBackground` in Unity? Explain its purpose and usage. | AudioClip.loadInBackground
public bool
loadInBackground
;
Description
Enable this property to load the AudioClip asynchronously in the background instead of on the main thread. Set this property in the Inspector (Read Only).
This property is useful if you have a lot of files or large files to load. If you load... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d44eb949e114 | unity_docs | rendering | What is `SystemInfo.maxComputeBufferInputsVertex` in Unity? Explain its purpose and usage. | SystemInfo.maxComputeBufferInputsVertex
public static int
maxComputeBufferInputsVertex
;
Description
Determines how many compute buffers Unity supports simultaneously in a vertex shader for reading. (Read Only) | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6e2adcceafec | unity_docs | animation | Explain 'Rotation in animations' in Unity. | You can use Unity to animate your
GameObject
’s rotations. There are different methods of applying these rotations to suit your project best.
Consult
Rotation and orientation in Unity
for more information on rotational representations.
## Rotation interpolation
You can use the
Animation window
to choose how Unity app... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a8775d14afdd | unity_docs | physics | What is `GUILayout.EndScrollView` in Unity? Explain its purpose and usage. | GUILayout.EndScrollView
Declaration
public static void
EndScrollView
();
Description
End a scroll view begun with a call to BeginScrollView.
Additional resources:
GUILayout.BeginScrollView
Scroll View in the Game View..
```csharp
using UnityEngine;public class ExampleScript : MonoBehaviour
{
// The variable... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9312c740af8f | unity_docs | rendering | Explain 'Web Player settings' in Unity. | Use Player settings to know how Unity builds and displays your final Web application. For a description of the general Player settings, refer to Player settings.
To access Web
Player settings
:
From the Unity main menu, go to
Edit
>
Project Settings
>
Player
. The Player settings window appears.
Select the Web tab to v... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c18fe9a5712d | unity_docs | scripting | What is `VersionControl.Provider.UpdateSettings` in Unity? Explain its purpose and usage. | Provider.UpdateSettings
Declaration
public static
VersionControl.Task
UpdateSettings
();
Description
Starts a task that sends the version control settings to the version control system.
The settings can be found in the Project Settings, Version Control tab and include version control password, username, serve... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_808739348e90 | unity_docs | math | What is `GL.LoadIdentity` in Unity? Explain its purpose and usage. | GL.LoadIdentity
Declaration
public static void
LoadIdentity
();
Description
Load an identity into the current model and view matrices.
Changing the model, view or projection matrices overrides the current rendering matrices.
It is good practice to save and restore these matrices using
GL.PushMatrix
and
GL.Po... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5fff205aa5f1 | unity_docs | math | Give me an overview of the `ComputeShader` class in Unity. | ComputeShader
class in
UnityEngine
/
Inherits from:
Object
/
Implemented in:
UnityEngine.CoreModule
Description
Compute Shader asset.
Compute shaders are programs that run on the GPU outside of the normal rendering pipeline.
They correspond to compute shader assets in the project (.compute files).
Compute sh... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f07a8d694740 | unity_docs | scripting | Explain 'CurveField' in Unity. | A CurveField is an
Editor-only
control that lets users select a curve from a curve editor. You can use a CurveField to display a curve to visualize its properties or create and adjust curves for animatable properties in an
Animation Clip
, providing precise control over how these properties change over time.
Note
: To ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2b09543d02f3 | unity_docs | scripting | Show me a Unity C# example demonstrating `SceneManagement.SceneManager.sceneUnloaded`. | directly this script code shows use of a delegate. This means the
sceneUnloaded
value is added into a list of delegates.
In the script example below a method call is shown. Specifically a function called OnSceneUnloaded is added to sceneUnloaded. SceneUnloaded is called when the Scene it is associated with is closed.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6bad90f5b4d2 | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormatUtility.IsSNormFormat` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormatUtility.IsSNormFormat
Declaration
public static bool
IsSNormFormat
(
Experimental.Rendering.GraphicsFormat
format
);
Description
Returns true if the format is a signed normalized format. Returns false otherwis... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5161780b1893 | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.CollisionModule.radiusScale`. | ParticleSystem.CollisionModule.radiusScale
public float
radiusScale
;
Description
A multiplier that Unity applies to the size of each particle before collisions are processed.
Useful for improving the visual accuracy of collisions, for example when there is an alpha border in the particle texture.
Additional r... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ba94b2a6bb95 | unity_docs | scripting | What are the parameters of `SceneManagement.SceneManager.LoadSceneAsync` in Unity? | Returns AsyncOperation Use the AsyncOperation to determine if the operation has completed. Description Loads the Scene asynchronously in the background. You can provide the full Scene path, the path shown in the Build Settings window, or just the Scene name. If you only provide the Scene name, Unity loads the first Sce... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_90b3894a2f64 | unity_docs | scripting | Show me a Unity C# example demonstrating `QualitySettings.IncreaseLevel`. | QualitySettings.IncreaseLevel
Declaration
public static void
IncreaseLevel
(bool
applyExpensiveChanges
= false);
Parameters
Parameter
Description
applyExpensiveChanges
Should expensive changes be applied (Anti-aliasing etc).
Description
Increase the current quality level.
```csharp
using UnityEngine;pub... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8c1961260bdd | unity_docs | physics | What is `ParticleSystemForceField.rotationSpeed` in Unity? Explain its purpose and usage. | ParticleSystemForceField.rotationSpeed
public
ParticleSystem.MinMaxCurve
rotationSpeed
;
Description
The speed at which particles are propelled around a vortex.
Set in conjunction with
ParticleSystemForceField.rotationAttraction
to create a vortex effect within the volume of the Force Field.
Additional res... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e93c12405d61 | unity_docs | scripting | What is `SubsystemManager.GetAllSubsystemDescriptors` in Unity? Explain its purpose and usage. | SubsystemManager.GetAllSubsystemDescriptors
Declaration
public static void
GetAllSubsystemDescriptors
(List<ISubsystemDescriptor>
descriptors
);
Parameters
Parameter
Description
descriptors
Subsystem descriptors.
Description
Gets all of the currently known subsystem descriptors regardless of specific subsy... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7c100f6b75d5 | unity_docs | scripting | What is `Experimental.GraphView.EdgeControl.fromCapColor` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
EdgeControl.fromCapColor
public
Color
fromCapColor
;
Description
The color of the cap color at the "from" end of the edge. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0b69687b900d | unity_docs | scripting | What is `UIElements.IDataSourceViewHashProvider` in Unity? Explain its purpose and usage. | IDataSourceViewHashProvider
interface in
UnityEngine.UIElements
Description
Defines a component as a data source view.
Public Methods
Method
Description
GetViewHashCode
Returns the hash code of the view, which can be used to notify the data binding system to refresh. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0038b5290bd4 | unity_docs | scripting | What is `Unity.Android.Gradle.ApplyPluginList` in Unity? Explain its purpose and usage. | ApplyPluginList
class in
Unity.Android.Gradle
/
Inherits from:
Unity.Android.Gradle.BaseBlock
Description
An element that holds a list of plugins to be applied in a gradle file.
For more information about the element, see Gradle's documentation:
Applying plugins
Constructors
Constructor
Description
ApplyPl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d458559b828b | unity_docs | rendering | What is `Rendering.DrawingSettings.enableDynamicBatching` in Unity? Explain its purpose and usage. | DrawingSettings.enableDynamicBatching
public bool
enableDynamicBatching
;
Description
Controls whether dynamic batching is enabled.
Dynamic batching is disabled by default since in general case it has issues (e.g. with multi-pass shaders).
Additional resources: ScriptableRenderContext.DrawRenderers. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_853c81dda338 | unity_docs | ui | In Unity's 'Multiplayer Sessions Building Block', what is 'Introduction' and how does it work? | The Multiplayer Session Building Block helps you integrate Unity’s multiplayer sessions into your project to connect players. This Building Block can serve as a starting point for your multiplayer projects, or as a quick integration of sessions throughout development.
This Building Block demonstrates how to do the foll... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_a52ff3a25f8f | github | scripting | Write a Unity C# script called Base Dynamic View | ```csharp
using UnityEngine;
namespace TinyECSUnityIntegration.Impls
{
/// <summary>
/// class BaseDynamicView
///
/// The class is a subtype of BaseView which should be used in cases when some view
/// will be created in runtime using GameObject.Instantiate or some factory
/// </summary>
... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_45ad68d06db1 | unity_docs | rendering | What is `GUILayout.AreaScope.ctor` in Unity? Explain its purpose and usage. | GUILayout.AreaScope Constructor
Declaration
public
GUILayout.AreaScope
(
Rect
screenRect
);
Declaration
public
GUILayout.AreaScope
(
Rect
screenRect
,
string
text
);
Declaration
public
GUILayout.AreaScope
(
Rect
screenRect
,
Texture
image
);
Declaration
public
GUILayout.AreaScope
(
Rect
scree... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f8235e5a43b9 | unity_docs | rendering | What is `Windows.WebCam.VideoCapture.StartVideoModeAsync` in Unity? Explain its purpose and usage. | VideoCapture.StartVideoModeAsync
Declaration
public void
StartVideoModeAsync
(
Windows.WebCam.CameraParameters
setupParams
,
Windows.WebCam.VideoCapture.AudioState
audioState
,
Windows.WebCam.VideoCapture.OnVideoModeStartedCallback
onVideoModeStartedCallback
);
Parameters
Parameter
Description
setupPar... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_724c42ce782d | unity_docs | scripting | In Unity's 'Create custom Editors with IMGUI', what is 'Making a Custom Editor' and how does it work? | The above demonstrates how you can get simple scripts running during edit-time, however this alone does not allow you to create your own Editor tools. The next step is to create a
Custom Editor
for the script you just created.
When you create a script in Unity, by default it inherits from MonoBehaviour, and therefore i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_278d0352e787 | github | scripting | Write a Unity C# XR/VR script for Joint Visualizer | ```csharp
using UnityEngine;
using UnityEngine.XR.Hands.Processing;
namespace UnityEngine.XR.Hands.Samples.VisualizerSample
{
public class JointVisualizer : MonoBehaviour
{
[SerializeField]
GameObject m_JointVisual;
[SerializeField]
Material m_HighFidelityJointMaterial;
... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_man_69f4495347e8 | unity_docs | scripting | Explain 'ScriptPlayable and PlayableBehaviour' in Unity. | To create your own custom playable, it must be inherited from the PlayableBehaviour base class.
lang-cs
public class MyCustomPlayableBehaviour : PlayableBehaviour
{
// Implementation of the custom playable behaviour
// Override PlayableBehaviour methods as needed
}
To use a PlayableBehaviour as a custom playable, it ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1de2ba51604b | unity_docs | editor | What is `Overlays.Overlay.OnWillBeDestroyed` in Unity? Explain its purpose and usage. | Overlay.OnWillBeDestroyed
Declaration
public void
OnWillBeDestroyed
();
Description
Called when an
Overlay
is about to be destroyed.
Usually this corresponds to the
EditorWindow
in which this
Overlay
resides closing. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2499c355a60a | unity_docs | editor | What is `Unity.IO.Archive.ArchiveFileInterface.GetMountedArchives` in Unity? Explain its purpose and usage. | ArchiveFileInterface.GetMountedArchives
Declaration
public static ArchiveHandle[]
GetMountedArchives
(
Unity.Content.ContentNamespace
namespaceId
);
Parameters
Parameter
Description
namespaceId
ContentNamespace identifier.
Returns
ArchiveHandle[]
Returns operation handles that reference mounted archives... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_2172e2e91daf | unity_docs | animation | Explain 'Common Blend Tree Options' in Unity. | The options in this topic are common to both 1D and 2D blending.
## Time Scale
You can alter the “natural” speed of
animation clips
with the animation speed number fields (the columns with a clock icon). For example, to double the speed of a walk clip, specify a value of
2.0
.
To rescale the speed of each clip in the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_16c6eb5c642c | unity_docs | editor | Show me a Unity C# example demonstrating `AssetDatabase.GetAssetPathsFromAssetBundle`. | setBundle
(string
assetBundleName
);
Parameters
Parameter
Description
assetBundleName
The name of the AssetBundle.
Description
Returns an array containing the paths of all assets marked with the specified AssetBundle name.
All paths returned are relative to the project folder, for example: "Assets/MyTextures... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4b683239b258 | unity_docs | scripting | Show me a Unity C# example demonstrating `Component.SendMessage`. | oBehaviour
in this game object.
The receiving method can choose to ignore the argument by having zero arguments.
If options is set to
SendMessageOptions.RequireReceiver
an error is printed when the message is not picked up by any component.
Note that messages will not be sent to inactive objects (ie, those that hav... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_925a259809b1 | unity_docs | rendering | What is `HandleUtility.EncodeSelectionId` in Unity? Explain its purpose and usage. | HandleUtility.EncodeSelectionId
Declaration
public static
Vector4
EncodeSelectionId
(int
pickingIndex
);
Parameters
Parameter
Description
pickingIndex
The picking index to encode. For example, a picking index passed from
RenderPickingArgs.pickingIndex
).
Returns
Vector4
The Vector4
selectionId
value... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9b46dde8f39b | unity_docs | rendering | Explain 'Create a material variant' in Unity. | Create a material that inherits properties from a parent material. For more information, refer to
Material variants
.
You can create a material variant from any material, including
Shader Graph
materials and
Asset Store
materials.
## Create a new material variant
In the Project window, right-click on a material. This... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3c0349bb6a19 | unity_docs | scripting | What is `GlobalObjectId.identifierType` in Unity? Explain its purpose and usage. | GlobalObjectId.identifierType
public int
identifierType
;
Description
The identifier type of the referenced object, represented as an integer.
{i}
is the identifier type represented by one of the following integers:
0 = Null
1 = Imported asset
2 = Scene object
3 = Source asset
4 = Built-in asset
The
identifie... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b8d88410a392 | unity_docs | physics | What are the parameters of `Physics.Raycast` in Unity? | Returns bool Returns true if the ray intersects with a Collider, otherwise false. Description Casts a ray, from point origin , in direction direction , of length maxDistance , against all colliders in the Scene. To select which layers a ray should collide with, use a LayerMask . Specifying queryTriggerInteraction allow... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0611564e2c5b | unity_docs | editor | What is `Experimental.GraphView.GraphViewEditorWindow.ShowGraphViewWindowWithTools` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphViewEditorWindow.ShowGraphViewWindowWithTools
Declaration
public static List<EditorWindow>
ShowGraphViewWindowWithTools
();
Returns
List<EditorWindow>
The list of newly created windows.
Description
Helper method th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1612807d5e6c | unity_docs | performance | What is `U2D.SpriteDataAccessExtensions.SetIndices` in Unity? Explain its purpose and usage. | SpriteDataAccessExtensions.SetIndices
Declaration
public static void
SetIndices
(
Sprite
sprite
,
NativeArray<ushort>
src
);
Parameters
Parameter
Description
src
The list of indices for this Sprite. The array must be disposed of by the caller.
Description
Set the indices for this Sprite. This is the same... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_661fc6413ce3_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Automatically sets the text to the application version at runtime.
Signature:
```csharp
public class AppVersionText : TextComponent
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_9297ee4c641f | unity_docs | animation | What is `HumanTrait.GetBoneDefaultHierarchyMass` in Unity? Explain its purpose and usage. | HumanTrait.GetBoneDefaultHierarchyMass
Declaration
public static float
GetBoneDefaultHierarchyMass
(int
i
);
Parameters
Parameter
Description
i
The humanoid bone index.
Returns
float
The bone hierarchy mass.
Description
Gets the bone hierarchy mass.
The default bone mass is used to compute the mass ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8f1400e061b3 | unity_docs | rendering | What is `Shader.GetGlobalFloatArray` in Unity? Explain its purpose and usage. | Shader.GetGlobalFloatArray
Declaration
public static float[]
GetGlobalFloatArray
(string
name
);
Declaration
public static float[]
GetGlobalFloatArray
(int
nameID
);
Parameters
Parameter
Description
nameID
The name ID of the property retrieved by
Shader.PropertyToID
.
name
The name of the property.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_966f97301232 | unity_docs | input | Show me a Unity C# example demonstrating `Gyroscope.updateInterval`. | Gyroscope.updateInterval
public float
updateInterval
;
Description
Sets or retrieves gyroscope interval in seconds.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
Input.gyro.updateInterval = 0.01f;
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_22b59df7c0e9 | unity_docs | editor | What are the parameters of `VersionControl.Provider.RevertIsValid` in Unity? | Description Returns true if Provider.Revert is a valid task to perform on at least one of the given assets in the list. ```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;public class EditorScript : MonoBehaviour
{
[MenuItem("Version Control/RevertIsVa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fd891c7701bf | unity_docs | rendering | What is `AssetImporters.MaterialDescription.GetVector4PropertyNames` in Unity? Explain its purpose and usage. | MaterialDescription.GetVector4PropertyNames
Declaration
public void
GetVector4PropertyNames
(List<string>
names
);
Parameters
Parameter
Description
names
The list of retrieved property names.
Description
Retrieves the property names of type Vector4 for this material. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4dbb6b3348f7 | unity_docs | editor | What is `EditorUtility.CreateGameObjectWithHideFlags` in Unity? Explain its purpose and usage. | EditorUtility.CreateGameObjectWithHideFlags
Declaration
public static
GameObject
CreateGameObjectWithHideFlags
(string
name
,
HideFlags
flags
,
params Type[]
components
);
Description
Creates a game object with
HideFlags
and specified components.
This is very similar to creating a
GameObject
the usua... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_6313a098a8b5 | github | scripting | Write a Unity C# script called Line | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EzySlice {
public struct Line {
private readonly Vector3 m_pos_a;
private readonly Vector3 m_pos_b;
public Line(Vector3 pta, Vector3 ptb) {
this.m_pos_a = pta;
this.m_... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_705ecf29a622 | unity_docs | scripting | What are the parameters of `ParticleSystem.CustomDataModule.SetMode` in Unity? | Description Choose the type of custom data to generate for the chosen data stream. Additional resources: ParticleSystem.CustomDataModule.GetMode , ParticleSystem.GetCustomParticleData . ```csharp
using UnityEngine;
using System.Collections;[RequireComponent(typeof(ParticleSystem))]
public class ExampleClass : MonoBehav... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dad75c24d90a | unity_docs | editor | What are the parameters of `EditorGUILayout.PrefixLabel` in Unity? | Description Make a label in front of some control. Simple window that shows the prefix label. Note that most editor controls already have built-in optional labels that can be specified as one of the parameters. PrefixLabel can be used when there is no such built-in label available, or when you're creating your own edit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_bc2c7de7b988 | unity_docs | rendering | In Unity's 'Introduction to batching meshes', what is 'Batch moving GameObjects' and how does it work? | Warning:
For most uses, dynamic batching is no longer recommended, because the CPU overhead might be greater than the overhead of a draw call. For more information, refer to
Choose a draw call optimization method
.
Dynamic batching is recommended only on lower-end devices. It does the following at runtime:
Transforms m... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_25038ba3cd1b | unity_docs | editor | Show me a Unity C# example demonstrating `SettingsProvider.GetSearchKeywordsFromSerializedObject`. | FromSerializedObject
Declaration
public static IEnumerable<string>
GetSearchKeywordsFromSerializedObject
(
SerializedObject
serializedObject
);
Parameters
Parameter
Description
serializedObject
Object to extract properties from.
Returns
IEnumerable<string>
Returns the list of keywords.
Description
E... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f1eeb6206b24 | unity_docs | editor | Show me a Unity code example for 'Modify Gradle project files with the Android Project Configuration Manager'. | fy them as required.
The entry point for the Android Project Configuration Manager is the OnModifyAndroidProjectFiles method in the AndroidProjectFilesModifier interface. This means to use the Android Project Configuration Manager, first create a class that implements AndroidProjectFilesModifier and declares a body for... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c6863b0e6079 | unity_docs | performance | What is `Profiling.RawFrameDataView.GetSampleMetadataAsString` in Unity? Explain its purpose and usage. | RawFrameDataView.GetSampleMetadataAsString
Declaration
public string
GetSampleMetadataAsString
(int
sampleIndex
,
int
metadataIndex
);
Parameters
Parameter
Description
sampleIndex
Index of the Profiler sample.
metadataIndex
Metadata index.
Returns
string
Returns string representation of sample metadat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bc75c0be2d67 | unity_docs | animation | What is `BodyDof.LastBodyDof` in Unity? Explain its purpose and usage. | BodyDof.LastBodyDof
Description
The last value of the
BodyDof
enum.
This value can be used in
for
loops.
```csharp
using UnityEngine;using UnityEngine.Animations;public class ExampleClass : MonoBehaviour
{
void Start()
{
for (int i = 0; i < (int)BodyDof.LastBodyDof; ++i)
{
var handle = new MuscleHandle((B... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e4445a2cf7c7 | unity_docs | rendering | Give me an overview of the `Material` class in Unity. | Material
class in
UnityEngine
/
Inherits from:
Object
/
Implemented in:
UnityEngine.CoreModule
Description
The material class.
This class exposes all properties from a material, allowing you to animate them.
You can also use it to set custom shader properties that can't be accessed through
the inspector (e.g... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_573e84d19b0a | unity_docs | physics | What is `PhysicsVisualizationSettings.FilterWorkflow` in Unity? Explain its purpose and usage. | FilterWorkflow
enumeration
Description
Decides whether the Workflow in the Physics Debug window should be
inclusive/
(
ShowSelectedItems
) or
exclusive
(
HideSelectedItems
).
By default
HideSelectedItems
is chosen and none of filtering items are selected. This means that nothing is hidden and thus everythin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c50bd613e08b | unity_docs | rendering | Show me a Unity code example for 'Upgrade to Unity 2023.2'. | ou must set RenderTextureDescriptor.shadowSamplingMode to ShadowSamplingMode.CompareDepths to enable depth-compare sampling.
Because
GraphicsFormat.DepthAuto and GraphicsFormat.ShadowAuto
were both considered depth stencil formats but used as colors formats, you may need to adjust your code.
For example, in the followi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c2f878bfd7e4 | unity_docs | rendering | What is `ShaderImporter.GetDefaultTexture` in Unity? Explain its purpose and usage. | ShaderImporter.GetDefaultTexture
Declaration
public
Texture
GetDefaultTexture
(string
name
);
Description
Gets the default texture assigned to the shader importer for the shader property with given name. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_232b246609a9 | unity_docs | physics | What is `XR.MeshGenerationResult.MeshCollider` in Unity? Explain its purpose and usage. | MeshGenerationResult.MeshCollider
public
MeshCollider
MeshCollider
;
Description
If the generation was successful, physics data has been written to this
MeshCollider
.
Check
MeshGenerationResult.Status
to determine if the generation was successful.
MeshCollider
may be null if a null
MeshCollider
was p... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ee0b596b6e70 | unity_docs | ui | Show me a Unity C# example demonstrating `GUILayout.HorizontalScope`. | HorizontalScope
class in
UnityEngine
/
Implemented in:
UnityEngine.IMGUIModule
Description
Disposable helper class for managing
BeginHorizontal
/
EndHorizontal
.
All controls rendered inside this element will be placed horizontally next to each other. The
using
statement means
BeginHorizontal
and
EndHor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fc2982a2fd33 | unity_docs | scripting | What is `Rendering.GraphicsSettings.Unsubscribe` in Unity? Explain its purpose and usage. | GraphicsSettings.Unsubscribe
Declaration
public static void
Unsubscribe
(Action<TChild,string>
callback
);
Parameters
Parameter
Description
callback
The callback that is registered to listen to changes.
Description
Cancels any subscription to changes of properties of a settings object implemented with the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ffe7a755f2ed | unity_docs | audio | What are the parameters of `Experimental.Audio.AudioSampleProvider.ConsumeSampleFramesNativeFunction` in Unity? | Description Type that represents the native function pointer for consuming sample frames. Importing a hypothetical native setup function would be done this way: ```csharp
[DllImport(pluginName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void SetConsumeSampleFramesFunction(... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_7743bbcbba7f | github | scripting | Write a Unity C# script called UI Manager | ```csharp
using System.Collections;
using UnityEngine;
namespace yaSingleton.Examples {
[CreateAssetMenu(fileName = "UI Manager", menuName = "Singletons/UIManager")]
public class UIManager : Singleton<UIManager> {
[SerializeField]
private bool _animate = true;
[SerializeField... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_6b3aa526c665 | unity_docs | editor | Show me a Unity C# example demonstrating `PrefabUtility.GetCorrespondingObjectFromSourceAtPath`. | ains a child nested prefab "C".
In this example scenario, when the GameObject "C (Instance)" is passed in as the source to this method, and "Assets/A.prefab" is passed as the path, this method returns the object "C (Nested Prefab)" from the prefab asset "A".
The example script below adds a menu item to the editor, whic... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dba08f7bd11e | unity_docs | math | What are the parameters of `Ray2D.ToString` in Unity? | Description Returns a formatted string for this 2D ray. Defaults to two digits displayed (format="F2"). For more information, see Microsoft's documentation on Standard numeric format strings . ```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
Ray2D ray = new Ray2D(Vector2... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a77d91665821 | unity_docs | scripting | What is `UIElements.IStyle.unityTextGenerator` in Unity? Explain its purpose and usage. | IStyle.unityTextGenerator
public StyleEnum<TextGeneratorType>
unityTextGenerator
;
Description
Switches between Unity's standard and advanced text generator
The advanced text generator supports comprehensive Unicode and text shaping for various languages and scripts, including RTL languages. However, it's c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5210185b2b68 | unity_docs | editor | What is `Device.Screen.currentResolution` in Unity? Explain its purpose and usage. | Screen.currentResolution
public static
Resolution
currentResolution
;
Description
This has the same functionality as
Screen.currentResolution
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_man_d3cbacf03a35 | unity_docs | rendering | Explain 'Simple diffuse lighting shader example in the Built-In Render Pipeline' in Unity. | The first thing we need to do is to indicate that our shader does in fact need lighting information passed to it. Unity’s
rendering pipeline
supports various ways of rendering; here we’ll be using the default
forward rendering
one.
We’ll start by only supporting one directional light. Forward rendering in Unity works b... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_0ca9741bbc26 | unity_docs | rendering | In Unity's 'Include a shader pass with the UsePass command', what is 'Example' and how does it work? | This example code creates a
Shader object
called ContainsNamedPass, which contains a Pass called ExampleNamedPass.
```
Shader "Examples/ContainsNamedPass"
{
SubShader
{
Pass
{
Name "ExampleNamedPass"
// The rest of the Pass contents go here.
}
}
}
```
This example code creates a Shader object called UseNamed... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_adcd17a839a0 | unity_docs | math | What is `Rendering.CommandBuffer.SetComputeIntParams` in Unity? Explain its purpose and usage. | CommandBuffer.SetComputeIntParams
Declaration
public void
SetComputeIntParams
(
ComputeShader
computeShader
,
string
name
,
params int[]
values
);
Declaration
public void
SetComputeIntParams
(
ComputeShader
computeShader
,
int
nameID
,
params int[]
values
);
Parameters
Parameter
Description
compute... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b72930b21457 | unity_docs | scripting | Give me an overview of the `Coroutine` class in Unity. | Coroutine
class in
UnityEngine
/
Inherits from:
YieldInstruction
/
Implemented in:
UnityEngine.CoreModule
Description
MonoBehaviour.StartCoroutine
returns a Coroutine. Instances of this class are only used to reference these coroutines, and do not hold any exposed properties or functions.
A coroutine is a fu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_06e89372698e | unity_docs | math | What is `Rendering.RayTracingShader.SetMatrixArray` in Unity? Explain its purpose and usage. | RayTracingShader.SetMatrixArray
Declaration
public void
SetMatrixArray
(string
name
,
Matrix4x4[]
values
);
Declaration
public void
SetMatrixArray
(int
nameID
,
Matrix4x4[]
values
);
Parameters
Parameter
Description
name
The name of the property being set.
nameID
The ID of the property as given by S... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6a7717b16cb9 | unity_docs | rendering | What is `ShaderData.VariantCompileInfo` in Unity? Explain its purpose and usage. | VariantCompileInfo
struct in
UnityEditor
Description
Represents the results of compiling a variant using
ShaderData.Pass.CompileVariant
.
Properties
Property
Description
Attributes
Vertex attributes the compiled variant uses (Read Only).
ConstantBuffers
Constant buffers the compiled variant uses (Read Only).... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a96ad1a67a0e | unity_docs | scripting | What is `UIElements.PanelSettings.referenceDpi` in Unity? Explain its purpose and usage. | PanelSettings.referenceDpi
public float
referenceDpi
;
Description
The DPI that the UI is designed for.
When
PanelSettings.scaleMode
is set to
ConstantPhysicalSize
, Unity compares
this value to the actual screen DPI, and scales the UI accordingly in the Game view.
If Unity cannot determine the screen ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_599bf9e84454 | unity_docs | animation | What is `Animator.SetBoneLocalRotation` in Unity? Explain its purpose and usage. | Animator.SetBoneLocalRotation
Declaration
public void
SetBoneLocalRotation
(
HumanBodyBones
humanBoneId
,
Quaternion
rotation
);
Parameters
Parameter
Description
humanBoneId
The human bone Id.
rotation
The local rotation.
Description
Sets local rotation of a human bone during a IK pass.
Can be used... | 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.