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_66a87e81d9ef | unity_docs | rendering | What is `Device.SystemInfo.supportsComputeShaders` in Unity? Explain its purpose and usage. | SystemInfo.supportsComputeShaders
public static bool
supportsComputeShaders
;
Description
This has the same functionality as
SystemInfo.supportsComputeShaders
and also mimics platform-specific behavior in the Unity Editor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f88a402ab737 | unity_docs | physics | What is `CustomRenderTextureManager.initializeTriggered` in Unity? Explain its purpose and usage. | CustomRenderTextureManager.initializeTriggered
Description
Unity raises this event when
CustomRenderTexture.Initialize
is called.
Use this event to keep track of CustomRenderTexture initialization. This is useful if you are writing your own CustomRenderTexture update loop.
Additional resources: Rendering.Graphics... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_86a4c1f9417d | unity_docs | animation | What is `HumanTrait.BoneName` in Unity? Explain its purpose and usage. | HumanTrait.BoneName
public static string[]
BoneName
;
Description
Array of the names of all human bone types defined by Mecanim.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
void Start()
{
string[] boneName = HumanTrait.BoneName;
for (int i = 0; i < Human... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0629d8c80374 | unity_docs | math | What is `Experimental.GraphView.SelectionDropper.panSpeed` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
SelectionDropper.panSpeed
public
Vector2
panSpeed
;
Description
When elements are dragged near the edges of the Graph, panning occurs. This controls the speed for said panning. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9aa70b732ac3 | unity_docs | rendering | What is `Rendering.FilteringSettings.renderingLayerMask` in Unity? Explain its purpose and usage. | FilteringSettings.renderingLayerMask
public uint
renderingLayerMask
;
Description
Unity renders objects whose
Renderer.renderingLayerMask
value is enabled in this bit mask.
Additional resources: ScriptableRenderContext.DrawRenderers,
Renderer.renderingLayerMask
,
Creating a simple render loop in a custom re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3dabb7219754 | unity_docs | physics | What is `ContactPoint2D.collider` in Unity? Explain its purpose and usage. | ContactPoint2D.collider
public
Collider2D
collider
;
Description
The incoming
Collider2D
involved in the collision with the
otherCollider
.
This collider is attached to the
Collision2D.rigidbody
.
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_0763c8420f97 | unity_docs | scripting | Give me an overview of the `LightProbeProxyVolume` class in Unity. | LightProbeProxyVolume
class in
UnityEngine
/
Inherits from:
Behaviour
/
Implemented in:
UnityEngine.CoreModule
Description
The Light Probe Proxy Volume component offers the possibility to use higher resolution lighting for large non-static GameObjects.
By default, a probe-lit Renderer receives lighting from ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cef01da5c72e | unity_docs | networking | What is `Networking.PlayerConnection.MessageEventArgs` in Unity? Explain its purpose and usage. | MessageEventArgs
class in
UnityEngine.Networking.PlayerConnection
/
Implemented in:
UnityEngine.CoreModule
Description
Arguments passed to Action callbacks registered in PlayerConnection.
Properties
Property
Description
data
Data that is received.
playerId
The Player ID that the data is received from. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_eb7002ab944d | unity_docs | math | Show me a Unity C# example demonstrating `Matrix4x4.inverse`. | ansforms vectors in a particular way,
then the inverse matrix can transform them back. For example,
Transform's
worldToLocalMatrix
and
localToWorldMatrix
are inverses of each other.
For regular 3D transformation matrices, it can be faster to use
Inverse3DAffine
method.
You can not invert a matrix with a
determin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3ad413bdb1ce | unity_docs | rendering | What is `LightProbeProxyVolume.QualityMode.Normal` in Unity? Explain its purpose and usage. | LightProbeProxyVolume.QualityMode.Normal
Description
This option will use L0 and L1 SH coefficients from the Light Probe Proxy Volume 3D Texture. The L2 coefficients are constant per Renderer. By having to provide the L2 coefficients, draw call batches might be broken.
Additional resources:
Light Probes
,
Light ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_34da4f3ff577 | unity_docs | physics | What is `PrefabUtility.MergePrefabInstance` in Unity? Explain its purpose and usage. | PrefabUtility.MergePrefabInstance
Declaration
public static void
MergePrefabInstance
(
GameObject
instanceRoot
);
Parameters
Parameter
Description
instanceRoot
Root of Prefab instance to update.
Description
Forces a Prefab instance to merge with changes from the Prefab Asset.
Unity will in most cases han... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e419e2103708 | unity_docs | physics | What is `Rigidbody2D.SlideMovement.surfaceAnchor` in Unity? Explain its purpose and usage. | Rigidbody2D.SlideMovement.surfaceAnchor
public
Vector2
surfaceAnchor
;
Description
The direction and distance to use when detecting if a surface is nearby during a slide iteration.
During a Rigiodbody2D.Slide this vector is used to detect if a surface is nearby and will cause the slide to be anchored in that ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_29936d552734 | unity_docs | editor | What are the parameters of `EditorGUIUtility.CommandEvent` in Unity? | Description Creates an event that can be sent to another window. ```csharp
// Sends a paste event to an EditorWindow, as if Paste
// was selected from the Edit menu.using UnityEngine;
using UnityEditor;public class CommandEventExample : EditorWindow
{
[MenuItem("Examples/CommandEvent example")]
static void comm... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_113b089506ef | unity_docs | scripting | What is `Projector.aspectRatio` in Unity? Explain its purpose and usage. | Projector.aspectRatio
public float
aspectRatio
;
Description
The aspect ratio of the projection.
This is projection width divided by height. An aspect ratio of 1.0
makes the projection square; a ratio of 2.0 makes it twice as wide
than high.
Additional resources:
projector component
.
```csharp
using UnityEn... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_da363f73c41a | unity_docs | performance | What is `Unity.Jobs.IJobParallelForExtensions.Schedule` in Unity? Explain its purpose and usage. | IJobParallelForExtensions.Schedule
Declaration
public static
Unity.Jobs.JobHandle
Schedule
(T
jobData
,
int
arrayLength
,
int
innerloopBatchCount
,
Unity.Jobs.JobHandle
dependsOn
);
Parameters
Parameter
Description
jobData
The job and data to schedule.
arrayLength
The number of iterations to execute... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_725ee2a80774 | unity_docs | scripting | What is `UIElements.BaseVerticalCollectionView.ctor` in Unity? Explain its purpose and usage. | BaseVerticalCollectionView Constructor
Declaration
public
BaseVerticalCollectionView
();
Description
Creates a
BaseVerticalCollectionView
with all default properties.
The
BaseVerticalCollectionView.itemsSource
must all be set for the BaseVerticalCollectionView to function properly.
Declaration
public
B... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_dd9936f3f00f | unity_docs | editor | Show me a Unity C# example demonstrating `EditorApplication.isPlaying`. | EditorApplication.isPlaying
public static bool
isPlaying
;
Description
Whether the Editor is in Play mode.
Returns true if the Editor is in Play mode. Setting
isPlaying
delays the result until after all script code has completed for this frame.
This also returns true if the Editor is paused.
Additional reso... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7aa631af7f57 | unity_docs | scripting | Show me a Unity C# example demonstrating `Animator.speed`. | ed of the Animator. 1 is normal playback speed.
Use
Animator.speed
to manipulate the playback speed of the Animator. Any animations currently being played by the Animator are slowed down or sped up depending on how the speed is altered. Set speed to 1 for normal playback. Negative playback speed is only supported wh... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bbb23774f539 | unity_docs | rendering | What is `Experimental.Rendering.GraphicsFormatUtility.IsAlphaOnlyFormat` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormatUtility.IsAlphaOnlyFormat
Declaration
public static bool
IsAlphaOnlyFormat
(
Experimental.Rendering.GraphicsFormat
format
);
Declaration
public static bool
IsAlphaOnlyFormat
(
TextureFormat
format
);
Desc... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3f5767be5c7b | unity_docs | rendering | In Unity's 'UWP Player settings', what is 'Icon' and how does it work? | Use the Icon settings to customize the branding for your app on the Microsoft Store.
The Icon section displays warnings for any images that are required for certification but haven’t been assigned. A UWP application must specify icon and logo images as part of the package before you can submit it to the Microsoft Store... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e14ce1312ca2 | unity_docs | scripting | What is `Unity.Hierarchy.HierarchyNodeChildren` in Unity? Explain its purpose and usage. | HierarchyNodeChildren
struct in
Unity.Hierarchy
/
Implemented in:
UnityEngine.HierarchyCoreModule
Description
A read-only collection of a hierarchy node's children.
If the hierarchy is modified, the collection is invalidated.
Properties
Property
Description
Count
The number of children.
this[int]... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7983af6119bf | unity_docs | scripting | What is `Unity.Android.Gradle.BaseElement.RemoveElementDependency` in Unity? Explain its purpose and usage. | BaseElement.RemoveElementDependency
Declaration
public void
RemoveElementDependency
(
Unity.Android.Gradle.BaseElement
element
);
Parameters
Parameter
Description
element
Element to be removed as a dependency.
Description
Remove an element dependency. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ce1bc6de7114 | unity_docs | math | What is `Rendering.CommandBuffer.SetComputeVectorArrayParam` in Unity? Explain its purpose and usage. | CommandBuffer.SetComputeVectorArrayParam
Declaration
public void
SetComputeVectorArrayParam
(
ComputeShader
computeShader
,
string
name
,
Vector4[]
values
);
Declaration
public void
SetComputeVectorArrayParam
(
ComputeShader
computeShader
,
int
nameID
,
Vector4[]
values
);
Parameters
Parameter
Descr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_851c47b43c65 | unity_docs | rendering | In Unity's 'Upgrade to Unity 2023.2', what is 'Environment lighting: Ambient probe and skybox Reflection Probe are no longer baked by default' and how does it work? | Unity’s Progressive Lightmapper no longer bakes the ambient probe and the skybox Reflection Probe
by default, and the
Recalculate Environment Lighting
setting in the Lighting window has been removed.
To avoid a newly created scene having no environment lighting, Unity assigns a default
Lighting Data Asset
containing en... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5927cc2e32f3 | unity_docs | scripting | What is `Android.AndroidAssetPacks.GetAssetPackStateAsync` in Unity? Explain its purpose and usage. | AndroidAssetPacks.GetAssetPackStateAsync
Declaration
public static
Android.GetAssetPackStateAsyncOperation
GetAssetPackStateAsync
(string[]
assetPackNames
);
Parameters
Parameter
Description
assetPackNames
The array of names of the Android asset packs to query the state of.
Returns
GetAssetPackStateAsync... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b4656641e6ab | unity_docs | rendering | What is `TerrainTools.TerrainPaintUtility.BeginPaintHeightmap` in Unity? Explain its purpose and usage. | TerrainPaintUtility.BeginPaintHeightmap
Declaration
public static
TerrainTools.PaintContext
BeginPaintHeightmap
(
Terrain
terrain
,
Rect
boundsInTerrainSpace
,
int
extraBorderPixels
= 0,
bool
fillOutsideTerrain
= true);
Parameters
Parameter
Description
terrain
Reference Terrain tile.
boundsInTerra... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2435943410ca | unity_docs | rendering | What is `LightTransport.RadeonRaysProbeIntegrator.IntegrateValidity` in Unity? Explain its purpose and usage. | RadeonRaysProbeIntegrator.IntegrateValidity
Declaration
public
LightTransport.IProbeIntegrator.Result
IntegrateValidity
(
LightTransport.IDeviceContext
context
,
int
positionOffset
,
int
positionCount
,
int
sampleCount
,
BufferSlice<float>
validityEstimateOut
);
Parameters
Parameter
Description
context... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_986153e628e4 | unity_docs | ui | Explain 'Customize the grid' in Unity. | This section provides information on how to customize the grid in the Scene view window.
## Display and hide grid lines
To toggle whether the grid is visible on all axes, select
Toggle grid visibility
(
) in the
Grid and Snap
.
## Change the axis that the grid appears on
If you are in
orthographic mode
(Iso) and al... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9aac19ee46e9 | unity_docs | input | What is `Gyroscope.enabled` in Unity? Explain its purpose and usage. | Gyroscope.enabled
public bool
enabled
;
Description
Sets or retrieves the enabled status of this gyroscope.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
bool enableTilt; void OnGUI()
{
if (Input.gyro.enabled)
{
GUILayout.Toggle(enableTilt, "Enable tilt control");
} // Other GUI eleme... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b59bc591e861 | unity_docs | performance | In Unity's 'Unmanaged C# memory', what is 'Native container memory allocators overview' and how does it work? | Unity’s native code libraries track native memory usage through a system of memory labels, areas, and roots that are managed by Unity’s native memory manager. The Profiler uses the native memory manager to monitor native memory usage. The asset garbage collector also tracks types that inherit from
UnityEngine.Object
so... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4430a9ec9913 | unity_docs | scripting | What are the parameters of `AudioSettings.OnAudioConfigurationChanged` in Unity? | Description Unity calls this event whenever the global audio settings change. The settings change when you use AudioSettings.Reset , but an external factor can also change them. For example: The OS control panel changes the sample rate. The user changes the default output device, for example if they plug in an HDMI mon... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7a0aea32e3e1 | unity_docs | rendering | In Unity's 'Customizing native memory allocators', what is 'Measuring the performance of changes' and how does it work? | To ensure your settings improve performance,
profile your application
before and after making changes. For more information, refer to the
Profiler overview page
.
You can also use the
Profiler Analyzer
package to measure changes. The Profiler Analyzer enables you to compare multiple frames, and two different Profiler c... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6bea7a4ed635 | unity_docs | rendering | What is `Device.SystemInfo.SupportsBlendingOnRenderTextureFormat` in Unity? Explain its purpose and usage. | SystemInfo.SupportsBlendingOnRenderTextureFormat
Declaration
public static bool
SupportsBlendingOnRenderTextureFormat
(
RenderTextureFormat
format
);
Description
This has the same functionality as
SystemInfo.SupportsBlendingOnRenderTextureFormat
and also mimics platform-specific behavior in the Unity Editor. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9c93f7432ae3 | unity_docs | scripting | What is `Experimental.GraphView.StickyNoteChange` in Unity? Explain its purpose and usage. | StickyNoteChange
enumeration
Description
Enum that specifies the type of change to the [StickyNote].
Properties
Property
Description
Title
Specifies that the title of the [StickyNote] has changed.
Contents
Specify that the content of the [StickyNote] has changed.
Theme
Specifies that the visual theme of the [... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0557006495b4 | unity_docs | scripting | What is `AndroidJNI.ExceptionOccurred` in Unity? Explain its purpose and usage. | AndroidJNI.ExceptionOccurred
Declaration
public static IntPtr
ExceptionOccurred
();
Description
Determines if an exception is being thrown.
Additional resources:
Java Native Interface Specification (Oracle) | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b7ed17999640 | unity_docs | scripting | What is `Accessibility.AssistiveSupport.notificationDispatcher` in Unity? Explain its purpose and usage. | AssistiveSupport.notificationDispatcher
public static
Accessibility.IAccessibilityNotificationDispatcher
notificationDispatcher
;
Description
Service used to send accessibility notifications to the screen reader.
For all the supported platforms, refer to
AssistiveSupport
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ad880034b47d | unity_docs | xr | What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobWorkerCount` in Unity? Explain its purpose and usage. | JobsUtility.JobWorkerCount
public static int
JobWorkerCount
;
Description
Current number of worker threads available to the Unity JobQueue.
By default, this property takes the value of JobWorkerMaximumCount. You can set the value of this property at runtime to dynamically
reduce the number worker threads avail... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b5c5bbd7fde3 | unity_docs | scripting | What is `Media.H264EncoderAttributes.numConsecutiveBFrames` in Unity? Explain its purpose and usage. | H264EncoderAttributes.numConsecutiveBFrames
public uint
numConsecutiveBFrames
;
Description
The maximum number of consecutive B frames between I and P frames.
Set a value of 0 to disable B frames. Set a value of 1 or greater to enable B frames. If you use the Baseline profile, the number of consecutive B frames... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c3bdedc48616 | unity_docs | rendering | What is `Rendering.CopyTextureSupport.DifferentTypes` in Unity? Explain its purpose and usage. | CopyTextureSupport.DifferentTypes
Description
Support for
Graphics.CopyTexture
between different texture types.
When this flag is set,
Graphics.CopyTexture
can do copies between different texture "dimensions",
for example copy a single cubemap face into a regular 2D texture; or copy from a 2D texture into
a sli... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2ecb57c03769 | unity_docs | scripting | What is `SceneManagement.SceneManager.GetSceneByPath` in Unity? Explain its purpose and usage. | SceneManager.GetSceneByPath
Declaration
public static
SceneManagement.Scene
GetSceneByPath
(string
scenePath
);
Parameters
Parameter
Description
scenePath
Path of the Scene. Should be relative to the project folder. Like: "Assets/MyScenes/MyScene.unity".
Returns
Scene
A reference to the Scene, if valid... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3935a60be908 | unity_docs | scripting | In Unity's 'Create and export asset packages', what is 'Naming strategies' and how does it work? | Name your updated package using incremental names suffixed with a version identifier, for example MyAssetPackageVer1 ,
MyAssetPackageVer2
, and so on. Unity recognizes these as updates of the same package. Use a naming convention that’s clear for you and anyone you share it with.
Warning:
Don’t remove files from asset ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6a738661c631 | unity_docs | math | What is `Tilemaps.Tilemap.InsertCells` in Unity? Explain its purpose and usage. | Tilemap.InsertCells
Declaration
public void
InsertCells
(
Vector3Int
position
,
Vector3Int
insertCells
);
Parameters
Parameter
Description
position
The target position to insert at.
insertCells
The number of columns, rows or layers of cells to insert.
Description
Inserts cells into the
Tilemap
.
De... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_90d65cf2e006 | unity_docs | editor | What is `IDataModeController` in Unity? Explain its purpose and usage. | IDataModeController
interface in
UnityEditor
Description
Interface with which any
EditorWindow
can interact with
DataMode
functionalities. To obtain an instance, use
EditorWindow.dataModeController
.
This interface displays a switch in the docking area when the window is visible and has more than one support... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_a850d83bba84 | unity_docs | ui | Show me a Unity code example for 'Create a custom control with two attributes'. | create and use this element in C#, but won’t automatically expose it in UXML and UI Builder. To expose it, add the UxmlElement attribute. To expose the attributes, add the UxmlAttribute attribute to each property that you want to be visible in UXML and the UI Builder.
Create a Unity project with any template.
In the As... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_da7cdc8927d5 | unity_docs | rendering | In Unity's 'Input data into HLSL', what is 'Example' and how does it work? | The following shader uses appdata_base , and colors the mesh based on its normals.
```
Shader "VertexInputSimple" {
SubShader {
Pass {
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
// Declare the structure for data passed from the vertex shader to the fragment shader.
struct v... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5a83e9c5d4a9 | unity_docs | editor | What is `CameraEditorUtils` in Unity? Explain its purpose and usage. | CameraEditorUtils
class in
UnityEditor
Description
Utilities for cameras.
Static Properties
Property
Description
GameViewAspectRatio
The aspect ratio of the game view.
virtualCameraPreviewInstantiator
Override this function to pass your own Camera provider to generate previews for virtual cameras.
Static Met... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9b9f7d93f9c4 | unity_docs | scripting | Show me a Unity C# example demonstrating `Networking.UnityWebRequest.timeout`. | public int
timeout
;
Description
The number of seconds after which UnityWebRequest attempts to abort the request if no response is received.
The default value is
0
which means no timeout is applied and UnityWebRequest will wait until the response is received.
When the response takes longer than the value specif... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0ecb957b037f | unity_docs | editor | What is `SketchUpImporter.GetScenes` in Unity? Explain its purpose and usage. | SketchUpImporter.GetScenes
Declaration
public SketchUpImportScene[]
GetScenes
();
Returns
SketchUpImportScene[]
Array of scenes extracted from a SketchUp file.
Description
The method returns an array of SketchUpImportScene which represents SketchUp scenes.
SketchUpImportScene
is the structure to represe... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_c246364e7a98_doc_2 | github | scripting | What does `Map01To` do in this Unity script? Explain its purpose and signature. | Converts float in 0-1 range to another range.
Signature:
```csharp
public static float Map01To(this float x, float outMin, float outMax)
=> (Mathf.Clamp01(x) * (outMax - outMin)) + outMin;
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_06b02a9e1ec3 | unity_docs | physics | Give me an overview of the `ConfigurableJoint` class in Unity. | ConfigurableJoint
class in
UnityEngine
/
Inherits from:
Joint
/
Implemented in:
UnityEngine.PhysicsModule
Description
The configurable joint is an extremely flexible joint giving you complete control over rotation and linear motion.
You can build all other joints with it and much more but it is also more com... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_fa20aec46281 | github | scripting | Write a Unity C# script called Mouse Zoom Gesture | ```csharp
// Copyright Wrld Ltd (2012-2014), All Rights Reserved
using UnityEngine;
namespace Wrld.MapInput.Mouse
{
public class MouseZoomGesture
{
private IUnityInputHandler m_handler;
float m_sensitivity;
float m_maxZoomPerSecond;
float m_zoomAccumulator;
... | You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development. |
local_sr_fe0bdaf15199 | unity_docs | scripting | What is `PrefabReplacingSettings.objectMatchMode` in Unity? Explain its purpose and usage. | PrefabReplacingSettings.objectMatchMode
public
ObjectMatchMode
objectMatchMode
;
Description
Use this property to control if GameObjects and Components should be matched up when replacing the Prefab Asset of an Prefab instance.
Using
ObjectMatchMode.ByName
will retain references and added objects if names m... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2d80db22c617 | unity_docs | editor | Show me a Unity C# example demonstrating `EditorGUILayout.VerticalScope`. | VerticalScope
class in
UnityEditor
Description
Disposable helper class for managing
BeginVertical
/
EndVertical
.
This is an extension to
GUILayout.VerticalScope
. It can be used for making compound controls
Vertical Compound group.
```csharp
using UnityEngine;
using UnityEditor;// Create a Vertical Compoun... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_eaa3d5ec0c04 | unity_docs | scripting | Explain 'Unity specific properties in gradle.properties file' in Unity. | The
gradle.properties
file includes the following properties that are specific to Unity’s Android build process:
Property Description unityStreamingAssets
Indicates the names of assets inside the
Streaming Assets
directory. Unity specifies that these assets are included in the final application and Gradle doesn’t compr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d9b44eaf7125 | unity_docs | scripting | What is `Pool.CollectionPool_2.Release` in Unity? Explain its purpose and usage. | CollectionPool<T0,T1>.Release
Declaration
public static void
Release
(TCollection
toRelease
);
Parameters
Parameter
Description
toRelease
The instance to return to the pool.
Description
Returns the instance back to the pool.
If the pool has collection checks enabled and the instance is already held by the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e712aa54ed45 | unity_docs | scripting | What is `Debug.unityLogger` in Unity? Explain its purpose and usage. | Debug.unityLogger
public static
ILogger
unityLogger
;
Description
Get default debug logger.
Logs
message
to the Unity Console using default logger.
Additional resources:
ILogger
,
ILogHandler
.
```csharp
using UnityEngine;
using System.Collections;public class MyGameClass : MonoBehaviour
{
private stat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a119b54741e6 | unity_docs | performance | What is `IMGUI.Controls.TreeView.CreateChildListForCollapsedParent` in Unity? Explain its purpose and usage. | TreeView.CreateChildListForCollapsedParent
Declaration
protected static List<TreeViewItem>
CreateChildListForCollapsedParent
();
Description
Creates a dummy TreeViewItem list. Useful when overriding
BuildRows
to prevent building a full tree of items.
When building the rows in BuildRows, it is not necessary to... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f4b8fb4f7988 | unity_docs | physics | What is `CompositeCollider2D.GenerationType` in Unity? Explain its purpose and usage. | GenerationType
enumeration
Description
Specifies when to generate the Composite Collider geometry.
Controls when the Composite Collider geometry is updated when a Collider used by a Composite Collider changes.
Additional resources:
CompositeCollider2D.generationType
.
Properties
Property
Description
Synchrono... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9eca270b133f | unity_docs | physics | What is `Search.SearchIndexer.LoadBytes` in Unity? Explain its purpose and usage. | SearchIndexer.LoadBytes
Declaration
public bool
LoadBytes
(byte[]
bytes
,
Action<bool>
finished
);
Parameters
Parameter
Description
bytes
Binary buffer containing the index representation.
finished
Callback that triggers when the index is fully loaded. The callback parameters indicates if loading was succ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_682d4e20fb0b | unity_docs | scripting | What is `UIElements.Columns.RemoveAt` in Unity? Explain its purpose and usage. | Columns.RemoveAt
Declaration
public void
RemoveAt
(int
index
);
Parameters
Parameter
Description
index
The index of the column to remove.
Description
Removes the column at the specified index. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f678de2f769f | unity_docs | editor | What is `InSceneAssetUtility` in Unity? Explain its purpose and usage. | InSceneAssetUtility
class in
UnityEditor
Description
Provides methods related to in-scene assets.
In-scene assets are scene objects that are referenced by one or more objects in a scene and are of an asset type. Examples of asset types include, but are not limited to,
Mesh
,
Material
, and
ScriptableObject
. I... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_39284011bb5c | unity_docs | math | What is `Experimental.GraphView.Edge.ContainsPoint` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Edge.ContainsPoint
Declaration
public bool
ContainsPoint
(
Vector2
localPoint
);
Parameters
Parameter
Description
localPoint
Point position.
Returns
bool
True if point is on top of edge. False otherwise.
Descripti... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_693406038cb2 | unity_docs | rendering | What is `ParticleSystem.ShapeModule.textureBilinearFiltering` in Unity? Explain its purpose and usage. | ParticleSystem.ShapeModule.textureBilinearFiltering
public bool
textureBilinearFiltering
;
Description
When enabled, the system takes four neighboring samples from the Texture then combines them to give the final particle value.
Enabling this option increases the performance cost, but reduces abrupt color chan... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_58c824fb5f63 | unity_docs | rendering | In Unity's 'Configure the asynchronous upload pipeline', what is 'Configure the streaming buffer for mesh data' and how does it work? | Unity re-uses a single ring buffer to stream texture and mesh data to the GPU. This reduces the number of memory allocations required.
The
Async Upload Buffer
determines the size of this ring buffer. It has a minimum size of 2 megabytes, and a maximum size of 2047 megabytes.
Unity automatically resizes the buffer to fi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ba47cdc840bf | unity_docs | rendering | Show me a Unity code example for 'Control occlusion in areas with Occlusion Portals'. | e it is directly in front of the Occlusion Portal.
Select the GameObject with the Occlusion Portal component.
In the Inspector window, toggle the Occlusion Portal component’s Open property on and off. In the Scene view, observe the difference in occlusion culling.
## Opening and closing an Occlusion Portal at runtime
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9a4b7fc5459d | unity_docs | math | What is `AndroidJNI.NewDoubleArray` in Unity? Explain its purpose and usage. | AndroidJNI.NewDoubleArray
Declaration
public static IntPtr
NewDoubleArray
(int
size
);
Description
Constructs a new primitive array object.
Additional resources:
Java Native Interface Specification (Oracle) | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_758ccf5ea1c2 | unity_docs | scripting | What is `SceneVisibilityManager.IsPickingDisabledOnAllDescendants` in Unity? Explain its purpose and usage. | SceneVisibilityManager.IsPickingDisabledOnAllDescendants
Declaration
public bool
IsPickingDisabledOnAllDescendants
(
SceneManagement.Scene
scene
);
Parameters
Parameter
Description
scene
Scene to check.
Returns
bool
Returns true if all descendants have picking disabled.
Description
Checks whether al... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_198de1d78f4b | unity_docs | scripting | What are the parameters of `Color.HSVToRGB` in Unity? | Returns Color An opaque colour with HSV matching the input. Description Creates an RGB colour from HSV input. Creates an RGB color from the hue, saturation and value of the input. ```csharp
//Create three Sliders ( Create>UI>Slider)
//These are for manipulating the hue, saturation and value levels of the Color.//Attach... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8cf681226a4e | unity_docs | rendering | Explain 'Set up your project for the BatchRendererGroup API in URP' in Unity. | Before you use BRG, your project must support it. BRG requires your project to:
Use the SRP Batcher. To enable the SRP Batcher, see
Using the SRP Batcher
.
Keep BRG
shader variants
. To do this, select
Edit
>
Project Settings
>
Graphics
, and set
BatchRendererGroup variants to Keep all
.
If your project uses URP, it’s ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3b217e1d2d45 | unity_docs | rendering | What is `Networking.DownloadHandlerTexture.ctor` in Unity? Explain its purpose and usage. | DownloadHandlerTexture Constructor
Declaration
public
DownloadHandlerTexture
();
Description
Default constructor.
Convenience constructor. Assumes the value of
readable
is
false
. The
Texture
returned by
texture
will not have its texture data accessible from script.
```csharp
using System.Collections;
u... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_067e00359443 | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.ExternalForcesModule.GetInfluence`. | ameters
Parameter
Description
index
The index to return the chosen Force Field from.
Returns
ParticleSystemForceField
The ForceField from the list.
Description
Gets the
ParticleSystemForceField
at the given index in the influencers list.
When
influenceFilter
is set to
ParticleSystemGameObjectFilter.Li... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_29d6a060ccc5 | unity_docs | scripting | What is `Animations.PropertySceneHandle` in Unity? Explain its purpose and usage. | PropertySceneHandle
struct in
UnityEngine.Animations
/
Implemented in:
UnityEngine.AnimationModule
Description
Handle to read a
Component
property on an object in the Scene.
PropertySceneHandle are read-only.
```csharp
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;public struct... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d23f7ac5b5fe | unity_docs | scripting | Show me a Unity C# example demonstrating `ParticleSystem.rotationOverLifetime`. | ParticleSystem.rotationOverLifetime
public
ParticleSystem.RotationOverLifetimeModule
rotationOverLifetime
;
Description
Script interface for the RotationOverLifetimeModule of a Particle System.
Rotate particles throughout their lifetime.
Particle System modules do not need to be reassigned back to the system... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_72e2ca993a1a | unity_docs | editor | What are the parameters of `Profiling.FrameDataView.GetCounterValueAsDouble` in Unity? | Returns double Returns the counter value as double . Description Gets the last value of a counter marker in the frame as a double data type'. Use to retrieve the last data sample of a marker with MarkerFlags.Counter flag. ```csharp
using UnityEditor.Profiling;class Example
{
static unsafe double ExtractMyCounterVal... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9bccdaa55b2f | unity_docs | input | What is `XR.TrackingOriginModeFlags.TrackingReference` in Unity? Explain its purpose and usage. | TrackingOriginModeFlags.TrackingReference
Description
XRInputSubsystem
tracks all
InputDevice
s in reference to an
InputDevice
with the
InputDeviceCharacteristics.TrackingReference
flag set when set to TrackingOriginModeFlags.TrackingReference. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_38dbfbcee81b | unity_docs | scripting | Explain 'ToolbarBreadcrumbs' in Unity. | A ToolbarBreadcrumbs is an
Editor-only
control that serves as a breadcrumb navigation bar. It has a predefined style that matches the Toolbar style.
## Create a ToolbarBreadcrumbs
You can create a ToolbarBreadcrumbs with UI Builder, UXML, or C#. The following C# example creates a ToolbarBreadcrumbs with three items:
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_95ba247c26c2 | unity_docs | rendering | What is `Rendering.VertexAttributeDescriptor.stream` in Unity? Explain its purpose and usage. | VertexAttributeDescriptor.stream
public int
stream
;
Description
Which vertex buffer stream the attribute should be in.
Unity supports up to 4 vertex streams, most meshes use one stream for all attributes. Default value is 0.
For a mesh to be compatible with a
SkinnedMeshRenderer
, it must have multiple vertex... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_234f97b75aba | unity_docs | scripting | In Unity's 'Label', what is 'Create a Label' and how does it work? | You can create a Label with UI Builder, UXML, or C#. The following C# example creates a Label with the text “Hello World” and sets the font size, font style, text alignment, and color:
```
var label = new Label("Hello World");
label.style.fontSize = 14;
label.style.unityFontStyleAndWeight = FontStyle.Bold;
label.style.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_91cb65a47073 | unity_docs | scripting | What is `Experimental.GraphView.Node.CollectElements` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Node.CollectElements
Declaration
public void
CollectElements
(HashSet<GraphElement>
collectedElementSet
,
Func<GraphElement,bool>
conditionFunc
);
Parameters
Parameter
Description
collectedElementSet
The set of matching ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_776bf5900716 | unity_docs | rendering | What is `SystemInfo.computeSubGroupSize` in Unity? Explain its purpose and usage. | SystemInfo.computeSubGroupSize
public static int
computeSubGroupSize
;
Description
Size of the compute thread group that supports efficient memory sharing on the GPU (Read Only).
The most efficient thread group size for a set of compute shader calls. This value takes synchronization and shared data into account... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d4fb0081a510 | unity_docs | math | What is `Mathf.FloorToInt` in Unity? Explain its purpose and usage. | Mathf.FloorToInt
Declaration
public static int
FloorToInt
(float
f
);
Description
Returns the largest integer smaller to or equal to
f
.
```csharp
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
void Example()
{
Debug.Log(Mathf.FloorToInt(10.0F)); // Prints 10
Debu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_bea885785175 | unity_docs | scripting | What is `Experimental.Rendering.GraphicsStateCollection.version` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsStateCollection.version
public int
version
;
Description
The current version of the collection.
The version can be used to help manage saved collections. It is not incremented internally and will only be updated when... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_174dd15ecba9 | unity_docs | physics | What are the parameters of `Collider.OnTriggerExit` in Unity? | Description OnTriggerExit is called when the Collider other has stopped touching the trigger. This message is sent to the trigger and the Collider that touches the trigger. Notes: Trigger events are only sent if one of the Colliders also has a Rigidbody attached. Trigger events will be sent to disabled MonoBehaviours, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f7f4d2c4c294 | unity_docs | math | What is `Transform.InverseTransformPoints` in Unity? Explain its purpose and usage. | Transform.InverseTransformPoints
Declaration
public void
InverseTransformPoints
(Span<Vector3>
positions
);
Parameters
Parameter
Description
positions
The positions of the points to be transformed, each is replaced by the transformed version.
Description
Transforms multiple positions from world space to l... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a4c73b62d349 | unity_docs | scripting | What is `UIElements.ImmediateModeElement` in Unity? Explain its purpose and usage. | ImmediateModeElement
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.VisualElement
/
Implemented in:
UnityEngine.UIElementsModule
Description
VisualElement that can implement custom immediate mode rendering.
To use this element, create a new element inheriting from this type and override the I... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e2ce7edc5d70 | unity_docs | rendering | In Unity's 'Bake data in multiple scenes', what is 'Bake lightmaps with multiple scenes' and how does it work? | To predetermine the brightness of surfaces in your scenes, you can bake
lightmaps
. There are two ways to bake lightmaps for multiple scenes at once:
To automate your lightmap builds, use the
Lightmapping.BakeMultipleScenes
function.
To manually bake the lightmaps in multiple scenes, use the Unity Editor and perform th... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_440cacd574dd | unity_docs | ui | Explain 'DropdownField' in Unity. | A DropdownField lets users choose a value from a list. When clicking on the control, it opens a drawer that presents multiple options, allowing users to select one. If you want to always display all the choices, use
RadioButtonGroup
.
Note
: To align an element with other fields in an Inspector window, simply apply the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_93c69af42564 | unity_docs | rendering | What is `ParticleSystem.ShapeModule.meshSpawnSpread` in Unity? Explain its purpose and usage. | ParticleSystem.ShapeModule.meshSpawnSpread
public float
meshSpawnSpread
;
Description
Control the gap between particle emission points across the Mesh.
Additional resources:
ParticleSystem.ShapeModule.shapeType
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_35d0975551a5 | unity_docs | math | What is `AndroidJNI.NewCharArray` in Unity? Explain its purpose and usage. | AndroidJNI.NewCharArray
Declaration
public static IntPtr
NewCharArray
(int
size
);
Description
Constructs a new primitive array object.
Additional resources:
Java Native Interface Specification (Oracle) | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0b6b64fa56a8 | unity_docs | scripting | Show me a Unity C# example demonstrating `Transform.localScale`. | Transform.localScale
public
Vector3
localScale
;
Description
The scale of the transform relative to the GameObjects parent.
The example below creates a sphere
GameObject
with a scale of (1,1,1). The application then changes the
Transform.localScale
from 1.0 down to 0.25 and back to 1.0 repeatedly.
```cs... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6830ff39c8db | unity_docs | networking | What is `Android.AndroidScreenLayoutRound` in Unity? Explain its purpose and usage. | AndroidScreenLayoutRound
enumeration
Description
Options to indicate whether the screen shape is rounded or not.
Additional resources:
AndroidConfiguration.screenLayoutRound
Properties
Property
Description
Undefined
Mirrors the Android property value SCREENLAYOUT_ROUND_UNDEFINED.
No
Mirrors the Android prope... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8814474003da | unity_docs | physics | What is `DistanceJoint2D` in Unity? Explain its purpose and usage. | DistanceJoint2D
class in
UnityEngine
/
Inherits from:
AnchoredJoint2D
/
Implemented in:
UnityEngine.Physics2DModule
Description
Joint that keeps two Rigidbody2D objects a fixed distance apart.
Note that unlike the SpringJoint2D component, the distance separating the objects is truly fixed and does not allow f... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9250a08a76a1 | unity_docs | scripting | Show me a Unity C# example demonstrating `GameObject.AddComponent`. | GameObject.AddComponent
Declaration
public
Component
AddComponent
(Type
componentType
);
Description
Adds a component of the specified type to the GameObject.
There is no corresponding method for removing a component from a GameObject. To remove a component, use
Object.Destroy
.
```csharp
using UnityEngin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_53802155a181 | unity_docs | math | What is `Matrix4x4.LookAt` in Unity? Explain its purpose and usage. | Matrix4x4.LookAt
Declaration
public static
Matrix4x4
LookAt
(
Vector3
from
,
Vector3
to
,
Vector3
up
);
Parameters
Parameter
Description
from
The source point.
to
The target point.
up
The vector describing the up direction (typically
Vector3.up
).
Returns
Matrix4x4
The resulting transformat... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c5cbd5a8e0c0 | unity_docs | performance | What is `Screen.dpi` in Unity? Explain its purpose and usage. | Screen.dpi
public static float
dpi
;
Description
The current pixel density of the screen measured in dots-per-inch (DPI) (Read Only).
This is the actual DPI of the screen or physical device running the application. The property returns
0
if the current DPI cannot be determined.
Android:
On Android devices, t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f4b489276456 | unity_docs | rendering | In Unity's 'Fix light bleeding in lightmaps', what is 'Solutions' and how does it work? | There is no one single solution for UV overlap, because there are so many things that can cause it. Here are the most common solutions to consider:
If you provide lightmap UVs yourself, add margin between UV charts using your modeling package.
If Unity automatically generates the lightmap UVs for a Model, you can tell ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_112a3eae04f0 | unity_docs | animation | What is `UIElements.Experimental.ValueAnimation_1.ctor` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
ValueAnimation<T0> Constructor
Declaration
public
ValueAnimation<T0>
();
Description
Constructor.
To properly use object pooling, use the Create static function. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a10de249f1b6 | unity_docs | rendering | Give me an overview of the `ShaderImporter` class in Unity. | ShaderImporter
class in
UnityEditor
/
Inherits from:
AssetImporter
Description
Shader importer lets you modify shader import settings from Editor scripts.
Properties
Property
Description
preprocessorOverride
This property has no effect.
Public Methods
Method
Description
GetDefaultTexture
Gets the defaul... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cc0c3155ab2b | unity_docs | editor | Show me a Unity C# example demonstrating `L10n.Tr`. | L10n.Tr
Declaration
public static string
Tr
(string
str
);
Parameters
Parameter
Description
str
Original text, basically English.
Returns
string
Localized text.
Description
This function referes a po file like ja.po as an asset. Asmdef and [assembly: UnityEditor.Localization] is needed.
```csharp
us... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a4866e4e6929 | unity_docs | physics | What is `MonoBehaviour.OnTriggerStay` in Unity? Explain its purpose and usage. | MonoBehaviour.OnTriggerStay(Collider)
Parameters
Parameter
Description
other
The other Collider involved in this collision.
Description
Called once per physics update for every collider that is touching the trigger.
OnTriggerStay
is called on every physics update while a collider remains touching the trigger... | 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.