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_f4ea505cc5e1 | unity_docs | scripting | Show me a Unity C# example demonstrating `LayerMask.NameToLayer`. | LayerMask.NameToLayer
Declaration
public static int
NameToLayer
(string
layerName
);
Description
Given a layer name, returns the layer index as defined by either a Builtin or a User Layer in the
Tags and Layers manager
.
Returns -1 if not found.
```csharp
using UnityEngine;public class Example : MonoBehaviou... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b94a13101d04 | unity_docs | rendering | What are the parameters of `Rendering.EditorCameraUtils.RenderToCubemap` in Unity? | Returns bool If the render process succeeds, returns true . Otherwise, returns false . Description Renders this Camera into a static cubemap. This function is mostly useful in the editor for "baking" static cubemaps of your Scene. This functions uses the Camera's Clear Flags, its Transform’s Position, and its Clipping ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f9c75f1bf817 | unity_docs | scripting | What is `Presets.Preset.IsValid` in Unity? Explain its purpose and usage. | Preset.IsValid
Declaration
public bool
IsValid
();
Description
Returns true if the Preset type of this Preset is valid.
A Preset can be invalid if created from an Object excluded from the Presets system. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a3138572921c | unity_docs | editor | Give me an overview of the `WSAUWPBuildType` class in Unity. | WSAUWPBuildType
enumeration
Description
Determines the output build type when building to Universal Windows Platform.
This setting can be changed in the build window when the target platform is set to Universal Windows Platform. You can also use
EditorUserBuildSettings.wsaUWPBuildType
property to change this set... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_29f1d476b377 | unity_docs | animation | What is `Playables.AnimationPlayableUtilities.PlayClip` in Unity? Explain its purpose and usage. | AnimationPlayableUtilities.PlayClip
Declaration
public static
Animations.AnimationClipPlayable
PlayClip
(
Animator
animator
,
AnimationClip
clip
,
out
Playables.PlayableGraph
graph
);
Parameters
Parameter
Description
animator
Target Animator.
clip
The AnimationClip to create an
AnimationClipPlaya... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_47b6a90b3cf0 | unity_docs | editor | Show me a Unity C# example demonstrating `Profiling.HierarchyFrameDataView.GetItemMergedSamplesMetadataCount`. | HierarchyFrameDataView.GetItemMergedSamplesMetadataCount
Declaration
public int
GetItemMergedSamplesMetadataCount
(int
id
,
int
sampleIndex
);
Parameters
Parameter
Description
id
Hierarchy item identifier.
sampleIndex
Merged sample index.
Returns
int
Returns metadata count.
Description
Returns met... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_54fcb6ec1b6c | unity_docs | math | What is `Experimental.GraphView.GraphView.GetPortCenterOverride` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphView.GetPortCenterOverride
Declaration
public bool
GetPortCenterOverride
(
Experimental.GraphView.Port
port
,
out
Vector2
overriddenPosition
);
Parameters
Parameter
Description
port
The specific port.
overridden... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1379d69025a7 | unity_docs | editor | What is `Device.SystemInfo.batteryLevel` in Unity? Explain its purpose and usage. | SystemInfo.batteryLevel
public static float
batteryLevel
;
Description
This has the same functionality as
SystemInfo.batteryLevel
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_6d530e382291 | unity_docs | scripting | What is `UIElements.StyleEnum_1.ctor` in Unity? Explain its purpose and usage. | StyleEnum<T0> Constructor
Declaration
public
StyleEnum<T0>
(T
v
);
Description
Creates from either an enum or a
StyleKeyword
.
Declaration
public
StyleEnum<T0>
(
UIElements.StyleKeyword
keyword
);
Description
Creates from either an enum or a
StyleKeyword
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_f0b766028e04 | unity_docs | rendering | Explain 'Stereo rendering' in Unity. | VR and most MR devices require rendering the Unity scene in stereo. Unity XR supports two stereo render modes:
Multi-pass
: in this mode, Unity performs a render pass for each eye. Some parts of the render loop are shared between the two passes, so multi-pass rendering is faster than rendering the scene with two unique... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_74229d00f61a | unity_docs | audio | What is `Experimental.Audio.AudioSampleProvider.freeSampleFrameCount` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
AudioSampleProvider.freeSampleFrameCount
public uint
freeSampleFrameCount
;
Description
Number of sample frames that can still be written to by the sample producer before overflowing.
Letting the internal buffer overflow wil... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_11c0d4bcb907 | unity_docs | rendering | Show me a Unity C# example demonstrating `AssetPostprocessor.OnPostprocessTexture3D`. | ssion format at this point. If you want to change compression format based on filename or other attributes of the texture, use
AssetPostprocessor.OnPreprocessTexture
.
However, if you modify the TextureImporter settings in this way, it has no effect on the texture that Unity is currently importing, but it does apply ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_5aca8368ddb4 | unity_docs | physics | In Unity's 'Build for Embedded Linux from the command line', what is 'Command line arguments' and how does it work? | To instruct Unity to start in CLI mode and build the project at
<path-to-unity-project-root>
for Embedded Linux, run the following command:
```
Unity -quit -batchmode -nographics -buildTarget EmbeddedLinux -executeMethod Builder.Build -projectPath <path-to-unity-project-root>
```
The build process also calls the functi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e9fd91b145d3 | unity_docs | rendering | What is `Material.SetBuffer` in Unity? Explain its purpose and usage. | Material.SetBuffer
Declaration
public void
SetBuffer
(string
name
,
ComputeBuffer
value
);
Declaration
public void
SetBuffer
(int
nameID
,
ComputeBuffer
value
);
Declaration
public void
SetBuffer
(string
name
,
GraphicsBuffer
value
);
Declaration
public void
SetBuffer
(int
nameID
,
Graphic... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_54bf747285b5 | unity_docs | physics | What is `Rigidbody.WakeUp` in Unity? Explain its purpose and usage. | Rigidbody.WakeUp
Declaration
public void
WakeUp
();
Description
Forces a rigidbody to wake up.
For more information about
Rigidbody
sleeping, refer to the
Rigidbody overview
.
```csharp
using UnityEngine;public class ExampleScript : MonoBehaviour
{
private float fallTime;
private Rigidbody rbGO;
private... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c1e9a2d735ab | unity_docs | rendering | Explain 'Audio file compression in Unity' in Unity. | Audio file compression is an essential way to optimize your application’s performance. When you
import an audio file
, Unity transcodes the file to a format suitable for the build target and the type of sound.
This page gives an overview of some different compression formats and their impact on file size, performance, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1164825c4c85 | unity_docs | rendering | What is `Rendering.GraphicsTextureState` in Unity? Explain its purpose and usage. | GraphicsTextureState
enumeration
Description
The state of a
GraphicsTexture
.
Describes the state of a GraphicsTexture as it is constructed, initialized, or destroyed on the render thread.
Properties
Property
Description
Constructed
The GraphicsTexture constructor has started execution.
Initializing
The desc... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a55c4a907beb | unity_docs | editor | What is `Tools.hidden` in Unity? Explain its purpose and usage. | Tools.hidden
public static bool
hidden
;
Description
Hides the Tools(Move, Rotate, Resize) handles in the Scene view.
This will hide the default Move, Rotate and Resize Tool handles for the curently selected GameObjects, it will not interfere with custom gizmos or handles added by Scripts. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_412468327ace | unity_docs | scripting | Show me a Unity C# example demonstrating `CharacterController.stepOffset`. | eight walls).
Lower values
make the character collide with even small obstacles, potentially requiring jumping or custom logic to overcome them.
This value works in conjunction with the slope limit—if an obstacle’s slope is too steep, even within the
stepOffset
, it might still block movement.
Note:
See the Manual... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_d2d607db2899 | github | scripting | Write a Unity Editor script for World Item Template List Updater | ```csharp
using System.Linq;
using ClusterVR.CreatorKit.Item.Implements;
using UnityEditor;
using UnityEngine;
namespace Baxter.ClusterScriptExtensions.Editor.ComponentUpdater
{
public static class WorldItemTemplateListUpdater
{
public static void Update(ScriptableItemExtension ext)
{
... | You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples. |
local_sr_41f9d3c78467 | unity_docs | scripting | What is `Rendering.BatchDrawCommand.visibleOffset` in Unity? Explain its purpose and usage. | BatchDrawCommand.visibleOffset
public uint
visibleOffset
;
Description
The index of the element in
BatchCullingOutputDrawCommands.visibleInstances
that matches the first instance in this draw command. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a6643ad07d28 | unity_docs | input | What is `Compass.timestamp` in Unity? Explain its purpose and usage. | Compass.timestamp
public double
timestamp
;
Description
Indicates the time elapsed since the compass heading was last updated. (Read Only)
Android
: The time elapsed is represented in seconds since the device was last turned on.
iOS
: The time elapsed is represented in seconds since the Unix epoch January 1, 19... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3b63d07cefe7 | unity_docs | xr | What is `WSA.Tile.CreateOrUpdateSecondary` in Unity? Explain its purpose and usage. | Tile.CreateOrUpdateSecondary
Declaration
public static
WSA.Tile
CreateOrUpdateSecondary
(
WSA.SecondaryTileData
data
);
Declaration
public static
WSA.Tile
CreateOrUpdateSecondary
(
WSA.SecondaryTileData
data
,
Vector2
pos
);
Declaration
public static
WSA.Tile
CreateOrUpdateSecondary
(
WSA.Second... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a197a8ba26f2 | unity_docs | physics | Give me an overview of the `CollisionDetectionMode2D` class in Unity. | CollisionDetectionMode2D
enumeration
Description
Controls how collisions are detected when a
Rigidbody2D
moves.
Additional resources:
Rigidbody2D.collisionDetectionMode
.
Properties
Property
Description
Discrete
When a Rigidbody2D moves, only collisions at the new position are detected.
Continuous
Ensures ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_836a2e4b7cf2 | unity_docs | physics | Show me a Unity C# example demonstrating `Assertions.Assert.AreNotApproximatelyEqual`. | message
);
Parameters
Parameter
Description
tolerance
Tolerance of approximation.
expected
The assumed
Assert
value.
actual
The exact
Assert
value.
message
The string used to describe the
Assert
.
Description
Asserts that the values are approximately not equal.
An absolute error check is used for a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_d705bac7dad2 | github | scripting | Write a Unity C# script called FOV Kick | ```csharp
using System;
using System.Collections;
using UnityEngine;
namespace UnityStandardAssets.Utility
{
[Serializable]
public class FOVKick
{
public Camera Camera; // optional camera setup, if null the main camera will be used
[HideInInspector] publi... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_bb0f6efce9e0 | unity_docs | scripting | What is `SystemLanguage.Czech` in Unity? Explain its purpose and usage. | SystemLanguage.Czech
Description
Czech.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Czech language
if (Application.systemLanguage == SystemLanguage.Czech)
{
//Outputs into console that the system is in Czech
Deb... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c17eb31411eb | unity_docs | rendering | What is `LightmapParameters.stitchEdges` in Unity? Explain its purpose and usage. | LightmapParameters.stitchEdges
public bool
stitchEdges
;
Description
Whether pairs of edges should be stitched together.
When true, Enlighten Realtime Global Illumination identifies the pair of edges that should be stitched together and produces radiosity which is as smooth as possible across the seam. This pa... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d1d99aba9d1c | unity_docs | editor | What is `Build.NamedBuildTarget` in Unity? Explain its purpose and usage. | NamedBuildTarget
struct in
UnityEditor.Build
Description
Build Target by name. This allows to describe and identify build targets that are not fully represented by BuildTargetGroup and BuildTarget.
Static Properties
Property
Description
Android
Android.
EmbeddedLinux
EmbeddedLinux.
iOS
iOS.
LinuxHeadlessSim... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_b91da0f0a398 | unity_docs | ui | In Unity's 'Assembly Definition Inspector window reference', what is 'General Options' and how does it work? | Property Description Allow ‘unsafe’ Code
Enable this option if you have used the C#
unsafe
keyword in a script within the assembly. When enabled, Unity passes the
/unsafe
option to the C# compiler when it compiles the assembly.
Auto Referenced
Specify whether this assembly is automatically referenced by Unity’s
predefi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a366b3d14ae0 | unity_docs | editor | What is `Rendering.ScriptableCullingParameters.maximumPortalCullingJobs` in Unity? Explain its purpose and usage. | ScriptableCullingParameters.maximumPortalCullingJobs
public int
maximumPortalCullingJobs
;
Description
This parameter controls how many active jobs contribute to occlusion culling.
The value must be in the range of 1 to 16. The default value is 6. The best amount of jobs depends on your scene.
When the cullin... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_53789f7e16bc | unity_docs | rendering | What is `SpriteRenderer.maskInteraction` in Unity? Explain its purpose and usage. | SpriteRenderer.maskInteraction
public
SpriteMaskInteraction
maskInteraction
;
Description
Specifies how the sprite interacts with the masks.
Sprites by default do not interact with Sprite Masks, and remain at their original visibility even when overlapping masks. Set this value to either VisibleInsideMask or ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4ab8cb04c2be | unity_docs | scripting | What is `SystemLanguage.Hungarian` in Unity? Explain its purpose and usage. | SystemLanguage.Hungarian
Description
Hungarian.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Hungarian language
if (Application.systemLanguage == SystemLanguage.Hungarian)
{
//Outputs into console that the system ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4de2aafe9986 | unity_docs | rendering | What are the parameters of `ParticleSystem.SubEmittersModule.GetSubEmitterEmitProbability` in Unity? | Returns float The emission probability for the sub-emitter Description Gets the probability that the sub-emitter emits particles. The return value ranges from 0 to 1, where 0 is never and 1 is always. ```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
// A simple particle ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_150322fd196d | unity_docs | scripting | Show me a Unity C# example demonstrating `GUI.GroupScope`. | he coordinate system for GUI controls are set so (0,0) is the top-left corner of the group. All controls are clipped to the group.
Groups can be nested - if they are, children are clipped to their parents.
This is very useful when moving a bunch of GUI elements around on screen. A common use case is designing your menu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_4e57c02b38e0 | unity_docs | scripting | What is `Transform.parent` in Unity? Explain its purpose and usage. | Transform.parent
public
Transform
parent
;
Description
The parent of the transform.
Changing the parent will modify the parent-relative position, scale and rotation but keep the world space position, rotation and scale the same.
Additional resources:
SetParent
.
```csharp
using UnityEngine;
using System.Co... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8293180e37e7 | unity_docs | physics | What is `PhysicsVisualizationSettings.colorVariance` in Unity? Explain its purpose and usage. | PhysicsVisualizationSettings.colorVariance
public static float
colorVariance
;
Description
Used to disinguish neighboring Colliders.
Linearly blends the existing color for a Collider with a random color that is built from the underlying physics object address. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_784a8fdadf8b_doc_16 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | Contains information on whether to enable or disable generation of collision meshes for different types of map geometry.
Signature:
```csharp
public CollisionConfig Collisions;
``` | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_man_14023b170785 | unity_docs | scripting | In Unity's 'Create USS variables', what is 'Create and use USS variables' and how does it work? | To create a USS variable, prefix its name with a double-hyphen (
--
).
```
--color-1: red;
```
To use a USS variable value in another USS rule, use the
var()
function to call it.
```
var(--color-1);
```
When you update a variable, it updates all the USS properties that use it.
For example, the following USS snippet def... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d72f580e9723 | unity_docs | rendering | What is `Lightmapping.BakeMultipleScenes` in Unity? Explain its purpose and usage. | Lightmapping.BakeMultipleScenes
Declaration
public static void
BakeMultipleScenes
(string[]
paths
);
Parameters
Parameter
Description
paths
The path of the Scenes that should be baked.
Description
Bakes an array of Scenes.
This loads all Scenes and then builds all lightmaps, Reflection Probes and Enlighte... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0100951b1de9 | unity_docs | xr | What is `EditorTools.EditorToolContext.ResolveTool` in Unity? Explain its purpose and usage. | EditorToolContext.ResolveTool
Declaration
public Type
ResolveTool
(
Tool
tool
);
Parameters
Parameter
Description
tool
The
Tool
to resolve to an
EditorTool
type.
Returns
Type
An
EditorTool
type for the requested
Tool
.
Description
Returns the matching
EditorTool
type for the specified
Tool... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_190189c0a579 | unity_docs | math | Show me a Unity C# example demonstrating `Vector3.ToString`. | tring
(string
format
,
IFormatProvider
formatProvider
);
Parameters
Parameter
Description
format
A numeric format string.
formatProvider
An object that specifies culture-specific formatting.
Description
Returns a formatted string for this vector.
Defaults to two digits displayed (format="F2"). For more in... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3dd9c905c7ed | unity_docs | scripting | Show me a Unity code example for 'Performing a search'. | Search Providers use the fetchItems function to search for items and filter the results. The fetchItems function has the following signature:
```csharp
// context: the necessary search context (for example, tokenized search and
// sub-filters).
// items: list of items to populate (if not using the asynchronous api)
// ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_11a6c1191dab | unity_docs | editor | Show me a Unity C# example demonstrating `EditorGUILayout.RectField`. | here will override settings defined by the
style
.
Additional resources:
GUILayout.Width
,
GUILayout.Height
,
GUILayout.MinWidth
,
GUILayout.MaxWidth
,
GUILayout.MinHeight
,
GUILayout.MaxHeight
,
GUILayout.ExpandWidth
,
GUILayout.ExpandHeight
.
Returns
Rect
The value entered by the user.
Description
M... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f6eb1f8cd967 | unity_docs | editor | Show me a Unity C# example demonstrating `ModelImporter.GetReferencedClipsForModelPath`. | Parameters
Parameter
Description
modelPath
The model for which to find matching referenced clips.
Returns
string[]
Array of referenced clip GUIDs matching the given model.
Description
Returns all the referenced clips matching the given model name.
Note: referenced clips are matched against the given model ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_164f884a1be3_doc_0 | github | scripting | What does `this member` do in this Unity script? Explain its purpose and signature. | TODO when unity supports default implementations move it to >
Signature:
```csharp
internal static void Resize<T>(this IAngularResizingElement<T> element, float distanceToCamera,
float pixelPerMeter) where T : VisualElement
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_8ead7764f7a0 | unity_docs | editor | Explain 'Building and publishing' in Unity. | When you create a build of your application, you create a Player. A Player is the platform-specific runtime application that Unity builds from your project. You can control how Unity creates a build through Unity’s build and player settings.
Topic Description Introduction to building
Understand the fundamentals of Unit... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_80491fa56dc6 | unity_docs | audio | What are the parameters of `Search.ObjectIndexer.IndexPropertyComponents` in Unity? | Description Indexes multiple variations of a property value. In the example, indexing "AudioClipComponent", will split the word in many ways and index variations such as "Audio", "Clip", "Component", "ACC", etc. The user will be able to search the property with mytype:clip instead of having to start with audio . ```csh... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5914374d071c | unity_docs | scripting | Show me a Unity C# example demonstrating `VersionControl.VersionControlObject`. | VersionControlObject
class in
UnityEditor.VersionControl
/
Inherits from:
ScriptableObject
Description
The abstract base class for representing a version control system.
You can add support for a custom VCS by creating a new class derived from VersionControlObject and applying the
VersionControlAttribute
.
``... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8becff3fd7b9 | unity_docs | editor | What is `ConsoleWindowUtility.GetConsoleLogCounts` in Unity? Explain its purpose and usage. | ConsoleWindowUtility.GetConsoleLogCounts(out int, out int, out int)
Description
Retrieve the current counts of messages in the Console Window.
Returns the current number of Error, Warning, and Log messages that are currently present in the Console Window.
```csharp
using UnityEngine;
using UnityEditor;public class... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c7ef87821f80 | unity_docs | editor | What is `HideFlags.DontSave` in Unity? Explain its purpose and usage. | HideFlags.DontSave
Description
The object will not be saved to the Scene.
It will not be destroyed when a new Scene is loaded
. It is a shortcut for HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset.
You must manually clear the object from memory using DestroyImmediate to avo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f50b922aef73 | unity_docs | editor | Give me an overview of the `ObjectNames` class in Unity. | ObjectNames
class in
UnityEditor
Description
Helper class for constructing displayable names for objects.
Static Methods
Method
Description
GetClassName
Class name of an object.
GetDragAndDropTitle
Drag and drop title for an object.
GetInspectorTitle
Inspector title for an object.
GetUniqueName
Make a uniqu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f5633411e51a | unity_docs | rendering | Show me a Unity C# example demonstrating `Material.SetFloat`. | ets a named float value.
When setting values on materials using the Standard Shader, you should be aware that you may need to use
EnableKeyword
to enable features of the shader that were not previously in use. For more detail, read
Accessing Materials via Script
.
Additional resources:
GetFloat
,
Materials
,
Sha... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_54173a1173b5 | unity_docs | scripting | What is `Compilation.Assembly.compiledAssemblyReferences` in Unity? Explain its purpose and usage. | Assembly.compiledAssemblyReferences
public string[]
compiledAssemblyReferences
;
Description
Assembly references to pre-compiled assemblies that used to build this assembly.
Additional resources:
Assembly.assemblyReferences
and
Assembly.allReferences
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_91dfb0bca9b0 | unity_docs | rendering | Show me a Unity C# example demonstrating `Cubemap.ctor`. | ding all texels, this can lead to improved performance and reduced memory usage during construction. Note that sampling an uninitialized texture gives unpredictable values.
Usually you will want to set the colors of the texture after creating it, using
SetPixel
and
Apply
functions.
Note that this class does not sup... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c81c75d754e0 | unity_docs | scripting | Show me a Unity C# example demonstrating `MonoBehaviour.OnApplicationPause`. | is evaluated twice during the initial frame: first as an early notification, and secondly during the normal co-routine update step.
On
Android
, enabling the on-screen keyboard causes an
OnApplicationFocus
event with the value
false
. However, if you press "Home" at the moment the keyboard is enabled, the
OnApplic... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2ceafe6f6452 | unity_docs | editor | What is `PrefabUtility.RevertAddedGameObject` in Unity? Explain its purpose and usage. | PrefabUtility.RevertAddedGameObject
Declaration
public static void
RevertAddedGameObject
(
GameObject
gameObject
,
InteractionMode
action
);
Parameters
Parameter
Description
action
The interaction mode for this action.
gameObject
The added GameObject on the Prefab instance to revert.
Description
Remo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6c6a700fba4a | unity_docs | scripting | Show me a Unity C# example demonstrating `Time.timeScale`. | rames. How often
MonoBehaviour.FixedUpdate
is executed per frame depends on the timeScale.
Therefore, to keep the number of FixedUpdate callbacks per frame constant, you must also multiply
Time.fixedDeltaTime
by timeScale. Whether this adjustment
is desirable is game-specific.
FixedUpdate functions and suspended ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_98e497a12d4c | unity_docs | scripting | What is `U2D.SpriteAtlasAsset.Load` in Unity? Explain its purpose and usage. | SpriteAtlasAsset.Load
Declaration
public static
U2D.SpriteAtlasAsset
Load
(string
assetPath
);
Parameters
Parameter
Description
assetPath
The path of the SpriteAtlasAsset file on disk.
Returns
SpriteAtlasAsset
Returns the loaded SpriteAtlasAsset.
Description
Loads SpriteAtlasAsset at the given path... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d06c1fb74dcd | unity_docs | scripting | What is `Quaternion.z` in Unity? Explain its purpose and usage. | Quaternion.z
public float
z
;
Description
Z component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
```csharp
//Create three Sliders (Create>UI>Slider) and three Text GameObjects (Create>UI>Text). These are for manipulating the x, y, and z values of the Quaternion. The t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f9920c09c8a0 | unity_docs | animation | What is `Animator.GetIKRotationWeight` in Unity? Explain its purpose and usage. | Animator.GetIKRotationWeight
Declaration
public float
GetIKRotationWeight
(
AvatarIKGoal
goal
);
Parameters
Parameter
Description
goal
The AvatarIKGoal that is queried.
Description
Gets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal).
An IK goal is a target posi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8d011400f1c1 | unity_docs | rendering | What is `TerrainTools.PaintContext.GetClippedPixelRectInTerrainPixels` in Unity? Explain its purpose and usage. | PaintContext.GetClippedPixelRectInTerrainPixels
Declaration
public
RectInt
GetClippedPixelRectInTerrainPixels
(int
terrainIndex
);
Parameters
Parameter
Description
terrainIndex
Index of the Terrain.
Returns
RectInt
Returns the clipped pixel rectangle.
Description
Retrieves the clipped pixel rectang... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_81a3e491bf7c | unity_docs | input | In Unity's 'Input events', what is 'InputEvent' and how does it work? | Event sent when data is input to visual elements that implement
TextInputBaseField
. This event differs from ChangeEvent in that it’s sent for every input event in the control, even if the value of the control hasn’t changed.
target
: The element where the input occurred. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_cb420c497216 | unity_docs | physics | What is `ContactPoint2D.rigidbody` in Unity? Explain its purpose and usage. | ContactPoint2D.rigidbody
public
Rigidbody2D
rigidbody
;
Description
The incoming
Rigidbody2D
involved in the collision with the
otherRigidbody
.
This may be null if the
Collision2D.collider
is not attached to a
Rigidbody2D
.
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_d035fc70c10e | unity_docs | math | What are the parameters of `Texture2D.GetPixel` in Unity? | Returns Color The pixel color. Description Gets the pixel color at coordinates ( x , y ). This method gets pixel data from the texture in CPU memory. Texture.isReadable must be true . The lower left corner is (0, 0). If the pixel coordinate is outside the texture's dimensions, Unity clamps or repeats it, depending on t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1c3a42ff1504 | unity_docs | rendering | What is `LightEditor.settings` in Unity? Explain its purpose and usage. | LightEditor.settings
protected
LightEditor.Settings
settings
;
Description
The settings helper that can be used for rendering a custom
LightEditor
.
This can be used for directly accessing the serialized properties of the light, as well as drawing the default widgets. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_585c2f5d7ad7 | unity_docs | scripting | What is `NetworkReachability` in Unity? Explain its purpose and usage. | NetworkReachability
enumeration
Description
Describes network reachability options.
Describes which options are available for connecting to the Internet on the device if there are any.
```csharp
//Attach this script to a GameObject
//This script checks the device’s ability to reach the internet and outputs it to ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e60989c6188f | unity_docs | scripting | What is `UIElements.BindingId.Equals` in Unity? Explain its purpose and usage. | BindingId.Equals
Declaration
public bool
Equals
(
UIElements.BindingId
other
);
Parameters
Parameter
Description
other
The object to compare with the current instance.
Returns
bool
true
if obj and this instance are the same type and represent the same value; otherwise,
false
.
Description
Indicate... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8065d097001b | unity_docs | scripting | What is `SearchService.ObjectSelectorSearchEndSessionModes` in Unity? Explain its purpose and usage. | ObjectSelectorSearchEndSessionModes
enumeration
Description
A bit field that contains the different modes to end an
Object Selector Search
session.
Properties
Property
Description
None
Default session ending mode. There is nothing to do except clean up your cached data.
CloseSelector
The session is ending be... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ef83fa7de2d2 | unity_docs | rendering | Explain 'Override the mipmap level of a texture' in Unity. | You configure Unity to override the mipmap level of a texture using the following:
The Priority property in the
Texture Import Settings
window of the texture.
The
Texture2D.requestedMipmapLevel
API.
## Use the Priority property
Follow these steps:
Select the texture asset in the Project window.
In the
Texture Import ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_70cb3e7e3a5d | unity_docs | physics | Give me an overview of the `WheelJoint2D` class in Unity. | WheelJoint2D
class in
UnityEngine
/
Inherits from:
AnchoredJoint2D
/
Implemented in:
UnityEngine.Physics2DModule
Description
The wheel joint allows the simulation of wheels by providing a constraining suspension motion with an optional motor.
Additional resources:
JointSuspension2D
.
Properties
Property
D... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ec3b37fceac6 | unity_docs | scripting | What is `Unity.Hierarchy.Hierarchy.EnumerateNodeTypeHandlersBase` in Unity? Explain its purpose and usage. | Hierarchy.EnumerateNodeTypeHandlersBase
Declaration
public
Unity.Hierarchy.HierarchyNodeTypeHandlerBaseEnumerable
EnumerateNodeTypeHandlersBase
();
Returns
HierarchyNodeTypeHandlerBaseEnumerable
An enumerable of hierarchy node type handler base.
Description
Enumerates all the node type handlers base tha... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_07ce961f78b9 | unity_docs | animation | Show me a Unity C# example demonstrating `Animations.MuscleHandle`. | MuscleHandle
struct in
UnityEngine.Animations
/
Implemented in:
UnityEngine.AnimationModule
Description
Handle for a muscle in the
AnimationHumanStream
.
MuscleHandle can only be used on
AnimationHumanStream
, otherwise an
InvalidOperationException
is thrown.
```csharp
using UnityEngine;
using UnityEngine.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7b81d4885b51 | unity_docs | scripting | What is `Experimental.GraphView.ClickSelector.ctor` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
ClickSelector Constructor
Declaration
public
ClickSelector
();
Description
Constructor for ClickSelector. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7fc28ffaec15 | unity_docs | xr | Explain 'Submit a license request from a command line and browser (Windows)' in Unity. | Submit a license request from the command line to manually activate your license if you’re unable to use the
other activation methods
.
Note
: The manual activation method doesn’t work with floating license subscriptions or Unity Personal. To activate a license for Unity Personal, log in to the Unity Hub. To return a P... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_af559de02d7c | unity_docs | scripting | What are the parameters of `AnimatorOverrideController.ctor` in Unity? | Description Creates an Animator Override Controller that overrides controller . Although the Animator Override Controller doesn't support nested Animator Override Controller, this constructor will find the right controller for you. ```csharp
using UnityEngine;public class SwapWeapon : MonoBehaviour
{
protected Anim... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_263ad0103f12 | unity_docs | scripting | What is `Actions.ContextMenuUtility.AddMenuItemWithContext` in Unity? Explain its purpose and usage. | ContextMenuUtility.AddMenuItemWithContext
Declaration
public static void
AddMenuItemWithContext
(
UIElements.DropdownMenu
menu
,
IEnumerable<Object>
context
,
string
menuItemPath
,
string
contextMenuPath
);
Parameters
Parameter
Description
menu
The Scene view context menu to add a
MenuItem
to.
context... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_eeac15e8e5bf | unity_docs | rendering | Show me a Unity C# example demonstrating `Graphics.DrawMeshNow`. | alIndex
Subset of the mesh to draw.
Description
Draw a mesh immediately.
This function will draw a given mesh immediately. Currently set shader and
material (see
Material.SetPass
) will be used.
The mesh will be just drawn once,
it won't be per-pixel lit and will not cast or receive real-time shadows. If you want
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ba8a23844020 | unity_docs | scripting | What is `Rendering.CommandBuffer.CopyBuffer` in Unity? Explain its purpose and usage. | CommandBuffer.CopyBuffer
Declaration
public void
CopyBuffer
(
GraphicsBuffer
source
,
GraphicsBuffer
dest
);
Parameters
Parameter
Description
source
The source buffer.
dest
The destination buffer.
Description
Adds a command to copy the contents of one
GraphicsBuffer
into another.
This is the equiv... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_139063bfda9d | unity_docs | scripting | In Unity's 'GradientField', what is 'Example' and how does it work? | The following UXML example creates a GradientField:
```
<UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
<uie:GradientField label="UXML Field" name="the-uxml-field" />
</UXML>
```
The following C# example illustrates some of the customizable functionalities of the GradientField:
```
/// <sample... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_a31e8f73ef8e | github | scripting | Write a Unity C# XR/VR script for AR Face Blend Shapes Mapper | ```csharp
using System.Collections.Generic;
using Unity.Collections;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARKit;
using UnityEngine.XR.ARSubsystems;
public class ARFaceBlendShapesMapper : MonoBehaviour
{
[SerializeField]
private ARFaceBlendShapesMapping blendShapesMapping =... | You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization. |
local_sr_860dffba8377 | unity_docs | scripting | Show me a Unity C# example demonstrating `SystemLanguage.ChineseSimplified`. | SystemLanguage.ChineseSimplified
Description
ChineseSimplified.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
//This checks if your computer's operating system is in the Simplified Chinese language
if (Application.systemLanguage == SystemLanguage.ChineseSimplified)
{
//Outp... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b2dea7798ef7 | unity_docs | editor | What is `AssetImporter.assetBundleName` in Unity? Explain its purpose and usage. | AssetImporter.assetBundleName
public string
assetBundleName
;
Description
Get or set the AssetBundle name.
This property makes it possible to programmatically access the assignment of Assets to AssetBundles, corresponding to the AssetBundle control found at the bottom of the Inspector.
This property is stored ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f72bc46b4eca | unity_docs | math | What is `BillboardAsset.GetImageTexCoords` in Unity? Explain its purpose and usage. | BillboardAsset.GetImageTexCoords
Declaration
public Vector4[]
GetImageTexCoords
();
Declaration
public void
GetImageTexCoords
(List<Vector4>
imageTexCoords
);
Parameters
Parameter
Description
imageTexCoords
The list that receives the array.
Description
Get the array of billboard image texture coordina... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_00da09ef0281 | unity_docs | rendering | Show me a Unity C# example demonstrating `AssetPostprocessor.assetPath`. | AssetPostprocessor.assetPath
public string
assetPath
;
Description
The path name of the asset being imported.
```csharp
using UnityEngine;
using UnityEditor;// Automatically sets Textures settings upon first import and prints the
// path from where is being importedclass CustomImportSettings : AssetPostprocesso... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_65d9e9e95aca | unity_docs | editor | What is `Build.Reporting.BuildStep` in Unity? Explain its purpose and usage. | BuildStep
struct in
UnityEditor.Build.Reporting
Description
Contains information about a single step in the build process.
Additional resources:
BuildReport.steps
Properties
Property
Description
depth
The nesting depth of the build step.
duration
The total duration for this build step.
messages
All log me... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9effb3a43e14 | unity_docs | physics | What is `BuoyancyEffector2D.flowVariation` in Unity? Explain its purpose and usage. | BuoyancyEffector2D.flowVariation
public float
flowVariation
;
Description
The random variation of the force used to similate fluid flow.
Fluid flow can be defined to move in any direction with a specific magnitude and a random variation on that magnitude.
This property defines the random variation in addition t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_17b407eabdbe | unity_docs | editor | What is `Unity.Profiling.Editor.ProfilerModuleChartType` in Unity? Explain its purpose and usage. | ProfilerModuleChartType
enumeration
Description
Options for a Profiler module’s chart type.
ProfilerModule
uses this to specify the type of chart that the module displays in the Profiler window.
Properties
Property
Description
Line
Display a line chart.
StackedTimeArea
Display a stacked-area chart.
StackedA... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_6238a418146e | unity_docs | xr | What is `ParticleSystem.CustomDataModule.GetMode` in Unity? Explain its purpose and usage. | ParticleSystem.CustomDataModule.GetMode
Declaration
public
ParticleSystemCustomDataMode
GetMode
(
ParticleSystemCustomData
stream
);
Parameters
Parameter
Description
stream
The name of the custom data stream to query.
Returns
ParticleSystemCustomDataMode
The type of data being generated for the reque... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_af26f7063923 | unity_docs | ui | In Unity's 'Toggle', what is 'Examples' and how does it work? | The following UXML example creates a Toggle:
```
<UXML xmlns="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
<Toggle label="UXML Field" name="the-uxml-field" />
</UXML>
```
The following C# example illustrates some of the customizable functionalities of the Toggle:
```
/// <sample>
// Get a reference to t... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d1ac1e12f9fd | unity_docs | scripting | Give me an overview of the `DefaultAsset` class in Unity. | DefaultAsset
class in
UnityEditor
/
Inherits from:
Object
Description
DefaultAsset is used for assets that do not have a specific type (yet).
Search for
t:DefaultAsset
in the project browser to see which assets are of that type.
Inherited Members
Properties Property Description
hideFlags
Should the object ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_aa0f497657c9 | unity_docs | rendering | What is `Rendering.RenderPipelineAsset_1.renderPipelineShaderTag` in Unity? Explain its purpose and usage. | RenderPipelineAsset<T0>.renderPipelineShaderTag
public string
renderPipelineShaderTag
;
Description
Returns the Shader Tag value for the render pipeline that is described by this asset.
Any shader that doesn't match this tag will be stripped out of builds using this
RenderPipelineAsset
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0416f4522e77 | unity_docs | editor | Give me an overview of the `CanEditMultipleObjects` class in Unity. | CanEditMultipleObjects
class in
UnityEditor
Description
Attribute used to make a custom editor support multi-object editing.
When multiple objects are selected, Editors that don't have this attribute will show the message "Multi-object editing not supported".
See the
Editor
class documentation on how to make an... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ef4d0d606ca8 | unity_docs | scripting | What is `UIElements.CollectionVirtualizationMethod` in Unity? Explain its purpose and usage. | CollectionVirtualizationMethod
enumeration
Description
Options to change the virtualization method used by the collection view to display its content.
Properties
Property
Description
FixedHeight
Collection view won't wait for the layout to update items, as the all have the same height. fixedItemHeight Need... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8423b8e28524 | unity_docs | performance | What is `Jobs.IJobParallelForTransformExtensions.EarlyJobInit` in Unity? Explain its purpose and usage. | IJobParallelForTransformExtensions.EarlyJobInit
Declaration
public static void
EarlyJobInit
();
Description
Gathers and caches reflection data for the internal job system's managed bindings.
Unity is responsible for calling this method - don't call it yourself. When the Jobs package is included in the project, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_55fdecf7f04f | unity_docs | rendering | Explain 'Lightmap texture Import Settings window reference' in Unity. | The Lightmap texture type formats the texture asset so it’s suitable to use as a
Lightmap
. This option enables encoding into a specific format (RGBM or dLDR depending on the platform) and a
post-processing
step on texture data (a push-pull dilation pass). Unity locks
Texture Shape to 2D
for this texture type. For more... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_241c966cc61f | unity_docs | scripting | What is `Plane.Raycast` in Unity? Explain its purpose and usage. | Plane.Raycast
Declaration
public bool
Raycast
(
Ray
ray
,
out float
enter
);
Description
Intersects a ray with the plane.
This function sets
enter
to the distance along the ray, where it intersects the plane.
If the ray is parallel to the plane, function returns
false
and sets
enter
to zero.
If the ray... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e91284946958 | unity_docs | scripting | Show me a Unity C# example demonstrating `Physics2D.gravity`. | Physics2D.gravity
public static
Vector2
gravity
;
Description
Acceleration due to gravity.
Set this vector to change all 2D gravity in your Scene. The default is (0, -9.8).
```csharp
//Attach this script to a 2D GameObject (for example a Sprite).
//Attach a Rigidbody component to the GameObject (Click the Ad... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_59c48ee4d9eb | unity_docs | performance | Explain 'Combine meshes manually' in Unity. | You can manually combine multiple meshes into a single mesh as a
draw call optimization
technique. Unity renders the combined mesh in a single draw call instead of one draw call per mesh. This technique can be a good alternative to
draw call batching
in cases where the meshes are close together and don’t move relative ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e329f199d46b | unity_docs | scripting | What is `SubsystemManager.GetInstances` in Unity? Explain its purpose and usage. | Method group is Obsolete
SubsystemManager.GetInstances
Obsolete
Use GetSubsystems instead.
Upgrade to
GetSubsystems<T>
Declaration
public static void
GetInstances
(List<T>
subsystems
);
Parameters
Parameter
Description
instances
Active instances.
Description
Returns active Subsystems of a specific ins... | 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.