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_dd9d8456ce59 | unity_docs | scripting | What is `MPE.ChannelClient.Stop` in Unity? Explain its purpose and usage. | ChannelClient.Stop
Declaration
public void
Stop
();
Description
Stops a specific ChannelClient from listening for new messages. This is different than
ChannelClient.Close
because you can restart the channel client using
ChannelClient.Start
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_791131aacb4f | unity_docs | rendering | What is `ParticleSystemRenderer.BakeTexture` in Unity? Explain its purpose and usage. | ParticleSystemRenderer.BakeTexture
Declaration
public int
BakeTexture
(ref
Texture2D
verticesTexture
,
ParticleSystemBakeTextureOptions
options
);
Declaration
public int
BakeTexture
(ref
Texture2D
verticesTexture
,
Camera
camera
,
ParticleSystemBakeTextureOptions
options
);
Declaration
public i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_92f3dd7c579a | unity_docs | xr | What is `WSA.Tile.GetSecondary` in Unity? Explain its purpose and usage. | Tile.GetSecondary
Declaration
public static
WSA.Tile
GetSecondary
(string
tileId
);
Parameters
Parameter
Description
tileId
A tile identifier.
Returns
Tile
A Tile object or null if secondary tile does not exist (not pinned to start screen and user request is complete).
Description
Returns the secon... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e6d7ed70f7dc | unity_docs | scripting | Show me a Unity code example for 'AppCallbacks class reference'. | You can use the AppCallbacks class to connect your main application to the Unity engine.
## App.xaml.cppfile
```csharp
App::App()
{
InitializeComponent();
SetupOrientation();
m_AppCallbacks = ref new AppCallbacks();
}
void App::OnLaunched(LaunchActivatedEventArgs^ e)
{
m_SplashScreen = e->SplashScreen;
Initiali... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9ee99f2cb026 | unity_docs | rendering | Explain 'Optimize for user preferences' in Unity. | Android’s
game mode
feature indicates how the user wants to optimize your application. It enables users to say whether they want your application to run normally, optimize for battery life, or optimize for best performance.
## Requirements and compatibility
Android’s game mode feature requires Android version 13.
##... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e4baa67078ad | unity_docs | scripting | What is `Search.PropertyDatabaseRecordKey.operator_eq` in Unity? Explain its purpose and usage. | PropertyDatabaseRecordKey.operator ==
public static bool
operator ==
(
Search.PropertyDatabaseRecordKey
lhs
,
Search.PropertyDatabaseRecordKey
rhs
);
Parameters
Parameter
Description
lhs
A record key.
rhs
A record key.
Description
The equals operator. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_de8ad0e966b1 | unity_docs | math | Show me a Unity C# example demonstrating `Screen.resolutions`. | tion.
Important:
When using
FullScreenMode.ExclusiveFullScreen
, use
Screen.resolutions
to determine which resolution to pass to
Screen.SetResolution
, because
FullScreenMode.ExclusiveFullScreen
only works with supported resolutions. Passing an unsupported resolution can severely impact performance. All other ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_22e09dd8b64e | unity_docs | scripting | What is `UIElements.RuntimePanelUtils.ScreenToPanel` in Unity? Explain its purpose and usage. | RuntimePanelUtils.ScreenToPanel
Declaration
public static
Vector2
ScreenToPanel
(
UIElements.IPanel
panel
,
Vector2
screenPosition
);
Parameters
Parameter
Description
panel
The local coordinates reference panel.
screenPosition
The screen position to transform.
Returns
Vector2
A position in panel ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_454df8a1d63a | unity_docs | editor | Show me a Unity code example for 'Add tests to a package'. | ere are three things you must do to set up tests on your package:
Create the C# test files and
put them under the Tests folder
.
Create
asmdef files for your tests
.
Enable tests
for your package.
## Location of test files
You can add your test files to the Tests folder of your package in the Editor and Runtime subfo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_97e53f9fcc07_doc_2 | github | scripting | What does `InstantiatedSingletons` do in this Unity script? Explain its purpose and signature. | Enumerable of all available singleton instances.
Signature:
```csharp
public static IEnumerable<T> InstantiatedSingletons => SceneScopedSingletons.Values;
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_9e809746d1b7 | unity_docs | scripting | What are the parameters of `Search.SearchUtils.GetTransformPath` in Unity? | Returns string Returns a transform name using "/" as hierarchy separator. Description Format the pretty name of a Transform component by appending all the parent hierarchy names. ```
static string FetchLabel(SearchItem item, SearchContext context)
{
if (item.label != null)
return item.label;
var go = O... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f8b74b38d830 | unity_docs | math | What is `ISerializationCallbackReceiver.OnBeforeSerialize` in Unity? Explain its purpose and usage. | ISerializationCallbackReceiver.OnBeforeSerialize
Declaration
public void
OnBeforeSerialize
();
Description
Implement this callback to transform data into serializable data types immediately before an object is serialized.
Unity invokes the
OnBeforeSerialize
callback on an object before serializing it. In this... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a2d130ad3550 | unity_docs | ui | In Unity's 'Universal selectors', what is 'Example' and how does it work? | To demonstrate how simple selectors match elements, here is an example UI Document.
```
<UXML xmlns="UnityEngine.UIElements">
<VisualElement name="container1">
<VisualElement name="container2" class="yellow">
<Button name="OK" class="yellow" text="OK" />
<Button name="Cancel" text="Cancel" />
</VisualElement>
</V... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_01ae8f3d7579 | unity_docs | scripting | What is `Selection.SetActiveObjectWithContext` in Unity? Explain its purpose and usage. | Selection.SetActiveObjectWithContext
Declaration
public static void
SetActiveObjectWithContext
(
Object
obj
,
Object
context
);
Parameters
Parameter
Description
obj
Object being selected (will be equal activeObject).
context
Context object.
Description
Selects an object with a context. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2eae7b789b36 | unity_docs | scripting | What is `UIElements.Experimental.PointerMoveLinkTagEvent.ctor` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
PointerMoveLinkTagEvent Constructor
Declaration
public
PointerMoveLinkTagEvent
();
Description
Constructor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_16919d8a1d33 | unity_docs | rendering | What is `AssetImporters.TexturePropertyDescription` in Unity? Explain its purpose and usage. | TexturePropertyDescription
struct in
UnityEditor.AssetImporters
Description
Contains a set of typed properties for describing a texture input of a MaterialDescription.
Properties
Property
Description
offset
UV coordinates offset (x,y).
path
Absolute path to the texture asset.
relativePath
Path to the texture... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3d2165f6f162 | unity_docs | rendering | Explain 'ShaderLab: legacy alpha testing' in Unity. | Note
: The ShaderLab functionality on this page is legacy, and is documented for backwards compatibility only. If your shader source file includes HLSL code, Unity ignores these commands completely. If your shader source file does not include HLSL code, Unity compiles these commands into regular shader programs on impo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3af42a012666 | unity_docs | animation | Explain 'Python Scripting' in Unity. | com.unity.scripting.python
## Description
Optimize Unity Editor workflows for your VFX/animation pipelines using Python scripting:
- Automate repetitive tasks to speed up your artistic process.
- Integrate your custom pipeline tools within Unity.
- Increase interoperability with other software of your pipeline.
This ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a353c0c51d6b | unity_docs | physics | What is `JointTranslationLimits2D` in Unity? Explain its purpose and usage. | JointTranslationLimits2D
struct in
UnityEngine
/
Implemented in:
UnityEngine.Physics2DModule
Description
Motion limits of a Rigidbody2D object along a SliderJoint2D.
Additional resources:
Rigidbody2D
class,
SliderJoint2D
class.
Properties
Property
Description
max
Maximum distance the Rigidbody2D object ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9c3b48d4982d | unity_docs | physics | What is `PhysicsScene.BoxCast` in Unity? Explain its purpose and usage. | PhysicsScene.BoxCast
Declaration
public bool
BoxCast
(
Vector3
center
,
Vector3
halfExtents
,
Vector3
direction
,
out
RaycastHit
hitInfo
,
Quaternion
orientation
= Quaternion.identity,
float
maxDistance
= Mathf.Infinity,
int
layerMask
= DefaultRaycastLayers,
QueryTriggerInteraction
queryTrigger... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_8d8edb6c8fc0 | github | scripting | Write a Unity Editor script for META Boundary Visibility Build Hook | ```csharp
using System;
using System.Collections.Generic;
using System.IO;
using Unity.XR.Management.AndroidManifest.Editor;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEditor.XR.OpenXR.Features;
using UnityEngine;
using UnityEngine.XR.OpenXR;
namespace OpenXR.Extensions.Editor
{
public class ... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_404069422881 | unity_docs | math | What is `Rendering.CommandBuffer.SetGlobalVectorArray` in Unity? Explain its purpose and usage. | CommandBuffer.SetGlobalVectorArray
Declaration
public void
SetGlobalVectorArray
(string
propertyName
,
Vector4[]
values
);
Declaration
public void
SetGlobalVectorArray
(int
nameID
,
Vector4[]
values
);
Declaration
public void
SetGlobalVectorArray
(string
propertyName
,
List<Vector4>
values
);
Declar... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_85751342b981 | unity_docs | ui | What is `UIElements.BaseListViewController` in Unity? Explain its purpose and usage. | BaseListViewController
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.CollectionViewController
/
Implemented in:
UnityEngine.UIElementsModule
Description
Base collection list view controller. View controllers of this type are meant to take care of data virtualized by any
BaseListView
inheritor.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c0fc89afd7df | unity_docs | math | What is `Transform.GetLocalPositionAndRotation` in Unity? Explain its purpose and usage. | Transform.GetLocalPositionAndRotation
Declaration
public void
GetLocalPositionAndRotation
(out
Vector3
localPosition
,
out
Quaternion
localRotation
);
Description
Gets the position and rotation of the Transform component in local space (that is, relative to its parent transform).
When getting both the po... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d3b773425023 | unity_docs | scripting | In Unity's 'Using a custom update manager', what is 'Example custom update manager' and how does it work? | To implement a custom update manager, first create a C# script to define the interface as follows:
```csharp
public interface IUpdatable
{
void CustomUpdate(float deltaTime);
}
```
You can then create a MonoBehaviour script for the update manager singleton. The update manager implements the built-in Update callback an... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d64541491163 | unity_docs | scripting | What is `Windows.Speech.ConfidenceLevel` in Unity? Explain its purpose and usage. | ConfidenceLevel
enumeration
Description
Used by KeywordRecognizer, GrammarRecognizer, DictationRecognizer. Phrases under the specified minimum level will be ignored.
Properties
Property
Description
High
High confidence level.
Medium
Medium confidence level.
Low
Low confidence level.
Rejected
Everything is re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_35838551d437 | unity_docs | physics | What is `SliderJoint2D` in Unity? Explain its purpose and usage. | SliderJoint2D
class in
UnityEngine
/
Inherits from:
AnchoredJoint2D
/
Implemented in:
UnityEngine.Physics2DModule
Description
Joint that restricts the motion of a
Rigidbody2D
object to a single line.
Additional resources:
Rigidbody2D
,
DistanceJoint2D
,
HingeJoint2D
,
SpringJoint2D
,
JointTranslationLi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ef4bebad6520 | unity_docs | editor | Show me a Unity C# example demonstrating `SearchService.ObjectSelectorEngineAttribute`. | ObjectSelectorEngineAttribute
class in
UnityEditor.SearchService
Description
Use this class attribute to register ObjectSelector search engines automatically. Search engines with this attribute must implement the
IObjectSelectorEngine
interface.
The following example creates an ObjectSelector search engine:
``... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7f3f10968348 | unity_docs | rendering | What is `ShaderData.ActiveSubshader` in Unity? Explain its purpose and usage. | ShaderData.ActiveSubshader
public
ShaderData.Subshader
ActiveSubshader
;
Description
Returns the active subshader or null if none is currently active.
The active subshader is the first one that is supported and satisfied the LOD needs. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c073a6ac50fd | unity_docs | physics | Explain 'Articulations' in Unity. | A physics articulation is a set of
Articulation Bodies
organized in a logical tree, in which each parent-child relationship reflects mutually constrained relative motion.
The main purpose of physics articulations is to provide a realistic physics behavior for industrial and commercial non-gaming applications that invol... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_632d113b98de | unity_docs | scripting | What is `SceneManagement.SceneManagerAPI` in Unity? Explain its purpose and usage. | SceneManagerAPI
class in
UnityEngine.SceneManagement
/
Implemented in:
UnityEngine.CoreModule
Description
Derive from this base class to provide alternative implementations to the C# behavior of specific
SceneManager
methods.
The example provided logs if scene loading is done by index and logs a warning to sw... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4d258bed197f | unity_docs | math | What is `SerializedObject.maxArraySizeForMultiEditing` in Unity? Explain its purpose and usage. | SerializedObject.maxArraySizeForMultiEditing
public int
maxArraySizeForMultiEditing
;
Description
Defines the maximum size beyond which arrays cannot be edited when multiple objects are selected.
This value controls the maximum array size that you can edit during multiple-object-editing in the Inspector.
When y... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_82aa0fe5b1a1 | github | scripting | Write a Unity C# MonoBehaviour script called Capture Screenshot | ```csharp
// SPDX-License-Identifier: MIT
using UnityEditor;
using UnityEngine;
namespace GaussianSplatting.Editor.Utils
{
public class CaptureScreenshot : MonoBehaviour
{
[MenuItem("Tools/Gaussian Splats/Debug/Capture Screenshot %g")]
public static void CaptureShot()
{
int... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_56e4f8787cf4 | unity_docs | ui | What is `IMGUI.Controls.TreeView.DragAndDropArgs.performDrop` in Unity? Explain its purpose and usage. | TreeView.DragAndDropArgs.performDrop
public bool
performDrop
;
Description
This value is false as long as the mouse button is down, when the mouse button is released it is true.
When this value is true the drop should be peformed. The data backend should be changed and the TreeView should be reloaded to reflect... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9bba17454342 | unity_docs | scripting | What is `Animations.GameObjectRecorder.TakeSnapshot` in Unity? Explain its purpose and usage. | GameObjectRecorder.TakeSnapshot
Declaration
public void
TakeSnapshot
(float
dt
);
Parameters
Parameter
Description
dt
Delta time.
Description
Forwards the animation by
dt
seconds, then record the values of the added bindings.
To add bindings, use the bindings methods:
BindComponent
,
BindComponentsOfT... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b59ab106148d | unity_docs | rendering | What is `LineRenderer.useWorldSpace` in Unity? Explain its purpose and usage. | LineRenderer.useWorldSpace
public bool
useWorldSpace
;
Description
If enabled, the lines are defined in world space.
This means the object's position is ignored, and the lines are rendered around world origin.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Creates a line renderer at th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f8042f8c5d00 | unity_docs | physics | What is `Physics2D.OverlapAreaAll` in Unity? Explain its purpose and usage. | Physics2D.OverlapAreaAll
Declaration
public static Collider2D[]
OverlapAreaAll
(
Vector2
pointA
,
Vector2
pointB
,
int
layerMask
= DefaultRaycastLayers,
float
minDepth
= -Mathf.Infinity,
float
maxDepth
= Mathf.Infinity);
Parameters
Parameter
Description
pointA
One corner of the rectangle.
pointB
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_707e68c9fd4b | unity_docs | rendering | What is `ShaderData.Pass` in Unity? Explain its purpose and usage. | Pass
class in
UnityEditor
Description
This class describes a pass of a subshader.
Properties
Property
Description
IsGrabPass
Indicates whether this Pass results from a GrabPass command.
Name
The name of this pass (may be empty).
SourceCode
The source code for this pass.
Public Methods
Method
Description
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_62bd57b657bf | unity_docs | scripting | Explain 'Publish an asset package on the Asset Store' in Unity. | You can upload your own assets to the
Asset Store
as an
asset package
(.unitypackage
) that users can pay to download or use for free.
Topic Description Asset package Asset Store publishing workflow
Learn about the required steps to sell a package on Unity’s Asset Store.
Create or delete a package draft
Add information... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ef338f58fc35 | unity_docs | scripting | What is `DragAndDrop` in Unity? Explain its purpose and usage. | DragAndDrop
class in
UnityEditor
Description
Editor drag & drop operations.
Static Properties
Property
Description
activeControlID
Get or set ID of currently active drag and drop control.
objectReferences
References to objects being dragged.
paths
The file names being dragged.
visualMode
The visual indicati... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_53a303d37c18 | unity_docs | editor | In Unity's 'Manage search indices', what is 'Index types' and how does it work? | Asset
- An index of all Assets in a Project. This index is created automatically when you create a Project and rebuilds when you add or modify new content. The Asset index includes all Assets including Prefabs and scenes, but it doesn’t index the content of a scene or a nested hierarchy in a
Prefab
.
Package
- An index... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_282fc54a68be | unity_docs | scripting | In Unity's 'Bind ListView to a list with runtime binding', what is 'Create the ListView item template in UI Builder' and how does it work? | Create a reusable template that defines how each list item look and behave. ListView uses this template to generate
visual elements
for each data item. The template approach is efficient because:
One template definition works for any number of list items
UI Toolkit can recycle visual elements as users scroll
Changes to... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_52e43db19404 | github | scripting | Write a Unity Editor script for Set Target Architecture Step | ```csharp
using System;
using MagicLeap.SetupTool.Editor.Interfaces;
using MagicLeap.SetupTool.Editor.Utilities;
using UnityEditor;
using UnityEngine;
namespace MagicLeap.SetupTool.Editor.Setup
{
public class SetTargetArchitectureStep: ISetupStep
{
//Localization
private const string FIX_SETTING_BUTTON_LABEL = ... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_e8bbc6b1d122 | unity_docs | scripting | Show me a Unity C# example demonstrating `RenderSettings.fogColor`. | RenderSettings.fogColor
public static
Color
fogColor
;
Description
The color of the fog.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
void Example()
{
// Set the fog color to be blue
RenderSettings.fogColor = Color.blue; // And enable fog
RenderSetting... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_019725addf33 | unity_docs | animation | What is `Animations.AnimationLayerMixerPlayable` in Unity? Explain its purpose and usage. | AnimationLayerMixerPlayable
struct in
UnityEngine.Animations
/
Implemented in:
UnityEngine.AnimationModule
Implements interfaces:
IPlayable
Description
An implementation of
IPlayable
that controls an animation layer mixer.
NOTE: You can use
PlayableExtensions
methods with AnimationLayerMixerPlayable object... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4e8aa9ca906c | unity_docs | rendering | What is `Graphics.CreateGraphicsFence` in Unity? Explain its purpose and usage. | Graphics.CreateGraphicsFence
Declaration
public static
Rendering.GraphicsFence
CreateGraphicsFence
(
Rendering.GraphicsFenceType
fenceType
,
Rendering.SynchronisationStageFlags
stage
= SynchronisationStage.PixelProcessing);
Parameters
Parameter
Description
fenceType
The
GraphicsFenceType
to create. ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8a0995de1058 | unity_docs | scripting | In Unity's 'Write and run coroutines', what is 'Writing coroutines' and how does it work? | Consider the task of gradually reducing an object’s alpha (opacity) value until it becomes invisible. For the fading effect to be visible, the opacity must reduce over a sequence of frames. If you tried to write a Fade method, you might write something like the following:
```csharp
void Fade()
{
Color c = renderer.mat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_50541680c809 | unity_docs | scripting | Give me an overview of the `WaitForSeconds` class in Unity. | WaitForSeconds
class in
UnityEngine
/
Inherits from:
YieldInstruction
/
Implemented in:
UnityEngine.CoreModule
Description
Suspends the coroutine execution for the specified scaled time in seconds.
WaitForSeconds
can only be used with a
yield
statement in coroutines.
The real time suspended is equal to the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6f50349a3756 | unity_docs | scripting | What is `Search.PropertyDatabase.TryLoad` in Unity? Explain its purpose and usage. | PropertyDatabase.TryLoad
Declaration
public bool
TryLoad
(ref
Search.PropertyDatabaseRecordKey
recordKey
,
out object
value
);
Parameters
Parameter
Description
recordKey
A record key.
value
The property value.
Returns
bool
True if the record is found and is valid, false otherwise.
Description
Lo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f534cfa26716 | unity_docs | networking | What is `Networking.PlayerConnection.PlayerConnection.RegisterDisconnection` in Unity? Explain its purpose and usage. | PlayerConnection.RegisterDisconnection
Declaration
public void
RegisterDisconnection
(UnityAction<int>
callback
);
Parameters
Parameter
Description
callback
The Action that is called when a Player disconnects from the Editor.
Description
Registers a callback to be called when Editor disconnects. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8faba4824ead | unity_docs | scripting | What is `Pool.ObjectPool_1.Clear` in Unity? Explain its purpose and usage. | ObjectPool<T0>.Clear
Declaration
public void
Clear
();
Description
Removes all pooled items and invokes the pool's action on destroy callback for each item in the pool.
The action on destroy callback is the delegate passed to the constructor as the optional
actionOnDestroy
parameter. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5753a63105b3 | unity_docs | performance | What is `FullScreenMode.ExclusiveFullScreen` in Unity? Explain its purpose and usage. | FullScreenMode.ExclusiveFullScreen
Description
Windows platforms only. Sets your application so it has sole full-screen use of a display.
Unlike
FullScreenMode.FullScreenWindow
, this mode changes the operating system resolution of the display to match the application's chosen resolution. On platforms other than ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fb2524aa4188 | unity_docs | scripting | What is `UIElements.UxmlChildElementDescription` in Unity? Explain its purpose and usage. | UxmlChildElementDescription
class in
UnityEngine.UIElements
/
Implemented in:
UnityEngine.UIElementsModule
Description
Describe an allowed child element for an element.
Properties
Property
Description
elementName
The name of the allowed child element.
elementNamespace
The namespace name of the allo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d57347dfcb24 | unity_docs | editor | What is `GradientUsageAttribute` in Unity? Explain its purpose and usage. | GradientUsageAttribute
class in
UnityEngine
/
Inherits from:
PropertyAttribute
/
Implemented in:
UnityEngine.CoreModule
Description
Controls how the
Gradient
inspector editor treats the color values.
Use this attribute on a Gradient public script variable. You can control the
colorSpace
and
hdr
flags.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2d8df8ade9ea | unity_docs | math | What is `Rendering.BatchDrawCommandProcedural.sortingPosition` in Unity? Explain its purpose and usage. | BatchDrawCommandProcedural.sortingPosition
public int
sortingPosition
;
Description
Together with
BatchDrawCommand.flags
, this specifies how to depth sort the instances in this draw command.
If
BatchDrawCommandFlags.HasSortingPosition
is set, this contains the index of the first position in the
BatchCulli... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5e56007fbd15 | unity_docs | scripting | What is `Editor.CreateEditor` in Unity? Explain its purpose and usage. | Editor.CreateEditor
Declaration
public static
Editor
CreateEditor
(
Object
targetObject
,
Type
editorType
= null);
Declaration
public static
Editor
CreateEditor
(Object[]
targetObjects
,
Type
editorType
= null);
Parameters
Parameter
Description
objects
All objects must be of the same type.
Des... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_d48c7ce4c801 | github | scripting | Write a Unity C# XR/VR script for Bubble Gun | ```csharp
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
[RequireComponent(typeof(XRGrabInteractable))]
public class BubbleGun : MonoBehaviour
{
XRGrabInteractable m_InteractableBase;
Animator m_Animator;
[SerializeField] ParticleSystem m_BubbleParticleSystem = null;
const string k... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_054c415ced10 | unity_docs | editor | What is `Presets.Preset.GetDefaultPresetsForType` in Unity? Explain its purpose and usage. | Preset.GetDefaultPresetsForType
Declaration
public static DefaultPreset[]
GetDefaultPresetsForType
(
Presets.PresetType
type
);
Parameters
Parameter
Description
type
A valid default
PresetType
.
Returns
DefaultPreset[]
Returns a list of
DefaultPreset
from the PresetManager that match the specified
P... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_84dcc83c6c24 | unity_docs | animation | In Unity's 'Animation Layers', what is 'Animation Layer syncing' and how does it work? | Sometimes it is useful to be able to re-use the same state machine in different layers. For example if you want to simulate wounded behavior, and have wounded animations for walk / run / jump instead of the healthy ones. You can click the Sync checkbox on one of your layers, and then select the layer you want to sync w... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d2c652b485ce | unity_docs | rendering | What is `Media.VideoTrackAttributes` in Unity? Explain its purpose and usage. | VideoTrackAttributes
struct in
UnityEditor.Media
Description
Descriptor for audio track format.
Properties
Property
Description
bitRateMode
VideoBitrateMode for the encoded video.
frameRate
Frames per second.
height
Image height in pixels.
includeAlpha
True if the track is to include the alpha channel fou... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_19387d234c8a | unity_docs | editor | What is `PackageManager.Error` in Unity? Explain its purpose and usage. | Error
class in
UnityEditor.PackageManager
Description
Structure describing the error of a package operation.
Properties
Property
Description
errorCode
Numerical error code.
message
Error message or description. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6894ce651c99 | unity_docs | math | What is `AssetBundleManifest.GetDirectDependencies` in Unity? Explain its purpose and usage. | AssetBundleManifest.GetDirectDependencies
Declaration
public string[]
GetDirectDependencies
(string
assetBundleName
);
Parameters
Parameter
Description
assetBundleName
Name of the asset bundle.
Returns
string[]
Array of asset bundle names this asset bundle depends on.
Description
Get the direct depen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_e678a30ca532 | github | scripting | Write a Unity C# audio script for Global Test1 | ```csharp
using UnityEngine;
public class GlobalTest1 : MonoBehaviourExtended, ITest
{
[GlobalComponent]
private SoundManager soundManager;
private void Start()
{
if (!Test())
{
Debug.LogError("Test failed: " + this);
}
}
public bool Test()
{
i... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_bb70df820d4d | unity_docs | scripting | What is `Unity.Android.Gradle.Manifest.Data` in Unity? Explain its purpose and usage. | Data
class in
Unity.Android.Gradle.Manifest
/
Inherits from:
Unity.Android.Gradle.Manifest.BaseElement
Description
The C# definition of the
<data>
Android Manifest element.
For more information about the element, see Android's documentation:
Data element
Properties
Property
Description
Attributes
The a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_11874a960951 | unity_docs | ui | What is `PopupWindow.Show` in Unity? Explain its purpose and usage. | PopupWindow.Show
Declaration
public static void
Show
(
Rect
activatorRect
,
PopupWindowContent
windowContent
);
Parameters
Parameter
Description
activatorRect
The rect of the button that opens the popup.
windowContent
The content to show in the popup window.
Description
Show a popup with the given Po... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3557bd5384db | unity_docs | math | What is `PlayerSettings.GetGraphicsAPIs` in Unity? Explain its purpose and usage. | PlayerSettings.GetGraphicsAPIs
Declaration
public static GraphicsDeviceType[]
GetGraphicsAPIs
(
BuildTarget
platform
);
Parameters
Parameter
Description
platform
Platform to get APIs for.
Returns
GraphicsDeviceType[]
Array of graphics APIs.
Description
Get graphics APIs to be used on a build platfo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_64cc4a40b355 | github | scripting | Write a Unity C# script called FB Passthrough Layer Handler | ```csharp
// SPDX-FileCopyrightText: 2024 Michael Nisbet <me@mikesky.dev>
// SPDX-License-Identifier: MIT
#if XR_COMPOSITION_LAYERS
using System;
using UnityEngine;
using Unity.XR.CompositionLayers.Services;
using Unity.XR.CompositionLayers.Layers;
using UnityEngine.XR.OpenXR.NativeTypes;
using UnityEngine.XR.OpenXR.C... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_b515d1993c7e | unity_docs | editor | What is `TerrainTools.TerrainPaintUtilityEditor.UpdateTerrainDataUndo` in Unity? Explain its purpose and usage. | TerrainPaintUtilityEditor.UpdateTerrainDataUndo
Declaration
public static void
UpdateTerrainDataUndo
(
TerrainData
terrainData
,
string
undoName
);
Parameters
Parameter
Description
terrainData
Terrain data object.
undoName
The name of the undo operation.
Description
Updates the undo stack with a terrai... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_80ee68835e75 | unity_docs | rendering | Show me a Unity C# example demonstrating `Rendering.RayTracingAccelerationStructure.BuildSettings`. | nityEngine.Rendering
/
Implemented in:
UnityEngine.CoreModule
Description
Contains options for building a
RayTracingAccelerationStructure
.
This struct packages together parameters for the
CommandBuffer.BuildRayTracingAccelerationStructure
and
RayTracingAccelerationStructure.Build
methods. Use the different ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f5aa9fe58690 | unity_docs | math | What is `PlayerSettings.SetGraphicsAPIs` in Unity? Explain its purpose and usage. | PlayerSettings.SetGraphicsAPIs
Declaration
public static void
SetGraphicsAPIs
(
BuildTarget
platform
,
GraphicsDeviceType[]
apis
);
Parameters
Parameter
Description
platform
Platform to set APIs for.
apis
Array of graphics APIs.
Description
Sets the graphics APIs used on a build platform.
By default ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_71cb5d227952_doc_1 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Provides thread safe alternatives to some static properties of .
Signature:
```csharp
public static class Application
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_man_97e19a607fe0 | unity_docs | scripting | In Unity's 'Use Unity through web proxies', what is 'Windows' and how does it work? | Unity version
Proxy authentication Solution Other information
Editor 2022.3.21f1 or later and Hub version 3.4.2 or later
Accepts basic authentication
Do these tasks:
Enable automatic proxy configuration
.
Store your credentials in Credential Manager (Windows)
.
Refer to footnote 1 that follows this table.
Editor 2022.3... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ee3a736a4895 | unity_docs | ui | What is `Audio.AudioMixer.SetFloat` in Unity? Explain its purpose and usage. | AudioMixer.SetFloat
Declaration
public bool
SetFloat
(string
name
,
float
value
);
Parameters
Parameter
Description
name
The name of an exposed Audio Mixer group parameter. To expose a parameter, go to the Audio Mixer group's Inspector window, right click the parameter you want to expose, and choose
Expose... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ff2c17d9a14f | unity_docs | scripting | Show me a Unity C# example demonstrating `Search.PropertyDatabase.Invalidate`. | PropertyDatabase.Invalidate
Declaration
public void
Invalidate
(ref
Search.PropertyDatabaseRecordKey
recordKey
);
Parameters
Parameter
Description
recordKey
A record key.
Description
Invalidates a single property record so it is no longer retrievable.
```
// Store a property.
var propertyRecordKey = Pro... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e476c8807ef7 | unity_docs | rendering | Explain '2D game perspectives reference' in Unity. | Decide what game perspective or viewpoint you want your game to have. The following table describes the main types of 2D game perspective:
Game perspective Description Top-down
A 2D game that provides an overhead or bird’s-eye view of the action.
Side-on
A 2D game where the character moves left or right (or up and down... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3229345d156b | unity_docs | physics | Give me an overview of the `BoxCollider2D` class in Unity. | BoxCollider2D
class in
UnityEngine
/
Inherits from:
Collider2D
/
Implemented in:
UnityEngine.Physics2DModule
Description
Collider for 2D physics representing an axis-aligned rectangle.
Additional resources:
CircleCollider2D
,
PolygonCollider2D
,
EdgeCollider2D
.
Properties
Property
Description
autoTili... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c562b00a9bf2 | unity_docs | math | What is `Handles.ScaleValueHandle` in Unity? Explain its purpose and usage. | Handles.ScaleValueHandle
Declaration
public static float
ScaleValueHandle
(float
value
,
Vector3
position
,
Quaternion
rotation
,
float
size
,
Handles.CapFunction
capFunction
,
float
snap
);
Parameters
Parameter
Description
value
The value the user can modify.
position
The position of the handle... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c0076ac8bf22 | unity_docs | scripting | What is `Profiling.HierarchyFrameDataView.GetItemMarkerIDPath` in Unity? Explain its purpose and usage. | HierarchyFrameDataView.GetItemMarkerIDPath
Declaration
public void
GetItemMarkerIDPath
(int
id
,
List<int>
outFullIdPath
);
Parameters
Parameter
Description
id
Hierarchy item identifier.
outFullIdPath
List filled with marker identifiers of all ancestors of the item as a result of a method call.
Descripti... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4ed705edbc29 | unity_docs | scripting | What is `DelayedAttribute.ctor` in Unity? Explain its purpose and usage. | DelayedAttribute Constructor
Declaration
public
DelayedAttribute
();
Description
Attribute used to make a float, int, or string variable in a script be delayed.
When this attribute is used, the float, int, or text field will not return a new value until the user has pressed enter or focus is moved away from the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_89ecf4b567a1 | unity_docs | rendering | What is `Rendering.RenderPipelineManager.endContextRendering` in Unity? Explain its purpose and usage. | RenderPipelineManager.endContextRendering
Description
Delegate that you can use to invoke custom code at the end of
RenderPipeline.Render
.
When Unity calls
RenderPipeline.BeginContextRendering
at the end of
RenderPipeline.Render
, it executes the methods in this delegate's invocation list.
In the Universal Ren... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_84a5e1366295 | unity_docs | scripting | What is `RequireComponent` in Unity? Explain its purpose and usage. | RequireComponent
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
The RequireComponent attribute automatically adds required components as dependencies.
When you add a script which uses RequireComponent to a GameObject, the required component is automatically added to the GameObject.
Th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_98ae8516765a | unity_docs | scripting | What are the parameters of `GUI.Window` in Unity? | Returns Rect Onscreen rectangle denoting the window's position and size. Description Make a popup window. Windows float above normal GUI controls, feature click-to-focus and can optionally be dragged around by the end user. Unlike other controls, you need to pass them a separate function that renders the GUI controls i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_32094c709e5e | unity_docs | physics | What is `PhysicsShape2D.useAdjacentStart` in Unity? Explain its purpose and usage. | PhysicsShape2D.useAdjacentStart
public bool
useAdjacentStart
;
Description
When the value is true, then the shape will use the
adjacentStart
feature. When the value is false, then the shape will not use the
adjacentStart
feature.
This property is identical to
EdgeCollider2D.useAdjacentStartPoint
.
NOTE
: T... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_7c59f1b91a24_doc_1 | github | scripting | What does `Awake` do in this Unity script? Explain its purpose and signature. | A Unity event function that is called when an enabled script instance is being loaded.
Signature:
```csharp
protected virtual void Awake()
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_229ec3c380cd | unity_docs | editor | What is `SerializedProperty.DeleteCommand` in Unity? Explain its purpose and usage. | SerializedProperty.DeleteCommand
Declaration
public bool
DeleteCommand
();
Description
Deletes the array element referenced by the SerializedProperty.
The serialized property can't be used anymore after calling this function. A new iterator must be created in that case.
Additional resources:
DeleteArrayElemen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_dff4b7998d6c | unity_docs | rendering | In Unity's 'Reflective Bumped Specular', what is 'Normal Mapped Properties' and how does it work? | Like a Diffuse shader, this computes a simple (Lambertian) lighting model. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on the angle, and does not change as the camera moves or rotates around.
Normal mapping
simulates small surface details using a text... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_86f7c9282a44 | unity_docs | editor | In Unity's 'Install the platform package for Embedded Linux', what is 'Installation' and how does it work? | To install the platform package for Embedded Linux on your system, follow these steps:
On the
Unity Embedded Linux releases page
, go to
EmbeddedLinux builds
.
Note:
If you’re unable to access the Embedded Linux releases page, contact your Account Manager or the
Unity Sales
team.
Select the folder for the specific Unit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0cafc2a7bd78 | unity_docs | scripting | What is `Handheld.StartActivityIndicator` in Unity? Explain its purpose and usage. | Handheld.StartActivityIndicator
Declaration
public static void
StartActivityIndicator
();
Description
Starts os activity indicator.
Please be warned that this informs os ui system to start.
For actual animation to take effect you usually need to wait till the end of this frame.
So if you want activity indicator... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6a41c3ec3a3a | unity_docs | editor | Explain 'Cloud Save' in Unity. | com.unity.services.cloudsave
## Description
Build better player experiences with seamless game data stored securely in the cloud.
Use Cloud Save to store your players progress and preferences, by doing so you can share this data between all the players devices and any game backend services.
## Released for Unity
Pa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_037a8061c0bd | unity_docs | ui | Show me a Unity C# example demonstrating `SettingsProvider.OnTitleBarGUI`. | SettingsProvider.OnTitleBarGUI
Declaration
public void
OnTitleBarGUI
();
Description
Use this function to override drawing the title for the SettingsProvider using IMGUI. This allows you to add custom UI (such as a toolbar button) next to the title.
AssetSettingsProvider
uses this mecanism to display the "add ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4f947884e6d9 | unity_docs | networking | What is `Android.AndroidConfiguration.fontScale` in Unity? Explain its purpose and usage. | AndroidConfiguration.fontScale
public float
fontScale
;
Description
Mirrors the Android property
fontScale
.
For information about this property, refer to the Android developer documentation on
fontScale
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_58c688beb50f | unity_docs | rendering | What is `TerrainTools.IOnInspectorGUI.ShowBrushesGUI` in Unity? Explain its purpose and usage. | IOnInspectorGUI.ShowBrushesGUI
Declaration
public void
ShowBrushesGUI
(int
spacing
,
TerrainTools.BrushGUIEditFlags
flags
,
int
textureResolutionPerTile
);
Parameters
Parameter
Description
spacing
Pixel spacing for the brush GUI controls.
flags
Specifies which brush controls to display in the Terrain t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_27e8c9e5dfff_doc_2 | github | scripting | What does `OnGetFromPool` do in this Unity script? Explain its purpose and signature. | Called when the object is retrieved from the pool.This method must be implemented by the derived class to specify custom behavior when the object is used.
Signature:
```csharp
public abstract void OnGetFromPool();
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_d95e48c85787 | unity_docs | scripting | What are the parameters of `SceneManagement.SceneManager.SetActiveScene` in Unity? | Returns bool Returns false if the Scene is not loaded yet. Description Set the Scene to be active. The active Scene is the Scene which will be used as the target for new GameObjects instantiated by scripts and from what Scene the lighting settings are used. When you add a Scene additively (see LoadSceneMode.Additive ),... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_976ebfebe4f0_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Switches the Color Space to Linear
Signature:
```csharp
public class ColorSpaceSetupStep : ISetupStep
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fd5ed6879e8d | unity_docs | physics | What is `JointMotor2D` in Unity? Explain its purpose and usage. | JointMotor2D
struct in
UnityEngine
/
Implemented in:
UnityEngine.Physics2DModule
Description
Parameters for the optional motor force applied to a Joint2D.
Additional resources:
HingeJoint2D
class,
SliderJoint2D
class.
Properties
Property
Description
maxMotorTorque
The maximum force that can be applied t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_69122ddbd4bf | unity_docs | rendering | In Unity's 'Toggle shader keywords in the Editor', what is 'Toggle keyword sets' and how does it work? | To toggle keywords in a set so they’re mutually exclusive, add a property with the attribute
KeywordEnum
. Unity creates a dropdown with all the keywords. When you enable one keyword in the set, Unity disables the others.
Follow these steps:
Declare the keyword set in the format
SETNAME_KEYWORDNAME
. For example:
```
#... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7d7ef29c17a7 | unity_docs | rendering | In Unity's 'Conservative command in ShaderLab reference', what is 'Syntax' and how does it work? | This command makes a change to the render state. Use it in a Pass block to set the render state for that Pass, or use it in a SubShader block to set the render state for all Passes in that SubShader.
Signature
Example syntax Function Conservative <enabled>
Conservative True
Enables or disables conservative rasterizatio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7148ff5007a6 | unity_docs | scripting | Show me a Unity C# example demonstrating `SystemLanguage.Hindi`. | SystemLanguage.Hindi
Description
Hindi.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Hindi language
if (Application.systemLanguage == SystemLanguage.Hindi)
{
//Outputs into console that the system is Hindi
Debug.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c4a2f90fb24b | unity_docs | scripting | What is `Compilation.CompilationPipeline.GetAssemblyRootNamespaceFromScriptPath` in Unity? Explain its purpose and usage. | CompilationPipeline.GetAssemblyRootNamespaceFromScriptPath
Declaration
public static string
GetAssemblyRootNamespaceFromScriptPath
(string
sourceFilePath
);
Parameters
Parameter
Description
sourceFilePath
Source (script) file path.
Returns
string
Returns the root namespace for the given script. If there ... | 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.