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_f0f1d09bde19 | unity_docs | scripting | What is `Event.displayIndex` in Unity? Explain its purpose and usage. | Event.displayIndex
public int
displayIndex
;
Description
Index of display that the event belongs to.
Not all platforms support multi-display GUI. On such platforms this property is always zero. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2473ea51298b | unity_docs | math | What is `GridBrushBase.Paint` in Unity? Explain its purpose and usage. | GridBrushBase.Paint
Declaration
public void
Paint
(
GridLayout
gridLayout
,
GameObject
brushTarget
,
Vector3Int
position
);
Parameters
Parameter
Description
grid
Grid
used for layout.
brushTarget
Target of the paint operation. By default the currently selected GameObject.
position
The coordinates... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_69683469183f | unity_docs | scripting | What is `Screen.brightness` in Unity? Explain its purpose and usage. | Screen.brightness
public static float
brightness
;
Description
Indicates the current brightness of the screen.
The value of this property is a number between 0.0 and 1.0, where 0 represents the minimum and 1.0 represents the maximum brightness of the screen.
iOS:
The screen brightness changes that your applica... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c2fffa8e7758 | unity_docs | scripting | What is `Animator.hasTransformHierarchy` in Unity? Explain its purpose and usage. | Animator.hasTransformHierarchy
public bool
hasTransformHierarchy
;
Description
Returns true if the object has a transform hierarchy.
This value is based on the Optimize GameObject property in the Model Importer. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d6659fd331b0 | unity_docs | performance | What is `Profiling.RawFrameDataView.GetSampleChildrenCount` in Unity? Explain its purpose and usage. | RawFrameDataView.GetSampleChildrenCount
Declaration
public int
GetSampleChildrenCount
(int
sampleIndex
);
Parameters
Parameter
Description
sampleIndex
Index of the Profiler sample.
Returns
int
Returns amount of child samples.
Description
Gets amount of child samples for the specific sample. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_eb5e3b4f28fe | unity_docs | input | Show me a Unity code example for 'UnsignedLongField'. | ctions to ensure that the entered data meets certain requirements.
Note
: To align an UnsignedLongField with other fields in an Inspector window, simply apply the.unity-base-field__aligned
USS class to it. For more information, refer to
BaseField
.
## Create an UnsignedLongField
You can create an UnsignedLongField wi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b6382a574a91 | unity_docs | editor | What are the parameters of `Application.IsPlaying` in Unity? | Returns bool True if the object is part of the playing world. Description Returns true if the given object is part of the playing world either in any kind of built Player or in Play Mode. In a built Player, this method will always return true. In the Editor, it will return true if the Editor is in Play Mode and the pro... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9c3d75ebd27b | unity_docs | animation | What is `Animations.BoundProperty` in Unity? Explain its purpose and usage. | BoundProperty
struct in
UnityEngine.Animations
/
Implemented in:
UnityEngine.AnimationModule
Description
A BoundProperty is a safe handle to read and write value in a generic way from any Unity components.
Static Properties
Property
Description
Null
An empty BoundProperty object that does not refer to a prop... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_22a944ec6f82 | unity_docs | scripting | Show me a Unity C# example demonstrating `Animator.Play`. | es into the
Bounce
state. This causes the cube to jump up and down twice. The cube then returns to the
Rest
state. Because
Bounce
is selected from the
Animator.Play
script, no Transition is needed. However the return from
Bounce
to
Rest
does have a Transition.
Has Exit Time
is ticked to make
Bounce
last... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_0838ccad95d4 | github | scripting | Write a Unity C# MonoBehaviour script called DDOL | ```csharp
using UnityEngine;
/// <summary>
/// GameObject with this script attached to it won't be destroyed on load.
/// </summary>
public class DDOL : MonoBehaviour
{
/// <summary>
/// Awake is called when the script instance is being loaded.
/// </summary>
private void Awake()
{
DontDes... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_9f5e9bf8a596 | unity_docs | editor | What are the parameters of `Handles.DrawSolidRectangleWithOutline` in Unity? | Description Draw a solid outlined rectangle in 3D space. Solid rectangle with a black outline in the Scene View. ```csharp
// Create a semi transparent rectangle that lets you modify
// the "range" that resides in "SolidRectangleExample.cs"using UnityEngine;
using UnityEditor;[CustomEditor(typeof(SolidRectangleExample)... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_db4e0bb4a3fb | unity_docs | editor | Show me a Unity C# example demonstrating `AssetImporters.AssetImporterEditor.OnInspectorGUI`. | AssetImporterEditor.OnInspectorGUI
Declaration
public void
OnInspectorGUI
();
Description
Override this method to create your own Inpsector GUI for a ScriptedImporter.
For the OnInspectorGUI Undo/Redo and cancel feature to work in the Inspector, you must either call ApplyRevertGUI or override needsApplyRevert t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_96d5b25e827d | unity_docs | editor | Show me a Unity C# example demonstrating `Search.ParsedQuery_1.Test`. | ParsedQuery<T0>.Test
Declaration
public bool
Test
(T
element
);
Parameters
Parameter
Description
element
A single test object.
Returns
bool
True if the object passes the query, returns false otherwise.
Description
Tests the query on a single object. Returns true if the test passes.
```csharp
using S... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_191626dd8304 | unity_docs | rendering | What is `Rendering.ScriptableRenderContext.SetupCameraProperties` in Unity? Explain its purpose and usage. | ScriptableRenderContext.SetupCameraProperties
Declaration
public void
SetupCameraProperties
(
Camera
camera
,
bool
stereoSetup
);
Declaration
public void
SetupCameraProperties
(
Camera
camera
,
bool
stereoSetup
,
int
eye
);
Parameters
Parameter
Description
camera
Camera to setup shader variables fo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9f1ffb9ad587 | unity_docs | scripting | In Unity's 'Introducing Android Library and Android Archive plug-ins', what is 'Android Archive plug-ins' and how does it work? | An Android Archive (AAR) plug-in is a compiled version of an Android Library plug-in that you can use as a dependency for an Android app module. The.aar
file itself is a.zip
archive that contains all the compiled code, assets, and plug-in manifest. For more information on the structure of an AAR, refer to
Anatomy of an... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_79eeaf1b57ec | unity_docs | rendering | In Unity's 'macOS', what is 'Additional resources and examples' and how does it work? | 📖
E-Book
:
Optimize your game performance for consoles and PCs in Unity
📖
E-Book
:
Best practices for project organization and version control
📖
E-Book
:
Create popular shaders and visual effects with the Universal Render Pipeline
📖
E-Book
:
Ultimate guide to profiling Unity games
📝
How-to guide
:
How to run autom... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dbd8c58a316f | unity_docs | scripting | What is `Undo.RevertAllDownToGroup` in Unity? Explain its purpose and usage. | Undo.RevertAllDownToGroup
Declaration
public static void
RevertAllDownToGroup
(int
group
);
Description
Performs all undo operations up to the group index without storing a redo operation in the process.
Additional resources:
Undo.GetCurrentGroup
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_00bce94d8e28 | unity_docs | scripting | What is `iOS.OnDemandResourcesRequest` in Unity? Explain its purpose and usage. | OnDemandResourcesRequest
class in
UnityEngine.iOS
/
Inherits from:
AsyncOperation
/
Implemented in:
UnityEngine.CoreModule
Description
Represents a request for On Demand Resources (ODR). It's an
AsyncOperation
and can be yielded in a coroutine.
NOTE:
only available on iOS.
Creating an
OnDemandResourcesReq... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b41762060235 | unity_docs | rendering | What is `CombineInstance.realtimeLightmapScaleOffset` in Unity? Explain its purpose and usage. | CombineInstance.realtimeLightmapScaleOffset
public
Vector4
realtimeLightmapScaleOffset
;
Description
The real-time lightmap UV scale and offset applied to the Mesh.
This property sets the realtime (dynamic) lightmap UV scale and offset applied to the Mesh. It is only used when lightmapped meshes are combined.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c97c306e639e | unity_docs | animation | What is `Animations.AnimatorState.speed` in Unity? Explain its purpose and usage. | AnimatorState.speed
public float
speed
;
Description
The default speed of the motion.
A speed of 1.0 plays the animation at its original speed. A speed of -1.0 plays the animation backwards. A speed between 0.0 and 1.0 plays the animation forwards and slower. A speed greater than 1.0 plays the animation forward... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dc5f59000490 | unity_docs | scripting | What is `CanAppendBuild` in Unity? Explain its purpose and usage. | CanAppendBuild
enumeration
Description
Whether you can append an existing build using
BuildOptions.AcceptExternalModificationsToPlayer
.
Properties
Property
Description
Unsupported
The target platform does not support appending builds.
Yes
The target platform supports appending builds, and the build can be ap... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2f236cf3879a | unity_docs | physics | What is `Joint.connectedMassScale` in Unity? Explain its purpose and usage. | Joint.connectedMassScale
public float
connectedMassScale
;
Description
The scale to apply to the inverse mass and inertia tensor of the connected body prior to solving the constraints.
Additional resources:
Joint.massScale
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_46369331e118 | unity_docs | math | Show me a Unity code example for 'BoundsField'. | The BoundsField lets users enter a Bounds value in a UI.
Note
: To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned
USS class to it. For more information, refer to
BaseField
.
## Create a BoundsField
You can create a BoundsField with UI Builder, UXML, or C#. The fo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_2a272d874d36 | unity_docs | xr | Explain 'XR' in Unity. | com.unity.modules.xr
## Description
The XR module contains the VR and AR related platform support functionality.
## Version information
Built-in packages are fixed to a single version matching the Editor version. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a0de3b055553 | unity_docs | scripting | What is `Unity.Hierarchy.HierarchyNodeFlags` in Unity? Explain its purpose and usage. | HierarchyNodeFlags
enumeration
Description
Bit flags used to describe the state of a hierarchy node.
Properties
Property
Description
None
The hierarchy node has no flags.
Expanded
The hierarchy node is expanded.
Selected
The hierarchy node is selected.
Cut
The hierarchy node is cut.
Hidde... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_687d1ff6ba4a_doc_0 | github | scripting | What does `LastTick` do in this Unity script? Explain its purpose and signature. | Time of last tick retrieved from Time.time
Signature:
```csharp
public float LastTick => behaviourTree.LastTick;
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_29265cfbd920 | unity_docs | rendering | What is `Video.VideoRenderMode.CameraNearPlane` in Unity? Explain its purpose and usage. | VideoRenderMode.CameraNearPlane
Description
Draw video content in front of a camera's scene.
Scene content is visible through any transparent areas of the video content.
Use for cutscenes, splashscreens and videos that overlay the scene.
Since the VideoPlayer has a transparency control, you can use this render mod... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_16c840ba62dc | unity_docs | scripting | What is `Advertisements.AdvertisementSettings.SetPlatformGameId` in Unity? Explain its purpose and usage. | AdvertisementSettings.SetPlatformGameId
Declaration
public static void
SetPlatformGameId
(string
platformName
,
string
gameId
);
Description
Sets the game identifier for the specified platform. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_efa7e346edcb | unity_docs | editor | What is `EditorUtility.CopySerializedIfDifferent` in Unity? Explain its purpose and usage. | EditorUtility.CopySerializedIfDifferent
Declaration
public static void
CopySerializedIfDifferent
(
Object
source
,
Object
dest
);
Description
Copy all settings of a Unity Object to a second Object if they differ. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_94e36c3c9756 | unity_docs | rendering | What is `SceneView.IsCameraDrawModeSupported` in Unity? Explain its purpose and usage. | SceneView.IsCameraDrawModeSupported
Declaration
public bool
IsCameraDrawModeSupported
(
SceneView.CameraMode
mode
);
Parameters
Parameter
Description
mode
A
CameraMode
to check.
Returns
bool
Returns true if the current rendering configuration supports the
CameraMode
.
Description
Checks if the cu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_de14661c78b0 | unity_docs | scripting | What is `Vector3.SmoothDamp` in Unity? Explain its purpose and usage. | Vector3.SmoothDamp
Declaration
public static
Vector3
SmoothDamp
(
Vector3
current
,
Vector3
target
,
ref
Vector3
currentVelocity
,
float
smoothTime
,
float
maxSpeed
= Mathf.Infinity,
float
deltaTime
= Time.deltaTime);
Parameters
Parameter
Description
current
The initial position.
target
The p... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9f9d37814fda | unity_docs | audio | Explain 'Audio Settings' in Unity. | The AudioSettings class contains various bits of global information relating to the sound system, but most importantly it contains API that allows resetting the audio system at runtime in order to change settings such as speaker mode, sample rate (if supported by the platform), DSP buffer size and real/virtual voice co... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d5acc89be92a | unity_docs | editor | What is `Callbacks.OnOpenAssetAttribute` in Unity? Explain its purpose and usage. | OnOpenAssetAttribute
class in
UnityEditor.Callbacks
/
Inherits from:
CallbackOrderAttribute
Description
Invokes a static callback method when the Unity Editor attempts to open an asset.
Unity calls any static method decorated with
[OnOpenAssetAttribute]
when attempting to open an asset, such as when double-cl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fadf36005f25 | unity_docs | editor | Show me a Unity C# example demonstrating `PrefabUtility.FindAllInstancesOfPrefab`. | ect[]
The root GameObjects for all instances of the Prefab asset with root
prefabRoot
.
Description
Retrieves the root GameObjects for all instances of the Prefab asset with root
prefabRoot
found in all currently loaded scenes. If
prefabRoot
is not a valid Prefab asset root GameObject, an
ArgumentException
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_291feacf11c8 | unity_docs | scripting | What is `VideoImporterTargetSettings.ctor` in Unity? Explain its purpose and usage. | VideoImporterTargetSettings Constructor
Declaration
public
VideoImporterTargetSettings
();
Description
Constructs an object with all members initialized with the default value inherent to their type. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dcf1ef61cb49 | unity_docs | editor | What are the parameters of `AssetDatabase.IsValidFolder` in Unity? | Returns bool Returns true if the folder exists. Description Given a path to a folder, returns true if it exists, false otherwise. The given path is relative to the project folder. ```csharp
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;public class AssetDatabaseExamples : MonoBehaviour
{
[M... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_57d2d884faba | unity_docs | audio | What are the parameters of `AudioClip.PCMSetPositionCallback` in Unity? | Description Unity calls this delegate each time AudioClip changes read position. Unity uses this delegate to signal when the audio clip changes its playback position, for example: A user seeks through an audio clip. The audio clip restarts. When you use AudioClip.Create to create a clip, use this delegate as a paramete... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_08392d6c1c61 | unity_docs | performance | Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorder.GetSample`. | ProfilerRecorder.GetSample
Declaration
public
Unity.Profiling.ProfilerRecorderSample
GetSample
(int
index
);
Description
Gets sample data.
Use to obtain sample data.
```csharp
using Unity.Profiling;
using UnityEngine;public class FrameTimeScript : MonoBehaviour
{
ProfilerRecorder frameTimeRecorder; void On... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_82b778f0726a | unity_docs | physics | What are the parameters of `PhysicsScene2D.Linecast` in Unity? | Returns RaycastHit2D The cast results returned. Description Casts a line segment against colliders in the PhysicsScene2D, returning the first intersection only. A linecast is an imaginary line between two points in world space. Any Collider2D making contact with this line can be detected and reported. This differs from... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_249df459e74a | unity_docs | animation | Show me a Unity C# example demonstrating `AnimationState.clip`. | AnimationState.clip
public
AnimationClip
clip
;
Description
The clip that is being played by this animation state.
```csharp
using UnityEngine;
using System.Collections;public class ExampleScript : MonoBehaviour
{
public Animation anim; void Update()
{
// Prints the frame rate of the animation clip to the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_208ef490ef8b | unity_docs | rendering | What is `Matrix4x4.Ortho` in Unity? Explain its purpose and usage. | Matrix4x4.Ortho
Declaration
public static
Matrix4x4
Ortho
(float
left
,
float
right
,
float
bottom
,
float
top
,
float
zNear
,
float
zFar
);
Parameters
Parameter
Description
left
Left-side x-coordinate.
right
Right-side x-coordinate.
bottom
Bottom y-coordinate.
top
Top y-coordinate.
zNear
Near... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1105881fbc4a | unity_docs | math | What is `ComputeShader.SetBuffer` in Unity? Explain its purpose and usage. | ComputeShader.SetBuffer
Declaration
public void
SetBuffer
(int
kernelIndex
,
string
name
,
ComputeBuffer
buffer
);
Declaration
public void
SetBuffer
(int
kernelIndex
,
int
nameID
,
ComputeBuffer
buffer
);
Declaration
public void
SetBuffer
(int
kernelIndex
,
string
name
,
GraphicsBuffer
buffer... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b8c335dffd71 | unity_docs | ui | Explain 'Extending IMGUI' in Unity. | There are a number of ways to leverage and extend the IMGUI system to meet your needs. Controls can be mixed and created, and you have a lot of leverage in dictating how user input into the GUI is processed.
## Compound Controls
There might be situations in your GUI where two types of Controls always appear together.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b12faf1cb0ee | unity_docs | scripting | What is `Progress.Item.Resume` in Unity? Explain its purpose and usage. | Progress.Item.Resume
Declaration
public bool
Resume
();
Returns
bool
True if the task resumes, false if it cannot resume.
Description
Resumes a paused progress indicator.
Additional resources:
Progress.Resume
,
Progress.Item.Pause
,
Progress.Item.RegisterPauseCallback
,
Progress.Item.UnregisterPauseCa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6ed913b4beec | unity_docs | rendering | In Unity's 'Set up a panoramic video', what is 'Render a cubemap video to a render texture' and how does it work? | If your video has a cubemap layout, you can render the video directly to a render texture cube instead of a 2D render texture. This is better for performance and is more suited to game engines.
To set this up:
Go to
Assets
>
Create
>
Rendering
>
Render Texture
. This action creates a new render texture.
Click on the ne... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_29d8533aae10 | github | scripting | Write a Unity C# UI script for Test | ```csharp
using System.Net.Http;
using Solid.Core;
using Solid.Examples;
using Solid.Examples.PopUps;
using Solid.UI;
using UnityEngine;
public class Test : MonoBehaviour
{
[SerializeField] private AudioClip _clip;
private UIManager _uiManager;
private void Awake()
{
var canvas = Fin... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_653ef1af616f | unity_docs | math | What is `TrailRenderer.GetPositions` in Unity? Explain its purpose and usage. | TrailRenderer.GetPositions
Declaration
public int
GetPositions
(out Vector3[]
positions
);
Declaration
public int
GetPositions
(out NativeArray<Vector3>
positions
);
Declaration
public int
GetPositions
(out NativeSlice<Vector3>
positions
);
Parameters
Parameter
Description
positions
The array of p... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1f27d2158ede | unity_docs | scripting | What is `UIElements.InspectorElement.debugInternalVariantUssClassName` in Unity? Explain its purpose and usage. | InspectorElement.debugInternalVariantUssClassName
public static string
debugInternalVariantUssClassName
;
Description
USS class name of elements of this type, when they are displayed in debug internal mode. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d32e47b84e6a | unity_docs | rendering | What is `ParticleSystem.SizeOverLifetimeModule` in Unity? Explain its purpose and usage. | SizeOverLifetimeModule
struct in
UnityEngine
/
Implemented in:
UnityEngine.ParticleSystemModule
Description
Script interface for the SizeOverLifetimeModule.
This module controls the size of particles throughout their lifetime.
Additional resources:
ParticleSystem
,
ParticleSystem.sizeOverLifetime
.
Properti... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9bb0bacfbb0b | unity_docs | editor | Show me a Unity C# example demonstrating `Profiling.IProfilerFrameTimeViewSampleSelectionController.SetSelection`. | is outside of the range described by
ProfilerWindow.firstAvailableFrameIndex
and
ProfilerWindow.lastAvailableFrameIndex
, Unity throws an ArgumentOutOfRangeException.
When the thread the selection object refers to cannot be found, Unity throws an ArgumentException.
Additional resources:
ProfilerEditorUtility.SetSel... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_49dec664d036 | unity_docs | editor | What is `SceneManagement.EditorSceneManager.RestoreSceneManagerSetup` in Unity? Explain its purpose and usage. | EditorSceneManager.RestoreSceneManagerSetup
Declaration
public static void
RestoreSceneManagerSetup
(SceneSetup[]
value
);
Parameters
Parameter
Description
value
In this array, at least one Scene should be loaded, and there must be one active Scene.
Description
Restore the setup of the SceneManager. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_149165286cff | unity_docs | xr | What is `PackageManager.Client.AddAndRemove` in Unity? Explain its purpose and usage. | Client.AddAndRemove
Declaration
public static
PackageManager.Requests.AddAndRemoveRequest
AddAndRemove
(string[]
packagesToAdd
,
string[]
packagesToRemove
);
Parameters
Parameter
Description
packagesToAdd
An array of strings representing the package(s) to be added:
- To install a specific version of a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8953ff8d0b15 | unity_docs | editor | Show me a Unity C# example demonstrating `EditorUtility.FormatBytes`. | EditorUtility.FormatBytes
Declaration
public static string
FormatBytes
(int
bytes
);
Description
Returns a text for a number of bytes.
```csharp
using UnityEngine;
using UnityEditor;public class FormatBytesExample : MonoBehaviour
{
void Start()
{
// prints "100 bytes"
print(EditorUtility.FormatBytes(100));... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_4200d6c4ab29 | unity_docs | scripting | Explain 'Introducing native plug-ins for Android' in Unity. | You can use
native plug-ins
in Android applications. There are different types of native
plug-in
, and the project’s
scripting backend
determines which plug-in types Unity supports. The possible plug-in types are:
Shared library
: Plug-ins packaged in a shared library (.so
).
Static library
: Plug-ins packaged in a sta... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fef1e9221056 | unity_docs | math | What is `AI.NavMeshBuildSettings.buildHeightMesh` in Unity? Explain its purpose and usage. | NavMeshBuildSettings.buildHeightMesh
public bool
buildHeightMesh
;
Description
Enables the creation of additional data needed to determine the height at any position on the NavMesh more accurately.
The NavMesh Agent is constrained to the surface of the NavMesh as it navigates. Since the NavMesh is an approximat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_554b92139ffb | unity_docs | ui | In Unity's 'Toolbar', what is 'Create a Toolbar' and how does it work? | You can create a Toolbar with UI Builder, UXML, or C#. The following C# example creates a Toolbar with a button and a toggle:
```csharp
using UnityEditor.UIElements;
...
var toolbar = new Toolbar();
var button = new ToolbarButton(() => { Debug.Log("Button clicked"); }) { text = "Click me" };
toolbar.Add(button);
toolba... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0c6daef7bf2a | unity_docs | math | What is `Matrix4x4.Scale` in Unity? Explain its purpose and usage. | Matrix4x4.Scale
Declaration
public static
Matrix4x4
Scale
(
Vector3
vector
);
Description
Creates a scaling matrix.
Returned matrix is such that scales along coordinate axes by a vector
v
.
The matrix looks like this:
```csharp
using UnityEngine;public class ExampleScript : MonoBehaviour
{
void Start()
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5a5614d23916 | unity_docs | rendering | What is `Texture3D.GetPixelBilinear` in Unity? Explain its purpose and usage. | Texture3D.GetPixelBilinear
Declaration
public
Color
GetPixelBilinear
(float
u
,
float
v
,
float
w
,
int
mipLevel
= 0);
Parameters
Parameter
Description
u
The u coordinate of the pixel to get.
v
The v coordinate of the pixel to get.
w
The w coordinate of the pixel to get.
mipLevel
The mipmap leve... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6885269d2cb4 | unity_docs | scripting | What is `Unity.Properties.PropertyPath.Combine` in Unity? Explain its purpose and usage. | PropertyPath.Combine
Declaration
public static
Unity.Properties.PropertyPath
Combine
(ref
Unity.Properties.PropertyPath
path
,
ref
Unity.Properties.PropertyPath
pathToAppend
);
Parameters
Parameter
Description
path
The <see cref="PropertyPath" />
pathToAppend
The <see cref="PropertyPath" /> to appen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_efecc9e0088a | unity_docs | scripting | What is `Playables.FrameData.EvaluationType` in Unity? Explain its purpose and usage. | EvaluationType
enumeration
Description
Describes the cause for the evaluation of a
PlayableGraph
.
Properties
Property
Description
Evaluate
Indicates the graph was updated due to a call to PlayableGraph.Evaluate.
Playback
Indicates the graph was called by the runtime during normal playback due to PlayableGrap... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_157ab625b65b | unity_docs | rendering | Show me a Unity C# example demonstrating `Rendering.RenderPipelineManager.beginContextRendering`. | om Scriptable Render Pipeline, you must call the method yourself. This functionality is not compatible with the Built-in Render Pipeline.
This delegate works in the same way as
RenderPipelineManager.beginFrameRendering
, except that this version does not cause heap allocations.
The following code example demonstrates ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_21bf0c3f3292 | unity_docs | math | What is `Ray.ToString` in Unity? Explain its purpose and usage. | Ray.ToString
Declaration
public string
ToString
();
Declaration
public string
ToString
(string
format
);
Declaration
public string
ToString
(string
format
,
IFormatProvider
formatProvider
);
Parameters
Parameter
Description
format
A numeric format string.
formatProvider
An object that specifies c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2493d2d81e65 | unity_docs | scripting | Show me a Unity C# example demonstrating `ReflectionProbe.IsFinishedRendering`. | ectionProbe.IsFinishedRendering
Declaration
public bool
IsFinishedRendering
(int
renderId
);
Parameters
Parameter
Description
renderId
An integer representing the RenderID as returned by the RenderProbe method.
Returns
bool
True if the render has finished, false otherwise.
Additional resources:
time... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_efd066b6a322 | unity_docs | editor | Explain 'Linux' in Unity. | Unity provides support for developing applications on Linux. You can build your application as a standalone executable and run it on Linux systems that support the same architecture that Unity supports. You can also build your application as a library and use it as a
plug-in
in other applications.
Topic Description Lin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a1dced25440a | unity_docs | rendering | What is `Windows.WebCam.WebCam.Mode` in Unity? Explain its purpose and usage. | WebCam.Mode
public static
Windows.WebCam.WebCamMode
Mode
;
Description
Specifies what mode the Web Camera is currently in.
Only a single instance of PhotoCapture or VideoCapture can be active at any given time. You can query the mode property if you want to know what mode the web camera is currently in. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a2bb98596040 | unity_docs | editor | What is `MPE.ChannelInfo` in Unity? Explain its purpose and usage. | ChannelInfo
struct in
UnityEditor.MPE
Description
A structure that contains the connection information of a Channel in
ChannelService
.
Properties
Property
Description
id
The ID of a specific channel. Normally this is the hash of the channel name.
name
The name of the channel. This matches the route of the U... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_cf41fd5ba932_doc_1 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Defines which transform the XR Origin's movement direction is relative to.
Signature:
```csharp
public enum MovementDirection
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_e4ade1edaa72 | unity_docs | scripting | What is `PrefabUtility.GetOutermostPrefabInstanceRoot` in Unity? Explain its purpose and usage. | PrefabUtility.GetOutermostPrefabInstanceRoot
Declaration
public static
GameObject
GetOutermostPrefabInstanceRoot
(
Object
componentOrGameObject
);
Parameters
Parameter
Description
componentOrGameObject
The object to check. Must be a component or GameObject.
Returns
GameObject
The outermost Prefab inst... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8a65d3d092f6 | unity_docs | scripting | What is `Device.Application.targetFrameRate` in Unity? Explain its purpose and usage. | Application.targetFrameRate
public static int
targetFrameRate
;
Description
This has the same functionality as
Application.targetFrameRate
. 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_8e872fa1ae9e | unity_docs | rendering | Give me an overview of the `TerrainExtensions` class in Unity. | TerrainExtensions
class in
UnityEngine
/
Implemented in:
UnityEngine.TerrainModule
Description
Extension methods to the Terrain class, used only for the UpdateGIMaterials method used by the Global Illumination System.
Static Methods
Method
Description
UpdateGIMaterials
Schedules an update of the albedo and e... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d11affb373a2 | unity_docs | scripting | In Unity's 'Content Size Fitter', what is 'Properties' and how does it work? | Property:
Function:
Horizontal Fit
How the width is controlled.
Unconstrained
Do not drive the width based on the layout element.
Min Size
Drive the width based on the minimum width of the layout element.
Preferred Size
Drive the width based on the preferred width of the layout element.
Vertical Fit
How the height is c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a7efc2e08a5b | unity_docs | input | What is `XR.XRInputSubsystem.TrySetTrackingOriginMode` in Unity? Explain its purpose and usage. | XRInputSubsystem.TrySetTrackingOriginMode
Declaration
public bool
TrySetTrackingOriginMode
(
XR.TrackingOriginModeFlags
origin
);
Parameters
Parameter
Description
origin
The new
TrackingOriginModeFlags
that you'd like to change to.
Returns
bool
True if the method changes the origin. Returns false othe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4a142fc30ad3 | unity_docs | physics | What is `IMGUI.Controls.JointAngularLimitHandle.zRange` in Unity? Explain its purpose and usage. | JointAngularLimitHandle.zRange
public
Vector2
zRange
;
Description
Returns or specifies the range of valid values for angular motion about the z-axis. Defaults to [-180.0, 180.0].
The x-value is the lower limit of the range and the y-value is the upper limit of the range.
Additional resources:
zMin
,
zMax
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f23a83659c01 | unity_docs | rendering | What is `Rendering.CopyTextureSupport.RTToTexture` in Unity? Explain its purpose and usage. | CopyTextureSupport.RTToTexture
Description
Support for RenderTexture to Texture copies in
Graphics.CopyTexture
.
Not all platforms can copy from a
RenderTexture
into a regular
Texture2D
directly. For example, Direct3D9
currently can not do this. See
CopyTextureSupport
for an overview. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dfaf98f242af | unity_docs | rendering | Show me a Unity C# example demonstrating `ParticleSystem.Emit`. | leSystem.EmitParams
emitParams
,
int
count
);
Parameters
Parameter
Description
emitParams
Overidden particle properties.
count
Number of particles to emit.
Description
Emit a number of particles from script.
Setting properties in the emitParams will override those properties in the emitted particles. Any... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5082b9ba14ad | unity_docs | ui | What is `UIElements.BaseListView.footerRemoveButtonName` in Unity? Explain its purpose and usage. | BaseListView.footerRemoveButtonName
public static string
footerRemoveButtonName
;
Description
The name of the remove button element in the footer.
Unity uses this name of
BaseListView
remove button when showAddRemoveFooter is set to
true
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dbd2b44a432b | unity_docs | scripting | What is `Experimental.GraphView.GraphElement.showInMiniMap` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphElement.showInMiniMap
public bool
showInMiniMap
;
Description
Whether the element is shown in the minimap. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0bf22264389d | unity_docs | editor | What is `AssetImporters.AssetImportContext.selectedBuildTarget` in Unity? Explain its purpose and usage. | AssetImportContext.selectedBuildTarget
public
BuildTarget
selectedBuildTarget
;
Description
Returns the current build target and creates a dependency on the target platform within a scripted importer.
This property returns the current build target platform (similar to EditorUserBuildSettings.activeBuildTarget... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7300dc303bdc | unity_docs | ui | Show me a Unity C# example demonstrating `GUIStyle.hover`. | GUIStyle.hover
public
GUIStyleState
hover
;
Description
Rendering settings for when the mouse is hovering over the control.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Prints the text color that button is using
// when the mouse is hovering over a control void OnGUI()
{
Debug.Lo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3fb8285bcca8 | unity_docs | animation | Show me a Unity C# example demonstrating `AnimationClip.frameRate`. | AnimationClip.frameRate
public float
frameRate
;
Description
Frame rate at which keyframes are sampled. (Read Only)
This is the frame rate that was used in the
animation program you used to create the animation or model.
```csharp
using UnityEngine;
using System.Collections;public class ExampleScript : MonoBe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_715ad5fa3986 | unity_docs | rendering | In Unity's 'Particle rendering and shading', what is 'Billboard render modes' and how does it work? | When you use 2D billboard graphics, the different render modes can produce a variety of results that make them suitable for specific uses:
Billboard mode is useful for particles that represent volumes that look similar from any direction (such as clouds).
Horizontal Billboard mode is useful when the particles cover the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a86ec4e32c07 | unity_docs | scripting | What is `RenderPickingResult.renderedPickingIndexCount` in Unity? Explain its purpose and usage. | RenderPickingResult.renderedPickingIndexCount
public int
renderedPickingIndexCount
;
Description
The number of consecutive picking indices used during the current
RenderPickingCallback
.
If you return a
RenderPickingResult
struct with 0 count, the rendering is considered a
RenderPickingResult.NoOperation
a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1ccafeede60b | unity_docs | animation | What is `Animations.IAnimationJob.ProcessAnimation` in Unity? Explain its purpose and usage. | IAnimationJob.ProcessAnimation
Declaration
public void
ProcessAnimation
(
Animations.AnimationStream
stream
);
Parameters
Parameter
Description
stream
The animation stream to work on.
Description
Defines what to do when processing the animation.
This method is called after
IAnimationJob.ProcessRootMotio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_68524fd29a10 | unity_docs | scripting | What is `Search.SearchContext.empty` in Unity? Explain its purpose and usage. | SearchContext.empty
public bool
empty
;
Description
Indicates of the search query is empty. This exclude the search filter id. In example if the search text is
h:
, then this property will still return true. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_77b4da19a55b | unity_docs | rendering | Explain 'Reflective Vertex-Lit' in Unity. | Note.
Unity 5 introduced the
Standard Shader
which replaces this
shader
.
## Reflective Properties
Note.
Unity 5 introduced the
Standard Shader
which replaces this shader.
This shader will simulate reflective surfaces such as cars, metal objects etc. It requires an environment Cubemap which will define what exactly i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0dae839435a2 | unity_docs | editor | What is `VersionControl.Provider.DiffIsValid` in Unity? Explain its purpose and usage. | Provider.DiffIsValid
Declaration
public static bool
DiffIsValid
(
VersionControl.AssetList
assets
);
Parameters
Parameter
Description
assets
List of assets.
Description
Returns true if starting a Diff task is a valid operation for at least one asset in the given
AssetList
.
When all of the assets in the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5b2b3efd4a29 | unity_docs | scripting | What is `Events.UnityAction` in Unity? Explain its purpose and usage. | UnityAction
Declaration
public delegate void
UnityAction
();
Description
Zero argument delegate used by UnityEvents.
Use this to create some dynamic functionality in your scripts. Unity Actions allow you to dynamically call multiple functions. Since Unity Actions have no arguments, functions they call must also... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e5a895b3220e | unity_docs | editor | What is `EditorGUI.ProgressBar` in Unity? Explain its purpose and usage. | EditorGUI.ProgressBar
Declaration
public static void
ProgressBar
(
Rect
position
,
float
value
,
string
text
);
Parameters
Parameter
Description
totalPosition
Rectangle on the screen to use in total for both the control.
value
Value that is shown.
Description
Makes a progress bar.
Value goes from 0 t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ba4bf940019d | unity_docs | math | In Unity's 'Profiling low-level native plug-ins', what is 'IUnityProfiler example' and how does it work? | The following example generates Profiler events that the Profiler window can display:
```csharp
#include <IUnityInterface.h>
#include <IUnityProfiler.h>
static IUnityProfiler* s_UnityProfiler = NULL;
static const UnityProfilerMarkerDesc* s_MyPluginMarker = NULL;
static bool s_IsDevelopmentBuild = false;
static void M... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1e4235a20048 | unity_docs | ui | What is `UIElements.PointerEventBase_1` in Unity? Explain its purpose and usage. | PointerEventBase<T0>
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.EventBase_1
/
Implemented in:
UnityEngine.UIElementsModule
Implements interfaces:
IPointerEvent
Description
Base class for all pointer-related events.
Pointer events are sent when a user interacts with the mouse, touchscreen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_3e3222cdb53f_doc_6 | github | scripting | What does `LoadRGBAFromWebP` do in this Unity script? Explain its purpose and signature. | Loads an image from webp into a byte array in RGBA format.The RGBA from web p.L data.L width.L height.If set to true l mipmaps.L error.Scaling function.
Signature:
```csharp
public static unsafe byte[] LoadRGBAFromWebP(byte[] lData, ref int lWidth, ref int lHeight, bool lMipmaps, out Error lError, ScalingFunction scal... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_man_68928a1de61d | unity_docs | rendering | In Unity's 'Widen the view with Lens Shift', what is 'Lens shifts and frustum obliqueness' and how does it work? | One side effect of a lens shift is that it makes the camera’s
view frustum
oblique. That means the angle between the camera’s center line and its frustum is smaller on one side than on the other.
You can use this to create visual effects based on perspective. For example, in a racing game, you might want to keep the pe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_46843e5dc8d0 | unity_docs | physics | Show me a Unity C# example demonstrating `Physics.RaycastNonAlloc`. | ance the rayhit is allowed to be from the start of the ray.
queryTriggerInteraction
Specifies whether this query should hit Triggers.
layerMask
A
Layer mask
that is used to selectively filter which colliders are considered when casting a ray.
Returns
int
The amount of hits stored into the
results
buffer.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_188b4ef54de1 | github | scripting | Write a Unity Editor script for World Item Reference List Updater | ```csharp
using System.Linq;
using ClusterVR.CreatorKit.Item.Implements;
using UnityEditor;
using UnityEngine;
namespace Baxter.ClusterScriptExtensions.Editor.ComponentUpdater
{
public static class WorldItemReferenceListUpdater
{
public static void Update(ScriptableItemExtension ext)
{
... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_bd0c4d34e862 | unity_docs | editor | Show me a Unity C# example demonstrating `AndroidSdkVersions`. | AndroidSdkVersions
enumeration
Description
The Android API levels to specify in scripts.
Note
: The lowest API level listed here strictly corresponds to the lowest supported API level. However, do not use these values to determine the highest supported API level.
The following code example demonstrates how you ca... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_444b17d9c66e | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.MainModule.loop`. | ParticleSystem.MainModule.loop
public bool
loop
;
Description
Specifies whether the Particle System is looping.
If you disable looping on a playing Particle System, it stops at the end of the current loop.
```csharp
using UnityEngine;
using System.Collections;[RequireComponent(typeof(ParticleSystem))]
public ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ab013884a92b | unity_docs | scripting | What is `Terrain.activeTerrain` in Unity? Explain its purpose and usage. | Terrain.activeTerrain
public static
Terrain
activeTerrain
;
Description
The active Terrain. This is a convenient function to get to the main Terrain in the Scene.
If you have multiple active Terrains, this returns only one of them. If you need all the terrains in the scene, use
Terrain.activeTerrains
instea... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dab87bab7587 | unity_docs | editor | What is `AssetDatabase.DeleteAsset` in Unity? Explain its purpose and usage. | AssetDatabase.DeleteAsset
Declaration
public static bool
DeleteAsset
(string
path
);
Parameters
Parameter
Description
path
Project relative path of the asset or folder to be deleted.
Returns
bool
Returns true if the asset has been successfully removed, false if it doesn't exist or couldn't be removed.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_1c58fbe976d4 | github | scripting | Write a Unity Editor script for Quit Button | ```csharp
#if UNITY_EDITOR
using UnityEditor;
#else
using UnityEngine;
#endif
namespace GI.UnityToolkit.Components.UI
{
public class QuitButton : ButtonComponent
{
protected override void OnClicked()
{
#if UNITY_EDITOR
EditorApplication.isPlaying = false;
#else
Applicati... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_f58901466552 | unity_docs | rendering | What is `Light.GetCommandBuffers` in Unity? Explain its purpose and usage. | Light.GetCommandBuffers
Declaration
public CommandBuffer[]
GetCommandBuffers
(
Rendering.LightEvent
evt
);
Parameters
Parameter
Description
evt
When to execute the command buffer during rendering.
Returns
CommandBuffer[]
Array of command buffers.
Description
Get command buffers to be executed at a ... | 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.