id stringlengths 15 22 | source stringclasses 2
values | category stringclasses 12
values | instruction stringlengths 22 180 | response stringlengths 100 46.1k | system stringclasses 5
values |
|---|---|---|---|---|---|
local_man_caec0798dd7c | unity_docs | networking | In Unity's 'Create callbacks between Unity C#, JavaScript, and C/C++/C# code', what is 'Use the makeDynCall function to make callbacks' and how does it work? | Use makeDynCall to call C, C++, or C# callbacks from JavaScript code. For example, the following JavaScript code calls the function
callback
:
```
{{{ makeDynCall('vii', 'callback') }}}(1, 2)
```
'vii'
is the signature of the parameters. For example, the callback function is a void type (v), and the
(1,2)
are both inte... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_07a236a1ab21 | unity_docs | scripting | What is `Progress.SetTimeDisplayMode` in Unity? Explain its purpose and usage. | Progress.SetTimeDisplayMode
Declaration
public static void
SetTimeDisplayMode
(int
id
,
Progress.TimeDisplayMode
displayMode
);
Parameters
Parameter
Description
id
The progress indicator's unique ID.
displayMode
The progress indicator's time display mode.
Description
Set a progress indicator's time di... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8bcb397984e3 | unity_docs | scripting | What is `SystemInfo.operatingSystemFamily` in Unity? Explain its purpose and usage. | SystemInfo.operatingSystemFamily
public static
OperatingSystemFamily
operatingSystemFamily
;
Description
Returns the operating system family the game is running on (Read Only).
This API is used by UI code to distinguish between desktop OS families with different UI conventions. For all non-desktop platforms i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_459c8f86da36 | unity_docs | rendering | What is `AssetPostprocessor.OnPostprocessMaterial` in Unity? Explain its purpose and usage. | AssetPostprocessor.OnPostprocessMaterial(Material)
Description
Add this function to a subclass to get a notification when a new Material is created during an import of a ModelImporter.
Use this method to modify the properties of newly created Material assets during import.
Note: This method is only called by the Mo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_14abdbd33cb4 | unity_docs | scripting | What is `Progress.GetId` in Unity? Explain its purpose and usage. | Progress.GetId
Declaration
public static int
GetId
(int
index
);
Parameters
Parameter
Description
index
The valid index for a progress indicator.
Returns
int
The progress indicator's unique ID, or -1 if the unique ID is not available.
Description
Finds a progress indicator's unique ID using its index... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9b2c6a80f4ea | unity_docs | scripting | Show me a Unity C# example demonstrating `SystemLanguage.Finnish`. | SystemLanguage.Finnish
Description
Finnish.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Finnish language
if (Application.systemLanguage == SystemLanguage.Finnish)
{
//Outputs into console that the system is Finni... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2e62bd8b554c | unity_docs | rendering | What is `Material.enabledKeywords` in Unity? Explain its purpose and usage. | Material.enabledKeywords
public LocalKeyword[]
enabledKeywords
;
Description
An array containing the local shader keywords that are currently enabled for this material.
Shader keywords determine which shader variants Unity uses. For information on working with
local shader keywords
and
global shader keyword... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ce187d0dd487 | unity_docs | rendering | What is `Rendering.RayTracingInstanceCullingTest.allowVisualEffects` in Unity? Explain its purpose and usage. | RayTracingInstanceCullingTest.allowVisualEffects
public bool
allowVisualEffects
;
Description
Whether to allow VFXRenderers.
If this value is false and the Renderer is a VFXRenderer, then the test fails.
Additional resources:
RayTracingAccelerationStructure.CullInstances
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4f0855e7ccc9 | unity_docs | editor | Show me a Unity C# example demonstrating `VersionControl.Provider.GetAssetListFromSelection`. | Provider.GetAssetListFromSelection
Declaration
public static
VersionControl.AssetList
GetAssetListFromSelection
();
Description
Returns the version control information about the currently selected Assets.
This method effectively adds all of the currently selected Assets to a
AssetList
which can be used for ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_8c43afcc7f53 | github | scripting | Write a Unity C# XR/VR script for Stopwatch | ```csharp
using UnityEngine;
namespace ExPresSXR.Misc.Timing
{
public class Stopwatch : MonoBehaviour
{
/// <summary>
/// Returned by currentStopTime if he stopwatch was not started yet.
/// </summary>
public const float INACTIVE_STOP_TIME = -1.0f;
/// <summary>
... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_7fb3b30f3507 | unity_docs | editor | What is `CustomEditor.ctor` in Unity? Explain its purpose and usage. | CustomEditor Constructor
Declaration
public
CustomEditor
(Type
inspectedType
);
Declaration
public
CustomEditor
(Type
inspectedType
,
bool
editorForChildClasses
);
Parameters
Parameter
Description
inspectedType
Type that this editor can edit.
editorForChildClasses
If true, child classes of inspectedT... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ef8e915dfe6c | unity_docs | rendering | What is `Shader.GetPropertyRangeLimits` in Unity? Explain its purpose and usage. | Shader.GetPropertyRangeLimits
Declaration
public
Vector2
GetPropertyRangeLimits
(int
propertyIndex
);
Parameters
Parameter
Description
propertyIndex
The index of the shader property.
Description
Returns the min and max limits for a
Range
property at the specified index.
If Unity cannot find a propert... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_504751843915 | unity_docs | animation | What is `AnimatorControllerParameter` in Unity? Explain its purpose and usage. | AnimatorControllerParameter
class in
UnityEngine
/
Implemented in:
UnityEngine.AnimationModule
Description
Used to communicate between scripting and the controller. Some parameters can be set in scripting and used by the controller, while other parameters are based on Custom Curves in Animation Clips and can be ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d15b87ba8a90 | unity_docs | scripting | What is `SystemLanguage.Unknown` in Unity? Explain its purpose and usage. | SystemLanguage.Unknown
Description
Unknown.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in an unknown language
if (Application.systemLanguage == SystemLanguage.Unknown)
{
//Outputs into console that the system language ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_97b2818f8a93 | unity_docs | editor | Show me a Unity C# example demonstrating `IMGUI.Controls.TreeView.useScrollView`. | ollView
;
Description
When drawing the TreeView contents, will it be enclosed within a ScrollView?
When enabled, the contents of the TreeView is culled so that anything outside of the ScrollView is not drawn. If the TreeView is contained within an external ScrollView, such as the Inspector window, then disabling t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_33c50a98f110 | unity_docs | rendering | What is `Texture2D.GetRawTextureData` in Unity? Explain its purpose and usage. | Texture2D.GetRawTextureData
Declaration
public NativeArray<T>
GetRawTextureData
();
Returns
NativeArray<T>
A native array that points directly to the texture's data buffer in CPU memory.
Description
Gets the raw data from a texture, as an array that points to memory.
This version of the
GetRawTextureData... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_54f5569633ac | unity_docs | input | What is `Experimental.GraphView.Dragger.OnMouseDown` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Dragger.OnMouseDown
Declaration
protected void
OnMouseDown
(
UIElements.MouseDownEvent
e
);
Parameters
Parameter
Description
e
The event.
Description
Called on mouse down event. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1aa12efe1e72 | unity_docs | scripting | What is `Unity.Android.Gradle.Manifest.AndroidManifestFile.ctor` in Unity? Explain its purpose and usage. | AndroidManifestFile Constructor
Declaration
public
AndroidManifestFile
();
Declaration
public
AndroidManifestFile
(
Unity.Android.Gradle.Manifest.AndroidManifestFile
androidManifestFile
);
Parameters
Parameter
Description
androidManifestFile
File to copy.
Description
Constructor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_6207051e38b3 | github | scripting | Write a Unity C# UI script for Voxel Generator Authoring | ```csharp
/*
* VoxelGeneratorAuthoring.cs
* Created by Arian - GameDevBox
* YouTube Channel: https://www.youtube.com/@GameDevBox
*
* 🎮 Want more Unity tips, tools, and advanced systems?
* 🧠 Learn from practical examples and well-explained logic.
* 📦 Subscribe to GameDevBox for more game dev content!
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_37acf3c5f794 | unity_docs | editor | What is `PlayerSettings.WSA.syncCapabilities` in Unity? Explain its purpose and usage. | PlayerSettings.WSA.syncCapabilities
public static bool
syncCapabilities
;
Description
Sync the Capabilities set in the Unity Editor to the AppXManifest
Enable this property to synchronize the 'Capabilities' section of the AppXManifest file with the Unity Editor's configured settings. Existing manifests will ha... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c99a37f5fd09 | unity_docs | math | What are the parameters of `Plane.SetNormalAndPosition` in Unity? | Description Sets a plane using a point that lies within it along with a normal to orient it. Note that the normal must be a normalised vector. ```csharp
using UnityEngine;public class Example : MonoBehaviour
{
public float fieldLength;
public float fieldWidth;
public Plane goalLine1;
public Plane goalLi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b1e395619f3f | unity_docs | scripting | Show me a Unity C# example demonstrating `GUISkin.textField`. | GUISkin.textField
public
GUIStyle
textField
;
Description
Style used by default for
GUI.TextField
controls.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Modifies only the textField style of the current GUISkin GUIStyle style;
string str = "A string..."; void OnGUI()
{
GUI.skin.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_10817fad06e7 | unity_docs | physics | What is `PointEffector2D.distanceScale` in Unity? Explain its purpose and usage. | PointEffector2D.distanceScale
public float
distanceScale
;
Description
The scale applied to the calculated distance between source and target.
When the distance is calculated between source and target for distance-based force calculations (such as inverse-linear or inverse-squared), it is then scaled by this va... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_289530030e64 | unity_docs | math | What is `Bounds.ClosestPoint` in Unity? Explain its purpose and usage. | Bounds.ClosestPoint
Declaration
public
Vector3
ClosestPoint
(
Vector3
point
);
Parameters
Parameter
Description
point
Arbitrary point.
Returns
Vector3
The point on the bounding box or inside the bounding box.
Description
The closest point on the bounding box.
If the point is inside the bounding b... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_68827b5a402f | unity_docs | rendering | In Unity's 'Create a material variant', what is 'Change the parent of a material variant' and how does it work? | To change the parent of a material variant, also known as reparenting, use one of the following methods:
In the Project window, drag the new parent material onto the material variant.
Select the material variant, then use the foldout (triangle) at the top-right to open the
Material Hierarchy
window. To set the parent m... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4d8ca88466e8 | unity_docs | rendering | What is `ParticleSystem.MinMaxGradient.gradientMax` in Unity? Explain its purpose and usage. | ParticleSystem.MinMaxGradient.gradientMax
public
Gradient
gradientMax
;
Description
Set a gradient for the upper bound.
Useful when
ParticleSystem.MinMaxGradient.mode
is set to
ParticleSystemGradientMode.TwoGradients
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0905fa3b8507 | unity_docs | scripting | What is `AI.NavMesh.RemoveLink` in Unity? Explain its purpose and usage. | NavMesh.RemoveLink
Declaration
public static void
RemoveLink
(
AI.NavMeshLinkInstance
handle
);
Parameters
Parameter
Description
handle
The instance of a link to remove.
Description
Removes a link from the NavMesh.
Use the instance returned by
AddLink
to remove the corresponding link.
Additional resour... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a6f8a3c193e5 | unity_docs | rendering | In Unity's 'Trace and manage PSO data collections', what is 'Save a collection' and how does it work? | Once tracing is complete, save the PSO data collection to disk using
GraphicsStateCollection.SaveToFile
.
When you save the PSO data collection, the collection saves as a.graphicsstate
file at the path you provide. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cac66bf7f74b | unity_docs | math | Give me an overview of the `Vector2Int` class in Unity. | Vector2Int
struct in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Representation of 2D vectors and points using integers.
This structure is used in some places to represent 2D positions and vectors that don't require the precision of floating-point.
Static Properties
Property
Description
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_740e12e0ac84 | unity_docs | xr | Show me a Unity code example for 'Set up your Nginx server configuration for Web builds'. | Unity quickly and efficiently.
For a full code example with all file types and compression types included, refer to
Full code example with all file types
.
For information about the Nginx server and how to install it, refer to the
Nginx documentation
.
## Edit your Nginx server configuration file for use with Unity
A... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_723f126fed89 | unity_docs | scripting | What is `Experimental.GraphView.Port.capacity` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Port.capacity
public
Experimental.GraphView.Port.Capacity
capacity
;
Description
Specify how many edges a port can have connected. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a219da9b3c74 | unity_docs | editor | Show me a Unity C# example demonstrating `EditorPrefs.SetString`. | EditorPrefs.SetString
Declaration
public static void
SetString
(string
key
,
string
value
);
Description
Sets the value of the preference identified by
key
. Note that EditorPrefs does not support null strings and will store an empty string instead.
Quick notes that last between Unity Sessions.
```csharp
//... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e8847f8e72ce | unity_docs | rendering | Show me a Unity C# example demonstrating `Mesh.RecalculateTangents`. | mal maps.
Unity calculates tangents using the vertex positions, normals and texture coordinates of the Mesh.
RecalculateTangents
adds a tangent attribute to the vertex, or changes the tangent attribute to the correct format. The attribute has a dimension of 4 and uses the
VertexAttributeFormat.Float32
format.
Recal... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5095c782f3ac | unity_docs | scripting | What is `SceneManagement.SceneManager.GetSceneByBuildIndex` in Unity? Explain its purpose and usage. | SceneManager.GetSceneByBuildIndex
Declaration
public static
SceneManagement.Scene
GetSceneByBuildIndex
(int
buildIndex
);
Parameters
Parameter
Description
buildIndex
Build index as shown in the Build Settings window.
Returns
Scene
A reference to the Scene, if valid. If not, an invalid Scene is returned... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_285c5d9f48a8 | unity_docs | rendering | What is `SceneView.CameraSettings.easingDuration` in Unity? Explain its purpose and usage. | SceneView.CameraSettings.easingDuration
public float
easingDuration
;
Description
How long it takes for the speed of the
SceneView
Camera to accelerate to its initial full speed. Measured in seconds. Valid values are between [0.1, 2]. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ff7cbc4943d8 | unity_docs | scripting | What is `GridBrushBase.Flip` in Unity? Explain its purpose and usage. | GridBrushBase.Flip
Declaration
public void
Flip
(
GridBrushBase.FlipAxis
flip
,
GridLayout.CellLayout
layout
);
Parameters
Parameter
Description
flip
Axis to flip by.
layout
CellLayout for flipping.
Description
Flips the grid brush in the given
FlipAxis
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c13dc06ed6e2 | unity_docs | scripting | What is `UIElements.Binding.isDirty` in Unity? Explain its purpose and usage. | Binding.isDirty
public bool
isDirty
;
Description
When set to
true
, the binding instance updates during the next update cycle.
When set to
false
, the binding instance updates only if a change is detected. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b8d380f03e9b | unity_docs | rendering | What is `Rendering.RayTracingInstanceCullingConfig.planes` in Unity? Explain its purpose and usage. | RayTracingInstanceCullingConfig.planes
public Plane[]
planes
;
Description
An array of planes used for culling ray tracing instances associated with the Renderers in a Scene.
To enable plane culling, use
RayTracingInstanceCullingFlags.EnablePlaneCulling
flag in
RayTracingInstanceCullingConfig.flags
.
A Rende... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_eb06f7316f92 | unity_docs | rendering | In Unity's 'Billboard Renderer component reference', what is 'Lighting' and how does it work? | The Lighting section contains properties that specify how this Billboard Renderer interacts with lighting in Unity.
Property:
Function:
Cast Shadows
Specify if and how the Mesh casts shadows when a suitable Light shines on it.
On
The Mesh casts a shadow when a shadow-casting Light shines on it.
Off
The Mesh does not ca... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5633cab1c42b | unity_docs | scripting | What is `Experimental.GraphView.EdgeControl.UpdateRenderPoints` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
EdgeControl.UpdateRenderPoints
Declaration
protected void
UpdateRenderPoints
();
Description
Update the edge's render points. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1ea9212eda55 | unity_docs | scripting | What is `WSA.SecondaryTileData.phoneticName` in Unity? Explain its purpose and usage. | SecondaryTileData.phoneticName
public string
phoneticName
;
Description
Phonetic name for secondary tile.
Optional, useful for some countries, like Japanese.
Ignored in Windows 8, supported only since 8.1. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_41e69d4fcdb9 | unity_docs | editor | In Unity's 'The Simulator view', what is 'Using the Simulator view' and how does it work? | To open the Simulator view, do one of the following:
In the
Game view
, in the top left corner, use the drop-down menu to switch between the Game view and the Simulator view.
In the menu:
Window
>
General
>
Device Simulator
Unity simulates the device in the Simulator view. To control the simulation, use the toolbar and... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_468e6a13af73 | unity_docs | math | Show me a Unity C# example demonstrating `Mathf.Repeat`. | th
, the result would be 0.5. With
t
= 5 and
length
= 2.5, the result would be 0.0. Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator.
In the example below, the value of time is restricted between 0.0 and just under 3.0. When the value of time is 3, the x positio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_ac4475661729_doc_12 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Represents an object which can be initialized using twelve arguments.-derived classes that implement this interface can be instantiated with arguments using the function.-derived classes that implement this interface can be added to a with arguments using the GameObject.AddComponent function.These functions can automat... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_39a935350168 | unity_docs | scripting | What is `Build.Content.ContentBuildInterface.StartProfileCapture` in Unity? Explain its purpose and usage. | ContentBuildInterface.StartProfileCapture
Declaration
public static void
StartProfileCapture
(
Build.Content.ProfileCaptureOptions
options
);
Parameters
Parameter
Description
options
Used to filter captured events.
Description
Starts a profile capture to record content build profile events.
Throws an Inv... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ddae99b1f7f3 | unity_docs | scripting | What is `Time.timeAsDouble` in Unity? Explain its purpose and usage. | Time.timeAsDouble
public static double
timeAsDouble
;
Description
The double precision time at the beginning of this frame (Read Only). This is the time in seconds since the start of the game.
Time.timeAsDouble is the amount of time in seconds that the application has been running for. It is read-only.
Double p... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_af40b027e0f2 | unity_docs | rendering | In Unity's 'Embedded dependencies', what is 'Creating a new custom package' and how does it work? | To embed a new package, create your new package content inside a folder under the Packages folder. For more information, follow the
instructions for creating your own custom package
.
Typically, your new package remains embedded in your project until you are ready to share it with other users and test it in other proje... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_59f3b6a4c4d1 | unity_docs | scripting | What is `UIElements.CurveField` in Unity? Explain its purpose and usage. | CurveField
class in
UnityEditor.UIElements
/
Inherits from:
UIElements.BaseField_1
Description
Makes a field for editing an
AnimationCurve
. For more information, refer to
UXML element CurveField
.
Static Properties
Property
Description
contentUssClassName
USS class name of content elements in element... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f436e76623b6 | unity_docs | ui | What is `UIElements.MouseManipulator` in Unity? Explain its purpose and usage. | MouseManipulator
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.Manipulator
/
Implemented in:
UnityEngine.UIElementsModule
Description
MouseManipulators have a list of activation filters.
Properties
Property
Description
activators
List of Activationfilters.
Protected Methods
Method
D... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_882d381de429 | unity_docs | editor | Show me a Unity C# example demonstrating `Callbacks.RunAfterPackageAttribute.ctor`. | s a dependency graph and uses topological sorting to ensure that all dependencies are run in sequence based on their dependencies. If callbacks dependencies are not present in the project then the instruction will be ignored during the generation of the dependency graph.
Note:
Defining callback dependencies is current... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_46d808d10e23 | unity_docs | scripting | In Unity's 'Manage the Inspector window', what is 'Open an Inspector window' and how does it work? | To open an Inspector , do one of the following:
To open the Inspector as a new window, from the main menu, select
Window
>
General
>
Inspector
.
To add an Inspector tab to any window, from the window’s
More Items
menu (⋮), select
Add Tab
>
Inspector
.
You can open as many Inspector windows as you want, and
reposition, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dfdd5b8279f5 | unity_docs | ui | What is `UIElements.BaseListView.makeHeader` in Unity? Explain its purpose and usage. | BaseListView.makeHeader
public Func<VisualElement>
makeHeader
;
Description
This callback allows the user to make their own header for this control.
Setting this callback will override the showFoldoutHeader and the headerTitle properties. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_a431e5038f5d_doc_14 | github | scripting | What does `HasGraphicsDeviceTypeAtIndex` do in this Unity script? Explain its purpose and signature. | Checks if the requested graphics device type for a given build target is at a certain index
Signature:
```csharp
public static bool HasGraphicsDeviceTypeAtIndex(BuildTarget buildTarget, GraphicsDeviceType graphicsDeviceType,
int index)
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_e793e1c41771 | unity_docs | rendering | Show me a Unity C# example demonstrating `Material.SetTextureScale`. | claration
public void
SetTextureScale
(int
nameID
,
Vector2
value
);
Parameters
Parameter
Description
nameID
Property name ID, use
Shader.PropertyToID
to get it.
name
Property name, e.g. "_MainTex".
value
Texture placement scale.
Description
Sets the placement scale of texture
propertyName
.
Addit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_75364ad7e053 | unity_docs | scripting | In Unity's 'Awaitable completion and continuation', what is 'Thread switching and performance' and how does it work? | It’s most efficient to call
await Awaitable.MainThreadAsync()
from the main thread and
await Awaitable.BackgroundThreadAsync()
from a background thread because in each case the code resumes immediately on completion. If you switch back to the main thread from a background thread with MainThreadAsync , your code can’t r... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a4bc0e168327 | unity_docs | scripting | In Unity's 'Unity linker marking rules reference', what is 'Dependency marking rules' and how does it work? | After the Unity linker identifies the roots in an assembly, it needs to identify any code that those roots depend on. The following table describes how the Unity linker identifies dependencies of root types in an assembly at different managed stripping levels:
Rule target
Dependency marking rules at managed stripping l... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f9ad57b033cb | unity_docs | scripting | What is `AssetImporter` in Unity? Explain its purpose and usage. | AssetImporter
class in
UnityEditor
/
Inherits from:
Object
Description
Base class from which asset importers for specific asset types derive.
Properties
Property
Description
assetBundleName
Get or set the AssetBundle name.
assetBundleVariant
Get or set the AssetBundle variant.
assetPath
The path name of th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a21afb753ec2 | unity_docs | ui | What is `UIElements.ToggleButtonGroupState.FromEnumFlags` in Unity? Explain its purpose and usage. | ToggleButtonGroupState.FromEnumFlags
Declaration
public static
UIElements.ToggleButtonGroupState
FromEnumFlags
(T
options
,
int
length
);
Parameters
Parameter
Description
options
The default Enum Flag value.
length
The number of options.
Returns
ToggleButtonGroupState
A ToggleButtonGroupState based ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2410d1a7fd5e | unity_docs | math | What is `AI.NavMeshAgent.steeringTarget` in Unity? Explain its purpose and usage. | NavMeshAgent.steeringTarget
public
Vector3
steeringTarget
;
Description
Get the current steering target along the path. (Read Only)
This is typically the next corner along the path or the end point of the path.
Unless the agent is moving on an OffMeshLink, there is a straight path between the agent and the st... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f83b452c9c25 | unity_docs | rendering | Explain 'Set shadow distance in a scene' in Unity. | Use the
Shadow Distance
property to determine the distance from the Camera up to which Unity renders real-time shadows.
Shadows from GameObjects become less noticeable the farther the GameObjects are from the Camera. This is both because the shadows appear smaller on the screen, and because distant GameObjects are usua... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_be314b0e1aa1 | unity_docs | rendering | In Unity's 'Managed code stripping and the Unity linker', what is 'Editing of method bodies' and how does it work? | At the High stripping level
, the Unity linker edits method bodies to further reduce code size. The Unity linker only edits method bodies in the .NET Class Library assemblies.
The Unity linker can edit a method body in the following ways:
Remove unreachable branches:
if
statement blocks that check
System.Environment.OS... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a859d9efe81a | unity_docs | scripting | What is `UIElements.DropdownField.ctor` in Unity? Explain its purpose and usage. | DropdownField Constructor
Declaration
public
DropdownField
();
Description
Construct an empty DropdownField.
Declaration
public
DropdownField
(string
label
);
Parameters
Parameter
Description
label
The label to display in front of the field.
Description
Construct a DropdownField with a Label in f... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_75689bdeaa26 | unity_docs | scripting | What is `UIElements.Columns.StretchMode` in Unity? Explain its purpose and usage. | StretchMode
enumeration
Description
Indicates how the size of a stretchable column in this collection should get automatically adjusted as other columns or its containing view get resized.
The default value is StretchMode.Grow.
Properties
Property
Description
Grow
The size of stretchable columns is automa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_138de8ca066e | unity_docs | physics | What is `PhysicsScene.OverlapBox` in Unity? Explain its purpose and usage. | PhysicsScene.OverlapBox
Declaration
public int
OverlapBox
(
Vector3
center
,
Vector3
halfExtents
,
Collider[]
results
,
Quaternion
orientation
= Quaternion.identity,
int
layerMask
= DefaultRaycastLayers,
QueryTriggerInteraction
queryTriggerInteraction
= QueryTriggerInteraction.UseGlobal);
Paramete... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_21f3fbaf87e1 | unity_docs | ui | What is `UIElements.PointerEventBase_1.pressedButtons` in Unity? Explain its purpose and usage. | PointerEventBase<T0>.pressedButtons
public int
pressedButtons
;
Description
Gets a bitmask that describes the buttons that are currently pressed.
Pressing a mouse button sets a bit. Releasing the button clears the bit. The left mouse button sets/clears Bit 0.
The right mouse button sets/clears Bit 1. The m... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a253e0ab6fec | unity_docs | math | What is `AndroidJNI.FromBooleanArray` in Unity? Explain its purpose and usage. | AndroidJNI.FromBooleanArray
Declaration
public static bool[]
FromBooleanArray
(IntPtr
array
);
Description
Converts a Java array of
boolean
to a managed array of System.Boolean.
Additional resources:
AndroidJNI.GetBooleanArrayElement
,
AndroidJNI.GetArrayLength
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0e984231f3d6 | unity_docs | scripting | What is `Rendering.BatchDrawCommandIndirect.visibleInstancesBufferWindowSizeBytes` in Unity? Explain its purpose and usage. | BatchDrawCommandIndirect.visibleInstancesBufferWindowSizeBytes
public uint
visibleInstancesBufferWindowSizeBytes
;
Description
Amount of data in the buffer to be bound, starting from the visibleInstancesBufferWindowOffset value. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_06dfd073a2ba | unity_docs | editor | What is `EditorUtility.CollectDependencies` in Unity? Explain its purpose and usage. | EditorUtility.CollectDependencies
Declaration
public static Object[]
CollectDependencies
(Object[]
roots
);
Description
Calculates and returns a list of all assets the assets listed in
roots
depend on.
Editor window that shows the next example.
```csharp
using UnityEngine;
using UnityEditor;public class Col... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1658cfb340d9 | unity_docs | animation | What is `ParticleSystem.MinMaxCurve.ctor` in Unity? Explain its purpose and usage. | ParticleSystem.MinMaxCurve Constructor
Declaration
public
ParticleSystem.MinMaxCurve
(float
constant
);
Parameters
Parameter
Description
constant
Constant value.
Description
A single constant value for the entire curve.
Declaration
public
ParticleSystem.MinMaxCurve
(float
multiplier
,
AnimationCurve
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c8ad6c646cf1 | unity_docs | rendering | What is `UnityEngine.WindModule` in Unity? Explain its purpose and usage. | UnityEngine.WindModule
Description
The Wind module implements the WindZone component which can affect terrain rendering and particle simulations.
Classes
Class
Description
WindZone
Wind Zones add realism to the trees you create by making them wave their branches and leaves as if blown by the wind.
Enumerations
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fac7b1a03c55 | unity_docs | physics | What is `EdgeCollider2D.adjacentStartPoint` in Unity? Explain its purpose and usage. | EdgeCollider2D.adjacentStartPoint
public
Vector2
adjacentStartPoint
;
Description
Defines the position of a virtual point adjacent to the start point of the EdgeCollider2D.
An EdgeCollider2D is made up of contiguous edges defined by a set of points adjacent to each other. When a collision occurs with a point ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a7be4735d8ce | unity_docs | xr | In Unity's 'XR input options', what is 'XR Interaction Toolkit' and how does it work? | The
XR Interaction Toolkit
builds on the Input System and the base
UnityEngine.XR
API to support XR input and interaction. It provides a near ready-to-use set of components for handling XR input and defining interactions between the user and the environment and the scene UI.
The XR Interaction Toolkit provides:
Interac... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_44ebcda36746 | unity_docs | math | What is `Tilemaps.Tilemap.SetTransformMatrix` in Unity? Explain its purpose and usage. | Tilemap.SetTransformMatrix
Declaration
public void
SetTransformMatrix
(
Vector3Int
position
,
Matrix4x4
transform
);
Parameters
Parameter
Description
position
Position of the Tile on the
Tilemap
.
transform
The transform matrix.
Description
Sets the transform matrix of a
Tile
given the XYZ coordin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8d7ae8ab5ee7 | unity_docs | scripting | What is `StreamingController` in Unity? Explain its purpose and usage. | StreamingController
class in
UnityEngine
/
Inherits from:
Behaviour
Description
A StreamingController controls the streaming settings for an individual camera location.
The StreamingController component is used to control texture streaming settings for a camera location.
This component supports the preloading o... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_dd5d97b490f4 | github | scripting | Write a Unity C# UI script for Observable Example | ```csharp
using RMC.Core.Observables;
using UnityEngine;
namespace RMC.Mini.Lessons.Observables
{
/// <summary>
/// The Example is the main entry point to the demo
/// </summary>
public class ObservableExample: MonoBehaviour
{
public Observable<string> Status = new Observable<string>();
... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_man_0adb080e5144 | unity_docs | rendering | Explain 'Preparing your model files for export' in Unity. | ## Scaling factors
Unity’s physics and lighting systems expect
1
meter in the game world to be
1
unit in the imported
Model file
.
The defaults for different 3D packages are as follows:.fbx, .max, .jas =
0.01
.3ds =
0.1.mb, .ma, .lxo, .dxf, .blend, .dae =
1
When importing Model files into Unity from a 3D modeling appl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7c8fe28426d2 | unity_docs | networking | What is `Android.AndroidConfiguration.ToString` in Unity? Explain its purpose and usage. | AndroidConfiguration.ToString
Declaration
public string
ToString
();
Description
Mirrors the Android method
toString()
.
For information about this method, refer to the Android developer documentation on
toString()
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a445b087f0fc | unity_docs | physics | What is `ContactFilter2D.layerMask` in Unity? Explain its purpose and usage. | ContactFilter2D.layerMask
public
LayerMask
layerMask
;
Description
Sets the contact filter to filter the results that only include
Collider2D
on the layers defined by the layer mask.
This field takes effect if
useLayerMask
is true.
Additional resources:
LayerMask
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a1dc343dd703 | unity_docs | rendering | In Unity's 'Managing importers with scripts', what is 'Scripting with built-in importers' and how does it work? | Use the callbacks in the AssetPostprocessor class to add custom behavior before or after Unity starts the import process for its built-in importers. You can manipulate import settings, analyze imported assets, or generate new assets dynamically during import. Refer to
Supported asset type reference
for a full list of b... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5c4857945683 | unity_docs | scripting | What is `Search.SearchUtils.CreateQuery` in Unity? Explain its purpose and usage. | SearchUtils.CreateQuery
Declaration
public static
Search.ISearchQuery
CreateQuery
(ref string
name
,
Search.SearchContext
context
,
Search.SearchTable
tableConfig
);
Parameters
Parameter
Description
name
Name of the query.
context
Search context used to execute the query.
tableConfig
Search table... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bdbe45dd4019 | unity_docs | scripting | Give me an overview of the `ModelImporterMeshCompression` class in Unity. | ModelImporterMeshCompression
enumeration
Description
Mesh compression options for
ModelImporter
.
Compressing meshes saves space in the built game, but more compression
introduces more artifacts in vertex data.
Additional resources:
ModelImporter.meshCompression
.
Properties
Property
Description
Off
No mesh ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_0cd53169e530 | unity_docs | editor | Show me a Unity code example for 'InspectorElement'. | An InspectorElement is a UI control that displays the properties of a SerializedObject in the Inspector window. You can use it to display the properties of a SerializedObject in a custom Editor window.
## Create an InspectorElement
You can create an InspectorElement with UXML or C#. The following C# example creates a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e91f77e2233f | unity_docs | scripting | Show me a Unity C# example demonstrating `Video.VideoPlayer.loopPointReached`. | ion
The VideoPlayer emits this event when the video reaches the end of its playback.
If you set the
VideoPlayer.isLooping
property to
true
, this event makes the video play again. Otherwise the
VideoPlayer
stops. You can also set the
Loop
property in the Inspector window of the
VideoPlayer
component.
Additio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_286f0898a61a | unity_docs | editor | In Unity's 'Project window reference', what is 'Shortcuts' and how does it work? | The following keyboard shortcuts are available when the browser view has focus. Note that some of them only work when the view is using the two-column layout (you can switch between the one- and two-column layouts using the panel menu in the very top right corner).
Shortcut Function F
Frame selected (ie, show the selec... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_07d530351dc8 | unity_docs | scripting | What is `Video.VideoClip.frameRate` in Unity? Explain its purpose and usage. | VideoClip.frameRate
public double
frameRate
;
Description
The frame rate of the clip in frames per second. (Read Only).
The frame rate is the number of frames that are displayed in one second of the video clip. This is useful if you want to synchronize with other effects in your project, and monitor performance... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d37d93c237c0 | unity_docs | animation | What is `AnimationUpdateMode` in Unity? Explain its purpose and usage. | AnimationUpdateMode
enumeration
Description
The update mode of the Animation component.
Properties
Property
Description
Normal
Animation updates in the Update loop.
Fixed
Animation updates in the FixedUpdate loop. Use this mode to evaluate animation independent of frame rate. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c0f157b973e5 | unity_docs | audio | What is `AudioReverbPreset` in Unity? Explain its purpose and usage. | AudioReverbPreset
enumeration
Description
Reverb presets used by the Reverb Zone class and the audio reverb filter.
Component for audio sources.
Properties
Property
Description
Off
No reverb preset selected.
Generic
Generic preset.
PaddedCell
Padded cell preset.
Room
Room preset.
Bathroom
Bathroom preset.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7fd4d17e796b | unity_docs | physics | What is `SliderJoint2D.autoConfigureAngle` in Unity? Explain its purpose and usage. | SliderJoint2D.autoConfigureAngle
public bool
autoConfigureAngle
;
Description
Should the
angle
be calculated automatically?
When true, the
angle
property will be calculated automatically to match the relative angle between the
anchor
and
connectedAnchor
properties. When false, the angle can be configure... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ce14ceee557e | unity_docs | rendering | In Unity's 'Built-in shader variables reference', what is 'Vertex input structures' and how does it work? | Structure Description appdata_base Declares vertex
for position,
normal
, and
texcoord
.
appdata_tan Declares vertex
for position,
tangent
,
normal
, and
texcoord
.
appdata_full Declares vertex
for position,
tangent
,
normal
,
color
,
texcoord
,
texcoord1
,
texcoord2
, and
texcoord3
.
appdata_img Declares vertex
for po... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_38c20b33d9c7 | unity_docs | editor | What is `Search.QueryEngine` in Unity? Explain its purpose and usage. | QueryEngine
class in
UnityEditor.Search
/
Inherits from:
Search.QueryEngine_1
Description
A QueryEngine defines how to build a query from an input string.
It can be customized to support custom filters and operators.
Default query engine of type object.
See
QueryEngine<T>
.
Constructors
Constructor
Descript... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a8a7d0aa4e4c | unity_docs | rendering | What is `LightTransport.EventID.Value` in Unity? Explain its purpose and usage. | EventID.Value
public ulong
Value
;
Description
The underlying event identifier value.
This value is implementation-specific and carries the actual event identifier used by the device context. The interpretation of this value depends on the concrete implementation:
CPU Implementations:
May store thread handles... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9b5300ddf100 | unity_docs | physics | Explain 'Get started with Unity' in Unity. | Unity is a real-time engine that you can use to create 2D and 3D applications, and then use Unity’s gaming services to manage the lifetime of your application beyond its development. There’s a few different pathways to getting started, depending on whether you’re completely new to game development, or if you’re moving ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ecb8397d85c4 | unity_docs | input | In Unity's 'Detect Game Controllers', what is 'Example: Detect attached Game Controllers' and how does it work? | The following code sample checks to see if any controllers are connected to the device.
```csharp
using System.Collections;
using UnityEngine;
public class GameControllers : MonoBehaviour
{
private bool connected = false;
IEnumerator CheckForControllers() {
while (true) {
var controllers = Input.GetJoystickNames(... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f3804d2f2959 | unity_docs | scripting | What is `Presets.Preset.GetTargetFullTypeName` in Unity? Explain its purpose and usage. | Preset.GetTargetFullTypeName
Declaration
public string
GetTargetFullTypeName
();
Returns
string
Fullname of the Preset's target type.
Description
Returns a human readable string of this Preset's target fulltype, including namespace. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c1f49fb24257 | unity_docs | scripting | Show me a Unity C# example demonstrating `AudioType.VAG`. | AudioType.VAG
Description
The audio file you want to stream has the VAG audio file format for PlayStation.
Use this enumeration value to ensure the format type of the audio file has the VAG audio file format. Use this audio type for files with the extension .vag
. If the audio file has a different format, Unity mig... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5c1ee4392494 | unity_docs | editor | What are the parameters of `UIElements.UIToolkitInputConfiguration.SetRuntimeInputBackend` in Unity? | Description Use this method to activate one of the two input backends available for UIToolkit events at runtime.
The new Input System compatible backend allows the Input System package to send its input to UI Toolkit
directly, removing the need for an UnityEngine.EventSystems.EventSystem in the user scene,
and will ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_c13463c0845a_doc_1 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Do not call this from another scope within OnDestroy(). Instead use IsInstantiated()
Signature:
```csharp
private static T _Instance;
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_6fcf48dc2cb9 | unity_docs | audio | What is `AudioClip.preloadAudioData` in Unity? Explain its purpose and usage. | AudioClip.preloadAudioData
public bool
preloadAudioData
;
Description
Enable this property in the Inspector to preload audio data from the audio clip when loading the clip Asset (Read Only).
This can help prevent delays when you play an audio clip because the data is already loaded. If you disable this propert... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c971b669bd7d | unity_docs | scripting | In Unity's 'Stop and restart Unity Accelerator', what is 'macOS' and how does it work? | Run the launchctl command from the terminal to control the
com.unity3d.accelerator
service from the LaunchControl utility. For more information, refer to
https://www.launchd.info/
.
Examples:
```
$ sudo launchctl bootout system /Library/LaunchDaemons/com.unity3d.accelerator.plist # Stops the service
$ sudo launchctl bo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_8069a57ecc07 | github | scripting | Write a Unity C# physics script for Collision Events | ```csharp
using FxResources.System;
using UnityEngine;
using UnityEngine.Events;
public class CollisionEvents : MonoBehaviour
{
[SerializeField] private UnityEvent onTriggerEnter;
private void OnTriggerEnter2D(Collider2D other)
{
onTriggerEnter.Invoke();
}
}
``` | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.