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_74708c2003ce | unity_docs | scripting | Show me a Unity C# example demonstrating `Rigidbody.angularDamping`. | Rigidbody.angularDamping
public float
angularDamping
;
Description
The angular damping of the object.
Angular damping can be used to slow down the rotation of an object.
The higher the damping the more the rotation slows down.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : M... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_00e7f248081c | unity_docs | scripting | What is `Unity.Loading.ContentFileUnloadHandle` in Unity? Explain its purpose and usage. | ContentFileUnloadHandle
struct in
Unity.Loading
/
Implemented in:
UnityEngine.ContentLoadModule
Description
A handle that can be used to track the progress of an unload operation. This is returned from
ContentFile.UnloadAsync
.
Properties
Property
Description
IsCompleted
Returns true if the unload operation... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_35f638e7b96c | unity_docs | editor | Show me a Unity C# example demonstrating `Profiling.ProfilerCategoryInfo`. | ProfilerCategoryInfo
struct in
UnityEditor.Profiling
Description
Category information descriptor structure.
Contains the full information about a Profiler category such as its name, color, id, and flags.
Use with
FrameDataView.GetAllCategories
and
FrameDataView.GetCategoryInfo
to get information on the availa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2b53135b14dd | unity_docs | rendering | What is `ParticleSystemRenderer.flip` in Unity? Explain its purpose and usage. | ParticleSystemRenderer.flip
public
Vector3
flip
;
Description
Flip a percentage of the particles, along each axis.
Set between 0 and 1, where higher values cause a higher proportion of the particles to flip, and 1 causes all particles to flip.
```csharp
using UnityEngine;
using UnityEditor;
using System.Coll... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_68201e0da539 | unity_docs | rendering | What is `Rendering.RenderPipelineManager.beginContextRendering` in Unity? Explain its purpose and usage. | RenderPipelineManager.beginContextRendering
Description
Delegate that you can use to invoke custom code at the start of
RenderPipeline.Render
.
When Unity calls
RenderPipeline.BeginContextRendering
at the start of
RenderPipeline.Render
, it executes the methods in this delegate's invocation list.
In the Univers... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a1652f90fd25 | unity_docs | scripting | Show me a Unity C# example demonstrating `Application.platform`. | Application.platform
public static
RuntimePlatform
platform
;
Description
Returns the platform the game is running on (Read Only).
Use this property if you need to do some platform dependent work.
```csharp
using UnityEngine;public class ExampleClass : MonoBehaviour
{
void Start()
{
if (Application.platfo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_81221ab096b4 | unity_docs | editor | Give me an overview of the `PrefabAssetType` class in Unity. | PrefabAssetType
enumeration
Description
Enum indicating the type of Prefab Asset, such as Regular, Model and Variant.
For an object on a Prefab Asset, the asset itself is checked. For an object on a Prefab instance, its corresponding asset is checked.
Properties
Property
Description
NotAPrefab
The object being... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7e11d95baeba | unity_docs | scripting | What is `VideoCodec.VP8` in Unity? Explain its purpose and usage. | VideoCodec.VP8
Description
Encode video using the vp8 codec.
The VP8 video codec is supported by software on most platforms, and by hardware on a few platforms such as Android and Web.
For more information about video encoding, refer to
Video encoding compatibility reference
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a2b6e1503b63 | unity_docs | math | What is `Matrix4x4.lossyScale` in Unity? Explain its purpose and usage. | Matrix4x4.lossyScale
public
Vector3
lossyScale
;
Description
Attempts to get a scale value from the matrix. (Read Only)
Scale can only be represented correctly by a 3x3 matrix instead of a 3 component vector, if the given matrix has been skewed for example.
lossyScale
is a convenience property which attempt... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7ee555e5b253 | unity_docs | rendering | Explain 'Particle rendering and shading' in Unity. | Understand how the properties on the Renderer module interact to determine how a
particle
’s image or Mesh is transformed, shaded and overdrawn by other particles.
## Render Mode
Use
Render Mode
to choose between several 2D Billboard graphic modes and a Mesh mode. 3D Meshes give particles extra authenticity when they... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1115b43d0ca9 | unity_docs | editor | What is `PrefabUtility.UnloadPrefabContents` in Unity? Explain its purpose and usage. | PrefabUtility.UnloadPrefabContents
Declaration
public static void
UnloadPrefabContents
(
GameObject
contentsRoot
);
Parameters
Parameter
Description
contentsRoot
The root of the loaded Prefab contents.
Description
Releases the content from a Prefab previously loaded with LoadPrefabContents from memory.
T... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7d533612a19f | unity_docs | scripting | What is `Experimental.Rendering.DefaultFormat.LDR` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
DefaultFormat.LDR
Description
Represents the default platform-specific LDR format. If the project uses the linear rendering mode, the actual format is sRGB. If the project uses the gamma rendering mode, the actual format is UNorm... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_bce5bb9901c1 | unity_docs | rendering | Explain 'Lightmap data format' in Unity. | Unity stores lightmaps with different compressions and encoding schemes, depending on the target platform and the compression setting in the Lighting Window.
## Encoding schemes
Unity projects can use two techniques to encode baked light intensity ranges into low dynamic range textures when this is needed:
RGBM encod... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d22a48ed4d23 | unity_docs | scripting | What is `Search.SearchUtils.FindShiftLeftVariations` in Unity? Explain its purpose and usage. | SearchUtils.FindShiftLeftVariations
Declaration
public static string[]
FindShiftLeftVariations
(string
word
);
Parameters
Parameter
Description
word
Word to extract variations from.
Returns
string[]
List of variations for a word.
Description
Extract all variations on a word. As an example: the word h... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4024a32297c4 | unity_docs | scripting | Show me a Unity C# example demonstrating `Playables.PlayableOutputExtensions`. | PlayableOutputExtensions
class in
UnityEngine.Playables
/
Implemented in:
UnityEngine.CoreModule
Description
Extensions for all the types that implements
IPlayableOutput
.
Extension methods are static methods that can be called as if they were instance methods on the extended type.
```csharp
using UnityEngine... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6e330033bad5 | unity_docs | physics | In Unity's 'Configuring garbage collection', what is 'Disabling the garbage collector' and how does it work? | To disable the garbage collector completely, set
GarbageCollector.GCMode to Disabled
. When you disable the garbage collector, Unity doesn’t perform any garbage collection. Calling
System.GC.Collect
has no effect and doesn’t start a collection.
Disabling the garbage collector prevents CPU spikes, but the memory usage o... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_41e73c7f0571 | unity_docs | scripting | Show me a Unity C# example demonstrating `Color.blue`. | Color.blue
public static
Color
blue
;
Description
Solid blue. RGBA is (0, 0, 1, 1).
```csharp
//Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options to create a GameObject with a Renderer automatically attached).
//This script changes the Color of yo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_893b61ab11bf | unity_docs | scripting | What is `Rendering.RenderPipelineAsset.OnValidate` in Unity? Explain its purpose and usage. | RenderPipelineAsset.OnValidate
Declaration
protected void
OnValidate
();
Description
Default implementation of OnValidate for RenderPipelineAsset. See
MonoBehaviour.OnValidate
Override this function to add your specific OnValidate code. You must call base.OnValidate() as well. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0deee9a018bb | unity_docs | scripting | What is `UIElements.HandleDragAndDropArgs.parentId` in Unity? Explain its purpose and usage. | HandleDragAndDropArgs.parentId
public int
parentId
;
Description
The new parent targeted by the drag-and-drop operation. Used only for trees.
Will always be -1 for drag-and-drop operations in list views. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8cd67a16a0ab | unity_docs | scripting | What is `Bounds.size` in Unity? Explain its purpose and usage. | Bounds.size
public
Vector3
size
;
Description
The total size of the box. This is always twice as large as the
extents
.
size.x
is the width,
size.y
is the height and
size.z
is the depth of the box. Note that
size
is given in world size. A Bound surrounding a tall human might have
size.y
approximatel... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_537ef0704193 | unity_docs | ui | What are the parameters of `QualitySettings.SetQualityLevel` in Unity? | Description Sets a new graphics quality level. The list of quality levels can be found by going to Edit > Project Settings > Quality . You can add, remove or edit these. ```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void OnGUI()
{
string[] names = QualitySettings.names;
GUIL... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8ddb9f32b52b | unity_docs | scripting | What is `RenderMode.ScreenSpaceOverlay` in Unity? Explain its purpose and usage. | RenderMode.ScreenSpaceOverlay
Description
Render at the end of the Scene using a 2D Canvas.
```csharp
//Attach this script to your Canvas GameObjectusing UnityEngine;public class Example : MonoBehaviour
{
enum RenderModeStates { camera, overlay, world };
RenderModeStates m_RenderModeStates; Canvas m_Canvas; // Us... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_23dedf0a2d8a | unity_docs | editor | What is `Build.Content.BuildUsageCache` in Unity? Explain its purpose and usage. | BuildUsageCache
class in
UnityEditor.Build.Content
Description
Caching object for the Scriptable Build Pipeline.
This class helps improve performance when calling the
ContentBuildInterface.CalculateBuildUsageTags
api multiple times.
Note: this class and its members exist to provide low-level support for the
Sc... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b63d3841d11d | unity_docs | scripting | What is `Search.SearchViewState.hasWindowSize` in Unity? Explain its purpose and usage. | SearchViewState.hasWindowSize
public bool
hasWindowSize
;
Description
Determines if the search view was opened with a predefined size. If false, then it means the search view was opened the previous window size it was last closed with. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1bc9751d8dd2 | unity_docs | rendering | What is `TextureFormat` in Unity? Explain its purpose and usage. | TextureFormat
enumeration
Description
Format used when creating textures from scripts.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
// Create a new alpha-only texture and assign it
// to the renderer's material
Texture2D texture = new Texture2D(128, 128, TextureFormat.Alph... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b1675e87da06 | unity_docs | scripting | What is `Networking.DownloadHandlerFile.removeFileOnAbort` in Unity? Explain its purpose and usage. | DownloadHandlerFile.removeFileOnAbort
public bool
removeFileOnAbort
;
Description
Should the created file be removed if download is aborted (manually or due to an error). Default: false.
```csharp
using System.Collections;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;public class DownloadHan... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e6c5a5fdb6fc | unity_docs | editor | What is `Sprites.PackerJob` in Unity? Explain its purpose and usage. | PackerJob
class in
UnityEditor.Sprites
Description
Current Sprite Packer job definition.
To be used in IPackerPolicy.OnGroupAtlases.
Public Methods
Method
Description
AddAtlas
Registers a new atlas.
AssignToAtlas
Assigns a Sprite to an already registered atlas. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2e24eca7a89c | unity_docs | scripting | Show me a Unity C# example demonstrating `Color32.ctor`. | Color32 Constructor
Declaration
public
Color32
(byte
r
,
byte
g
,
byte
b
,
byte
a
);
Description
Constructs a new Color32 with given r, g, b, a components.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
Color32 color = new Color32(64, 128, 192, 255);
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e9da93ce89b8 | unity_docs | scripting | What are the parameters of `Handles.DrawLines` in Unity? | Description Draw a list of line segments. "Draw multiple lines in sceneview.". Below is an example of an Editor script that draws lines in SceneView to GameObjects listed in a script. ```csharp
// Draw lines to the connected game objects that a script has.
// if the target object doesn't have any game objects attached
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_16cb6758356a | unity_docs | ui | What is `UIElements.IMouseEvent.pressedButtons` in Unity? Explain its purpose and usage. | IMouseEvent.pressedButtons
public int
pressedButtons
;
Description
A bitmask that describes the currently pressed buttons.
Pressing a mouse button sets a bit; releasing the button clears it. The left mouse button sets/clears Bit 0. The right mouse button sets/clears Bit 1. The middle mouse button sets/clear... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1240c32b2eda | unity_docs | physics | Show me a Unity C# example demonstrating `VersionControl.Provider.IsOpenForEdit`. | Edit
Declaration
public static bool
IsOpenForEdit
(
VersionControl.Asset
asset
);
Parameters
Parameter
Description
asset
Asset to test.
Description
Returns true if an asset can be edited.
Version control systems like Perforce or Plastic SCM require that an asset be checked out before it can be edited. In... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6f02f17f8d9a | unity_docs | scripting | What is `Unity.Android.Gradle.Element.ctor` in Unity? Explain its purpose and usage. | Element Constructor
Declaration
public
Element
();
Declaration
public
Element
(string
value
);
Declaration
public
Element
(
Unity.Android.Gradle.Element
element
);
Parameters
Parameter
Description
value
Raw string value.
element
Element to be copy.
Description
Element constructor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1a9d715e3c17 | unity_docs | scripting | Show me a Unity code example for 'Deep linking'. | running: The device passes the URL to the application and calls the
Application.deepLinkActivated
event using the deep link URL as a parameter.
Application.absoluteURL
updates at the same time.
In both cases, use
Application.absoluteURL
to select the scene to open in the application.
The following code sample shows you... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_04a682116d89 | unity_docs | physics | What is `ParticleCollisionEvent.normal` in Unity? Explain its purpose and usage. | ParticleCollisionEvent.normal
public
Vector3
normal
;
Description
Geometry normal at the intersection point of the collision.
The normal is reported in world coordinates regardless of whether the Particle System is simulated in local coordinates. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_610713ac3faa | unity_docs | scripting | What is `WebGLLinkerTarget` in Unity? Explain its purpose and usage. | WebGLLinkerTarget
enumeration
Description
The build format options available when building to WebGL.
See
WebGL Player Settings
documentation for more details.
Properties
Property
Description
Asm
Only asm.js output will be generated. This setting has been deprecated.
Wasm
Only WebAssembly output will be gene... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_7e346e9fe67c | github | scripting | Write a Unity C# script called I Angular Resizable Element | ```csharp
using UnityEngine.UIElements;
namespace UIToolkitXRAdapter.AngularResizing {
internal interface IAngularResizableElement<out T> where T : VisualElement {
/// <summary>
/// Resizes the element properly
/// </summary>
/// <param name="distanceToCamera">the distance t... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_97d3e236a829 | unity_docs | editor | What is `EditorApplication.isCreateFromTemplate` in Unity? Explain its purpose and usage. | EditorApplication.isCreateFromTemplate
public static bool
isCreateFromTemplate
;
Description
Returns true if the current project was created from a template project.
A template project is typically created using the
-cloneFromTemplate
command line argument. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_67aab470e75c | unity_docs | rendering | What is `Rendering.DefaultReflectionMode.Custom` in Unity? Explain its purpose and usage. | DefaultReflectionMode.Custom
Description
Custom default reflection.
You can specify cubemap that will be used as a default specular reflection.
Additional resources: RenderSettings.customReflection,
RenderSettings.defaultReflectionMode
,
Lighting Window
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7871bc57dba1 | unity_docs | xr | In Unity's 'Decentralized technology Verified Solutions', what is 'Legitimacy' and how does it work? | Although the decentralization space in gaming is new and evolving, there are regulations you must follow for your solution to be compliant. To be proactive in staying compliant, you can do the following:
Demonstrate that all open-source or third-party code, modules, libraries, or pieces of software are properly license... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_de647b0ac251 | unity_docs | scripting | What is `RenderingLayerMask.GetDefinedRenderingLayerValues` in Unity? Explain its purpose and usage. | RenderingLayerMask.GetDefinedRenderingLayerValues
Declaration
public static int[]
GetDefinedRenderingLayerValues
();
Returns
int[]
List of the defined Rendering Layers values.
Description
Returns a values of the defined Rendering Layers in the
Tags and Layers manager
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_86689fd57540 | unity_docs | scripting | Show me a Unity C# example demonstrating `Component.GetComponentInParent`. | ched to that GameObject). You can then call
GetComponentInParent
on that reference.
See the
Component
and
GameObject
class reference pages for the other variations of the
GetComponent
family of methods.
The following example gets a reference to a hinge joint component on the same GameObject as the script, or an... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_74149cb116dc | unity_docs | input | What is `Experimental.GraphView.ContentDragger.OnMouseDown` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
ContentDragger.OnMouseDown
Declaration
protected void
OnMouseDown
(
UIElements.MouseDownEvent
e
);
Parameters
Parameter
Description
e
The event.
Description
Called on mouse down event. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3f7eece833e9 | unity_docs | editor | What is `TerrainTools.BrushesOverlay` in Unity? Explain its purpose and usage. | BrushesOverlay
class in
UnityEditor.TerrainTools
Description
Contains functions that help display Terrain Tools overlays.
This class contains static functions to determine whether terrain tool overlays should be visible.
Static Properties
Property
Description
ActiveTerrainTool
The current active terrain tool,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f840a839abb3 | unity_docs | input | What is `IMGUI.Controls.TreeView.GetNewSelectionFunction` in Unity? Explain its purpose and usage. | TreeView.GetNewSelectionFunction
Declaration
public delegate List<int>
GetNewSelectionFunction
(
IMGUI.Controls.TreeViewItem
clickedItem
,
bool
keepMultiSelection
,
bool
useActionKeyAsShift
);
Parameters
Parameter
Description
clickedItem
The item clicked, or selected via keyboard.
keepMultiSelection
Sho... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a1ba61c3628b | unity_docs | ui | In Unity's 'Multiple 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. |
gh_ac4d44dec4fe | github | scripting | Write a Unity Editor script for Readme Editor | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System;
using System.IO;
using System.Reflection;
[CustomEditor(typeof(Readme))]
[InitializeOnLoad]
public class ReadmeEditor : Editor {
static string kShowedReadmeSessionStateName = "ReadmeEditor.show... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_b345d1b405a2 | unity_docs | rendering | What is `CustomRenderTextureUpdateZoneSpace` in Unity? Explain its purpose and usage. | CustomRenderTextureUpdateZoneSpace
enumeration
Description
Space in which coordinates are provided for Update Zones.
Additional resources:
CustomRenderTexture
.
Properties
Property
Description
Normalized
Coordinates are normalized. (0, 0) is top left and (1, 1) is bottom right.
Pixel
Coordinates are expresse... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f308830d2000 | unity_docs | editor | Show me a Unity C# example demonstrating `IMGUI.Controls.AdvancedDropdown`. | AdvancedDropdown
class in
UnityEditor.IMGUI.Controls
Description
Inherit from this class to implement your own drop-down control.
```csharp
using UnityEditor;
using UnityEngine;
using UnityEditor.IMGUI.Controls;class WeekdaysDropdown : AdvancedDropdown
{
public WeekdaysDropdown(AdvancedDropdownState state) : bas... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9dcda3077bb8 | unity_docs | rendering | Give me an overview of the `TextureImporterCubemapConvolution` class in Unity. | TextureImporterCubemapConvolution
enumeration
Description
Defines
Cubemap
convolution mode.
This is useful if you need to pre-compute a diffuse or glossy specular reflections in the texture.
Additional resources:
TextureImporterSettings.cubemapConvolution
.
Properties
Property
Description
None
No convolutio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3ff14c9d0bdb | unity_docs | math | What is `BillboardAsset.GetIndices` in Unity? Explain its purpose and usage. | BillboardAsset.GetIndices
Declaration
public ushort[]
GetIndices
();
Declaration
public void
GetIndices
(List<ushort>
indices
);
Parameters
Parameter
Description
indices
The list that receives the array.
Description
Get the indices of the billboard mesh.
Billboard meshes are always made of triangles.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_67110da7ed44 | unity_docs | rendering | In Unity's 'Optimize shadow rendering in URP', what is 'Experiment with the Soft Shadows property' and how does it work? | Using the
Soft Shadows
property lets you achieve higher visual fidelity with lower shadow resolution values.
The
Soft Shadows
property might have a significant performance impact on platforms that use tile-based rendering, such as mobile platforms and untethered XR platforms. If your target platform uses tile-based ren... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ad4b8f22fa78 | unity_docs | math | What is `Mesh.GetBonesPerVertex` in Unity? Explain its purpose and usage. | Mesh.GetBonesPerVertex
Declaration
public NativeArray<byte>
GetBonesPerVertex
();
Returns
NativeArray<byte>
Returns the number of non-zero bone weights for each vertex.
Description
The number of non-zero bone weights for each vertex.
The size of the returned array is either
Mesh.vertexCount
or zero. Th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e6276eb1ce55 | unity_docs | scripting | What is `IMGUI.Controls.MultiColumnHeader.AddColumnHeaderContextMenuItems` in Unity? Explain its purpose and usage. | MultiColumnHeader.AddColumnHeaderContextMenuItems
Declaration
protected void
AddColumnHeaderContextMenuItems
(
GenericMenu
menu
);
Parameters
Parameter
Description
menu
Context menu shown.
Description
Override this method to extend the default context menu items shown when context clicking the header area... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0fcf260ae91f | unity_docs | editor | Show me a Unity C# example demonstrating `EditorGUI.actionKey`. | EditorGUI.actionKey
public static bool
actionKey
;
Description
Is the platform-dependent "action" modifier key held down? (Read Only)
The key is Command on macOS, Control on Windows.
Action Key usage, key not pressed/key pressed.
```csharp
using UnityEngine;
using UnityEditor;
// Shows a password field with s... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b713f8c03e5e | unity_docs | scripting | Show me a Unity C# example demonstrating `Handles.DrawLines`. | DrawLines
Declaration
public static void
DrawLines
(Vector3[]
lineSegments
);
Parameters
Parameter
Description
lineSegments
A list of pairs of points that represent the start and end of line segments.
Description
Draw a list of line segments.
"Draw multiple lines in sceneview.".
Below is an example of an ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1ea5730947b6 | unity_docs | scripting | Explain 'General preferences reference' in Unity. | The preferences in the General tab let you customize the overall behavior for working in Unity. To open the preferences, go to
Edit > Preferences > General
(macOS:
Unity > Settings > General
).
Property Function Load Previous Project on Startup
Enable this setting to always load the previous project at startup.
Disable... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4a0337b560be | unity_docs | editor | Give me an overview of the `TreePrototype` class in Unity. | TreePrototype
class in
UnityEngine
/
Implemented in:
UnityEngine.TerrainModule
Description
Simple class that contains a pointer to a tree prototype.
This class is used by the TerrainData gameObject.
Properties
Property
Description
bendFactor
Bend factor of the tree prototype.
navMeshLod
The LOD index of a ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_669854edb0ca | unity_docs | editor | Show me a Unity C# example demonstrating `Profiling.FrameDataView.UnityObjectNativeTypeInfo`. | UnityObjectNativeTypeInfo
struct in
UnityEditor.Profiling
Description
Unity native type information.
```csharp
using UnityEditorInternal;
using UnityEditor.Profiling;public class Example
{
public static string GetInstanceName(int frame, int instanceId)
{
using (var frameData = ProfilerDriver.GetRawFrameDataVie... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ea34724d31bb | unity_docs | ui | What is `UIElements.VisualElementExtensions.RemoveManipulator` in Unity? Explain its purpose and usage. | VisualElementExtensions.RemoveManipulator
Declaration
public static void
RemoveManipulator
(
UIElements.VisualElement
ele
,
UIElements.IManipulator
manipulator
);
Parameters
Parameter
Description
ele
VisualElement associated to the manipulator.
manipulator
Manipulator to be removed from the VisualEleme... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6a493329f364 | unity_docs | scripting | Show me a Unity C# example demonstrating `Handles.PositionHandle`. | with the handle. If the user has not moved the handle, it will return the same value as you passed into the function.
Description
Make a position handle.
This handle behaves like the built-in move tool in Unity.
Position handle in the Scene View.''
Add the following script to your Assets folder as PositionHandleE... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_44b3184352be | unity_docs | scripting | What is `Unity.Hierarchy.HierarchyNode` in Unity? Explain its purpose and usage. | HierarchyNode
struct in
Unity.Hierarchy
/
Implemented in:
UnityEngine.HierarchyCoreModule
Description
Represents a hierarchy node.
Static Properties
Property
Description
Null
Represents a hierarchy node that is null or invalid.
Properties
Property
Description
Id
The unique identification number ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7de5e1106c8a | unity_docs | scripting | Show me a Unity C# example demonstrating `Video.VideoClip.width`. | VideoClip.width
public uint
width
;
Description
The width of the images in the video clip in pixels. (Read Only).
You can use this property to help get the dimensions of your video and help display your video properly. Also, you can use it to calculate the image aspect ratio.
Additional resources:
VideoClip.h... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_61b4241f8ff9 | unity_docs | editor | Give me an overview of the `CloudProjectSettings` class in Unity. | CloudProjectSettings
class in
UnityEditor
Description
Use this class to retrieve information about the currently selected project and the current Unity ID that is logged in.
Static Properties
Property
Description
coppaCompliance
The current COPPA compliance state.
organizationId
The Organization ID, formatted... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_916fdcc416ab | unity_docs | editor | What is `Selection.activeGameObject` in Unity? Explain its purpose and usage. | Selection.activeGameObject
public static
GameObject
activeGameObject
;
Description
Returns the active game object. (The one shown in the inspector).
It will also return game objects that might be Prefabs or non-modifiable objects.
```csharp
using UnityEngine;
using UnityEditor;class Example : EditorWindow
{
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_572f26880952 | unity_docs | editor | What are the parameters of `PrefabUtility.RevertRemovedGameObject` in Unity? | Description Adds this removed GameObject back on the Prefab instance. After the revert action the GameObject will once again exist on the Prefab instance. The GameObject's components and children will also exist again, unless they had previously been removed. Note that added GameObjects and added component overrides, w... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_67e723fae7df | unity_docs | rendering | In Unity's 'LOD Group component reference', what is 'Previewing the LOD transitions' and how does it work? | The Scene view displays a preview of the transitions between LOD levels when you move the camera icon on the LOD Group selection bar. The camera icon acts like a playhead which you can use to scrub back and forth to control the exact position to preview along the LOD Group selection bar. The preview shows what the Came... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_39b301cbba08 | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormat.R32G32B32_SFloat` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormat.R32G32B32_SFloat
Description
A three-component, 96-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_50b4f6a953af | unity_docs | scripting | What is `SystemLanguage.Polish` in Unity? Explain its purpose and usage. | SystemLanguage.Polish
Description
Polish.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Polish language
if (Application.systemLanguage == SystemLanguage.Polish)
{
//Outputs into console that the system is Polish
D... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a4fa3a9a0936 | unity_docs | ui | What is `UIElements.MeshWriteData` in Unity? Explain its purpose and usage. | MeshWriteData
class in
UnityEngine.UIElements
/
Implemented in:
UnityEngine.UIElementsModule
Description
Represents the vertex and index data allocated for drawing the content of a
VisualElement
.
You can use this object to fill the values for the vertices and indices only during a callback to the
VisualE... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ab4e2c0f1497 | unity_docs | rendering | What is `TerrainData.SetHoles` in Unity? Explain its purpose and usage. | TerrainData.SetHoles
Declaration
public void
SetHoles
(int
xBase
,
int
yBase
,
bool[,]
holes
);
Parameters
Parameter
Description
xBase
First x index of Terrain holes samples to set.
yBase
First y index of Terrain holes samples to set.
holes
Array of Terrain holes samples to set (array indexed as [y,x])... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c21f53a850d6 | unity_docs | scripting | What is `AndroidJNIHelper.CreateJavaRunnable` in Unity? Explain its purpose and usage. | AndroidJNIHelper.CreateJavaRunnable
Declaration
public static IntPtr
CreateJavaRunnable
(
AndroidJavaRunnable
jrunnable
);
Parameters
Parameter
Description
runnable
A delegate representing the java.lang.Runnable.
Description
Creates a UnityJavaRunnable object (implements java.lang.Runnable).
Additional r... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ba11af56a9f1 | unity_docs | editor | Show me a Unity C# example demonstrating `Presets.Preset.excludedProperties`. | Preset.excludedProperties
public string[]
excludedProperties
;
Description
List of properties to ignore when applying the Preset to an object.
Sets the list of properties or parent properties to ignore when applying the Preset to an object.
```csharp
using UnityEngine;
using UnityEditor.Presets;static class Pr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a538384196f0 | unity_docs | physics | What are the parameters of `Collider.OnCollisionEnter` in Unity? | Description OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. In contrast to OnTriggerEnter , OnCollisionEnter is passed the Collision class and not a Collider.
The Collision class contains information, for example, about contact points and impact velocity.
Notes: Co... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_58ae75bf173b | unity_docs | editor | What are the parameters of `VersionControl.Provider.Resolve` in Unity? | Description Starts a task that will resolve the conflicting assets in version control. When conflicts between the depot and the local version of the asset appear you can resolve them by keeping either your own copy or the incoming copy. ```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Ve... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_08077e231c66_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | A base class for MonoBehaviours that can beinstantiatedor addedto a with five arguments passed to the function of the created instance.Instances of classes inheriting from receive the arguments via the method where they can be assigned to member fields or properties. Type of the first argument received in the funct... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_man_8a15d732e0d0 | unity_docs | rendering | In Unity's 'Reflective Shader Family', what is 'Reflective Specular' and how does it work? | Assets needed:
One Base texture with alpha channel for defining reflective areas & Specular Map combined One Reflection
Cubemap for Reflection Map
Note:
One consideration for this shader is that the Base texture’s alpha channel will double as both the reflective areas and the Specular Map. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a30ab982e667 | unity_docs | rendering | Show me a Unity code example for 'Simple unlit shader example in the Built-In Render Pipeline'. | ```
Shader "Unlit/SimpleUnlitTexturedShader"
{
Properties
{
// we have removed support for texture tiling/offset,
// so make them not be displayed in material inspector
[NoScaleOffset] _MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Pass
{
HLSLPROGRAM
// use "vert" function as the vertex shader
#pragma... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_152281030e1d_doc_0 | github | scripting | What does `OnInstanceSet` do in this Unity script? Explain its purpose and signature. | Called when this object is set to Instance of
Signature:
```csharp
protected virtual void OnInstanceSet()
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_2f10f3617ee6 | unity_docs | editor | What is `EditorTools.ToolAttribute.variantPriority` in Unity? Explain its purpose and usage. | ToolAttribute.variantPriority
public int
variantPriority
;
Description
The variant priority defines the order that tools are displayed in when they are displayed in a
ToolAttribute.variantGroup
dropdown.
Tools are sorted in ascending order, with the lowest values at the top of the list.
The default priority i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_15376922b174 | unity_docs | physics | In Unity's 'Speculative CCD', what is 'Understand speculative CCD' and how does it work? | Speculative CCD works by increasing an object’s broad-phase axis-aligned minimum bounding box (AABB), based on the object’s linear and angular motion. The algorithm is speculative because it selects all potential contacts during the next physics step and feeds them into the solver, which makes sure that all contact con... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_786b86bc9aad | unity_docs | scripting | What is `Unity.Hierarchy.HierarchyNodeType` in Unity? Explain its purpose and usage. | HierarchyNodeType
struct in
Unity.Hierarchy
/
Implemented in:
UnityEngine.HierarchyCoreModule
Description
Type descriptor for a node in Hierarchy. Corresponds to the NodeType of the HierarchyNodeHandler.
Static Properties
Property
Description
Null
Represents a hierarchy node type that is null or invalid... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9661247049e7 | unity_docs | editor | What is `Selection.activeObject` in Unity? Explain its purpose and usage. | Selection.activeObject
public static Object
activeObject
;
Description
Returns the actual object selection. Includes Prefabs, non-modifiable objects.
When working with objects that are primarily in a Scene, it is strongly recommended to use
Selection.activeTransform
instead. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_d5f9d370f872_doc_10 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Name of an input control scheme that defines the grouping of bindings that should remain enabled when applying any movement control scheme.Control schemes are created and named in the Input Actions window. The other movement control schemes are applied additively to this scheme.Can be an empty string, which means only ... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_2b9057006581 | unity_docs | input | What is `IMGUI.Controls.TreeView.GetCellRectForTreeFoldouts` in Unity? Explain its purpose and usage. | TreeView.GetCellRectForTreeFoldouts
Declaration
protected
Rect
GetCellRectForTreeFoldouts
(
Rect
rowRect
);
Parameters
Parameter
Description
rowRect
Rect for a row.
Returns
Rect
Cell rect in a multi column setup.
Description
Utility for multi column setups. This method will clip the input rowRect ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8cc491cead79 | unity_docs | rendering | What is `MaterialPropertyBlock.HasProperty` in Unity? Explain its purpose and usage. | MaterialPropertyBlock.HasProperty
Declaration
public bool
HasProperty
(string
name
);
Declaration
public bool
HasProperty
(int
nameID
);
Parameters
Parameter
Description
name
The name of the property.
nameID
The name ID of the property. Use
Shader.PropertyToID
to get this ID.
Returns
bool
Return... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b454797ea920 | unity_docs | editor | In Unity's 'Apply styles in C# scripts', what is 'Set styles' and how does it work? | In a C# script, you can set styles directly to the style properties of a
visual element
. For example, the following code sets the background color of a button to red:
```
button.style.backgroundColor = Color.red
```
You can also add a Unity style sheet (USS) to any visual element. Unity represents USS files as StyleSh... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_af53d900fc00 | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.CollisionModule.SetPlane`. | d
SetPlane
(int
index
,
Transform
transform
);
Parameters
Parameter
Description
index
The plane entry to set.
transform
The plane to collide particles against.
Description
Set a collision plane to use with this Particle System.
If the index is greater than the number of planes currently assigned to the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_63865eb9d3a8 | unity_docs | rendering | Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.sizeAmount`. | ParticleSystem.NoiseModule.sizeAmount
public
ParticleSystem.MinMaxCurve
sizeAmount
;
Description
How much the noise affects the particle sizes, applied as a multiplier on the size of each particle.
```csharp
using UnityEngine;
using System.Collections;[RequireComponent(typeof(ParticleSystem))]
public class E... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cfa8abbe0c97 | unity_docs | rendering | What is `Rendering.DrawingSettings.mainLightIndex` in Unity? Explain its purpose and usage. | DrawingSettings.mainLightIndex
public int
mainLightIndex
;
Description
Configures what light should be used as main light.
If not set, main light will be the visible brighest directional light. This is used to perform per-object light culling for the main light.
Additional resources: ScriptableRenderContext.Dra... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2bb93bf643ca | unity_docs | networking | What is `Android.AndroidUIModeNight` in Unity? Explain its purpose and usage. | AndroidUIModeNight
enumeration
Description
Options to indicate whether the device screen is in a special mode, such as a night mode.
Additional resources:
AndroidConfiguration.uiModeNight
Properties
Property
Description
Undefined
Mirrors the Android property value UI_MODE_NIGHT_UNDEFINED.
No
Mirrors the Andr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_25a33d3a35ac | unity_docs | scripting | What is `DecoratorDrawer.GetHeight` in Unity? Explain its purpose and usage. | DecoratorDrawer.GetHeight
Declaration
public float
GetHeight
();
Description
Override this method to specify how tall the GUI for this decorator is in pixels.
The default is one line high.
See
DecoratorDrawer
for an example of how to use this. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b8e0ef6cb302 | unity_docs | rendering | What is `SpeedTreeImporter.MaterialLocation.InPrefab` in Unity? Explain its purpose and usage. | SpeedTreeImporter.MaterialLocation.InPrefab
Description
Unity imports materials as sub-assets.
Materials imported as sub-assets are read-only and can only be modified after they are extracted.
Additional resources:
SpeedTreeImporter.SearchAndRemapMaterials
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4ba366dc7f11 | unity_docs | rendering | Give me an overview of the `SpriteImportMode` class in Unity. | SpriteImportMode
enumeration
Description
Texture importer modes for Sprite import.
Properties
Property
Description
None
Graphic is not a Sprite.
Single
Sprite is a single image section extracted automatically from the texture.
Multiple
Sprites are multiple image sections extracted from the texture.
Polygon
S... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b665318ccffb | unity_docs | scripting | Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.AlignOf`. | or ensuring the proper alignment of data structures, which can improve access speed and comply with hardware requirements.
Proper alignment can prevent performance penalties by avoiding misaligned data access, which might require multiple memory accesses. This function is particularly useful when you're implementing cu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b23d29eba48e | unity_docs | scripting | In Unity's 'Compile a static library as a Unity plug-in', what is '2. Configure any existing project scripts' and how does it work? | Emscripten works as a replacement for the gcc or clang compiler. If you have existing C/C++ code, you need to make the following changes in your C++ project:
Use “emcc” as the C/C++ compiler
Use “emar” as the static linker
For more information, refer to the Emscripten documentation on
Compiling and Running Projects
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_47d247262f20 | github | scripting | Write a Unity C# script called Inventory Service Unity Event | ```csharp
using RMC.Mini.Service;
using UnityEngine.Events;
namespace RMC.Mini.Samples.SOM.Mini
{
// Namespace Properties ------------------------------
public class InventoryServiceUnityEvent : UnityEvent<string> {}
/// <summary>
/// The Service handles external data
/// </summary>
public c... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_8da0b1a5d214 | unity_docs | math | What is `Mathf.Abs` in Unity? Explain its purpose and usage. | Mathf.Abs
Declaration
public static float
Abs
(float
f
);
Description
Returns the absolute value of
f
.
```csharp
using UnityEngine;public class ScriptExample : MonoBehaviour
{
void Start()
{
// Prints 10
Debug.Log(Mathf.Abs(-10.0f));
// Prints 0
Debug.Log(Mathf.Abs(0.0f));
// Prints 10
Debug.Log(Mat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_44c6917698d7 | github | scripting | Write a Unity C# script called Coroutine Delay | ```csharp
using System;
using System.Collections;
using UnityEngine;
namespace THEBADDEST.Coroutines
{
[System.Serializable]
public class CoroutineDelay : CoroutineSequence
{
public float seconds;
protected bool realTime = false;
protected YieldInstruction iterator2;
public ... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_b4451ce12691 | unity_docs | scripting | What is `IMGUI.Controls.MultiColumnHeader.sortedColumnIndex` in Unity? Explain its purpose and usage. | MultiColumnHeader.sortedColumnIndex
public int
sortedColumnIndex
;
Description
The index of the column that is set to be the primary sorting column. This is the column that shows the sorting arrow above the header text.
Default value: -1 (no sorting). | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c768c2dd4dc1 | unity_docs | scripting | What is `GameObjectUtility.EnsureUniqueNameForSibling` in Unity? Explain its purpose and usage. | GameObjectUtility.EnsureUniqueNameForSibling
Declaration
public static void
EnsureUniqueNameForSibling
(
GameObject
self
);
Parameters
Parameter
Description
self
The GameObject whose name you want to ensure is unique.
Description
You can use this method
after
parenting one GameObject to another to ensur... | 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.