id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_7d05b5bfe3a7
unity_docs
scripting
In Unity's 'Game view reference', what is 'Play mode' and how does it work?
Use Play mode to run your project and test how it works as it would in a built application. Use the Play mode buttons in the Toolbar to control the Play mode: Select Play to switch the Editor to Play mode. Select Pause to pause Play mode. Select Step to move Play mode forward by one frame. In Play mode, any changes you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb7638d7bc1d
unity_docs
scripting
What is `Progress.Item.indefinite` in Unity? Explain its purpose and usage.
Progress.Item.indefinite public bool indefinite ; Description Returns true if the progress indicator is indefinite. An indefinite progress indicator shows that the task is in progress, but does not show how close it is to completion. Additional resources: Progress.GetOptions , Indefinite .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfc140325462
unity_docs
scripting
What is `Progress.Item.remainingTime` in Unity? Explain its purpose and usage.
Progress.Item.remainingTime public TimeSpan remainingTime ; Description Returns this progress indicator's remaining time to completion. Additional resources: Progress.GetRemainingTime , Progress.Item.SetRemainingTime .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a635e276eaa
unity_docs
performance
What is `Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks` in Unity? Explain its purpose and usage.
NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks Declaration public static void* GetUnsafeBufferPointerWithoutChecks (NativeArray<T> nativeArray ); Parameters Parameter Description nativeArray The NativeArray to check. Returns void* The memory buffer pointer of the NativeArray. Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9565cce391a
unity_docs
input
Show me a Unity C# example demonstrating `Input`.
s when the user rotates the device to hold it differently. Note that the accelerometer hardware can be polled more than once per frame. To access all accelerometer samples since the last frame, you can use the Input.accelerationEvents property array. This can be useful when reconstructing player motions, feeding acce...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_258805b6593c
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemDescendantsThatHaveChildren` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemDescendantsThatHaveChildren Declaration public void GetItemDescendantsThatHaveChildren (int id , List<int> outChildren ); Parameters Parameter Description id Hierarchy item identifier. outChildren List filled with item all child identifiers which have children. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2738da41a6bb
github
scripting
Write a Unity C# script called Detect Enemy Service
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using MBT; namespace MBTExample { [AddComponentMenu("")] [MBTNode("Example/Detect Enemy Service")] public class DetectEnemyService : Service { public LayerMask mask = -1; [Tooltip("Sphere radius")]...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_9cf329bbdbbb
unity_docs
rendering
What is `MaterialPropertyBlock.CopyProbeOcclusionArrayFrom` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.CopyProbeOcclusionArrayFrom Declaration public void CopyProbeOcclusionArrayFrom (Vector4[] occlusionProbes ); Declaration public void CopyProbeOcclusionArrayFrom (List<Vector4> occlusionProbes ); Parameters Parameter Description occlusionProbes The array of probe occlusion values t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52e9d8c3e5ea
unity_docs
editor
Show me a Unity C# example demonstrating `StaticEditorFlags.BatchingStatic`.
StaticEditorFlags.BatchingStatic Description Combine the GameObject's Mesh with other eligible Meshes, to potentially reduce runtime rendering costs. For more information, see the documentation on Static Batching . Note that you can use StaticBatchingUtility.Combine to combine Meshes that do not have this Static...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a3884972a9f8
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.RegisterChildrenOrderUndo`.
nOrderUndo ( Object objectToUndo , string name ); Parameters Parameter Description objectToUndo The object whose child order should be recorded on the undo stack. name The name of the undo operation. Description Stores a copy of the order of the object's children on the undo stack. If the undo is perform...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c80a9703d49d
unity_docs
rendering
What is `Texture2D.EXRFlags` in Unity? Explain its purpose and usage.
EXRFlags enumeration Description Flags used to control the encoding to an EXR file. Additional resources: EncodeToEXR . Properties Property Description None No flag. This will result in an uncompressed 16-bit float EXR file. OutputAsFloat The texture will be exported as a 32-bit float EXR file (default is 16...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bcaa09b26d92
unity_docs
scripting
What is `SystemLanguage.Swedish` in Unity? Explain its purpose and usage.
SystemLanguage.Swedish Description Swedish. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Swedish language if (Application.systemLanguage == SystemLanguage.Swedish) { //Outputs into console that the system is Swedi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1708f4d1d768
unity_docs
xr
What is `Rendering.RenderPipeline.SupportsRenderRequest` in Unity? Explain its purpose and usage.
RenderPipeline.SupportsRenderRequest Declaration public static bool SupportsRenderRequest ( Camera camera , RequestData data ); Description Query the active render pipeline to check support for the given RequestData type. By default this returns false unless the active render pipeline overrides RenderPipeli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ce91b20caca0
unity_docs
rendering
In Unity's 'Import a texture', what is 'Texture dimensions' and how does it work?
Ideally, Texture dimension sizes should be powers of two on each side (that is, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 pixels (px), and so on). The Textures do not have to be square; the width can be different from height. It is possible to use NPOT (non-power of two) Texture sizes with Unity. However, NPOT Tex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39d1a94ed373
unity_docs
scripting
What is `XR.XRDisplaySubsystem.foveatedRenderingFlags` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.foveatedRenderingFlags public XR.XRDisplaySubsystem.FoveatedRenderingFlags foveatedRenderingFlags ; Description Controls optional behavior of the foveated rendering system.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19e6ea5182e5
unity_docs
performance
What is `Unity.Profiling.ProfilerRecorder.IsRunning` in Unity? Explain its purpose and usage.
ProfilerRecorder.IsRunning public bool IsRunning ; Description Indicates if ProfilerRecorder is attached to the Profiler metric. Returns true if ProfilerRecorder is attached to the Profiler metric and collecting the data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8999f0f182fe
unity_docs
rendering
What are the parameters of `Texture2D.SetPixel` in Unity?
Description Sets the pixel color at coordinates ( x , y ). This method sets pixel data for the texture in CPU memory. Texture.isReadable must be true , and you must call Apply after SetPixel to upload the changed pixels to the GPU. Apply is an expensive operation because it copies all the pixels in the texture even if ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87bf80d0fd3a
unity_docs
physics
What is `ParticleSystemForceField.vectorFieldAttraction` in Unity? Explain its purpose and usage.
ParticleSystemForceField.vectorFieldAttraction public ParticleSystem.MinMaxCurve vectorFieldAttraction ; Description Controls how strongly particles are dragged into the vector field motion. Set in conjunction with ParticleSystemForceField.vectorFieldSpeed to apply a vector field to the particle motion. Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00fdcfa81a3b
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.EndScrollView`.
EditorGUILayout.EndScrollView Declaration public static void EndScrollView (); Description Ends a scrollview started with a call to BeginScrollView. Label inside a scroll view. ```csharp using UnityEngine; using UnityEditor;// Simple Editor Window that creates a scroll view with a Label insidepublic class Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27a2e339a603
unity_docs
scripting
Show me a Unity C# example demonstrating `Quaternion.Inverse`.
Quaternion.Inverse Declaration public static Quaternion Inverse ( Quaternion rotation ); Description Returns the Inverse of rotation . ```csharp using UnityEngine;public class Example : MonoBehaviour { // Sets this transform to have the opposite rotation of the target Transform target; void Update() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3e367a3dec08
unity_docs
audio
In Unity's 'Reverb Zones', what is 'Properties' and how does it work?
Property: Function: Min Distance Represents the radius of the inner circle in the gizmo , this determines the zone where there is a gradually reverb effect and a full reverb zone. Max Distance Represents the radius of the outer circle in the gizmo, this determines the zone where there is no effect and where the reverb ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b537b39644bd
unity_docs
math
What is `Jobs.TransformAccess` in Unity? Explain its purpose and usage.
TransformAccess struct in UnityEngine.Jobs / Implemented in: UnityEngine.CoreModule Description Represents the position, rotation and scale of an object. Properties Property Description isValid Determines whether this instance refers to a valid Transform. localPosition The position of the transform relative...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77951f8717fb
unity_docs
networking
What is `Android.AndroidConfiguration.hardKeyboardHidden` in Unity? Explain its purpose and usage.
AndroidConfiguration.hardKeyboardHidden public Android.AndroidHardwareKeyboardHidden hardKeyboardHidden ; Description Mirrors the Android property hardKeyboardHidden . For information about this property, refer to the Android developer documentation on hardKeyboardHidden .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a7dfe8da298
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightPyramidShape.mode` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightPyramidShape.mode public Experimental.GlobalIllumination.LightMode mode ; Description The lightmode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f9e970cc25f
unity_docs
performance
What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobScheduleParameters` in Unity? Explain its purpose and usage.
JobScheduleParameters struct in Unity.Jobs.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Provides job parameters for scheduling. Properties Property Description Dependency A JobHandle of any dependency that the job has. JobDataPtr A pointer to the job data. ReflectionData A pointer t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e6e27af8bad
unity_docs
rendering
In Unity's 'Rotation by Speed module reference', what is 'Properties' and how does it work?
For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Separate Axes Control rotation independently for each axis of rotation. Angular Velocity Rotation velocity in degrees per ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9b71fa0100da
unity_docs
editor
Explain 'Configure your debugging tool to debug Unity in Windows' in Unity.
Set up Windows Debugger (WinDbg) or Visual Studio to resolve Unity symbols so you can debug your Unity applications or the Unity Editor. If your debugging tool is already set up to resolve Unity symbols and you want to know how to set up live or forensic debugging, refer to: Set up live debugging for Unity Set up foren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05c65915ab3a
unity_docs
ui
Show me a Unity C# example demonstrating `HideInCallstackAttribute`.
llstackAttribute is to reduce call stack clutter by hiding trivial helper methods. If you apply [HideInCallstack] to the method that actually writes to the log, although the name is hidden from the detail view, the Console window still provides a clickable link to the called method. To hide the marked methods, clic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1b1acc64e1a1
github
scripting
Write a Unity C# UI script for Fantasy Portal Scene Select
```csharp using UnityEngine; using UnityEngine.SceneManagement; namespace PortalFX { public class FantasyPortalSceneSelect : MonoBehaviour { public bool GUIHide = false; public bool GUIHide2 = false; public bool GUIHide3 = false; public void LoadSceneDemo1() { SceneManager.LoadScene("MagicPortal...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_4d3a26ccc922
unity_docs
editor
In Unity's 'Build your application for Dedicated Server', what is 'Scripting' and how does it work?
To create a Dedicated Server build using a script, set buildPlayerOptions.subtarget to (int)StandaloneBuildSubtarget.Server . ``` buildPlayerOptions.target = BuildTarget.StandaloneWindows; // SubTarget expects an integer. buildPlayerOptions.subtarget = (int)StandaloneBuildSubtarget.Server; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0d5ff50c58a
unity_docs
scripting
What is `Unity.IO.Archive.ArchiveFileInfo` in Unity? Explain its purpose and usage.
ArchiveFileInfo struct in Unity.IO.Archive / Implemented in: UnityEngine.CoreModule Description Represents information about a file included in an archive. Properties Property Description Filename The name of the archived file. FileSize The size of the archived file, in bytes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b49b43c168fd
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.onPreCull`.
Callback , and add them to this delegate. For example, you could change a Camera's settings to affect what the Camera sees. For similar functionality that applies only to a single Camera and requires your script to be on the same GameObject, see MonoBehaviour.OnPreCull . If you're using a Scriptable Render Pipeline, f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31c9da541c4e
unity_docs
scripting
What is `Tilemaps.ITilemap` in Unity? Explain its purpose and usage.
ITilemap class in UnityEngine.Tilemaps / Implemented in: UnityEngine.TilemapModule Description Class passed onto Tiles when information is queried from the Tiles. This handles editor preview tiles when painting on a Tilemap in Editor mode. Properties Property Description cellBounds Returns the boundarie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_34acc1b6e7a3
unity_docs
scripting
Show me a Unity code example for 'Custom serialization'.
n memory. For example, use the key and value arrays to repopulate the C# Dictionary. ## Example 1: Unity’s default serialization causes performance issues Suppose you want to have a tree data structure. If you let Unity serialize the data structure directly, the “no support for null” limitation would cause your data ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c8238a9001f6
github
scripting
Write a Unity C# MonoBehaviour script called Platform Specific Content
```csharp using System; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif namespace UnityStandardAssets.Utility { #if UNITY_EDITOR [ExecuteInEditMode] #endif public class PlatformSpecificContent : MonoBehaviour { private enum BuildTargetGroup { Stand...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_d21e7d30fc48
unity_docs
scripting
What is `Renderer.localBounds` in Unity? Explain its purpose and usage.
Renderer.localBounds public Bounds localBounds ; Description The bounding box of the renderer in local space. This is the axis-aligned bounding box fully enclosing the object in local space. For a SkinnedMeshRenderer , default local bounds are precomputed based on animations associated with that model, which...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8d0cb3356c38
github
scripting
Write a Unity C# script called Json Utils
```csharp using UnityEngine; using System; using System.Collections.Generic; namespace TapLive.Utils { /// <summary> /// JSON serialization utilities /// Handles complex objects and arrays /// </summary> public static class JsonUtils { /// <summary> /// Serialize object to JSON ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b4249efdf2e7
unity_docs
rendering
What is `ParticleSystem.SubEmittersModule.SetSubEmitterType` in Unity? Explain its purpose and usage.
ParticleSystem.SubEmittersModule.SetSubEmitterType Declaration public void SetSubEmitterType (int index , ParticleSystemSubEmitterType type ); Parameters Parameter Description index The index of the sub-emitter you want to modify. type The new spawning type to assign to this sub-emitter. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1047fe679291
unity_docs
scripting
Show me a Unity C# example demonstrating `GUISkin.box`.
GUISkin.box public GUIStyle box ; Description Style used by default for GUI.Box controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the box style of the current GUISkin GUIStyle style; void OnGUI() { GUI.skin.box = style; GUILayout.Box("This is a box."); } } `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe62da73ca7b
unity_docs
animation
What is `AnimationState.speed` in Unity? Explain its purpose and usage.
AnimationState.speed public float speed ; Description The playback speed of the animation. 1 is normal playback speed. A negative playback speed will play the animation backwards. Additional resources: AnimationState.time , AnimationState.wrapMode properties and WrapMode enum. ```csharp using UnityEngine;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f4de99751c5
unity_docs
rendering
What is `Experimental.GraphView.StickyNoteTheme` in Unity? Explain its purpose and usage.
StickyNoteTheme enumeration Description Enum used to describe the visual theme used by the [StickyNote]. Properties Property Description Classic The light, classic theme. Black The dark theme.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26caba1703d9
unity_docs
editor
What is `PrefabUtility.SaveAsPrefabAsset` in Unity? Explain its purpose and usage.
PrefabUtility.SaveAsPrefabAsset Declaration public static GameObject SaveAsPrefabAsset ( GameObject instanceRoot , string assetPath ); Declaration public static GameObject SaveAsPrefabAsset ( GameObject instanceRoot , string assetPath , out bool success ); Parameters Parameter Description instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3be590f23486
github
scripting
Write a Unity C# script called Game Object Commands
```csharp using UnityEngine; namespace InGame_Console.InGame_Console_System.Scripts.Predefined_Commands { public class GameObjectCommands { [ConsoleCommand("GameObject.LoadAndSpawn")] static void SpawnObject(GameObject @object) { Debug.Log("Spawned " + @object.name)...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_cd5944cd3bc4
unity_docs
rendering
What is `ShaderImporter` in Unity? Explain its purpose and usage.
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_46013ccb6634
unity_docs
scripting
What is `Rendering.StencilState.SetFailOperation` in Unity? Explain its purpose and usage.
StencilState.SetFailOperation Declaration public void SetFailOperation ( Rendering.StencilOp value ); Parameters Parameter Description value The value to set. Description What to do with the contents of the buffer if the stencil test fails. Sets failOperationBack and failOperationFront .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5d70a425e24e
unity_docs
ui
Show me a Unity code example for 'Structure UI with C# scripts'.
cript . Controls are interactive and represent a value that you can change. For example, a FloatField represents a float value. You can create C# scripts to change the value of a control, register a callback, or apply data binding. ## Add controls to a UI with C# scripts To use a control in a UI, add it to the visual...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c13936da478
unity_docs
editor
Show me a Unity C# example demonstrating `QualitySettings.GetRenderPipelineAssetsForPlatform`.
the Render Pipeline Assets. uniqueRenderPipelineAssets A collection with the non null selected Render Pipeline Assets for the platform. allLevelsAreOverridden An additional information that state if all quality settings were overridden in the project. Description [Editor Only] Obtains a set with the non null Rend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a41d1fe90127
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.FloorToInt`.
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_1762f54cf38f
unity_docs
rendering
What is `CombineInstance.lightmapScaleOffset` in Unity? Explain its purpose and usage.
CombineInstance.lightmapScaleOffset public Vector4 lightmapScaleOffset ; Description The baked lightmap UV scale and offset applied to the Mesh. This property sets the baked lightmap UV scale and offset applied to the Mesh. It is only used when lightmapped meshes are combined. Additional resources: Mesh.Comb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01142ed63c8b
unity_docs
scripting
What is `Presets.Preset.GetTargetTypeName` in Unity? Explain its purpose and usage.
Preset.GetTargetTypeName Declaration public string GetTargetTypeName (); Returns string Fullname of the Preset's target type. Description Returns a human readable string of this Preset's target type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e69cc99dfbe
unity_docs
editor
What is `EditorGUILayout.Vector2Field` in Unity? Explain its purpose and usage.
EditorGUILayout.Vector2Field Declaration public static Vector2 Vector2Field (string label , Vector2 value , params GUILayoutOption[] options ); Declaration public static Vector2 Vector2Field ( GUIContent label , Vector2 value , params GUILayoutOption[] options ); Parameters Parameter Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8aec2c0e6c7f
unity_docs
scripting
Give me an overview of the `Grid` class in Unity.
Grid class in UnityEngine / Inherits from: GridLayout Description Grid is the base class for plotting a layout of uniformly spaced points and lines. The Grid component stores dimensional data of the layout of the grid and provides helper functions to retrieve information about the grid, such as the conversion b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c172186c5fbf
github
scripting
Write a Unity C# ScriptableObject for Utility
```csharp using System; using UnityEngine; using System.Threading; #if UNITY_EDITOR using UnityEditor; #endif namespace E { internal static class Utility { #if UNITY_EDITOR public static void CreateAssetIfNotExists<T>() where T : ScriptableObject { string[] guids = AssetDatabase.Fin...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_032ca5d143a5
unity_docs
rendering
What is `QualitySettings.shadowResolution` in Unity? Explain its purpose and usage.
QualitySettings.shadowResolution public static ShadowResolution shadowResolution ; Description The default resolution of the shadow maps. Additional resources: Light.shadowResolution , Shadow mapping .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_046fa8ed7860
unity_docs
rendering
What is `Canvas.worldCamera` in Unity? Explain its purpose and usage.
Canvas.worldCamera public Camera worldCamera ; Description Camera used for sizing the Canvas when in Screen Space - Camera. Also used as the Camera that events will be sent through for a World Space Canvas .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b2fa4132dec
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.IsValidFolder`.
AssetDatabase.IsValidFolder Declaration public static bool IsValidFolder (string path ); Parameters Parameter Description path Project relative path to the folder. Returns bool Returns true if the folder exists. Description Given a path to a folder, returns true if it exists, false otherwise. The gi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_997bee926803
unity_docs
editor
What is `Build.Content.BuildReferenceMap` in Unity? Explain its purpose and usage.
BuildReferenceMap class in UnityEditor.Build.Content Description Container for holding information about where objects will be serialized in a build. This class helps ensure that Object references can be correctly resolved in the final built data. Note: this class and its members exist to provide low-level suppor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ad9d9866547
unity_docs
ui
What is `GUISkin.GetStyle` in Unity? Explain its purpose and usage.
GUISkin.GetStyle Declaration public GUIStyle GetStyle (string styleName ); Description Get a named GUIStyle . ```csharp using UnityEngine;public class Example : MonoBehaviour { bool b; void OnGUI() { b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button")); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7781c877c113
unity_docs
physics
What is `Rigidbody2D.OverlapPoint` in Unity? Explain its purpose and usage.
Rigidbody2D.OverlapPoint Declaration public bool OverlapPoint ( Vector2 point ); Parameters Parameter Description point A point in world space. Returns bool Whether the point overlapped any of the Rigidbody2D colliders. Description Check if any of the Rigidbody2D colliders overlap a point in spa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a3fbf3ae9e1
unity_docs
scripting
What is `AI.NavMeshBuildMarkup` in Unity? Explain its purpose and usage.
NavMeshBuildMarkup struct in UnityEngine.AI / Implemented in: UnityEngine.AIModule Description The NavMesh build markup allows you to control how certain objects are treated during the NavMesh build process, specifically when collecting sources for building. You can override the area type or specify that certai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d1146bd805a
unity_docs
rendering
What is `Material.EnableKeyword` in Unity? Explain its purpose and usage.
Material.EnableKeyword Declaration public void EnableKeyword (ref Rendering.LocalKeyword keyword ); Declaration public void EnableKeyword (string keyword ); Parameters Parameter Description keyword The LocalKeyword to enable. keyword The name of the LocalKeyword to enable. Description Enables...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e43515b64d49
unity_docs
rendering
What is `Rendering.RenderTargetBlendState` in Unity? Explain its purpose and usage.
RenderTargetBlendState struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Values for the blend state. Additional resources: RenderStateBlock , ShaderLab: Blending . Static Properties Property Description defaultValue Default values for the blend state. Properties Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2b3fe2a3fff
unity_docs
rendering
Show me a Unity C# example demonstrating `Media.MediaEncoder`.
onstructing an instance of this class creates an encoder that will create an audio, video or audio/video file with the specified tracks in it. Call the AddFrame() and AddSamples() methods alternately for each track, so that frames and samples keep each track equally filled. Once all the wanted frames and samples are ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3d95b2e20b1
unity_docs
physics
Give me an overview of the `ForceReserializeAssetsOptions` class in Unity.
ForceReserializeAssetsOptions enumeration Description Options for AssetDatabase.ForceReserializeAssets . Properties Property Description ReserializeAssets Specifies that AssetDatabase.ForceReserializeAssets should load, upgrade, and save the assets at the paths passed to the function, but not their accompanyin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6ba05a61863b
unity_docs
physics
Explain 'Scene visibility' in Unity.
Unity’s scene visibility controls allow you to quickly hide and display GameObjects in the Scene view without changing their in-game visibility. This is useful for working with large or complex scenes where it can be difficult to view and select specific GameObjects. Using visibility options is safer than deactivating ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_737a4a2a9f41
unity_docs
rendering
In Unity's 'Background Tasks window reference', what is 'Task information' and how does it work?
Each entry in the Background Tasks window displays the following information about the task. Screenshot label Section Displays 1 Task name/description A name or short description for the task. 2 Progress bar Indicates how close the task is to completion. If the task is indeterminate, because its progress is not measura...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c1e4bfcfe05
unity_docs
xr
What is `Search.IPropertyDatabaseView.IsPersistableType` in Unity? Explain its purpose and usage.
IPropertyDatabaseView.IsPersistableType Declaration public bool IsPersistableType (Type type ); Parameters Parameter Description type A type. Returns bool True if the type can be persisted in the file, false otherwise. Description Returns a boolean indicating if a type can be persisted into the backi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd8690901f9c
unity_docs
scripting
What is `XR.Bone.TryGetChildBones` in Unity? Explain its purpose and usage.
Bone.TryGetChildBones Declaration public bool TryGetChildBones (List<Bone> childBones ); Parameters Parameter Description childBones A list of bones that will be filled out with the children bones of this bone. Returns bool true if bone can be queried for child bones; otherwise false. Description Get...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1da92d4c72e8
unity_docs
scripting
What is `PlayerSettings.accelerometerFrequency` in Unity? Explain its purpose and usage.
PlayerSettings.accelerometerFrequency public static int accelerometerFrequency ; Description Accelerometer update frequency. Note: build-time option. Has no effect if changed when application is already running.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a0219140703
unity_docs
scripting
What are the parameters of `GameObjectUtility.DuplicateGameObjects` in Unity?
Returns GameObject[] The array of the duplicated GameObject roots. Description Duplicates an array of GameObjects and returns the array of the new GameObject roots. Duplicates GameObjects within a Scene. Each GameObject will be on the same level in the hierarchy as its original GameObject, and they will share the same ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3a7fa444986
unity_docs
rendering
What is `RenderTextureFormat.RGBAUShort` in Unity? Explain its purpose and usage.
RenderTextureFormat.RGBAUShort Description Four channel (RGBA) render texture format, 16 bit unsigned integer per channel. Note that not all graphics cards support integer render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.Sup...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f6ca802b3d4
unity_docs
editor
What is `SceneManagement.PrefabOverride` in Unity? Explain its purpose and usage.
PrefabOverride class in UnityEditor.SceneManagement Description Class with information about a given override on a Prefab instance. Public Methods Method Description Apply Applies the override to the Prefab Asset at the given path. GetAssetObject Returns the asset object of the override in the outermost Prefa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_642894063d1e
unity_docs
rendering
What are the parameters of `ComputeShader.IsKeywordEnabled` in Unity?
Returns bool Returns true if the given LocalKeyword is enabled for this compute shader. Otherwise, returns false. Description Checks whether a local shader keyword is enabled for this compute shader. Shader keywords determine which shader variants Unity uses. For information on working with local shader keywords and gl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9e610c30d95
unity_docs
scripting
What is `UIElements.DataBinding.ApplyConverterGroupToSource` in Unity? Explain its purpose and usage.
DataBinding.ApplyConverterGroupToSource Declaration public void ApplyConverterGroupToSource ( UIElements.ConverterGroup group ); Parameters Parameter Description group The converter group. Description Applies a ConverterGroup to this binding that will be used when converting data between a UI control ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd1689070ae8
unity_docs
rendering
Explain 'Receiving shadows shader example in the Built-In Render Pipeline' in Unity.
Implementing support for receiving shadows will require compiling the base lighting pass into several variants, to handle cases of “directional light without shadows” and “directional light with shadows” properly. #pragma multi_compile_fwdbase directive does this (see multiple shader variants for details). In fact it d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf99e501f6fd
unity_docs
rendering
What is `TrueTypeFontImporter.characterPadding` in Unity? Explain its purpose and usage.
TrueTypeFontImporter.characterPadding public int characterPadding ; Description Border pixels added to character images for padding. This is useful if you want to render text using a shader which needs to render outside of the character area (like an outline shader).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87ce798bacab
unity_docs
ui
What is `UIElements.VisualElement.Hierarchy.operator_ne` in Unity? Explain its purpose and usage.
VisualElement.Hierarchy.operator != public static bool operator != ( UIElements.VisualElement.Hierarchy x , UIElements.VisualElement.Hierarchy y ); Parameters Parameter Description x The left operand of the comparison. y The right operand of the comparison. Returns bool Returns false if the two ins...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99a17061e407
unity_docs
math
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetricsFilters.SetReadTypeFilter` in Unity? Explain its purpose and usage.
AsyncReadManagerMetricsFilters.SetReadTypeFilter Declaration public void SetReadTypeFilter ( Unity.IO.LowLevel.Unsafe.FileReadType _readType ); Declaration public void SetReadTypeFilter (FileReadType[] _readTypes ); Parameters Parameter Description _readType FileReadType to filter by. Summary will inc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00a2db57de80
unity_docs
scripting
What is `SystemLanguage.Indonesian` in Unity? Explain its purpose and usage.
SystemLanguage.Indonesian Description Indonesian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Indonesian language if (Application.systemLanguage == SystemLanguage.Indonesian) { //Outputs into console that the sys...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c06c4d5d353f
unity_docs
editor
Show me a Unity C# example demonstrating `SettingsProvider.OnDeactivate`.
SettingsProvider.OnDeactivate Declaration public void OnDeactivate (); Description Use this function to implement a handler for when the user clicks on another setting or when the Settings window closes. ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements;class SimpleIMGUISettingsProvid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c4bdbbfc6c5
unity_docs
rendering
What is `SpriteRenderer.RegisterSpriteChangeCallback` in Unity? Explain its purpose and usage.
SpriteRenderer.RegisterSpriteChangeCallback Declaration public void RegisterSpriteChangeCallback (UnityAction<SpriteRenderer> callback ); Parameters Parameter Description callback The callback to invoke when the SpriteRenderer's Sprite reference changes. Description Registers a callback to receive a notifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_31406ef16f6b
unity_docs
scripting
In Unity's 'RepeatButton', what is 'Inherited UXML attributes' and how does it work?
This element inherits the following attributes from its base class: Name Type Description binding-path string Path of the target property to be bound. display-tooltip-when-elided boolean When true, a tooltip displays the full version of elided text, and also if a tooltip had been previously provided, it will be overwri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73aea0d8931d
unity_docs
scripting
What is `QualitySettings.activeQualityLevelChanged` in Unity? Explain its purpose and usage.
QualitySettings.activeQualityLevelChanged Parameters Parameter Description value If the current Quality level is being changed this callback will be raised. Description Delegate that you can use to invoke custom code when Unity changes the current Quality Level. Parameters are the previous Quality Level and t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a0cfc8d90a6e
unity_docs
physics
In Unity's 'Define binding mode and update trigger', what is 'Define binding modes' and how does it work?
Binding modes configure how changes are replicated between the data source and the UI. The following binding modes are available: TwoWay : Changes are replicated from the data source to the UI and from the UI to the data source. This is the default binding mode. ToTarget : Changes are replicated from the data source to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2115b3516974
unity_docs
editor
Show me a Unity C# example demonstrating `Profiling.ProfilerEditorUtility.SetSelection`.
he specified thread can not be found, Unity throws an ArgumentException. If you know the rawSampleIndex to the sample you want to select, you can use IProfilerFrameTimeViewSampleSelectionController.SetSelection directly to set the selection. Additional resources: IProfilerFrameTimeViewSampleSelectionController.SetSe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9f208ab5ea8
unity_docs
rendering
What is `ParticleSystemShapeType` in Unity? Explain its purpose and usage.
ParticleSystemShapeType enumeration Description The emission shape. This is used by the ShapeModule to determine how to sort the particles. Properties Property Description Sphere Emit from a sphere. Hemisphere Emit from a half-sphere. Cone Emit from the base of a cone. Box Emit from the volume of a box. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_023e5c84cd4b
unity_docs
rendering
What is `GraphicsBuffer.Target.Vertex` in Unity? Explain its purpose and usage.
GraphicsBuffer.Target.Vertex Description GraphicsBuffer can be used as a vertex buffer. DirectX 11 does not allow Vertex buffers to also be Structured . For compute shader mesh data access with DirectX 11 compatibility, it is best to use Raw . Additional resources: Mesh.vertexBufferTarget , Mesh.GetVertexBuff...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ff1a05c1cbe
unity_docs
rendering
What is `Texture2D.ReadPixels` in Unity? Explain its purpose and usage.
Texture2D.ReadPixels Declaration public void ReadPixels ( Rect source , int destX , int destY , bool recalculateMipMaps = true); Parameters Parameter Description source The region of the render target to read from. destX The x position in the texture to write the pixels to. destY The y position in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79a089a61db6
unity_docs
input
Give me an overview of the `TouchScreenKeyboardType` class in Unity.
TouchScreenKeyboardType enumeration Description Enumeration of the different types of supported touchscreen keyboards. Properties Property Description Default The default keyboard layout of the target platform. ASCIICapable Keyboard with standard ASCII keys. NumbersAndPunctuation Keyboard with numbers and pun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4a8e48c486f
unity_docs
scripting
What is `Experimental.GraphView.ISelectable.IsSelectable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ISelectable.IsSelectable Declaration public bool IsSelectable (); Returns bool True if selectable. False otherwise. Description Check if element is selectable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df3bb45a0d0f
unity_docs
scripting
What is `UnityAPICompatibilityVersionAttribute` in Unity? Explain its purpose and usage.
UnityAPICompatibilityVersionAttribute class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Declares an assembly to be compatible (API wise) with a specific Unity API. Used by internal tools to avoid processing the assembly in order to decide whether assemblies may be using old Unity API. Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13f18301e80a
unity_docs
scripting
What is `VersionControl.Asset.States` in Unity? Explain its purpose and usage.
States enumeration Description Describes the various version control states an asset can have. Properties Property Description None The version control state is unknown. Local The asset is not under version control. Synced The asset is up to date. OutOfSync A newer version of the asset is available on the ve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29def8119a19
unity_docs
scripting
What is `WindZone.windPulseFrequency` in Unity? Explain its purpose and usage.
WindZone.windPulseFrequency public float windPulseFrequency ; Description Defines the frequency of the wind changes. ```csharp // Creates a wind zone to produce a softly changing general wind // Just place this into an empty game object using UnityEngine;public class ExampleScript : MonoBehaviour { void Start...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_faab1ee4805e
unity_docs
ui
What is `UIElements.WheelEvent.scrollDeltaPerTick` in Unity? Explain its purpose and usage.
WheelEvent.scrollDeltaPerTick public static float scrollDeltaPerTick ; Description The magnitude of WheelEvent.delta that corresponds to exactly one tick of the scroll wheel. UIToolkit's scroll factor is the same as IMGUI's scroll factor both in Editor and Runtime.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49edc876653b
unity_docs
math
What is `MaterialPropertyBlock.SetMatrixArray` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.SetMatrixArray Declaration public void SetMatrixArray (string name , Matrix4x4[] values ); Declaration public void SetMatrixArray (int nameID , Matrix4x4[] values ); Declaration public void SetMatrixArray (string name , List<Matrix4x4> values ); Declaration public void SetMatr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b67c48c62f70
unity_docs
scripting
Show me a Unity C# example demonstrating `Time.frameCount`.
Time.frameCount public static int frameCount ; Description The total number of frames since the start of the game (Read Only). This value starts at 0 and increases by 1 on each Update phase. Internally, Unity uses a 64 bit integer which it downcasts to 32 bits when this is called, and discards the most signif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6a3349d2c1e
unity_docs
math
What is `Unity.IO.Archive.ArchiveHandle.GetFileInfo` in Unity? Explain its purpose and usage.
ArchiveHandle.GetFileInfo Declaration public ArchiveFileInfo[] GetFileInfo (); Returns ArchiveFileInfo[] Returns array of ArchiveFileInfo structs, describing each file included in the archive. Description Retrieves information about files included in the archive. Only accessible if the archive loaded su...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39ee4f673a39
unity_docs
rendering
What is `ShaderUtil.IsShaderPropertyHidden` in Unity? Explain its purpose and usage.
ShaderUtil.IsShaderPropertyHidden Declaration public static bool IsShaderPropertyHidden ( Shader s , int propertyIdx ); Parameters Parameter Description s The shader to check against. propertyIdx The property index to use. Description Returns true if the shader propery at index propertyIdx is hidden ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_422e53be5292
unity_docs
rendering
What is `TextureFormat.R16_SIGNED` in Unity? Explain its purpose and usage.
TextureFormat.R16_SIGNED Description Single channel (R) texture format, 16-bits signed integer. Import textures of this format in .DDS files. Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check. Additional resources: Texture2D.format , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_14
github
scripting
What does `GetIndoorMapId` do in this Unity script? Explain its purpose and signature.
Get the Indoor Map Id string of this Positioner.The Indoor Map Id, as a string. Signature: ```csharp public string GetIndoorMapId() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.