id stringlengths 15 22 | source stringclasses 2
values | category stringclasses 12
values | instruction stringlengths 22 180 | response stringlengths 100 46.1k | system stringclasses 5
values |
|---|---|---|---|---|---|
local_man_de105fb632de | unity_docs | editor | In Unity's 'Add tests to a package', what is 'Editor file example' and how does it work? | The editor test.asmdef
file looks like this:
```
{
"name": "MyCompany.MyPackage.Editor.Tests",
"references": [
"MyPackage.Editor",
"MyPackage"
],
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": []
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0fa7120f95fc | unity_docs | physics | Show me a Unity C# example demonstrating `MonoBehaviour.OnMouseExit`. | MouseOver
.
This event is sent to all scripts attached to the
Collider
. This function is not called on objects that belong to Ignore Raycast layer.
This function is called on Colliders and 2D Colliders marked as trigger when the following properties are set to true:
For 3D physics:
Physics.queriesHitTriggers
For ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_35bc98eae407 | unity_docs | scripting | What is `Debug.LogWarningFormat` in Unity? Explain its purpose and usage. | Debug.LogWarningFormat
Declaration
public static void
LogWarningFormat
(string
format
,
params object[]
args
);
Declaration
public static void
LogWarningFormat
(
Object
context
,
string
format
,
params object[]
args
);
Parameters
Parameter
Description
format
A composite format string.
args
Format... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c7ef52213d66 | unity_docs | scripting | Show me a Unity C# example demonstrating `Sprite.GetScriptableObjects`. | sprite, the arrays will not be resized and the results will be limited.
If the size of the arrays passed in as parameters are bigger than the number of
ScriptableObject
referenced by the sprite, the number of elements used in the array will be indicated by the return value of the method.
The following is an example u... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_203a211af02c | unity_docs | rendering | What is `Shader.FindPropertyIndex` in Unity? Explain its purpose and usage. | Shader.FindPropertyIndex
Declaration
public int
FindPropertyIndex
(string
propertyName
);
Parameters
Parameter
Description
propertyName
The name of the shader property.
Description
Finds the index of a shader property by its name.
You can use the index with functions such as
GetPropertyType
and
GetPro... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_c24ffea30041_doc_5 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Determines whether the specified is a reference or an that has been destroyed. The to check. if the specified is a reference or an that has been destroyed; otherwise, .
Signature:
```csharp
public static bool operator ==(object @object, NullComparer @null) =>
@object is Object unityObject ? unityObject ==... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_ee105961a113 | unity_docs | scripting | Give me an overview of the `FFTWindow` class in Unity. | FFTWindow
enumeration
Description
Spectrum analysis windowing types.
Use this to reduce leakage of signals across frequency bands.
Properties
Property
Description
Rectangular
W[n] = 1.0.
Triangle
W[n] = 1 - abs(2n/N - 1).
Hamming
W[n] = 0.54 - 0.46 * cos(2π * n/N).
Hanning
W[n] = 0.5 * (1.0 - cos(2π * n/N))... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9200460d034d | unity_docs | scripting | What is `Accessibility.AccessibilitySettings.boldTextStatusChanged` in Unity? Explain its purpose and usage. | AccessibilitySettings.boldTextStatusChanged
Description
Event that is invoked on the main thread when the user changes the
bold text setting in the system settings.
This is only supported on iOS. On Android, the app restarts when the
user changes the bold text setting in the system settings, so this event
is... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_65f1ba6628cd | unity_docs | scripting | Show me a Unity C# example demonstrating `Quaternion.Index_operator`. | Quaternion.this[int]
public float
this[int]
;
Description
Access the x, y, z, w components using [0], [1], [2], [3] respectively.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
Quaternion p = new Quaternion();
p[3] = 0.5f; // the same as p.w = 0.5
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_883c622d202f | unity_docs | rendering | Explain 'Particle animations' in Unity. | Particle animations are typically simpler and less detailed than character animations. In systems where the particles are visible individually, animations can be used to convey actions or movements. For example, flames may flicker and insects in a swarm might vibrate or shudder as if flapping their wings. In cases wher... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8e2ed18f94b6 | unity_docs | editor | What is `EditorGUI.BeginChangeCheck` in Unity? Explain its purpose and usage. | EditorGUI.BeginChangeCheck
Declaration
public static void
BeginChangeCheck
();
Description
Starts a new code block to check for GUI changes.
Use this in combination with
EditorGUI.EndChangeCheck
to create a code block that checks if the GUI state changed for just the controls contained in that block.
This ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d9293bd2b6d7 | unity_docs | rendering | What is `AndroidDisplayOptions` in Unity? Explain its purpose and usage. | AndroidDisplayOptions
enumeration
Description
Options to configure how your application renders on Android devices.
Set the value of this enum to
displayOptions
property.
```csharp
// This example demonstrates how to disable the default rendering behavior for secondary screens
using UnityEditor;
using UnityEdit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1083882b9611 | unity_docs | xr | What is `Camera.GetStereoNonJitteredProjectionMatrix` in Unity? Explain its purpose and usage. | Camera.GetStereoNonJitteredProjectionMatrix
Declaration
public
Matrix4x4
GetStereoNonJitteredProjectionMatrix
(
Camera.StereoscopicEye
eye
);
Parameters
Parameter
Description
eye
Specifies the stereoscopic eye whose non-jittered projection matrix needs to be returned.
Returns
Matrix4x4
The non-jitter... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b264b20ac52d | unity_docs | rendering | What is `RenderBuffer` in Unity? Explain its purpose and usage. | RenderBuffer
struct in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Color or depth buffer part of a
RenderTexture
.
A single
RenderTexture
object represents both color and depth buffers,
but many complex rendering algorithms require using the same depth buffer
with multiple color buffers ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f6843fb7c928 | unity_docs | scripting | What is `Experimental.GraphView.SelectionDragger.RegisterCallbacksOnTarget` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
SelectionDragger.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_man_33ecc1854392 | unity_docs | rendering | Explain 'Particle size' in Unity. | Understand how the Particle System can change a particle’s size based on its speed or lifetime.
## Changing particle size based on the particle’s speed
The
Size By Speed Module
can create particles that change size based on their speed in distance units per second.
Some situations will require particles which vary in... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_2b14f9768c46 | github | scripting | Write a Unity C# ScriptableObject for Grid State Color Palette Entry | ```csharp
using FactoryMustScale.Runtime.Visualization;
using UnityEngine;
namespace FactoryMustScale.Authoring
{
[System.Serializable]
public struct GridStateColorPaletteEntry
{
public string name;
public int StateId;
public Color32 Color;
}
[CreateAssetMenu(
fileN... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_21290a58dd22 | unity_docs | ui | What is `UIElements.BaseListView.allowRemove` in Unity? Explain its purpose and usage. | BaseListView.allowRemove
public bool
allowRemove
;
Description
This property allows the user to allow or block the removal of an item when clicking on the Remove Button.
It must return
true
or
false
.
If the property is not set to
false
, any Remove operation will be allowed. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4fd8681717f4 | unity_docs | scripting | What is `PluginImporter.SetPlatformData` in Unity? Explain its purpose and usage. | PluginImporter.SetPlatformData
Declaration
public void
SetPlatformData
(
BuildTarget
platform
,
string
key
,
string
value
);
Declaration
public void
SetPlatformData
(string
platformName
,
string
key
,
string
value
);
Parameters
Parameter
Description
platform
Target platform.
key
Key value for dat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a71b6a56c730 | unity_docs | scripting | What is `iOSLaunchScreenType.ImageAndBackgroundRelative` in Unity? Explain its purpose and usage. | iOSLaunchScreenType.ImageAndBackgroundRelative
Description
Use a custom launch screen image specified in the iOS Player Settings or with
PlayerSettings.iOS.SetLaunchScreenImage
which will be scaled across the entire screen. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_82a3147ef8c3 | unity_docs | editor | Explain 'Gradle project structure' in Unity. | When you export your Unity project, Unity creates a Gradle project with the following main modules:
UnityLibrary
module: Contains the Unity runtime and project data. This module is a library that you can integrate into any other Gradle project. Use it to embed Unity into existing Android applications.
Launcher
module: ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_09ee9ba300a4 | unity_docs | performance | Explain 'Memory in Unity introduction' in Unity. | To ensure your application runs with no performance issues, it’s important to understand how Unity uses and allocates memory.
Unity uses the following memory management layers to handle memory in your application:
Managed memory
: A controlled memory layer that uses a managed heap and a
garbage collector
to automatical... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d3f46505a7a6 | unity_docs | editor | What is `EditorGUIUtility.whiteTexture` in Unity? Explain its purpose and usage. | EditorGUIUtility.whiteTexture
public static
Texture2D
whiteTexture
;
Description
Get a white texture.
White texture in an Editor Window.
```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;public class EditorGUITextures : EditorWindow
{
Texture2D textur... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_87426340b4f8 | unity_docs | input | What is `Gyroscope.updateInterval` in Unity? Explain its purpose and usage. | Gyroscope.updateInterval
public float
updateInterval
;
Description
Sets or retrieves gyroscope interval in seconds.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
Input.gyro.updateInterval = 0.01f;
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1c52911ff886 | unity_docs | xr | What is `Networking.UploadHandler.contentType` in Unity? Explain its purpose and usage. | UploadHandler.contentType
public string
contentType
;
Description
Determines the default
Content-Type
header which will be transmitted with the outbound HTTP request.
If the parent
UnityWebRequest
does not have a custom
Content-Type
header set, then the value of this property will be used to determine the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dc0f9be44117 | unity_docs | scripting | What is `Windows.WebCam.VideoCapture.OnStoppedRecordingVideoCallback` in Unity? Explain its purpose and usage. | VideoCapture.OnStoppedRecordingVideoCallback
Declaration
public delegate void
OnStoppedRecordingVideoCallback
(
Windows.WebCam.VideoCapture.VideoCaptureResult
result
);
Parameters
Parameter
Description
result
Indicates whether or not video recording was saved successfully to the file system.
Description
C... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_199b78d5025b | unity_docs | editor | Show me a Unity C# example demonstrating `Handles.DrawTexture3DVolume`. | ltering mode to use.
useColorRamp
Enables color ramp visualization.
customColorRamp
The custom gradient that Unity uses as a color ramp. If this is not specified, Unity uses
Google Turbo color ramp
.
Description
Draws a 3D texture using Volume rendering mode in 3D space.
Teapot volume rendered with a gradient t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_61fd1c45e1eb | unity_docs | animation | Explain 'Animation transitions' in Unity. | Use
animation transitions
in the
state machine
to switch or blend from one animation state to another. Transitions define the duration of the blend between states and the conditions when a transition occurs. To set these conditions, specify values of parameters in the
Animator Controller
.
For example, your character m... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_16f443bea463 | unity_docs | rendering | What is `Material.GetTexture` in Unity? Explain its purpose and usage. | Material.GetTexture
Declaration
public
Texture
GetTexture
(string
name
);
Declaration
public
Texture
GetTexture
(int
nameID
);
Parameters
Parameter
Description
nameID
The name ID of the property retrieved by
Shader.PropertyToID
.
name
The name of the property.
Description
Get a named texture.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b865cced1ba9 | unity_docs | math | In Unity's 'BoundsField', what is 'Create a BoundsField' and how does it work? | You can create a BoundsField with UI Builder, UXML, or C#. The following C# example creates a BoundsField with a default Bounds value:
```
var boundsField = new BoundsField();
boundsField.value = new Bounds(Vector3.zero, Vector3.one);
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1ee243b251d2 | unity_docs | physics | What is `DistanceJoint2D.maxDistanceOnly` in Unity? Explain its purpose and usage. | DistanceJoint2D.maxDistanceOnly
public bool
maxDistanceOnly
;
Description
Whether to maintain a maximum distance only or not. If not then the absolute distance will be maintained instead.
When true, only the maximum distance is maintained. When false, the absolute distance is maintained.
Additional resources:
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_956b1eca6e97 | unity_docs | xr | Explain 'Request runtime permissions' in Unity. | This page explains how to request the user’s permission for your application to access data on the device or use a device feature such as a built-in camera or microphone.
Google’s guideline for requesting permissions recommends that, if the user denies a permission request once, you should display the reason for the re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_211387f89e33 | github | scripting | Write a Unity C# script called Editable Ordered Dictionary_string_Texture | ```csharp
// Copyright (c) Rotorz Limited. All rights reserved.
// Licensed under the MIT license.
using System;
using UnityEngine;
namespace Rotorz.Games.Collections
{
/// <summary>
/// An object that allows users to edit <see cref="OrderedDictionary_string_Texture"/>
/// objects when using the Unity ins... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_19ab8458b806 | unity_docs | rendering | Show me a Unity C# example demonstrating `ImageConversion.EncodeArrayToPNG`. | t further processing.
This function does not work on any compressed format.
The encoded PNG data will be either 8bit grayscale, RGB or RGBA (depending on the passed in format).
For single-channel red textures (
R8
,
R16
,
RFloat
and
RHalf
), the encoded PNG data will be in grayscale.
PNG data will not contain... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1c4329202256 | unity_docs | scripting | What is `Unity.Hierarchy.Hierarchy.Reserve` in Unity? Explain its purpose and usage. | Hierarchy.Reserve
Declaration
public void
Reserve
(int
count
);
Parameters
Parameter
Description
count
The number of nodes to reserve memory for.
Description
Ensures that the hierarchy has enough memory reserved for storing the specified number of nodes. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_95a950a24d78 | github | scripting | Write a Unity C# script called V Container_I Object Resolver_Binding | ```csharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityFusion.CLR.TypeSystem;
using UnityFusion.CLR.Method;
using UnityFusion.Runtime.Enviorment;
using UnityFusion.Runtime.Intepreter;
using UnityFusion.Run... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_69894e056703 | unity_docs | networking | Explain 'Multiplayer Services Building Blocks' in Unity. | The Multiplayer Services Unity Building Blocks provide a UI-based path to quickly set up multiplayer sessions and matchmaking in your Unity project.
Topic Description Multiplayer Services Building Blocks prerequisites
Set up your project to work with the
Unity Services
that the Unity Multiplayer Services Building Block... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d0a082614b60 | unity_docs | physics | What is `ParticleSystemForceField.shape` in Unity? Explain its purpose and usage. | ParticleSystemForceField.shape
public
ParticleSystemForceFieldShape
shape
;
Description
Selects the type of shape used for influencing particles.
Additional resources:
ParticleSystemForceField
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_052edfd6b96d | unity_docs | rendering | What is `Rendering.RayTracingGeometryInstanceConfig.renderingLayerMask` in Unity? Explain its purpose and usage. | RayTracingGeometryInstanceConfig.renderingLayerMask
public uint
renderingLayerMask
;
Description
A mask that you can access in HLSL with
unity_RenderingLayer
built-in shader uniform.
```
uniform float4 unity_RenderingLayer;// HLSL usage example:
uint renderingLayerMask = asuint(unity_RenderingLayer.x);
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ce30b1103f41 | unity_docs | audio | What is `Unity.Collections.Allocator` in Unity? Explain its purpose and usage. | Allocator
enumeration
Description
Sets which allocation type to use for a NativeArray.
Properties
Property
Description
Invalid
Use an invalid allocation.
None
Use no allocation.
Temp
Use a temporary allocation.
TempJob
Use a temporary job allocation.
Persistent
Use a persistent allocation.
AudioKernel
Use ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7a1cbbf31f30 | unity_docs | xr | What is `Networking.UnityWebRequest.disposeDownloadHandlerOnDispose` in Unity? Explain its purpose and usage. | UnityWebRequest.disposeDownloadHandlerOnDispose
public bool
disposeDownloadHandlerOnDispose
;
Description
If true, any
DownloadHandler
attached to this
UnityWebRequest
will have
DownloadHandler.Dispose
called automatically when
UnityWebRequest.Dispose
is called.
Default: true.
If no
DownloadHandler
is... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_81e9b8bdd6d4 | unity_docs | editor | What is `MouseCursor.ResizeUpLeft` in Unity? Explain its purpose and usage. | MouseCursor.ResizeUpLeft
Description
Resize up-Left for window edges.
```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 ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_98ac79052362 | unity_docs | physics | In Unity's 'Troubleshooting custom control library compilation', what is 'Resolution' and how does it work? | To resolve this issue, run the UI Toolkit source generator (
Unity.UIToolkit.SourceGenerator.dll
) during the DLL compilation process.
Find the source generator file in your Unity installation. It’s typically located at:
<Unity Installation Path>\Data\Tools\Unity.SourceGenerators\Unity.UIToolkit.SourceGenerator.dll
.
A... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_659151918e14 | unity_docs | rendering | In Unity's 'Texture and mesh loading', what is 'How it works' and how does it work? | The main difference between the synchronous and asynchronous upload pipelines is where Unity saves the data at build time, which affects how Unity loads it at runtime.
In the synchronous upload pipeline, Unity must load both the metadata (header data) and the texel or vertex data (binary data) for the texture or mesh i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_10998f703c8f | unity_docs | scripting | Show me a Unity C# example demonstrating `AudioType.XM`. | AudioType.XM
Description
The audio file you want to stream has the FastTracker 2 XM audio file format.
Use this enumeration value to ensure the format type of the audio file has the FastTracker 2 XM audio file format. Use this audio type for files with the extension .xm
. If the audio file has a different format, U... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a76abcf8d7e4 | unity_docs | ui | What is `Unity.Profiling.Editor.ProfilerModuleViewController.CreateView` in Unity? Explain its purpose and usage. | ProfilerModuleViewController.CreateView
Declaration
protected
UIElements.VisualElement
CreateView
();
Returns
VisualElement
Returns the view controller’s view. A
VisualElement
.
Description
Creates the view controller’s view. Unity calls this method automatically when it is about to display the view con... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_da3166048e0e | unity_docs | scripting | What is `UIElements.SearchFieldBase_2` in Unity? Explain its purpose and usage. | SearchFieldBase<T0,T1>
class in
UnityEditor.UIElements
/
Inherits from:
UIElements.VisualElement
Implements interfaces:
INotifyValueChanged<T0>
Description
The base class for a search field.
Static Properties
Property
Description
cancelButtonOffVariantUssClassName
USS class name of cancel buttons in el... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dad5365afb24 | unity_docs | editor | What is `ObjectChangeEventStream.Builder.PushUpdatePrefabInstancesEvent` in Unity? Explain its purpose and usage. | ObjectChangeEventStream.Builder.PushUpdatePrefabInstancesEvent
Declaration
public void
PushUpdatePrefabInstancesEvent
(ref
UpdatePrefabInstancesEventArgs
data
);
Parameters
Parameter
Description
data
The event data to add to the stream.
Description
Adds an
UpdatePrefabInstancesEventArgs
to the end of t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_13d12a8854c0 | unity_docs | math | What is `Vector3Int.Max` in Unity? Explain its purpose and usage. | Vector3Int.Max
Declaration
public static
Vector3Int
Max
(
Vector3Int
lhs
,
Vector3Int
rhs
);
Description
Returns a vector that is made from the largest components of two vectors.
Additional resources:
Min
function. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1477038a4b8b | unity_docs | scripting | Show me a Unity C# example demonstrating `Canvas`. | Canvas
class in
UnityEngine
/
Inherits from:
Behaviour
/
Implemented in:
UnityEngine.UIModule
Description
Element that can be used for screen rendering.
Elements on a canvas are rendered AFTER Scene rendering, either from an attached camera or using overlay mode.
```csharp
using System.Collections;
using Sys... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_abae9293f2a3 | github | scripting | Write a Unity Editor script for MK Glow Editor | ```csharp
///////////////////////////////////////////////
// MKGlowSystem Editor //
// //
// Created by Michael Kremmel on 23.12.2014 //
// Copyright © 2015 All rights reserved. //
///////////////////////////////////////////////
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using System... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_a39f304f6065 | unity_docs | rendering | What is `Build.IPreprocessShaders.OnProcessShader` in Unity? Explain its purpose and usage. | IPreprocessShaders.OnProcessShader
Declaration
public void
OnProcessShader
(
Shader
shader
,
Rendering.ShaderSnippetData
snippet
,
IList<ShaderCompilerData>
data
);
Parameters
Parameter
Description
shader
The shader that Unity is about to compile.
snippet
Details about the specific shader code being c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c4cea097eb42 | unity_docs | rendering | What is `TextureImporter.maxTextureSize` in Unity? Explain its purpose and usage. | TextureImporter.maxTextureSize
public int
maxTextureSize
;
Description
Maximum texture size.
Larger textures will be scaled down to this size at import time.
This will only affect the default platform setting. Additional resources:
TextureImporterPlatformSettings
,
TextureImporter.SetPlatformTextureSettings
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_40b8e2181d90 | unity_docs | scripting | What is `AppleMobileArchitectureSimulator` in Unity? Explain its purpose and usage. | AppleMobileArchitectureSimulator
enumeration
Description
Apple mobile CPU architecture options for the Simulator.
Properties
Property
Description
X86_64
64-bit Intel/AMD simulator architecture.
ARM64
64-bit ARM simulator architecture.
Universal
All simulator architectures. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b9abfe82233e | unity_docs | rendering | Explain 'Android permissions in Unity' in Unity. | To get permission to access device features or data outside of your Unity application’s sandbox, there are two stages:
At build time, declare the permission in the application’s
Android App Manifest
.
At runtime, request permission from the user.
For some permissions, Unity automatically handles both the build-time And... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_948c19b7a690 | unity_docs | rendering | In Unity's 'Introduction to cameras', what is 'Perspective and orthographic cameras' and how does it work? | A camera in the real world, or indeed a human eye, sees the world in a way that makes objects look smaller the farther they are from the point of view. This well-known perspective effect is widely used in art and computer graphics and is important for creating a realistic scene. Naturally, Unity supports perspective ca... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3ce20e56d4c3 | unity_docs | rendering | What is `Experimental.GlobalIllumination.DirectionalLight.color` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
DirectionalLight.color
public
Experimental.GlobalIllumination.LinearColor
color
;
Description
The direct light color. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0cac6f5418fb | unity_docs | ui | What is `UIElements.VisualElement.Hierarchy.Remove` in Unity? Explain its purpose and usage. | VisualElement.Hierarchy.Remove
Declaration
public void
Remove
(
UIElements.VisualElement
child
);
Description
Removes this child from the hierarchy.
This method will first calculate the index of the child, followed by calling the RemoveAt method to remove it from the hierarchy.
If the element is null or ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_eeb6586b4ad1 | unity_docs | rendering | What is `Camera.stereoActiveEye` in Unity? Explain its purpose and usage. | Camera.stereoActiveEye
public
Camera.MonoOrStereoscopicEye
stereoActiveEye
;
Description
Returns the eye that is currently rendering.
If called when stereo is not enabled it will return
Camera.MonoOrStereoscopicEye.Mono
.
If called during a camera rendering callback such as
OnRenderImage
it will return th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0d9b51fe1490 | unity_docs | rendering | What is `ParticleSystemRenderer.rotateWithStretchDirection` in Unity? Explain its purpose and usage. | ParticleSystemRenderer.rotateWithStretchDirection
public bool
rotateWithStretchDirection
;
Description
Rotate the particles based on the direction they are stretched in. This is added on top of other particle rotation.
This property only has effect when
freeformStretching
is enabled. When
freeformStretching
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e87daca52fbe | unity_docs | performance | What is `Unity.Profiling.ProfilerRecorder.StartNew` in Unity? Explain its purpose and usage. | ProfilerRecorder.StartNew
Declaration
public static
Unity.Profiling.ProfilerRecorder
StartNew
(
Unity.Profiling.ProfilerCategory
category
,
string
statName
,
int
capacity
,
Unity.Profiling.ProfilerRecorderOptions
options
);
Parameters
Parameter
Description
category
Profiler category.
statName
Profi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_a864a33c1a81_doc_1 | github | scripting | What does `GetListOfSingletonClasses` do in this Unity script? Explain its purpose and signature. | Looks for [Singleton] tagged classes and returns all their namesList of class' with the SingletonAttribute
Signature:
```csharp
public static List<string> GetListOfSingletonClasses()
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fbc2e1c37d41 | unity_docs | rendering | What is `Lightmapping.GetTerrainGIChunks` in Unity? Explain its purpose and usage. | Lightmapping.GetTerrainGIChunks
Declaration
public static void
GetTerrainGIChunks
(
Terrain
terrain
,
ref int
numChunksX
,
ref int
numChunksY
);
Parameters
Parameter
Description
terrain
The terrain.
numChunksX
Number of chunks in terrain width.
numChunksY
Number of chunks in terrain length.
Descripti... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d253410727cb | unity_docs | editor | Show me a Unity C# example demonstrating `AssetImporter.GetImportLog`. | AssetImporter.GetImportLog
Declaration
public static
AssetImporters.ImportLog
GetImportLog
(string
path
);
Description
Retrieves logs generated during the import of the asset at
path
.
Additional resources:
ImportLog
,
AssetImportContext.LogImportError
,
AssetImportContext.LogImportWarning
.
```csharp
u... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5a6980c64c53 | unity_docs | rendering | What is `ParticleSystem.ShapeModule.radiusSpeed` in Unity? Explain its purpose and usage. | ParticleSystem.ShapeModule.radiusSpeed
public
ParticleSystem.MinMaxCurve
radiusSpeed
;
Description
In animated modes, this determines how quickly the particle emission position moves along the radius.
The value is specified in world units.
Additional resources:
ParticleSystem.ShapeModule.radiusMode
,
Parti... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f5b0dff65048 | unity_docs | editor | Explain 'Add tests to a package' in Unity. | As with any kind of development, it’s good practice to add tests to your package. There are three things you must do to set up tests on your package:
Create the C# test files and
put them under the Tests folder
.
Create
asmdef files for your tests
.
Enable tests
for your package.
## Location of test files
You can add... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_4121c9acdcd7 | github | scripting | Write a Unity C# script called Demo Text Input | ```csharp
using UIToolkitXRAdapter.XRAdapter;
using UnityEngine.UIElements;
namespace Demo.UIs.TextInput {
public class DemoTextInput : XRTextInput {
public override void Activate(TextField textField) => textField.value = "Active";
public override void Deactivate(TextField textField) => te... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_man_ed134cd9e2fc | unity_docs | rendering | In Unity's 'Customize the global cache', what is 'Using the Preferences window' and how does it work? | To use the Preferences window to override the default location of the global cache, follow these steps.
Use one of the following methods to open the Preferences window:
Use the Unity Editor’s menus, as described in
Preferences
.
Open the Package Manager window, open the More (⋮) menu, and select
Preferences
.
Select th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_39581e7f7dd7 | unity_docs | scripting | In Unity's 'Apple’s privacy manifest policy requirements', what is 'Privacy manifest for Unity applications' and how does it work? | If you’re developing an application using Unity, consider the following steps:
Assess if your native application code uses any of the following APIs:
APIs listed under the
required reason API
category.
The
C# .Net framework APIs
in Unity framework.
If you meet one or both of the conditions from step 1,
create a privacy... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_97b44b36b167 | unity_docs | rendering | Show me a Unity C# example demonstrating `AssetImporter.GetAtPath`. | AssetImporter.GetAtPath
Declaration
public static
AssetImporter
GetAtPath
(string
path
);
Description
Retrieves the asset importer for the asset at
path
.
Additional resources:
ModelImporter
,
TextureImporter
,
AudioImporter
.
```csharp
using UnityEngine;
using UnityEditor;
public class GetAtPathExample... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_983cb9579222_doc_5 | github | scripting | What does `object` do in this Unity script? Explain its purpose and signature. | Our lock for THE instance.
Signature:
```csharp
private static readonly object InstanceLock = new object();
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_18652dc67ebc | unity_docs | editor | What is `EditorGUI.FloatField` in Unity? Explain its purpose and usage. | EditorGUI.FloatField
Declaration
public static float
FloatField
(
Rect
position
,
float
value
,
GUIStyle
style
= EditorStyles.numberField);
Declaration
public static float
FloatField
(
Rect
position
,
string
label
,
float
value
,
GUIStyle
style
= EditorStyles.numberField);
Declaration
public st... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d1c3635dde45 | unity_docs | rendering | Show me a Unity C# example demonstrating `ShaderKeywordFilter.RemoveOrSelectAttribute`. | Description
Either remove or include the specified shader keywords in the build, depending on the data field underneath.
Unity does the following in all
multi_compile
keyword sets:
Removes
keywordNames
if the data field under
RemoveOrSelect
matches the value of
condition
.
Includes only
keywordNames
if the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_33608810f520 | github | scripting | Write a Unity C# MonoBehaviour script called Node | ```csharp
//
// Copyright (c) Sandro Figo
//
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
namespace DebugMenu
{
public class Node
{
public MonoBehaviour monoBehaviour;
public MethodInfo method;
public readonly List<Node> chi... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
gh_6738bae9ebef | github | scripting | Write a Unity C# MonoBehaviour script called Mono Singleton | ```csharp
using UnityEngine;
namespace GrimTools.Runtime.Core
{
public abstract class MonoSingleton<T> : MonoBehaviour, ISingleton where T : MonoSingleton<T>
{
#region Fields
private static T _instance;
private SingletonInitializationStatus _initializationStatus = SingletonInitializati... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_man_83f6190bbaf9 | unity_docs | scripting | In Unity's 'Troubleshooting reflections', what is 'Box projection' and how does it work? | Normally, the reflection cubemap is assumed to be at an infinite distance from any given object. Different angles of the cubemap will be visible as the object turns but it is not possible for the object to move closer or farther away from the reflected surroundings. This often works very well for outdoor scenes but its... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0be5ca3bed7e | unity_docs | scripting | Show me a Unity C# example demonstrating `Animator.GetCurrentAnimatorStateInfo`. | formation on the current state.
Description
Returns an
AnimatorStateInfo
with the information on the current state.
Fetches the data from the current state in the Animator. Use this to get details from the state, including accessing the state’s speed, length, name and other variables. For gathering information f... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_76c8796fc3e0 | unity_docs | scripting | Explain 'Add a custom Web template' in Unity. | Create a custom Web template to control the appearance of the HTML page that displays your content.
Custom templates appear in
Web Player settings under Web Template
with the folder name and thumbnail image you provide.
## Create a custom template
The easiest way to create a custom Web template is to copy a built-in ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ad3e47a2175e | unity_docs | xr | Explain 'AR development in Unity' in Unity. | Get started with
augmented reality
development in Unity.
Augmented Reality (AR) involves a different set of design challenges compared to VR or traditional real-time 3D applications. An augmented reality app overlays its content on the real world around the user. AR devices, such as glasses, visors, or mobile devices, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1055a11358e8 | unity_docs | scripting | What is `Experimental.GraphView.GraphViewMinimapWindow.OnGraphViewChanged` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphViewMinimapWindow.OnGraphViewChanged
Declaration
protected void
OnGraphViewChanged
();
Description
Callback invoked when the GraphView has changed. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_08024081baa0 | unity_docs | rendering | What is `Texture2D.GetPixelBilinear` in Unity? Explain its purpose and usage. | Texture2D.GetPixelBilinear
Declaration
public
Color
GetPixelBilinear
(float
u
,
float
v
,
int
mipLevel
= 0);
Parameters
Parameter
Description
u
The normalized U coordinate to interpolate to. 0 is the left of the mipmap level and 1 is one pixel beyond the right. Values outside the 0,1 range will be handl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_97bf3b2a84a9 | unity_docs | physics | What is `SpringJoint.minDistance` in Unity? Explain its purpose and usage. | SpringJoint.minDistance
public float
minDistance
;
Description
The minimum distance between the bodies relative to their initial distance.
The distanced that will be maintained, will be kept between minDistance and maxDistance.
Both values are relative to the distance between the center of masses when the Scen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e7f17c8b3f08 | unity_docs | audio | Show me a Unity C# example demonstrating `AudioClip.SetData`. | ou can only set the sample data if you set
Load Type
to
Decompress on Load
in the
Audio Clip
importer.
For the best performance, use the Span version because you don't need to allocate managed memory.
Note:
The buffer provided contains a float value per sample and per channel. If your audio clip is stereo, the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_132700d31ea9 | unity_docs | editor | What is `Search.CustomObjectIndexerTarget` in Unity? Explain its purpose and usage. | CustomObjectIndexerTarget
struct in
UnityEditor.Search
Description
Represents a descriptor for the object that is about to be indexed. It stores a reference to the object itself as well as an already set up SerializedObject.
Properties
Property
Description
documentIndex
Document Index which owns the object to ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b42499e69258 | unity_docs | rendering | What is `ParticleSystemJobs.IJobParticleSystemExtensions` in Unity? Explain its purpose and usage. | IJobParticleSystemExtensions
class in
UnityEngine.ParticleSystemJobs
/
Implemented in:
UnityEngine.ParticleSystemModule
Description
Extension methods for Jobs using the
IJobParticleSystem
interface.
Static Methods
Method
Description
EarlyJobInit
Gathers and caches reflection data for the internal job syste... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a9f758fe9fcc | unity_docs | editor | What is `PlayerSettings.Android.minimumWindowHeight` in Unity? Explain its purpose and usage. | PlayerSettings.Android.minimumWindowHeight
public static int
minimumWindowHeight
;
Description
The minimum vertical size of the Android Player window in pixels.
```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;public class MinimumWindowHeightSample : MonoBehaviour
{
[MenuItem("Build/Min... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8df6b9d8471f | unity_docs | editor | In Unity's 'Play mode and Editor profile samples', what is 'Editor samples' and how does it work? | When you
profile the Editor process
, all the samples that were previously hidden under the EditorLoop marker contribute to their respective categories. This means that the information in the
CPU Profiler module’s detail pane
and its charts changes significantly.
There are certain
profiler markers
that only appear when... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_72201cfeaac2 | unity_docs | scripting | What is `AndroidJavaProxy` in Unity? Explain its purpose and usage. | AndroidJavaProxy
class in
UnityEngine
/
Implemented in:
UnityEngine.AndroidJNIModule
Description
This class can be used to implement any java interface. Any java vm method invocation matching the interface on the proxy object will automatically be passed to the c# implementation.
Note
: this API can be used fro... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f6399327a045 | unity_docs | scripting | Show me a Unity C# example demonstrating `Rigidbody2D.linearDamping`. | time.
Zero indicates that no damping should be used whereas higher values increase the damping, effectively slowing down the linear motion faster. Unlike contact friction, linear damping is always applied.
Note:
The following formula is how the linear damping is applied:
linearVelocity *= 1.0f / ( 1.0f + simulation-t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2cc85b3be7a2 | unity_docs | editor | Give me an overview of the `WSABuildAndRunDeployTarget` class in Unity. | WSABuildAndRunDeployTarget
enumeration
Description
Specifies the Windows device to deploy and launch the UWP app on when using Build and Run from the Editor.
This setting is ignored when performing a regular Build to generate a Visual Studio Solution.
Properties
Property
Description
LocalMachine
Runs the app o... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8c78a22e0b6d | unity_docs | scripting | Show me a Unity C# example demonstrating `Vector3.ClampMagnitude`. | Vector3.ClampMagnitude
Declaration
public static
Vector3
ClampMagnitude
(
Vector3
vector
,
float
maxLength
);
Description
Returns a copy of
vector
with its magnitude clamped to
maxLength
.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
// Move the obje... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f2f2351a4bc7 | unity_docs | rendering | What is `SystemInfo.supportsRenderTargetArrayIndexFromVertexShader` in Unity? Explain its purpose and usage. | SystemInfo.supportsRenderTargetArrayIndexFromVertexShader
public static bool
supportsRenderTargetArrayIndexFromVertexShader
;
Description
Boolean that indicates if SV_RenderTargetArrayIndex can be used in a vertex shader (true if it can be used, false if not). | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4e2a654cd48f | unity_docs | xr | What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.AverageThroughputMBPerSecond` in Unity? Explain its purpose and usage. | AsyncReadManagerSummaryMetrics.AverageThroughputMBPerSecond
public float
AverageThroughputMBPerSecond
;
Description
The mean rate of request throughput, in Mbps, for read request metrics included in the summary calculation.
This is similar to
bandwidth
, but takes into account the waiting time as well as readi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a9ed99be1a59 | unity_docs | rendering | What is `Texture2D.normalTexture` in Unity? Explain its purpose and usage. | Texture2D.normalTexture
public static
Texture2D
normalTexture
;
Description
Gets a small Texture with pixels that represent surface normal vectors at a neutral position.
Unity sets all pixels of this Texture to (0.5, 0.5, 1, 1). | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9e1292c2b2a5 | unity_docs | scripting | What is `UIElements.DropdownMenuSeparator` in Unity? Explain its purpose and usage. | DropdownMenuSeparator
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.DropdownMenuItem
/
Implemented in:
UnityEngine.UIElementsModule
Description
Provides a separator menu item.
Properties
Property
Description
subMenuPath
The submenu path to the separator. Path components are delimited by ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_afc860d2ebab | unity_docs | rendering | In Unity's 'Create and assign a material', what is 'Assign a material asset to a GameObject' and how does it work? | To render a GameObject using a material:
Add a component that inherits from
Renderer
.
MeshRenderer
is the most common and is suitable for most use cases, but SkinnedMeshRenderer ,
LineRenderer
, or TrailRenderer might be more suitable if your GameObject has special requirements.
Assign the material asset to the compon... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_174578a08289 | unity_docs | editor | What are the parameters of `ShortcutManagement.ShortcutManager.UnregisterContext` in Unity? | Description Removes a IShortcutContext from the shortcut context list. Additional resources: ShortcutManager.RegisterContext . ```csharp
using UnityEditor;
using UnityEditor.ShortcutManagement;
using UnityEngine;
public class ShortcutContextSample : EditorWindow
{
public class CustomShortcutContext : IShortcutCont... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a4a9e0bb449f | unity_docs | rendering | What is `GL.End` in Unity? Explain its purpose and usage. | GL.End
Declaration
public static void
End
();
Description
End drawing 3D primitives.
In OpenGL this matches
glEnd
; on other graphics APIs the same
functionality is emulated.
Additional resources:
GL.Begin
.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Draws a Triangle, a Quad and a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_57b6dba214d6 | unity_docs | physics | Show me a Unity C# example demonstrating `Rigidbody.AddExplosionForce`. | urface of the Rigidbody that is closest to
explosionPosition
but shifted along the y-axis by negative
upwardsModifier
. Using this parameter, you can make the explosion appear to throw objects up into the air, which can give a more dramatic effect rather than a simple outward force.
Force can be applied only to an a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7974163ad018 | unity_docs | rendering | Show me a Unity C# example demonstrating `AndroidDisplayOptions`. | AndroidDisplayOptions
enumeration
Description
Options to configure how your application renders on Android devices.
Set the value of this enum to
displayOptions
property.
```csharp
// This example demonstrates how to disable the default rendering behavior for secondary screens
using UnityEditor;
using UnityEdit... | 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.