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_3a6fa53d4dc5 | unity_docs | scripting | Show me a Unity C# example demonstrating `Vector2.operator_divide`. | Vector2.operator /
public static
Vector2
operator /
(
Vector2
a
,
float
d
);
Description
Divides a vector by a number.
Divides each component of
a
by a number
d
.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
// make the vector twice shorter: prints (0.5,1.0)
pri... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8204e27241f1 | unity_docs | rendering | Explain 'Decals and projectors' in Unity. | Resources and techniques for projecting materials to act as decals that decorate the surface of other materials.
Topic Description Introduction to decals and projection
Understand what decals are, how Unity uses projection to create them, and what you could use projection for.
Decals in the Universal Render Pipeline
Te... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_f82cb51563a0_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Locator class for managing items of type TBase.This class provides methods to add, retrieve, check for, and remove items in a type-safe manner.It ensures that items are stored and retrieved based on their most specific type.Generally, you can use the public API methods directly (e.g., AddItem, GetItem, HasItem, RemoveI... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_f8070e566adb | unity_docs | scripting | Show me a Unity C# example demonstrating `QualitySettings.antiAliasing`. | Multi-Sample Anti-aliasing (MSAA) that the GPU performs.
The value indicates the number of samples per pixel. Valid values are 0 (no MSAA), 2, 4, and 8. If the graphics API does not support the value you provide, it uses the next highest supported value.
MSAA is compatible only with Forward rendering. For more informa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_72e06f4bf5af | unity_docs | ui | What is `UIElements.ScrollView.ScrollTo` in Unity? Explain its purpose and usage. | ScrollView.ScrollTo
Declaration
public void
ScrollTo
(
UIElements.VisualElement
child
);
Parameters
Parameter
Description
child
The child to scroll to.
Description
Scroll to a specific child element.
This example creates a ScrollView that contains multiple labels. A Button is used to scroll to a sele... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1c493a0cccd7 | unity_docs | rendering | Explain 'Draw and configure a line in 3D space' in Unity. | To create a
Line Renderer
:
In the Unity menu bar, go to
GameObject
>
Effects
>
Line
.
Select the Line Renderer
GameObject
.
Add points to the Line Renderer’s Positions array, either by directly setting array values in the Inspector window or by using the
Create Points Scene Editing Mode. Refer to
Access scene editing ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_68ebcfd82389 | unity_docs | scripting | Explain 'Programming in Unity' in Unity. | Programming in Unity refers to authoring your project’s functionality in code rather than through the Unity Editor UI. This allows you to go beyond what can be done in the Editor UI alone. Interacting directly with the public Unity APIs allows for finer control and a greater degree of customization.
Learning to program... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5fd53d009d27 | unity_docs | input | Show me a Unity C# example demonstrating `Touch.position`. | Touch.position
public
Vector2
position
;
Description
The position of the touch in screen space pixel coordinates.
Position returns the current position of a touch contact as it's dragged. If you need the original position of the touch see
Touch.rawPosition
.
The bottom-left of the screen or window is at (0, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e2be41295715 | unity_docs | performance | What is `Profiling.Profiler.GetAllCategories` in Unity? Explain its purpose and usage. | Profiler.GetAllCategories
Declaration
public static void
GetAllCategories
(ProfilerCategory[]
categories
);
Declaration
public static void
GetAllCategories
(NativeArray<ProfilerCategory>
categories
);
Description
Returns all
ProfilerCategory
registered in Profiler.
Fills the provided array with a list o... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4043b325e49a | unity_docs | scripting | What is `UIElements.ConverterGroups.TryGetConverterGroup` in Unity? Explain its purpose and usage. | ConverterGroups.TryGetConverterGroup
Declaration
public static bool
TryGetConverterGroup
(string
groupId
,
out
UIElements.ConverterGroup
converterGroup
);
Parameters
Parameter
Description
groupId
The group ID.
converterGroup
The converter group.
Description
Retrieves a converter group by ID. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c3dfceef9229 | unity_docs | scripting | What is `Experimental.GraphView.GraphView.FrameNext` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphView.FrameNext
Declaration
public
Experimental.GraphView.EventPropagation
FrameNext
();
Declaration
public
Experimental.GraphView.EventPropagation
FrameNext
(Func<GraphElement,bool>
predicate
);
Parameters
Param... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_98c880f1b309 | unity_docs | rendering | Show me a Unity code example for 'Add material properties'. | To assign material properties to a Shader object in ShaderLab , you place a Properties block inside a Shader block.
If you want to access some of those properties in a
shader program
, you need to declare a Cg/HLSL variable with the same name and a matching type.
For example these shader properties:
```
_MyColor ("Some... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_24ccbac90b38 | unity_docs | scripting | Show me a Unity C# example demonstrating `QualitySettings.resolutionScalingFixedDPIFactor`. | QualitySettings.resolutionScalingFixedDPIFactor
public static float
resolutionScalingFixedDPIFactor
;
Description
In resolution scaling mode, this factor is used to multiply with the target Fixed DPI specified to get the actual Fixed DPI to use for this quality setting.
Additional resources:
Multi-Resolution ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1925886e616a | unity_docs | scripting | What is `ExcludeFromObjectFactoryAttribute` in Unity? Explain its purpose and usage. | ExcludeFromObjectFactoryAttribute
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Add this attribute to a class to prevent the class and its inherited classes from being created with
ObjectFactory
methods.
Constructors
Constructor
Description
ExcludeFromObjectFactoryAttribute
Defa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_eeaaa920fb6e | unity_docs | scripting | What is `MPE.ChannelClient.Start` in Unity? Explain its purpose and usage. | ChannelClient.Start
Declaration
public void
Start
(bool
autoTick
);
Parameters
Parameter
Description
autoTick
Specifies whether Unity processes (ticks) this ChannelClient's incoming and outgoing messages automatically, or the user processes (ticks) them manually, either in the main thread or a dedicated thre... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_5e1dd91ed13e | unity_docs | rendering | Explain 'USS common properties' in Unity. | This page introduces the common USS properties, their syntax and accepted values, and differences from CSS. For a complete list of USS properties, see
USS properties reference
.
## All
The all property resets all properties to their default value. This property doesn’t apply to the custom USS properties.
```
all: ini... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9c35e02d0395 | unity_docs | scripting | What is `AssetBundleManifest.GetAllDependencies` in Unity? Explain its purpose and usage. | AssetBundleManifest.GetAllDependencies
Declaration
public string[]
GetAllDependencies
(string
assetBundleName
);
Parameters
Parameter
Description
assetBundleName
Name of the asset bundle.
Description
Get all the dependent AssetBundles for the given AssetBundle. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8cb5720ad009 | unity_docs | scripting | What is `Selection.instanceIDs` in Unity? Explain its purpose and usage. | Selection.instanceIDs
public static int[]
instanceIDs
;
Description
The actual unfiltered selection from the Scene returned as instance ids instead of
objects
.
All objects will be returned, including assets in projects. You can also assign objects to the selection.
The instance ID of an object is always guara... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0b53e26e9469 | unity_docs | animation | What is `Animations.LookAtConstraint.roll` in Unity? Explain its purpose and usage. | LookAtConstraint.roll
public float
roll
;
Description
The rotation angle along the z axis of the object. The constraint uses this property to calculate the world up vector when Animations.LookAtConstraint.UseUpObject is false. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_2a1c58b33a09 | github | scripting | Write a Unity C# script called Swipe Mode Controller | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SwipeModeController {
private GameObject _die;
private Rigidbody rigidbody;
private Vector3 startPosition = Vector3.zero;
private Vector3 endPosition = Vector3.zero;
private Vector3 direction = V... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_fa4a1c72c704 | unity_docs | rendering | What is `MaterialPropertyBlock.GetMatrix` in Unity? Explain its purpose and usage. | MaterialPropertyBlock.GetMatrix
Declaration
public
Matrix4x4
GetMatrix
(string
name
);
Declaration
public
Matrix4x4
GetMatrix
(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 ma... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_94c216cb2541_doc_1 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Default prefix to be added to the feedback.
Signature:
```csharp
public const string DEFAULT_FEEDBACK_PREFIX = "Correct Answer was:";
``` | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_dd9a2a7e56bd | unity_docs | performance | What is `Mesh.SetColors` in Unity? Explain its purpose and usage. | Mesh.SetColors
Declaration
public void
SetColors
(Color32[]
inColors
);
Declaration
public void
SetColors
(Color[]
inColors
);
Declaration
public void
SetColors
(List<Color32>
inColors
);
Declaration
public void
SetColors
(List<Color>
inColors
);
Declaration
public void
SetColors
(NativeArray<T>... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_026736cca8e2 | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormat.D16_UNorm` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormat.D16_UNorm
Description
A one-component, 16-bit unsigned normalized format that has a single 16-bit depth component. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_87e820d3a3b0 | unity_docs | scripting | What is `Vector2.operator_divide` in Unity? Explain its purpose and usage. | Vector2.operator /
public static
Vector2
operator /
(
Vector2
a
,
float
d
);
Description
Divides a vector by a number.
Divides each component of
a
by a number
d
.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
// make the vector twice shorter: prints (0.5,1.0)
pri... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_5b96ec760e07_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Base class for singletons. Contains method stubs and the Create method. Use this to create custom Singleton flavors.If you're looking to create a singleton, inherit Singleton or LazySingleton.
Signature:
```csharp
public abstract class BaseSingleton : PreloadedScriptableObject
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_570665879388 | unity_docs | editor | Show me a Unity C# example demonstrating `EditorUtility.SaveFilePanelInProject`. | lete, the return value is an empty string. Common cases where this can happen include:
The user clicks Cancel.
The chosen path would be invalid or outside
Assets/
and Unity rejects it.
The extension enforcement conflicts and Unity can't resolve it.
There is no structured error object; you only get an empty string... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e4cefcf45014 | unity_docs | scripting | Show me a Unity C# example demonstrating `Search.IPropertyDatabaseView.InvalidateMask`. | aration
public void
InvalidateMask
(ulong
documentKeyMask
);
Parameters
Parameter
Description
documentKeyMask
A document key mask.
Description
Invalidate all properties stored from multiple documents that match a document key mask.
This operation is slower than the simpler
IPropertyDatabaseView.Invalidate
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_50015c2bdd22 | unity_docs | editor | Show me a Unity code example for 'Simulate hitches for testing'. | game handles performance issues like lag spikes, frame drops, stuttering, or degraded UI responsiveness under stress.
The following is a simple MonoBehaviour script that you can attach to any GameObject in your
scene
. It causes the main thread to hang at regular intervals, simulating a hitch or spike in frame time. Yo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_29f91b5a8fe3 | unity_docs | rendering | In Unity's 'Surface Shaders and rendering paths in the Built-In Render Pipeline', what is 'Forward Rendering path' and how does it work? | ForwardBase
pass renders ambient,
lightmaps
, main directional light and not important (vertex/SH) lights at once.
ForwardAdd
pass is used for any additive per-pixel lights; one invocation per object illuminated by such light is done. See
Forward Rendering
for details.
If forward rendering is used, but a shader does no... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b93e6e71c3f7 | unity_docs | ui | What is `UIElements.VisualElementFocusRing.GetFocusChangeDirection` in Unity? Explain its purpose and usage. | VisualElementFocusRing.GetFocusChangeDirection
Declaration
public
UIElements.FocusChangeDirection
GetFocusChangeDirection
(
UIElements.Focusable
currentFocusable
,
UIElements.EventBase
e
);
Description
Get the direction of the focus change for the given event. For example, when the Tab key is pressed, fo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_358eef59e764 | unity_docs | xr | What is `Android.Permission.ExternalStorageRead` in Unity? Explain its purpose and usage. | Permission.ExternalStorageRead
public static string
ExternalStorageRead
;
Description
Used when requesting permission or checking if permission has been granted to read from external storage such as a SD card. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9248b8416800 | unity_docs | rendering | What is `Material.doubleSidedGI` in Unity? Explain its purpose and usage. | Material.doubleSidedGI
public bool
doubleSidedGI
;
Description
Gets and sets whether the Double Sided Global Illumination setting is enabled for this material.
When enabled, the lightmapper accounts for both sides of the geometry when calculating Global Illumination. Backfaces are not rendered or added to ligh... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a488f15d9c9a | unity_docs | rendering | What is `Camera.targetTexture` in Unity? Explain its purpose and usage. | Camera.targetTexture
public
RenderTexture
targetTexture
;
Description
Destination render texture.
Usually cameras render directly to screen, but for some effects it is useful to make
a camera render into a texture. This is done by creating a
RenderTexture
object
and setting it as
targetTexture
on the cam... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_beb044d100db | unity_docs | xr | In Unity's 'Game state hinting', what is 'Manual game state hinting' and how does it work? | You can use
AndroidGame.SetGameState
method to indicate the current game state of your application to Android. It’s best practice to call this method when your application transitions to or from a loading state to make sure the operating system is aware of the state of your application.
Note
: Automated game state hint... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f550c64c2cb5 | unity_docs | editor | In Unity's 'Create a pop-up window', what is 'Create the pop-up window content' and how does it work? | Create a UI Document (UXML file) to define the content in the pop-up window. Create a C# class to set the window size and to display the window.
In the Editor folder, create a UI Document named
PopupWindowContent.uxml
with the following content:
```
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIEl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b2af48c85b0d | unity_docs | physics | Explain 'Troubleshoot D3D12 GPU crashes on Windows' in Unity. | A GPU crash can cause the Unity Editor to close unexpectedly and return a graphics error, for example,
Unrecoverable D3D12 device error! Run with -force-d3d12-debug and see logs for more info
. Diagnosing these crashes is often difficult because the cause might not be in your project’s code. This page explains how to i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ae79086ebca1 | unity_docs | xr | What is `AssetPreview.IsLoadingAssetPreviews` in Unity? Explain its purpose and usage. | AssetPreview.IsLoadingAssetPreviews
Declaration
public static bool
IsLoadingAssetPreviews
();
Description
Loading previews is asynchronous so it is useful to know if any requested previews are in the process of being loaded so client code e.g can repaint while waiting. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_487527c5a1b1 | unity_docs | scripting | What is `Unity.Hierarchy.Hierarchy.GetOrCreateNodeTypeHandler` in Unity? Explain its purpose and usage. | Hierarchy.GetOrCreateNodeTypeHandler
Declaration
public T
GetOrCreateNodeTypeHandler
();
Returns
T
The hierarchy node type handler instance for that type.
Description
Get or create a hierarchy node type handler instance for this hierarchy.
If a hierarchy node type handler with that type is already cre... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d3c5dc7b01c6 | unity_docs | physics | What is `Physics2D.SyncTransforms` in Unity? Explain its purpose and usage. | Physics2D.SyncTransforms
Declaration
public static void
SyncTransforms
();
Description
Synchronizes.
When a
Transform
component changes, any
Rigidbody2D
or
Collider2D
on that
Transform
or its children may need to be repositioned, rotated or scaled depending on the change to the
Transform
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ae52929fa658 | unity_docs | xr | What is `MPE.EventService.CancelRequest` in Unity? Explain its purpose and usage. | EventService.CancelRequest
Declaration
public static bool
CancelRequest
(string
eventType
,
string
message
);
Parameters
Parameter
Description
eventType
The event to cancel.
message
The error message sent to the pending request.
Returns
bool
Returns true if a pending request was found and cancelled fa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dc4a35e72c7e | unity_docs | scripting | What is `PlayerPrefs.DeleteKey` in Unity? Explain its purpose and usage. | PlayerPrefs.DeleteKey
Declaration
public static void
DeleteKey
(string
key
);
Description
Removes the given
key
from the PlayerPrefs. If the key does not exist,
DeleteKey
has no impact.
The following example shows a public function called ‘DeleteKey’. The function takes a string variable called ‘KeyName’ a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1f53494a5afc | unity_docs | scripting | Show me a Unity C# example demonstrating `AssetBundle.LoadFromFile`. | isk.
The function supports bundles of any compression type.
In case of
LZMA
compression, the file content will be fully decompressed into memory and loaded from there. See
AssetBundles compression
for more details.
Compared to
LoadFromFileAsync
, this version is synchronous and will not return until it is done cr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9724bb2b9385 | unity_docs | animation | Explain 'Timeline' in Unity. | com.unity.timeline
## Description
Use Unity Timeline to create cinematic content, game-play sequences, audio sequences, and complex particle effects.
## Released for Unity
Package version 1.8.12 is released for Unity Editor version 6000.0. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ae3bce02472a | unity_docs | scripting | What is `U2D.SpriteAtlasPackingSettings.enableTightPacking` in Unity? Explain its purpose and usage. | SpriteAtlasPackingSettings.enableTightPacking
public bool
enableTightPacking
;
Description
Determines if sprites should be packed tightly during packing.
Tight packing means the mesh of the sprite is used as the boundary of the sprite during packing, instead of the full rectangle. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ea2f0a12aeb0 | unity_docs | scripting | What is `Unity.Properties.GeneratePropertyBagAttribute` in Unity? Explain its purpose and usage. | GeneratePropertyBagAttribute
class in
Unity.Properties
/
Implemented in:
UnityEngine.PropertiesModule
Description
Use this attribute to have the source generator generate property bags for a given type. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f92497433635 | unity_docs | animation | What is `Animations.ParentConstraint.rotationAxis` in Unity? Explain its purpose and usage. | ParentConstraint.rotationAxis
public
Animations.Axis
rotationAxis
;
Description
The rotation axes affected by the ParentConstraint.
Use this property to restrict the rotation of the constrained object on a particular axis.
```csharp
using UnityEngine.Animations;public class ConstraintAxis
{
public void Cons... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_ac4475661729_doc_7 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Represents an object which can be initialized using seven arguments.-derived classes that implement this interface can be instantiated with arguments using the function.-derived classes that implement this interface can be added to a with arguments using the GameObject.AddComponent function.These functions can automati... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_e66ac901b809 | unity_docs | networking | What is `Android.AndroidConfiguration.fontWeightAdjustment` in Unity? Explain its purpose and usage. | AndroidConfiguration.fontWeightAdjustment
public int
fontWeightAdjustment
;
Description
Mirrors the Android property
fontWeightAdjustment
.
For information about this property, refer to the Android developer documentation on
fontWeightAdjustment
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a7f4979dc7cf | unity_docs | scripting | In Unity's 'Create a property visitor with the PropertyVisitor class', what is 'Create data and utility classes' and how does it work? | Create a simple data class and a utility class that uses the visitor to visit and print its properties:
Create the following C# class called Data with properties that can be visited:
```csharp
using System.Collections.Generic;
using UnityEngine;
public class Data
{
public string Name = "Henry";
public Vector2 Vec2 =... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_fd89907967d9 | unity_docs | scripting | Show me a Unity code example for 'Customize IMGUI controls'. | nctions have an optional last parameter: the GUIStyle to use for displaying the Control. If this is omitted, Unity’s default GUIStyle will be used. This works internally by applying the name of the control type as a string, so
GUI.Button()
uses the “button” style,
GUI.Toggle()
uses the “toggle” style, etc. You can over... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_af9b23465a9a | unity_docs | performance | What is `Search.QueryGraphOptimizationOptions.swapNotToRightHandSide` in Unity? Explain its purpose and usage. | QueryGraphOptimizationOptions.swapNotToRightHandSide
public bool
swapNotToRightHandSide
;
Description
Swaps "Not" operations to the right-hand side of combining operations (i.e. "And", "Or"). Useful if a "Not" operation is slow. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a98fce9bcef1 | unity_docs | scripting | What is `GUI.GroupScope` in Unity? Explain its purpose and usage. | GroupScope
class in
UnityEngine
/
Implemented in:
UnityEngine.IMGUIModule
Description
Disposable helper class for managing
BeginGroup
/
EndGroup
.
BeginGroup
is called at construction, and
EndGroup
is called when the instance is disposed.
When you begin a group, the coordinate system for GUI controls are ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_39941c801eec | unity_docs | scripting | Show me a Unity C# example demonstrating `Events.UnityEvent_2`. | UnityEvent<T0,T1>
class in
UnityEngine.Events
/
Inherits from:
Events.UnityEventBase
/
Implemented in:
UnityEngine.CoreModule
Description
Two argument version of
UnityEvent
.
Generics are supported, specify type parameters on initialization as shown in the example. Refer to
Configure callbacks in the Inspec... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8719df9b93d1 | unity_docs | editor | Show me a Unity code example for 'Create a simple transition with UI Builder and C# scripts'. | the labels:
In the Scale row, change the X value to
1.1
.
In the Rotate row, enter
10
.
In the StyleSheets window, click
Add new selector
and enter Label to add a style for the label.
Press Enter and select Label in the list of USS selectors.
In the
Transition Animations
section, enter
3
in the Duration row.
Save and c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_941beaef3cf4 | unity_docs | rendering | Show me a Unity C# example demonstrating `StaticEditorFlags.ContributeGI`. | computing lighting data at bake time. The ContributeGI property exposes the
ReceiveGI
property. The ContributeGI property only takes effect if you enable a global illumination setting such as
Baked Global Illumination
or
Enlighten Realtime Global Illumination
for the target Scene. For additional context, see
thi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_803c10126804 | unity_docs | rendering | What is `ParticleSystem.Particle.startSize` in Unity? Explain its purpose and usage. | ParticleSystem.Particle.startSize
public float
startSize
;
Description
The initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.
This is particle's size in meters in world space. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3a7e5758c92c | unity_docs | rendering | What is `SpriteRenderer` in Unity? Explain its purpose and usage. | SpriteRenderer
class in
UnityEngine
/
Inherits from:
Renderer
/
Implemented in:
UnityEngine.CoreModule
Description
Renders a Sprite for 2D graphics.
```csharp
//This example outputs Sliders that control the red green and blue elements of a sprite's color
//Attach this to a GameObject and attach a SpriteRender... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_57947345513c | github | scripting | Write a Unity C# script called Script Extension Field | ```csharp
using System;
using ClusterVR.CreatorKit.Item.Implements;
using Newtonsoft.Json;
using UnityEngine;
namespace Baxter.ClusterScriptExtensions
{
/// <summary>
/// Scriptで定義されたフィールド値1つを表現する値。
/// 全ての型が入りうるような構造をしており、大きい
/// </summary>
[Serializable]
public class ScriptExtensionField
... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_5e4466d43e74 | unity_docs | editor | What is `Handles.DrawAAConvexPolygon` in Unity? Explain its purpose and usage. | Handles.DrawAAConvexPolygon
Declaration
public static void
DrawAAConvexPolygon
(params Vector3[]
points
);
Parameters
Parameter
Description
points
List of points describing the convex polygon.
Description
Draw anti-aliased convex polygon specified with point array.
```csharp
using UnityEditor;
using Unity... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_630ff4307b94 | unity_docs | scripting | Show me a Unity C# example demonstrating `UIElements.StyleSheet`. | leObject
/
Implemented in:
UnityEngine.UIElementsModule
Description
Style sheets are applied to visual elements in order to control the layout and visual appearance of the user interface.
The
StyleSheet
class holds the imported data of USS files in your project.
Once loaded, a style sheet can be attached t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c29fc965cc2e | unity_docs | xr | Explain 'Dynamic heap allocator example' in Unity. | ## Example usage report
An example usage report for the dynamic heap allocator is as follows:
```
[ALLOC_DEFAULT_MAIN]
Peak usage frame count: [16.0 MB-32.0 MB]: 497 frames, [32.0 MB-64.0 MB]: 1 frames
Requested Block Size 16.0 MB
Peak Block count 2
Peak Allocated memory 54.2 MB
Peak Large allocation bytes 40.2 MB
```... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c366a6b9d6d4 | unity_docs | editor | What is `EditorGUI.FocusTextInControl` in Unity? Explain its purpose and usage. | EditorGUI.FocusTextInControl
Declaration
public static void
FocusTextInControl
(string
name
);
Parameters
Parameter
Description
name
Name set using
GUI.SetNextControlName
.
Description
Move keyboard focus to a named text field and begin editing of the content.
In Editor GUI, text fields can have keyboard... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_350bd6fb0d4b | unity_docs | scripting | What is `iOS.Xcode.XcScheme.ReadFromStream` in Unity? Explain its purpose and usage. | XcScheme.ReadFromStream
Declaration
public void
ReadFromStream
(TextReader
tr
);
Parameters
Parameter
Description
tr
The project contents.
Description
Reads the scheme from the given text reader.
The existing values of this XcScheme instance are discarded and replaced with the values read from the text re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e62fc9287d5a | unity_docs | scripting | What is `Experimental.GraphView.ContentZoomer.scaleStep` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
ContentZoomer.scaleStep
public float
scaleStep
;
Description
Zoom step: percentage of variation between a zoom level and the next. For example, with a value of 0.15, which represents 15%, a zoom level of 200% will become 230%... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_73723be36ba9 | unity_docs | rendering | What is `Rendering.ScriptableCullingParameters.conservativeEnclosingSphere` in Unity? Explain its purpose and usage. | ScriptableCullingParameters.conservativeEnclosingSphere
public bool
conservativeEnclosingSphere
;
Description
This property enables a conservative method for calculating the size and position of the minimal enclosing sphere around the frustum cascade corner points for shadow culling.
The default value is
false... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_153df15c5fe6 | unity_docs | physics | In Unity's 'Perforce Integration', what is 'Integration through the CLI' and how does it work? | When you connect Perforce through the command line interface, the provider is enabled immediately but only becomes active after
Provider.UpdateSettings()
completes its asynchronous update.
Note
: If your workflow requires the provider to be active immediately, call
Provider.UpdateSettings().Wait()
before you check the ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_caedfa8f5bfc | unity_docs | editor | Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.RemoveAssetTag`. | roject.RemoveAssetTag
Declaration
public void
RemoveAssetTag
(string
tag
);
Parameters
Parameter
Description
tag
The name of the asset tag.
Description
Removes an asset tag.
Removes the given asset tag from the list of configured asset tags for all files on all targets, the list of asset tags configured f... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5dfaed4a748f | unity_docs | rendering | What is `TextureImporterSettings.flipbookColumns` in Unity? Explain its purpose and usage. | TextureImporterSettings.flipbookColumns
public int
flipbookColumns
;
Description
The number of columns in the source image for a Texture2DArray or Texture3D.
When Unity imports a texture with a
textureShape
of
TextureImporterShape.Texture2DArray
or
TextureImporterShape.Texture3D
, it divides the source ima... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3980d1337f0a | unity_docs | xr | What is `Android.ExitReason` in Unity? Explain its purpose and usage. | ExitReason
enumeration
Description
The reason code for termination of the process.
Properties
Property
Description
Unknown
Mirrors android:public static final int REASON_UNKNOWN.
ExitSelf
Mirrors android:public static final int REASON_EXIT_SELF.
Signaled
Mirrors android:public static final int REASON_SIGNALED... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cf2ab0d2dc6c | unity_docs | math | What is `UIElements.IPointerEvent.radius` in Unity? Explain its purpose and usage. | IPointerEvent.radius
public
Vector2
radius
;
Description
Gets an estimate of the radius of a touch.
Add
radiusVariance
to get the maximum touch radius, subtract it to get the minimum touch radius. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0ec19f199bef | unity_docs | math | What is `Camera.CalculateObliqueMatrix` in Unity? Explain its purpose and usage. | Camera.CalculateObliqueMatrix
Declaration
public
Matrix4x4
CalculateObliqueMatrix
(
Vector4
clipPlane
);
Parameters
Parameter
Description
clipPlane
Vector4 that describes a clip plane.
Returns
Matrix4x4
Oblique near-plane projection matrix.
Description
Calculates and returns oblique near-plane pr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_46a614c30f9b | unity_docs | rendering | What is `AssetImporters.LightDescription.GetVector4PropertyNames` in Unity? Explain its purpose and usage. | LightDescription.GetVector4PropertyNames
Declaration
public void
GetVector4PropertyNames
(List<string>
names
);
Parameters
Parameter
Description
names
The list of retrieved property names.
Description
Retrieves the property names of type Vector4 for this light. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_905a32021e6f | unity_docs | ui | Explain 'USS transition' in Unity. | USS transitions are similar to
CSS transitions
. A USS transition changes property values over a given duration. You can use a USS transition to create an animation that changes the appearance of a
visual element
. For example, you can use a UI transition to make UI elements that change size or color when a user hovers... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c1fa2cdf39de | unity_docs | scripting | What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.CopyPtrToStructure` in Unity? Explain its purpose and usage. | UnsafeUtility.CopyPtrToStructure
Declaration
public static void
CopyPtrToStructure
(void*
ptr
,
out T
output
);
Parameters
Parameter
Description
ptr
The memory pointer to copy from.
output
A struct to copy data to.
Description
Copies sizeof(T) bytes from a memory pointer to a struct. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1e19cb1bcc95 | unity_docs | rendering | In Unity's 'Vulkan', what is 'Vulkan device filtering' and how does it work? | You can manage Vulkan support on Android devices to fine-tune which devices use the Vulkan API with the
Android Vulkan Allow and Deny Filter Lists
. The
Android Vulkan Deny Filter List
allows you to exclude specific Android devices on which Vulkan might lead to suboptimal performance. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_99eaa02d06d0 | unity_docs | rendering | What is `MaterialProperty.PropType` in Unity? Explain its purpose and usage. | PropType
enumeration
Description
Material property type.
Material properties can be textures, colors, floats and so on.
Additional resources:
MaterialProperty.type
.
Properties
Property
Description
Color
Color property.
Vector
Vector property.
Float
Float property.
Range
Ranged float (with min/max values) ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_53fd680cde63 | unity_docs | animation | Explain 'Create a new Animation Clip' in Unity. | To create a new
Animation Clip
, do the following:
Select a GameObject in your
Scene
.
Go to
Window
>
Animation
>
Animation
to open the
Animation Window
,
If the GameObject is not assigned an animation clip, the Create button displays in the centre of the Animation Window.
Click the Create button. Unity prompts you to ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9ede9117766b | unity_docs | scripting | What is `SystemInfo.batteryLevel` in Unity? Explain its purpose and usage. | SystemInfo.batteryLevel
public static float
batteryLevel
;
Description
The current battery level (Read Only).
The current level of the battery, represented as a float between
0
and
1
.
If the battery level is not available on your target platform, this property returns
-1
.
```csharp
using UnityEngine;... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b0012e9e2c49 | unity_docs | editor | Show me a Unity C# example demonstrating `QualitySettings.TryIncludePlatformAt`. | TargetGroupName
,
int
index
,
out Exception
error
);
Parameters
Parameter
Description
buildTargetGroupName
The platform name.
index
The index of the Quality Level, must be positive and lower than the count of Quality Levels.
error
The error found by the API.
Returns
bool
If errors were found.
Descri... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e42c8275d8d2 | unity_docs | rendering | Show me a Unity code example for 'Include a shader pass with the UsePass command'. | The UsePass command inserts a named Pass from another Shader object. You can use this command to reduce code duplication in shader source files.
## Example
This example code creates a
Shader object
called ContainsNamedPass, which contains a Pass called ExampleNamedPass.
```
Shader "Examples/ContainsNamedPass"
{
SubS... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b89da1c3f9b7 | unity_docs | scripting | What is `Color.b` in Unity? Explain its purpose and usage. | Color.b
public float
b
;
Description
Blue component of the color.
The value ranges from 0 to 1.
```csharp
//Attach this script to a GameObject with a Renderer attached to it
//Use the sliders in Play Mode to change the Color of the GameObject's Materialusing UnityEngine;public class Example : MonoBehaviour
{
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_caf905bfb36e | unity_docs | math | In Unity's 'BoundsIntField', what is 'Example' and how does it work? | The following UXML example creates a BoundsIntField:
```
<UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
<BoundsIntField label="UXML Field" name="the-uxml-field" />
</UXML>
```
The following C# example illustrates some of the customizable functionalities of the BoundsIntField:
```
/// <sample>... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_497ea844922e | unity_docs | editor | What is `AssetImporters.AssetImporterEditor.extraDataType` in Unity? Explain its purpose and usage. | AssetImporterEditor.extraDataType
protected Type
extraDataType
;
Description
Override this property to return a type that inherits from ScriptableObject. This makes the AssetImporterEditor aware of serialized data outside of the Importer.
When returning a type that inherits from ScriptableObject, the AssetImpor... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_009ac3cde30c | github | scripting | Write a Unity C# script called Sliced Hull | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EzySlice {
/**
* The final generated data structure from a slice operation. This provides easy access
* to utility functions and the final Mesh data for each section of the HULL.
*/
public sealed ... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_6d77d1dbf194 | unity_docs | scripting | What is `SearchService.ISearchContext.requiredTypeNames` in Unity? Explain its purpose and usage. | ISearchContext.requiredTypeNames
public IEnumerable<string>
requiredTypeNames
;
Description
An IEnumerable of strings that contains the type name constraints for this search.
These constraints provide the class names of the objects included in the search. This can be null or empty. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b8ad15cffb38 | unity_docs | ui | In Unity's 'Find visual elements with UQuery', what is 'Query elements' and how does it work? | You can query elements by their name , their
USS class
, or their
element type (C# type)
. You can also query with a predicate or make
complex hierarchical queries
.
The following sections use this example UXML to demonstrate how to find elements:
```
<UXML xmlns="UnityEngine.UIElements">
<VisualElement name="containe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_161747f781b1 | unity_docs | scripting | Show me a Unity C# example demonstrating `Vector3.operator_subtract`. | Vector3.operator -
public static
Vector3
operator -
(
Vector3
a
,
Vector3
b
);
Description
Subtracts one vector from another.
Subtracts each component of
b
from
a
.
```csharp
// prints (-5.0,-3.0,-1.0)using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
void Exampl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0a0b39133d3f | unity_docs | editor | Show me a Unity C# example demonstrating `StaticEditorFlags.ReflectionProbeStatic`. | StaticEditorFlags.ReflectionProbeStatic
Description
Include this GameObject when when precomputing data for
Reflection Probes
whose
Type
property is set to
Baked
.
For more information, see the documentation on [[wiki:ReflectionProbes|Reflection Probes].
```csharp
using UnityEngine;
using UnityEditor;
public ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_1724f442d80c_doc_10 | github | scripting | What does `ConvertToLinearColorspace` do in this Unity script? Explain its purpose and signature. | Convert the light colors to linearBeware that you will lose information when quantizing down fromlinear-float32 to linear-uint8.
Signature:
```csharp
public static void ConvertToLinearColorspace(LightPayload lights)
``` | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_cd070d499835 | unity_docs | scripting | Give me an overview of the `ArticulationDofLock` class in Unity. | ArticulationDofLock
enumeration
Description
The lock type applied to a particular degree of freedom of an articulation body.
Properties
Property
Description
LockedMotion
The relative motion of the two connected articulation bodies is not allowed.
LimitedMotion
The relative motion of the two connected articulat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1970ff860e19 | unity_docs | editor | What are the parameters of `iOS.Xcode.PBXProject.ReplaceFile` in Unity? | Description Replaces a specified file with a new file. The path to the specified file is replaced and the GUID of the old file is preserved. ```csharp
using UnityEditor;
using System.IO;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;public class Sample_ReplaceFile
{
[PostProcessBuild]
public static... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9572fbbda028 | unity_docs | scripting | What is `SystemLanguage.Chinese` in Unity? Explain its purpose and usage. | SystemLanguage.Chinese
Description
Chinese.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Chinese language
if (Application.systemLanguage == SystemLanguage.Chinese)
{
//Outputs into console that the system is in Ch... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ecb04071d112 | unity_docs | physics | Show me a Unity C# example demonstrating `Collider2D.OnTriggerExit2D`. | when another object leaves a trigger collider attached to this object (2D physics only).
Further information about the other collider is reported in the Collider2D parameter passed during the call.
Notes: Trigger events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions.
Ad... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ada25e924691 | unity_docs | physics | What is `ContactPoint2D.otherCollider` in Unity? Explain its purpose and usage. | ContactPoint2D.otherCollider
public
Collider2D
otherCollider
;
Description
The other
Collider2D
involved in the collision with the
collider
.
This collider is attached to the
Collision2D.otherRigidbody
.
Additional resources:
Collider2D
and
Rigidbody2D
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f5f796134e14 | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.limit`. | ParticleSystem.LimitVelocityOverLifetimeModule.limit
public
ParticleSystem.MinMaxCurve
limit
;
Description
Maximum velocity curve, when not using one curve per axis.
Additional resources:
MinMaxCurve
.
```csharp
using UnityEngine;
using System.Collections;[RequireComponent(typeof(ParticleSystem))]
public c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c2f5d0b246ac | unity_docs | scripting | What is `Unity.Android.Gradle.NativeBuildOption` in Unity? Explain its purpose and usage. | NativeBuildOption
class in
Unity.Android.Gradle
/
Inherits from:
Unity.Android.Gradle.BaseBlock
Description
The C# definition of
externalNativeBuild
build options in a gradle file.
For more information about the file, see Android's documentation:
ExternalNativeBuildOptions
Properties
Property
Description
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0b97062322f4 | unity_docs | scripting | What is `PenStatus.Inverted` in Unity? Explain its purpose and usage. | PenStatus.Inverted
Description
The pen is inverted.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void OnGUI()
{
Event m_Event = Event.current; if (m_Event.type == EventType.MouseDown)
{
if (m_Event.pointerType == PointerType.Pen) //Check if it's a pen event.
{
if (m_Event.penStatus == P... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_33053ac40d7c | unity_docs | physics | Show me a Unity C# example demonstrating `SpherecastCommand`. | dex N in the command buffer are stored at index N * maxHits in the results buffer.
Spherecast command also allows you to control whether or not Trigger colliders and back-face triangles generate a hit. Use
QueryParameters
to control hit flags.
Note: Only BatchQuery.ExecuteSpherecastJob is logged into the profiler. Qu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b00a424a78f4 | unity_docs | performance | Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorderOptions.SumAllSamplesInFrame`. | ProfilerRecorderOptions.SumAllSamplesInFrame
Description
Use to sum all samples within a frame and collect those as one sample per frame.
```csharp
using System;
using Unity.Profiling;
using UnityEngine;public class CollectGCAllocCountExample2
{
static void PrintGCAllocCount(Action a)
{
using (var gcAllocRecorde... | 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.