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 |
|---|---|---|---|---|---|
gh_9e716cf088cb | github | scripting | Write a Unity Editor script for FB Composition Layer Alpha Blend | ```csharp
// SPDX-FileCopyrightText: 2024 Michael Nisbet <me@mikesky.dev>
// SPDX-License-Identifier: MIT
using System;
using System.Runtime.InteropServices;
using UnityEngine.XR.OpenXR.Features;
using UnityEngine.XR.OpenXR;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.XR.OpenXR.Features;
#endif
namespace ... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_man_b23ee3ef2d13 | unity_docs | rendering | In Unity's 'Windows build settings reference', what is 'Modify and rebuild your application' and how does it work? | To modify your application or distribute the built code (for example, if you want to sign it or modify the built executable metadata), you must rebuild your project and place the output in your built game directory.
Modifying the built executable metadata, such as the publisher or company name is necessary to ensure th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_64d65bfefa9e | unity_docs | editor | What is `EditorGUI.SelectableLabel` in Unity? Explain its purpose and usage. | EditorGUI.SelectableLabel
Declaration
public static void
SelectableLabel
(
Rect
position
,
string
text
,
GUIStyle
style
= EditorStyles.label);
Parameters
Parameter
Description
position
Rectangle on the screen to use for the label.
text
The text to show.
style
Optional
GUIStyle
.
Description
Make... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_58dfe2587824 | unity_docs | editor | What is `TextureImporter.GetPlatformTextureSettings` in Unity? Explain its purpose and usage. | TextureImporter.GetPlatformTextureSettings
Declaration
public bool
GetPlatformTextureSettings
(string
platform
,
out int
maxTextureSize
,
out
TextureImporterFormat
textureFormat
,
out int
compressionQuality
,
out bool
etc1AlphaSplitEnabled
);
Parameters
Parameter
Description
platform
The platform for ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_7fe1fc6816c1_doc_3 | github | scripting | What does `GetUnityClass` do in this Unity script? Explain its purpose and signature. | Converts this PlainMesh class into its Unity Mesh equivalent
Signature:
```csharp
public Material GetUnityClass()
``` | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_81eba57e2553 | unity_docs | editor | Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.GetBuildPropertyForConfig`. | e name of the build property.
Returns
string
The specified build property value.
Description
Gets a build property value for the given name in the specified build configuration(s). If a property has multiple values they are delimited by a space.
Duplicate build properties are ignored. Values for names
LIBRARY... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_988702adc42d | unity_docs | editor | Explain 'Visualizing profiler counters' in Unity. | Once you’ve
added Profiler counters to your code
, you can visualize them in the Profiler window, or in a build of your application.
## Visualizing custom counters in the Profiler window
To view the data that ProfilerCounter or ProfilerCounterValue generates in the Profiler window, you can use a
custom Profiler modul... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e121ef363954 | unity_docs | scripting | Show me a Unity C# example demonstrating `Transform.hasChanged`. | transform can be anything that can cause its matrix to be recalculated: any adjustment to its position, rotation or scale. Note that operations which can change the transform will not actually check if the old and new value are different before setting this flag. So setting, for instance, transform.position will always... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_86bac38b94f9 | unity_docs | performance | In Unity's 'Adding profiling information to your code introduction', what is 'Profiler counters' and how does it work? | To display custom metrics in the Unity profiler, use the ProfilerCounter API in the
Unity Profiling Core
package. The Profiler can display data from ProfilerCounter or
ProfilerCounterValue
.
Unity groups Profiler counters into categories based on the type of work the counters profile, for example, Rendering, Scripting,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ae4a67f23a22 | unity_docs | input | In Unity's 'UI Toolkit project settings', what is 'Advanced' and how does it work? | The UI Toolkit Event Debugger is an experimental feature that helps you to discover how various UI Toolkit events, such as input, layout, and paint, are handled. The
UI Toolkit Event Debugger
window is disabled by default. To enable it, Select
Enable Event Debugger
. To access it once enabled, select
Windows
>
UI Toolk... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_73b46d4f9303 | unity_docs | physics | What is `ApplicationTitleDescriptor` in Unity? Explain its purpose and usage. | ApplicationTitleDescriptor
class in
UnityEditor
Description
Utility class containing all the information necessary to format Unity Editor main window title. All the various fields are concatenated to create a fully formed title. If only
ApplicationTitleDescriptor.title
is provided, this will become the complete ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a107e242b9ec | unity_docs | scripting | What is `PropertyName.Equals` in Unity? Explain its purpose and usage. | PropertyName.Equals
Declaration
public bool
Equals
(object
other
);
Description
Determines whether this instance and a specified object, which must also be a PropertyName object, have the same value. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ad5b8be80a82 | unity_docs | editor | What is `ShortcutManagement.IShortcutManager` in Unity? Explain its purpose and usage. | IShortcutManager
interface in
UnityEditor.ShortcutManagement
Description
Represents a manager that configures a particular instance of the shortcuts system.
The manager maintains a list of
available
profiles which can be retrieved with
GetAvailableProfiles
. Some of the methods require the passed profile ID to... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6b0f57b9dc33 | unity_docs | math | What is `Search.ParsedQuery_1.returnPayloadIfEmpty` in Unity? Explain its purpose and usage. | ParsedQuery<T0>.returnPayloadIfEmpty
public bool
returnPayloadIfEmpty
;
Description
Boolean. Indicates if the original payload should be returned when the query is empty.
If set to true, returns the original payload when the query is empty. If set to false, returns an empty array.
```csharp
using System.Collec... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6664c9556bfc | unity_docs | scripting | What is `Application.logMessageReceivedThreaded` in Unity? Explain its purpose and usage. | Application.logMessageReceivedThreaded
Description
Event that is fired if a log message is received.
This event will be triggered regardless of whether the message comes in on the main thread or not. This means that the handler code has to be thread-safe. It may be invoked from different threads and may be invoked ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f706c0d09bd6 | unity_docs | scripting | Show me a Unity C# example demonstrating `Caching.ClearCachedVersion`. | CachedVersion
Declaration
public static bool
ClearCachedVersion
(string
assetBundleName
,
Hash128
hash
);
Parameters
Parameter
Description
assetBundleName
The AssetBundle name.
hash
Version needs to be cleaned.
Returns
bool
Returns true when cache clearing succeeded. Can return false if any cached b... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f77ed96b5ff1 | unity_docs | editor | What is `Search.ISearchView.results` in Unity? Explain its purpose and usage. | ISearchView.results
public
Search.ISearchList
results
;
Description
Returns the list of all search results.
```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Search;
static class Example_ISearchView_results
{
static ISearchList s_Results;
static ISearchView s_View;
[MenuItem("Examples/ISe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5478502f0c5f | unity_docs | scripting | Show me a Unity C# example demonstrating `Rect.zero`. | Rect.zero
public static
Rect
zero
;
Description
Shorthand for writing
new Rect(0,0,0,0)
.
Additional resources:
Rect
.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
Rect initialBox = Rect.zero;
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f3d4d8786507 | unity_docs | scripting | What is `UIElements.BaseTreeViewController.CollapseItem` in Unity? Explain its purpose and usage. | BaseTreeViewController.CollapseItem
Declaration
public void
CollapseItem
(int
id
,
bool
collapseAllChildren
,
bool
refresh
);
Parameters
Parameter
Description
id
The item ID.
collapseAllChildren
Whether the whole hierarchy under that item will be collapsed.
refresh
Whether to refresh items or not. Set ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_598e8c5474ae | unity_docs | editor | Show me a Unity C# example demonstrating `Search.SearchProvider.active`. | SearchProvider.active
public bool
active
;
Description
Indicates if the search provider is active or not. Inactive search providers are ignored by the search service. The active state can be toggled in the search settings.
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text;
using U... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_aabd8d034dab | github | scripting | Write a Unity C# script called Modify Stencil Grid Size Command | ```csharp
// Copyright 2021 The Open Brush Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_3d0e7ec7a53b | unity_docs | editor | What is `MouseCursor.Text` in Unity? Explain its purpose and usage. | MouseCursor.Text
Description
Text cursor.
```csharp
//Create a folder and name it “Editor” if this doesn’t already exist
//Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a small window that has a color box in it.
//Hov... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_af0782067447 | unity_docs | physics | In Unity's 'Manage results tables', what is 'Customize columns' and how does it work? | You can customize the name, icon, alignment and whether the column is sortable.
To edit your column, right-click the column header and select
Edit <column name>
.
Field Description Format
Changes the data about the results to another format. If the result has no data for the new format (for example asking for color inf... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_19ec9a415269 | unity_docs | xr | In Unity's 'Set up your Apache server configuration for Web builds', what is 'Use the virtual host in.htaccessmethod' and how does it work? | If you’re unable to modify
httpd.conf
, for example, due to unavailable admin rights to your web hosting, but your Apache supports.htaccess
, then you can configure.htaccess
in the following way:
```
# NOTE: "mod_mime" Apache module must be enabled for this configuration to work.
<IfModule mod_mime.c>
# The following ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_22a63aeebee1 | unity_docs | scripting | In Unity's 'TreeView', what is 'Bind the TreeView to data' and how does it work? | You can bind the TreeView to a data source. The data source can be a list of objects or a list of strings.
The following example binds a TreeView to a custom type.
```
treeView.makeItem = () => new VisualElement();
var item = new VisualElement();
treeView.bindItem = (item, i) =>
{
var c = treeView.GetItemDataForIndex... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_92caf71fc433 | unity_docs | scripting | Show me a Unity C# example demonstrating `EditorGUILayout.Space`. | ration
public static void
Space
(float
width
,
bool
expand
);
Parameters
Parameter
Description
width
The width of the empty space. Use this for horizontal layout.
expand
Option passed to enable or disable horizontal expansion.
Description
Make a small space between the previous control and the following.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_d62165df1ed8 | unity_docs | rendering | Explain 'Adding a device' in Unity. | To add a new device to the Device Simulator, you create a device definition and a device overlay.
A device definition is a text file with the.device
extension in your Unity project. It contains JSON that describes the properties of a device.
A device overlay is an image that contains the border of the device screen, to... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5702503b7c0b | unity_docs | math | What is `Quaternion` in Unity? Explain its purpose and usage. | Quaternion
struct in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Quaternions are used to represent rotations.
A quaternion is a four-tuple of real numbers {x,y,z,w}. A quaternion is a mathematically convenient alternative to the euler angle representation. You can interpolate a quaternion ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1b32744385c7 | unity_docs | rendering | In Unity's 'Materials and shaders', what is 'Additional resources and examples' and how does it work? | 👥
Community
:
Join the conversation on Unity Discussions for Graphics
📖
E-Book
:
Introduction to the Universal Render Pipeline for advanced creators (Unity 6 edition)
📖
E-Book
:
Create popular shaders and visual effects with the Universal Render Pipeline (Unity 6 edition)
📺
Video
:
20 advanced 2D shader effects - p... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_42d536c7b89f | unity_docs | scripting | What is `Search.IQueryEngineFilter.stringComparison` in Unity? Explain its purpose and usage. | IQueryEngineFilter.stringComparison
public stringComparison
stringComparison
;
Description
The string comparison options of the filter.
When a filter is created with a string comparison option, this property is included with
overridesStringComparison
to indicate
stringComparison
should be used instead of th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3ecd07fcbc02 | unity_docs | scripting | What is `Experimental.GraphView.EdgeConnector_1.RegisterCallbacksOnTarget` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
EdgeConnector<T0>.RegisterCallbacksOnTarget
Declaration
protected void
RegisterCallbacksOnTarget
();
Description
Called to register click event callbacks on the target element. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b4c956580bb7 | unity_docs | scripting | What is `WSABuildAndRunDeployTarget.DevicePortal` in Unity? Explain its purpose and usage. | WSABuildAndRunDeployTarget.DevicePortal
Description
Runs the app on a remote Windows device using the Windows DevicePortal (WDP) transport.
To use this option, DevicePortal must be enabled on the target device and the
connection address
must be provided.
Additionally, if DevicePortal authentication is enabled, th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_66d2a591b77e | unity_docs | scripting | What is `SceneManagement.PreviewSceneStage.OnOpenStage` in Unity? Explain its purpose and usage. | PreviewSceneStage.OnOpenStage
Declaration
protected bool
OnOpenStage
();
Returns
bool
If your Stage opened successfully return
true
, otherwise return
false
.
Description
Unity calls this method when the Stage is opened. Classes that inherit from PreviewSceneStage should implement initialization logic in... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2025cfd7db8f | unity_docs | animation | What is `Animations.IConstraint` in Unity? Explain its purpose and usage. | IConstraint
interface in
UnityEngine.Animations
Description
The common interface for constraint components.
Properties
Property
Description
constraintActive
Activate or deactivate the constraint.
locked
Lock or unlock the offset and position at rest.
sourceCount
Gets the number of sources currently set on th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_96141f562e2b | unity_docs | scripting | What is `SceneVisibilityManager.IsPickingEnabledOnAllDescendants` in Unity? Explain its purpose and usage. | SceneVisibilityManager.IsPickingEnabledOnAllDescendants
Declaration
public bool
IsPickingEnabledOnAllDescendants
(
GameObject
gameObject
);
Parameters
Parameter
Description
gameObject
GameObject on which to do the check.
Returns
bool
Returns true if all descendants of the GameObject are pickable.
Des... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_904d35dbb9e5 | unity_docs | scripting | What is `SceneManagement.SceneManagerAPI.GetSceneByBuildIndex` in Unity? Explain its purpose and usage. | SceneManagerAPI.GetSceneByBuildIndex
Declaration
protected
SceneManagement.Scene
GetSceneByBuildIndex
(int
buildIndex
);
Parameters
Parameter
Description
buildIndex
Build index as returned by SceneManagement.SceneManagerApi.GetNumScenesInBuildSettings.
Returns
Scene
A reference to the Scene, if valid. ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_fa6eb785598e_doc_3 | github | scripting | What does `GetInheritedTypes` do in this Unity script? Explain its purpose and signature. | Get all Inherited from Types
Signature:
```csharp
public static List<Type> GetInheritedTypes(Type baseType, params Assembly[] assemblies)
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_26509779beb5 | unity_docs | scripting | What is `AI.NavMesh.GetAreaCost` in Unity? Explain its purpose and usage. | NavMesh.GetAreaCost
Declaration
public static float
GetAreaCost
(int
areaIndex
);
Parameters
Parameter
Description
areaIndex
Index of the area to get.
Description
Gets the cost for path finding over geometry of the area type.
The value applies to all agents unless you the value has been customized per age... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e89909cbb3b9 | unity_docs | scripting | What is `AnimatedValues.AnimFloat.ctor` in Unity? Explain its purpose and usage. | AnimFloat Constructor
Declaration
public
AnimFloat
(float
value
);
Declaration
public
AnimFloat
(float
value
,
Events.UnityAction
callback
);
Parameters
Parameter
Description
value
Start Value.
Description
Constructor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a42bd32f8698 | unity_docs | physics | What is `PhysicsVisualizationSettings.GetShowSphereColliders` in Unity? Explain its purpose and usage. | PhysicsVisualizationSettings.GetShowSphereColliders
Declaration
public static bool
GetShowSphereColliders
();
Description
Should SphereColliders be shown.
Additional resources:
SphereCollider
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5fd6b12ebc99 | unity_docs | scripting | What is `SearchService.ISearchEngine_1.Search` in Unity? Explain its purpose and usage. | ISearchEngine<T0>.Search
Declaration
public IEnumerable<T>
Search
(
SearchService.ISearchContext
context
,
string
query
,
Action<IEnumerable<T>>
asyncItemsReceived
);
Parameters
Parameter
Description
context
The search context.
query
The query string used for the search.
asyncItemsReceived
Callback us... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f6bc3dc82b40 | unity_docs | scripting | Show me a Unity C# example demonstrating `Vector3.LerpUnclamped`. | When
t
≤ 0, this method returns a vector that points along the line through
a
and
b
but in front of
a
.
When 0 <
t
< 1, this method returns a vector that points along the line between
a
and
b
. The distance along the line corresponds to the fraction represented by
t
.
When
t
> 1, this this method retur... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d2a6ce9cf5bb | unity_docs | ui | What is `UIElements.ToggleButtonGroupState.Equals` in Unity? Explain its purpose and usage. | ToggleButtonGroupState.Equals
Declaration
public bool
Equals
(
UIElements.ToggleButtonGroupState
other
);
Parameters
Parameter
Description
other
A ToggleButtonGroupState to be compared against.
Returns
bool
True if both option has the same data and number of options, otherwise returns false.
Descript... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8eb39a1be170 | unity_docs | rendering | Show me a Unity code example for 'JavaScript interface in Unity Web builds'. | rror
to display a permanent error message on top of the canvas.
Use
type == warning
to show a yellow highlight color over the message.
The following code from the default WebGL template sets the appearance of the error and warning banners. In your custom template, you can override this function to create your own banne... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_082e2e063fbc | unity_docs | scripting | Show me a Unity C# example demonstrating `Application.backgroundLoadingPriority`. | rride it:
Universal Windows Platform -
ThreadPriority.High
Consoles -
ThreadPriority.Normal
Background loading thread uses
backgroundLoadingPriority
directly. This property's value is passed to the operating system as that thread's scheduling priority, with no conversion or indirection.
The Profiler marker
Appl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cc34d3d08446 | unity_docs | rendering | What is `Rendering.ShadowCastingMode` in Unity? Explain its purpose and usage. | ShadowCastingMode
enumeration
Description
How shadows are cast from this object.
Additional resources:
Renderer.shadowCastingMode
.
Properties
Property
Description
Off
No shadows are cast from this object.
On
Shadows are cast from this object.
TwoSided
Shadows are cast from this object, treating it as two-s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_71a943dc6436 | unity_docs | input | Show me a Unity C# example demonstrating `AI.NavMesh.SetAreaCost`. | Index of the area to set.
cost
New cost.
Description
Sets the cost for finding path over geometry of the area type on all agents.
This will replace any custom area costs on all agents, and set the default cost for new agents that are created after calling the function. The cost must be larger than 1.0.
Use
GetAre... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_961d36c32dc5 | unity_docs | scripting | What is `Experimental.GraphView.Group.AcceptsElement` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Group.AcceptsElement
Declaration
public bool
AcceptsElement
(
Experimental.GraphView.GraphElement
element
,
ref string
reasonWhyNotAccepted
);
Parameters
Parameter
Description
element
The element to add.
reasonWhyNotAc... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ded0c72cb126 | unity_docs | ui | What are the parameters of `UIElements.MinMaxSlider.ctor` in Unity? | Description Constructor. Declaration public MinMaxSlider (string label ,
float minValue ,
float maxValue ,
float minLimit ,
float maxLimit ); Parameters Parameter Description minValue The minimum value in the range to be represented. maxValue The maximum value in the range to be represented. minLimit The minimum value ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_95c369de90f2 | unity_docs | xr | Show me a Unity C# example demonstrating `LightTransport.BakeProgressState`. | porting.
BakeProgressState is commonly used with:
InputExtraction.PopulateWorld
for world population progress.
IProbeIntegrator
methods for integration progress tracking.
Long-running light transport operations that benefit from progress feedback.
The progress state uses a work-step model where the total expected... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_31ba7c3115c1 | unity_docs | audio | What is `AudioSettings.dspTime` in Unity? Explain its purpose and usage. | AudioSettings.dspTime
public static double
dspTime
;
Description
Returns the current time of the audio system.
This is a value specified in seconds and based on the actual number of samples the audio system processes and is therefore much more precise than the time obtained via the
Time.time
property.
```cs... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_09f573f0e185 | unity_docs | audio | Show me a Unity C# example demonstrating `AudioSource.UnPause`. | d.
This is also useful if you have paused one-shots and want to resume playback without creating a new playback voice for the attached AudioClip.
If you use
UnPause
on an AudioSource that hasn't played before or has stopped, the audio will not play. This is because
UnPause
resumes the clip from when the clip was la... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5999286ead9d | unity_docs | scripting | What is `XR.XRDisplaySubsystem.XRRenderPass.GetRenderParameterCount` in Unity? Explain its purpose and usage. | XRDisplaySubsystem.XRRenderPass.GetRenderParameterCount
Declaration
public int
GetRenderParameterCount
();
Returns
int
Count of render parameters.
Description
The number of
XRRenderParameter
entries for this
XRRenderPass
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9698d58c6326 | unity_docs | scripting | What is `GraphicsBuffer.CopyCount` in Unity? Explain its purpose and usage. | GraphicsBuffer.CopyCount
Declaration
public static void
CopyCount
(
ComputeBuffer
src
,
ComputeBuffer
dst
,
int
dstOffsetBytes
);
Declaration
public static void
CopyCount
(
GraphicsBuffer
src
,
ComputeBuffer
dst
,
int
dstOffsetBytes
);
Declaration
public static void
CopyCount
(
ComputeBuffer
sr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_89b3820379d1 | unity_docs | scripting | Show me a Unity C# example demonstrating `Experimental.Audio.AudioSampleProvider`. | s VideoPlayer.
This class is meant to be usable outside the main thread and the implementation assumes a single consumer at a time invoking
AudioSampleProvider.ConsumeSampleFrames
. Audio data can be accessed both from C# and from C++, depending on what has to be done with this data.
The following is an example of ho... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e69ba04b9861 | unity_docs | rendering | What is `Rendering.CommandBuffer.SetGlobalDepthBias` in Unity? Explain its purpose and usage. | CommandBuffer.SetGlobalDepthBias
Declaration
public void
SetGlobalDepthBias
(float
bias
,
float
slopeBias
);
Parameters
Parameter
Description
bias
Scales the GPU's minimum resolvable depth buffer value to produce a constant depth offset. The minimum resolvable depth buffer value varies by device.
Set to a n... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5ecb9ffe1925 | unity_docs | scripting | What is `Unity.Android.Gradle.BuildTypes` in Unity? Explain its purpose and usage. | BuildTypes
class in
Unity.Android.Gradle
/
Inherits from:
Unity.Android.Gradle.BaseBlock
Description
The C# definition of the
buildTypes
element in a gradle file.
For more information about the element, see Android's documentation:
Configure build types
Constructors
Constructor
Description
BuildTypes
Ele... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_df3d316597cb | unity_docs | rendering | What is `Experimental.Playables.CameraPlayable` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
CameraPlayable
struct in
UnityEngine.Experimental.Playables
/
Implemented in:
UnityEngine.CoreModule
Implements interfaces:
IPlayable
Description
An implementation of
IPlayable
that produces a
Camera
texture.
NOTE: You ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bb9580e77fc4 | unity_docs | rendering | What is `Rendering.GraphicsTextureDescriptor.numSamples` in Unity? Explain its purpose and usage. | GraphicsTextureDescriptor.numSamples
public int
numSamples
;
Description
The number of samples per pixel in the GraphicsTexture.
Must always be 1 or more. A value greater than 1 indicates that the GraphicsTexture is using multi-sampled anti-aliasing,
which requires
GraphicsTextureDescriptorFlags.RenderTarget
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cc458e24e8fe | unity_docs | scripting | Give me an overview of the `TerrainRenderFlags` class in Unity. | TerrainRenderFlags
enumeration
Description
Enum provding terrain rendering options.
Properties
Property
Description
Heightmap
Render heightmap.
Trees
Render trees.
Details
Render terrain details.
All
Render all options. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9d9772838fc2 | unity_docs | rendering | Explain 'Audio Chorus Filter' in Unity. | The
Audio Chorus Filter
takes an
Audio Clip
and processes it creating a chorus effect.
## Properties
Property:
Function:
Dry Mix
Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5.
Wet Mix 1
Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5.
Wet Mix 2
Volume of 2nd chorus tap. This tap is 90 deg... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6bb464c93664 | unity_docs | scripting | What is `Vector3.right` in Unity? Explain its purpose and usage. | Vector3.right
public static
Vector3
right
;
Description
Shorthand for writing
Vector3(1, 0, 0)
.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
void Example()
{
transform.position += Vector3.right * Time.deltaTime;
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4340e44bfd73 | unity_docs | editor | What is `SceneManagement.StageUtility.GoBackToPreviousStage` in Unity? Explain its purpose and usage. | StageUtility.GoBackToPreviousStage
Declaration
public static void
GoBackToPreviousStage
();
Description
Navigate the Editor to the previous stage.
This is equivalent to clicking the previous breadcrumb in the Scene view while in Prefab Mode. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_02d7f72bc2b2 | unity_docs | rendering | What is `Shader.SetGlobalBuffer` in Unity? Explain its purpose and usage. | Shader.SetGlobalBuffer
Declaration
public static void
SetGlobalBuffer
(string
name
,
ComputeBuffer
value
);
Declaration
public static void
SetGlobalBuffer
(int
nameID
,
ComputeBuffer
value
);
Declaration
public static void
SetGlobalBuffer
(string
name
,
GraphicsBuffer
value
);
Declaration
pub... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_defa71ed4637 | unity_docs | editor | Show me a Unity C# example demonstrating `AssetDatabase.GUIDFromAssetPath`. | DFromAssetPath
Declaration
public static GUID
GUIDFromAssetPath
(string
path
);
Parameters
Parameter
Description
path
Project relative path for the asset.
Returns
GUID
The GUID of the asset. An all-zero GUID denotes an invalid asset path.
Description
Get the GUID for the asset at
path
.
All paths a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f4aa32e17667 | unity_docs | editor | What is `EditorGUIUtility.GetFlowLayoutedRects` in Unity? Explain its purpose and usage. | EditorGUIUtility.GetFlowLayoutedRects
Declaration
public static List<Rect>
GetFlowLayoutedRects
(
Rect
rect
,
GUIStyle
style
,
float
horizontalSpacing
,
float
verticalSpacing
,
List<string>
items
);
Parameters
Parameter
Description
rect
Area where to layout the items.
style
Style for the items.
hor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f93ff6832a9c | unity_docs | scripting | What is `UIElements.UxmlUnsignedLongAttributeDescription` in Unity? Explain its purpose and usage. | UxmlUnsignedLongAttributeDescription
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.TypedUxmlAttributeDescription_1
/
Implemented in:
UnityEngine.UIElementsModule
Description
Describes a UXML
ulong
attribute.
Properties
Property
Description
defaultValueAsString
The default value for the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_85e4b6247349 | unity_docs | scripting | Give me an overview of the `AssetBundleRequest` class in Unity. | AssetBundleRequest
class in
UnityEngine
/
Inherits from:
ResourceRequest
/
Implemented in:
UnityEngine.AssetBundleModule
Description
Asynchronous load request from an
AssetBundle
.
Additional resources:
AsyncOperation
.
Properties
Property
Description
allAssets
Asset objects with sub assets being loaded... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9ff1784a6646 | unity_docs | scripting | What are the parameters of `Physics.IgnoreCollision` in Unity? | Description Makes the collision detection system ignore all collisions between collider1 and collider2 . This is useful, say, for preventing projectiles from colliding with the object that fires them. Note that IgnoreCollision is not persistent. This means ignore collision state will not be stored in the editor when sa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_18bb84b071dc | unity_docs | physics | Show me a Unity C# example demonstrating `Rigidbody.OnCollisionStay`. | don't use collisionInfo in the function, leave out the collisionInfo parameter as this avoids unneccessary calculations.
Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events are sent to disabled MonoBehaviours, to allow enabling Behaviours in respon... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d07e479d017d | unity_docs | physics | What is `AreaEffector2D.angularDrag` in Unity? Explain its purpose and usage. | AreaEffector2D.angularDrag
public float
angularDrag
;
Description
The angular drag to apply to rigid-bodies.
The
angularDrag
coefficient is applied in addition to the standard
Rigidbody2D
angular drag coefficient to provide additional angular drag in the effector area. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b6bab8338bbb | unity_docs | math | Show me a Unity C# example demonstrating `Mesh.GetAllBoneWeights`. | number of non-zero weights for each vertex, and then use that to iterate over this data.
For each vertex, the
BoneWeight1
structs are sorted by
BoneWeight1.weight
, in descending order.
Additional resources:
Mesh.SetBoneWeights
,
Mesh.GetBonesPerVertex
,
Mesh.boneWeights
,
Mesh.GetBoneWeights
ModelImporter.max... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d1c18ef6685e | unity_docs | scripting | What is `Mesh.OptimizeIndexBuffers` in Unity? Explain its purpose and usage. | Mesh.OptimizeIndexBuffers
Declaration
public void
OptimizeIndexBuffers
();
Description
Optimizes the geometry of the Mesh to improve rendering performance.
This function causes the geometry of the mesh to be reordered internally in an attempt to improve vertex cache utilisation on the graphics hardware and thu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f73de9822513 | unity_docs | scripting | In Unity's 'Create TreeView with IMGUI', what is 'Initializing a TreeView' and how does it work? | The TreeView is initialized when the Reload method is called from a TreeView object.
There are two ways to set up a TreeView:
Create the full tree
- Create TreeViewItem s for all items in the tree model data. This is the default and requires less code to set up. The full tree is built when BuildRoot is called from a Tr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c6799c7c8d03 | unity_docs | physics | What is `UIElements.VisualElement.Hierarchy.RemoveAt` in Unity? Explain its purpose and usage. | VisualElement.Hierarchy.RemoveAt
Declaration
public void
RemoveAt
(int
index
);
Description
Remove the child element located at this position from this element's contentContainer
Removes the element from both the child list and the layout list.
If the index is out of range, an exception will be thrown.
T... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e5393548d249 | unity_docs | scripting | Show me a Unity C# example demonstrating `GUISkin.verticalScrollbarThumb`. | GUISkin.verticalScrollbarThumb
public
GUIStyle
verticalScrollbarThumb
;
Description
Style used by default for the thumb that is dragged in
GUI.VerticalScrollbar
controls.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Modifies only the vertical scrollbar thumb of the current GUISkin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_22c48f0f93d7_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Event invoked when the update job is scheduled.This is used internally for implementing dependencies between managed jobs.
Signature:
```csharp
public event Action<JobHandle> OnJobScheduled;
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
gh_d2865d5d2a9a | github | scripting | Write a Unity C# script called Item Color Palette Data | ```csharp
using UnityEngine;
namespace FactoryMustScale.Runtime.Visualization
{
/// <summary>
/// Runtime color lookup for item ids.
/// ItemId 0 is reserved for no payload.
/// </summary>
public struct ItemColorPaletteData
{
private readonly Color32[] _colorsByItemId;
private r... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_11db132fedad | unity_docs | scripting | What is `WSA.SecondaryTileData.backgroundColorSet` in Unity? Explain its purpose and usage. | SecondaryTileData.backgroundColorSet
public bool
backgroundColorSet
;
Description
Defines, whether backgroundColor should be used.
When false (default), backgroundColor is ignored and background is defined by the system. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6f19176450b1 | unity_docs | rendering | In Unity's 'Package versioning', what is 'Assets' and how does it work? | A project can reference any asset that is visible to the Asset Database. The Asset Database tracks these assets uniquely using the GUIDs defined in their.meta
files.
When you introduce one of these changes to the public API, this requires a new MAJOR release, because they are
breaking changes
:
Scenario:
Why these are ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b017f593d4b9 | unity_docs | scripting | Explain 'MultiColumnListView' in Unity. | A MultiColumnListView is a UI control commonly used to display tabular or grid-like data with multiple columns. It allows you to present data in a structured format, where each row represents an item or entry, and each column represents a specific attribute or property of that item.
## Create a MultiColumnListView
Yo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cf2b27bbe7c1 | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.dragMultiplier`. | ParticleSystem.LimitVelocityOverLifetimeModule.dragMultiplier
public float
dragMultiplier
;
Description
Specifies the drag multiplier.
Changing this property is more efficient than accessing the entire curve, if you only want to change the overall drag multiplier.
```csharp
using UnityEngine;
using System.Col... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_72abb564a349 | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormat.R8_UInt` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormat.R8_UInt
Description
A one-component, 8-bit unsigned integer format that has a single 8-bit R component. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_248ec553e828 | unity_docs | math | What is `Mesh.MeshData.GetVertexAttributeFormat` in Unity? Explain its purpose and usage. | Mesh.MeshData.GetVertexAttributeFormat
Declaration
public
Rendering.VertexAttributeFormat
GetVertexAttributeFormat
(
Rendering.VertexAttribute
attr
);
Parameters
Parameter
Description
attr
The vertex attribute to check the format of.
Returns
VertexAttributeFormat
Returns the format of the given verte... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f0c4224b4d97 | unity_docs | scripting | Explain 'Inspecting scripts' in Unity. | When you select a script asset in the
Project window
, the Inspector displays some basic information about it, including the name of the assembly it belongs to, and a preview of the contents.
Note:
Although the Inspector displays the contents of the script, you can’t edit the contents in the Inspector window.
The scrip... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_d5f9d370f872_doc_17 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Stores the "Left Hand" used with continuous movement when inputs should be relative to the left hand's orientation.
Signature:
```csharp
public Transform leftHandForwardSource
``` | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_man_7a3a65058cc3 | unity_docs | scripting | Show me a Unity code example for 'Best practices for calling Java/Kotlin code'. | practice to wrap any instance of AndroidJavaObject or AndroidJavaClass with a using statement to ensure Unity destroys them as soon as possible. If you don’t use using , Unity’s
garbage collector
will still release all created instances, but you lose control over when this happens.
The following code example demonstrat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_94489b1f9b36 | github | scripting | Write a Unity C# MonoBehaviour script called Board View | ```csharp
using System;
using System.Collections.Generic;
using Assets.Scripts.PacEngine.PacEngine.item;
using Assets.Scripts.View.characters.items;
using PacEngine;
using PacEngine.board.prizes;
using PacEngine.board.tiles;
using PacEngine.utils;
using UnityEngine;
using UnityEngine.Tilemaps;
public class... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7150b68cb907 | unity_docs | rendering | What is `WebCamKind.WideAngle` in Unity? Explain its purpose and usage. | WebCamKind.WideAngle
Description
Wide angle (default) camera.
On iOS devices, this value is reported directly by the hardware.
On Android devices, this value is reported for cameras with a calculated Equivalent Focal Length from 20mm to 45mm.
Additional resources:
WebCamDevice.kind
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9e05a34de811 | unity_docs | ui | What is `Input.GetKeyDown` in Unity? Explain its purpose and usage. | Input.GetKeyDown
Declaration
public static bool
GetKeyDown
(string
name
);
Description
Returns true during the frame the user starts pressing down the key identified by
name
.
Note
: This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_34c18591966a | unity_docs | editor | Explain '2D Tilemap Editor' in Unity. | com.unity.2d.tilemap
## Description
2D Tilemap Editor is a package that contains editor functionalities for editing Tilemaps.
## Version information
Core packages are fixed to a single version matching the Editor version. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b2e50e7c0987 | unity_docs | rendering | Explain 'Video Player component targets' in Unity. | Use the Video Player component to play videos (from a URL or
video clips
) on various surfaces in your
scene
.
The Video Player component lets you play video content on different targets, which changes where the video content displays in your scene. To change the video’s target, open the Video Player component and set ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_079ddc72b74b | unity_docs | editor | Explain 'Unity Profiling Core API' in Unity. | com.unity.profiling.core
## Description
The Unity Profiling Core package provides an API for code instrumentation markup, and for profiling statistic collection.
## Released for Unity
Package version 1.0.3 is released for Unity Editor version 6000.0. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_11bbdcb67f51 | unity_docs | xr | What is `Cache.spaceFree` in Unity? Explain its purpose and usage. | Cache.spaceFree
public long
spaceFree
;
Description
Returns the number of currently unused bytes in the cache.
When the cache is empty, this value equals
Cache.maximumAvailableStorageSpace
. As AssetBundles are stored in the cache, this value will decrease. Caching manages cached content based on a Least Recen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a905c8f80a59 | unity_docs | scripting | Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.AsRef`. | at its current memory location.
Description
Gets a reference to a struct at a specific memory location.
The
AsRef
method provides a reference to a struct directly in memory. This allows efficient data manipulation without copying. Use this method when performance is critical, and you must access data in-place. I... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_3fc186c84eea_doc_6 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | The input used to trigger spawn, if is set to .
Signature:
```csharp
public XRInputButtonReader spawnObjectInput
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_ddb820d2ca7c | unity_docs | scripting | What is `AI.NavMeshObstacle` in Unity? Explain its purpose and usage. | NavMeshObstacle
class in
UnityEngine.AI
/
Inherits from:
Behaviour
/
Implemented in:
UnityEngine.AIModule
Description
An obstacle for NavMeshAgents to avoid.
A NavMeshObstacle is cylindrical in shape and can move around the surface of the NavMesh with a specified velocity. By default, the obstacle will only a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_eb5e4e6a95a1 | unity_docs | scripting | Show me a Unity C# example demonstrating `Rigidbody.PublishTransform`. | y.PublishTransform
Declaration
public void
PublishTransform
();
Description
Applies the
position
and
rotation
of the Rigidbody to the corresponding
Transform
component.
This is more efficient than setting
Transform.position
and
Transform.rotation
manually.
Note: This method doesn't update the child T... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0b48af65a203 | unity_docs | ui | What is `UIElements.VisualElementExtensions.StretchToParentWidth` in Unity? Explain its purpose and usage. | VisualElementExtensions.StretchToParentWidth
Declaration
public static void
StretchToParentWidth
(
UIElements.VisualElement
elem
);
Parameters
Parameter
Description
elem
The element to be aligned with its parent
Description
Aligns a VisualElement's left and right edges with the corresponding edges of its... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e0337d0d33f9 | unity_docs | editor | What is `AssetDatabase.GetMainAssetTypeAtPath` in Unity? Explain its purpose and usage. | AssetDatabase.GetMainAssetTypeAtPath
Declaration
public static Type
GetMainAssetTypeAtPath
(string
assetPath
);
Parameters
Parameter
Description
assetPath
Filesystem path of the asset to load.
Returns
Type
Returns the type of the main asset object at
assetPath
.
Description
Obtains the type of the m... | 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.