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_70ddf07021b5
unity_docs
editor
What is `Compilation.CodeOptimization` in Unity? Explain its purpose and usage.
CodeOptimization enumeration Description Code optimization mode defines whether UnityEditor compiles scripts in Debug or Release mode. Properties Property Description None Unitialized value for code optimization mode. Debug Debug mode enables C# debugging but reduces C# performance. Release Release mode disab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc02f0eac12f
unity_docs
scripting
What is `Apple.ReplayKit.ReplayKit.StartBroadcasting` in Unity? Explain its purpose and usage.
ReplayKit.StartBroadcasting(BroadcastStatusDelegate, bool, bool) Parameters Parameter Description callback A callback for getting the status of broadcast initiation. enableMicrophone Enable or disable the microphone while broadcasting. Enabling the microphone allows you to include user commentary while broadcas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd9aa11e383a
unity_docs
scripting
Give me an overview of the `ClipboardUtility` class in Unity.
ClipboardUtility class in UnityEditor Description A class containing methods to assist with clipboard operations. Static Properties Property Description canCopyGameObject Optional filtering functions invoked to determine if a GameObject can be copied before any action is taken. canCutGameObject Optional filte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4a77918fcda
unity_docs
rendering
What is `RenderTextureFormat.RGInt` in Unity? Explain its purpose and usage.
RenderTextureFormat.RGInt Description Two channel (RG) render texture format, 32 bit signed 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.SupportsRende...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92ca4efc45e8
unity_docs
rendering
What is `Rendering.BatchRendererGroup.SetLoadingMaterial` in Unity? Explain its purpose and usage.
BatchRendererGroup.SetLoadingMaterial Declaration public void SetLoadingMaterial ( Material material ); Parameters Parameter Description material The material to display while a shader is compiling. If this value is null , Unity does not display anything. Description Set the loading material for the Bat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2ac008c8be23
unity_docs
rendering
In Unity's 'Creating and editing Terrains', what is 'Terrain Overlay Windows' and how does it work?
Terrain tools can be used with overlays. When a Terrain GameObject is selected, overlays will appear in the Scene View. These overlays can be docked, dragged, and collapsed. The Terrain Toolbar overlay contains the terrain tools, divided into categories. From left to right, the menu buttons are Sculpt Mode , Materials ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9f0200cd84a
unity_docs
rendering
What is `Experimental.GlobalIllumination.DirectionalLight.indirectColor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. DirectionalLight.indirectColor public Experimental.GlobalIllumination.LinearColor indirectColor ; Description The indirect light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eec2ed115a11
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.ImportAsset`.
The path of the asset to import. Description Import asset at path. Import an asset at the specified path. Calling this method triggers a number of callbacks including AssetModificationProcessor.OnWillSaveAssets and AssetPostprocessor.OnPostprocessAllAssets . All paths are relative to the project folder, for examp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb5a7282c95b
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.GetComponentInChildren`.
then call GetComponentInChildren on that reference. Note : If the type you request is a derivative of MonoBehaviour and the associated script can't be loaded then this function will return `null` for that component. The following example gets a reference to a hinge joint component on the referenced GameObject, or any...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_91ab1ab4c64c
unity_docs
rendering
In Unity's 'Style UI with UI Builder', what is 'Set inline styles to elements' and how does it work?
You can set inline styles to elements in the Inlined Styles section in the element’s Inspector window. Style fields that appear bold with a solid line on the left of the field label represent style properties that are already set or overridden . It’s important to keep track of these overridden style properties, as they...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cda2a0be6d0
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.padding`.
GUIStyle.padding public RectOffset padding ; Description Space from the edge of GUIStyle to the start of the contents. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints the left, right, top and down values of the GUIStyle overflow RectOffset rctOff; void OnGUI() { rctOff = GUI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_40f2c8ee0665_doc_0
github
scripting
What does `CreateTemplateObject` do in this Unity script? Explain its purpose and signature.
Create with default fields Signature: ```csharp public static DefaultEditorScriptTemplate CreateTemplateObject() ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_a35f6347a782
github
scripting
Write a Unity C# script called Character Interaction Module
```csharp using UnityEngine; class CharacterInteractionModule { public virtual void OnActivate(CharacterInteraction charInteraction) { } public virtual void OnDeactivate() { } public virtual void OnUpdate() { } } ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_d2667c39f695
unity_docs
rendering
Explain 'Using the High Definition Render Pipeline' in Unity.
The High Definition Render Pipeline (HDRP) is a prebuilt Scriptable Render Pipeline , built by Unity. HDRP lets you create cutting-edge, high-fidelity graphics for high-end platforms. Use HDRP for AAA quality games, automotive demos, architectural applications and anything that requires high-fidelity graphics. HDRP use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a903aed1339f
unity_docs
rendering
Explain 'Set up a panoramic video as a skybox' in Unity.
Use your panoramic video as the backdrop of your Scene . This information covers how to create a skybox material and assign it to your default skybox. For more information about how to work with skyboxes, refer to Create a skybox . You can use a panoramic video as a skybox to enhance immersion in various ways. You can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99779599d0db
unity_docs
scripting
What is `ArticulationDofLock` in Unity? Explain its purpose and usage.
ArticulationDofLock enumeration Description The lock type applied to a particular degree of freedom of an articulation body. Properties Property Description LockedMotion The relative motion of the two connected articulation bodies is not allowed. LimitedMotion The relative motion of the two connected articulat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f085e257f13
unity_docs
editor
What is `AssetDatabase.ImportPackageFailedCallback` in Unity? Explain its purpose and usage.
AssetDatabase.ImportPackageFailedCallback Declaration public delegate void ImportPackageFailedCallback (string packageName , string errorMessage ); Parameters Parameter Description packageName Name of the package that raised the callback. errorMessage Reason for failure. Description Delegate to be calle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a923bf899e7d
unity_docs
physics
What is `PhysicsVisualizationSettings.GetQueryFilterState` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.GetQueryFilterState Declaration public static bool GetQueryFilterState ( PhysicsVisualizationSettings.QueryFilter filter ); Parameters Parameter Description filter The QueryFilter flags that should be checked. Returns bool Wheter all the flags specified by the filter are...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b7706122a66
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_ASTC4X4_UFloat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_ASTC4X4_UFloat Description A four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of float RGBA texel data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_99395bd0da6e
unity_docs
editor
Show me a Unity code example for 'Use C# code to enable optimization settings'.
manually set each of them individually. Note : This script only works in the Unity Editor, not in builds. ## Create a C# script to optimize your Web build To use code to enable most of these optimizations at once in your Unity project settings : Create an Assets/Editor folder if you don’t already have one. Create an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5c3cab60bb3
unity_docs
rendering
What is `U2D.SpriteAtlasImporter.includeInBuild` in Unity? Explain its purpose and usage.
SpriteAtlasImporter.includeInBuild public bool includeInBuild ; Description Property to get/set whether this Sprite Atlas is marked to be included in the build. Include this method to ensure that the Sprite refers to the Sprite Atlas's packed Texture at runtime. Conversely, the packed texture will not be in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_646f0a078c45
unity_docs
editor
In Unity's 'Manage your license through the command line', what is 'macOS' and how does it work?
Enter the following command into the Terminal to return the license: ``` <unity-command-location> -quit -batchmode -returnlicense -username 'name@example.com' -password 'XXXXXXXXXXXXX' ``` Replace <unity-command-location> with the full path to your Unity Editor application , concatenated with /Contents/MacOS/Unity . Fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2dca4daedd83
unity_docs
scripting
What is `Presets.Preset.ctor` in Unity? Explain its purpose and usage.
Preset Constructor Declaration public Preset ( Object source ); Parameters Parameter Description source Used by the Preset to know its target type and serialized values. Description Constructs a new Preset from a given Object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76cb1f92ff58
unity_docs
scripting
What is `ChangeChildrenOrderEventArgs.instanceId` in Unity? Explain its purpose and usage.
ChangeChildrenOrderEventArgs.instanceId public int instanceId ; Description The instance ID of the parent GameObject whose children have been reordered. Note that this is not the instance ID of the Transform component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_014b91fbdd55
unity_docs
scripting
What is `UIElements.TransformOrigin.ctor` in Unity? Explain its purpose and usage.
TransformOrigin Constructor Declaration public TransformOrigin ( UIElements.Length x , UIElements.Length y ); Description Create a TransformOrigin data with two Lengths for the x and y axis.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9502b1010252
unity_docs
scripting
What is `UIElements.Tab.closeable` in Unity? Explain its purpose and usage.
Tab.closeable public bool closeable ; Description A property that adds the ability to close tabs. The default value is false . Set this value to true to allow the user to close tabs in the tab view.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b00ae47ba41c
unity_docs
rendering
What are the parameters of `Rendering.CommandBuffer.DispatchRays` in Unity?
Description Adds a command to execute a RayTracingShader. When the command buffer executes, the GPU launches the threads of the ray generation shader you specify as an argument for this method. Retrieve the width, height, and depth values with the HLSL DispatchRaysDimensions() function. Retrieve the ray generation shad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52e20e44230d
unity_docs
scripting
What is `UIElements.CollectionViewController.GetIdForIndex` in Unity? Explain its purpose and usage.
CollectionViewController.GetIdForIndex Declaration public int GetIdForIndex (int index ); Parameters Parameter Description index The item index. Returns int The item id. Description Returns the id for the specified index. For example, the index will be different from the id in a tree.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_028e54f6d1d8
unity_docs
rendering
What is `ComputeShader.DisableKeyword` in Unity? Explain its purpose and usage.
ComputeShader.DisableKeyword Declaration public void DisableKeyword (ref Rendering.LocalKeyword keyword ); Declaration public void DisableKeyword (string keyword ); Parameters Parameter Description keyword The LocalKeyword to disable. keyword The name of the LocalKeyword to disable. Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79273ecbe8ef
unity_docs
physics
Give me an overview of the `Physics2D` class in Unity.
Physics2D class in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Global settings and helpers for 2D physics. Static Properties Property Description AllLayers Layer mask constant that includes all layers. angularSleepTolerance A Rigidbody cannot sleep if its angular velocity is above ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9201db310f2a
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddFrameworkToProject` in Unity? Explain its purpose and usage.
PBXProject.AddFrameworkToProject Declaration public void AddFrameworkToProject (string targetGuid , string framework , bool weak ); Parameters Parameter Description targetGuid The GUID of the build configuration as returned by TargetGuidByName . framework The name of the framework. The extension of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1471746c0a98
unity_docs
performance
What is `Profiling.FrameDataView.GetFrameMetaData` in Unity? Explain its purpose and usage.
FrameDataView.GetFrameMetaData Declaration public NativeArray<T> GetFrameMetaData (Guid id , int tag ); Declaration public NativeArray<T> GetFrameMetaData (Guid id , int tag , int index ); Parameters Parameter Description id Project or package identifier. tag Data stream index. index Chunk index....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f7f011c7e0f
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnGUI`.
rendering and handling GUI events. OnGUI is the only function that can implement the "Immediate Mode" GUI (IMGUI) system for rendering and handling GUI events. Your OnGUI implementation might be called several times per frame (one call per event). For more information on GUI events see the Event reference. If the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_908c00c5df59
unity_docs
rendering
What is `TerrainData.CopyActiveRenderTextureToTexture` in Unity? Explain its purpose and usage.
TerrainData.CopyActiveRenderTextureToTexture Declaration public void CopyActiveRenderTextureToTexture (string textureName , int textureIndex , RectInt sourceRect , Vector2Int dest , bool allowDelayedCPUSync ); Parameters Parameter Description textureName The name of the Terrain texture to copy into. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_336802973b72
unity_docs
scripting
What is `Search.SearchTable.LoadFromFile` in Unity? Explain its purpose and usage.
SearchTable.LoadFromFile Declaration public static Search.SearchTable LoadFromFile (string stcPath ); Parameters Parameter Description stcPath Absolute path of the JSON file on disk. Returns SearchTable Loaded search table configuration. Description Load a search table configuraiton from a JSON fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2ca0cf08bbc
unity_docs
rendering
What is `ParticleSystemVertexStreams.Custom2` in Unity? Explain its purpose and usage.
Method group is Obsolete ParticleSystemVertexStreams.Custom2 Obsolete ParticleSystemVertexStreams is deprecated. Please use ParticleSystemVertexStream instead. Description The second stream of custom data, supplied from script. Additional resources: ParticleSystem.SetCustomParticleData , ParticleSystem.GetCus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14f735d3427c
unity_docs
scripting
What is `Unity.Properties.ITypeVisitor` in Unity? Explain its purpose and usage.
ITypeVisitor interface in Unity.Properties Description Interface used to receive a visitation callbacks for a specific type. Public Methods Method Description Visit Implement this method to accept visitation for container type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7ca927c592b
unity_docs
scripting
Show me a Unity C# example demonstrating `iOS.DeviceGeneration`.
DeviceGeneration enumeration Description iOS device generation. ```csharp using UnityEngine; using UnityEngine.iOS;public class DeviceGenerationExample : MonoBehaviour { string m_DeviceGeneration = "Undefined"; void Start() { // Check if the device running this is an "iPhone 14 Pro Max" if (Device.generation =...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d823dc1f737
unity_docs
rendering
What is `PrefabUtility.GetIconForGameObject` in Unity? Explain its purpose and usage.
PrefabUtility.GetIconForGameObject Declaration public static Texture2D GetIconForGameObject ( GameObject gameObject ); Parameters Parameter Description gameObject The GameObject to get an icon for. Returns Texture2D The icon for the GameObject. Description Retrieves the icon for the given GameObje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce5e2b94a08d
unity_docs
performance
Give me an overview of the `AndroidJNI` class in Unity.
AndroidJNI class in UnityEngine / Implemented in: UnityEngine.AndroidJNIModule Description 'Raw' JNI interface to Android Java VM from Unity scripting (C#). Note: Using raw JNI functions requires advanced knowledge of the Android Java Native Interface (JNI). Please take note. Static Methods Method Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02e95f9bf9a8
unity_docs
scripting
What is `Android.AndroidLocale.country` in Unity? Explain its purpose and usage.
AndroidLocale.country public string country ; Description Indicates the geographical location as an ISO code. For example, US (United States), GB (United Kingdom). For more information, refer to the the Android developer documentation on Locale .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed720f4ef537
unity_docs
scripting
What is `iOS.Device.systemVersion` in Unity? Explain its purpose and usage.
Device.systemVersion public static string systemVersion ; Description iOS version. iOS version as a string. E.g. "7.0" or "8.1". ```csharp using UnityEngine; using UnityEngine.iOS;public class SystemVersionExample : MonoBehaviour { bool allowFeature = true; void Start() { // Get the iOS version of the devic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08a039e77467
unity_docs
scripting
What are the parameters of `Caching.GetCacheByPath` in Unity?
Returns Cache A reference to the Cache with the given path. Description Returns the Cache that has the given cache path. ```csharp using System.IO; using UnityEngine;public class Example : MonoBehaviour { void GetCacheByPathExample() { Directory.CreateDirectory("Cache1"); Directory.CreateDirecto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a314b3357602
unity_docs
rendering
What is `LightingSettings.indirectScale` in Unity? Explain its purpose and usage.
LightingSettings.indirectScale public float indirectScale ; Description Multiplies the intensity of of indirect lighting in lightmaps. (Editor only). The range is 0 through 5. The default value is 1. A value of greater than 1 increases the brightness of indirect lighting in lightmaps, and a value of less than ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b301f72f084
unity_docs
physics
In Unity's 'The Package Manager window', what is 'Advanced settings' and how does it work?
The advanced settings menu allows you to perform these actions: Menu item Action results Project Settings Select this item to open the Package Manager project settings , where you can: - List pre-release packages when browsing the Unity Registry. - Add, edit, and remove scoped registries in your project. Preferences Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f9d64ba71819
unity_docs
scripting
In Unity's 'General preferences reference', what is 'Hierarchy window' and how does it work?
Settings for how the Hierarchy window is displayed in the Editor. Property Function Enable Alphanumeric Sorting Displays a button in the top-right corner of the Hierarchy window to toggle between sorting GameObjects by the default Transform sort, or alphanumeric sort order in the Hierarchy window. This setting isn’t av...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf1e77f6a923
unity_docs
rendering
What is `Renderer.worldToLocalMatrix` in Unity? Explain its purpose and usage.
Renderer.worldToLocalMatrix public Matrix4x4 worldToLocalMatrix ; Description Matrix that transforms a point from world space into local space (Read Only). Use this matrix for shader parameters and calculations related to rendering instead of Transform.worldToLocalMatrix . The matrix from the Transform compo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68f82b6f1555
unity_docs
xr
What is `Camera.GetStereoViewMatrix` in Unity? Explain its purpose and usage.
Camera.GetStereoViewMatrix Declaration public Matrix4x4 GetStereoViewMatrix ( Camera.StereoscopicEye eye ); Parameters Parameter Description eye Specifies the stereoscopic eye whose view matrix needs to be returned. Returns Matrix4x4 The view matrix of the specified stereoscopic eye. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d730b0d15213
unity_docs
rendering
What is `Camera.layerCullSpherical` in Unity? Explain its purpose and usage.
Camera.layerCullSpherical public bool layerCullSpherical ; Description How to perform per-layer culling for a Camera. Normally this type of culling is performed by moving the Camera's far plane closer to the eye. By setting this value to true, the culling is instead based on spherical distance. The benefit is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d574778c140e
unity_docs
animation
Show me a Unity code example for 'Animation Parameters'.
sented by a checkbox) Trigger - a boolean parameter that is reset by the controller when consumed by a transition (represented by a circle button) Parameters can be assigned values from a script using functions in the Animator class: SetFloat , SetInteger , SetBool , SetTrigger , and ResetTrigger . Here’s an example of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cee944daa43c
unity_docs
physics
What is `PhysicsScene2D.CapsuleCast` in Unity? Explain its purpose and usage.
PhysicsScene2D.CapsuleCast Declaration public RaycastHit2D CapsuleCast ( Vector2 origin , Vector2 size , CapsuleDirection2D capsuleDirection , float angle , Vector2 direction , float distance , int layerMask = Physics2D.DefaultRaycastLayers); Declaration public RaycastHit2D CapsuleCast ( Vecto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a44547368e1a
unity_docs
scripting
What is `Experimental.GraphView.StickyNoteChangeEvent.GetPooled` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StickyNoteChangeEvent.GetPooled(StickyNote,Change) Parameters Parameter Description target The target [StickyNote]. change The type of change. Returns void Returns an initialized event. Description Gets an event from...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3fdca7e27c75_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
-enabled update job structs must implement this interface to be executed by . Signature: ```csharp public interface IUpdateTransformJob ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_9e7c50f127a7
unity_docs
scripting
What is `MPE.ChannelService.GetPort` in Unity? Explain its purpose and usage.
ChannelService.GetPort Declaration public static int GetPort (); Returns int The port number of the ChannelService. Description Retrieves the port where the ChannelService runs. This port is chosen randomly when the ChannelService first starts. Alternatively you can specify the port from the command line, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f742d191da5
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.worldToCameraMatrix`.
or to provide a custom Camera's location that is not based on the transform. Note that camera space matches OpenGL convention: camera's forward is the negative Z axis. This is different from Unity's convention, where forward is the positive Z axis. If you change this matrix, the camera no longer updates its rendering b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5e6115896bf
unity_docs
editor
What is `UIElements.Column.comparison` in Unity? Explain its purpose and usage.
Column.comparison public Comparison<int> comparison ; Description The comparison to use when using ColumnSortingMode.Default . Compares two items by their index in the source. The following example creates a MultiColumnListView that can be sorted with the default algorithm: ```csharp using System; u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4e1efb70a9b
unity_docs
scripting
What is `HighlightSearchMode` in Unity? Explain its purpose and usage.
HighlightSearchMode enumeration Description Used to specify how to find a given element in the editor to highlight. Let's consider various approaches to highlighting the Scale control in the Transform component. Using the HighlightSearchMode.PrefixLabel mode you can specify the label text "Scale" as the identifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e15828c4a08
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody2D.linearVelocity`.
y is affected by user specified forces, impulses from collisions, gravity and Rigidbody2D.linearDamping . Note: A velocity in Unity is represented as world units per second. World units are arbitrary and often thought of as metres, but they can also represent millimetres or light years. Additional resources: Rigidbo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fbf1d05f143
unity_docs
editor
What is `Rendering.GraphicsTier.Tier1` in Unity? Explain its purpose and usage.
GraphicsTier.Tier1 Description The lowest graphics tier. Corresponds to low-end devices. Note: Graphics tiers are only supported in the Built-in Render Pipeline. For information on which devices this graphics tier corresponds to, and how to work with graphics tiers, see Graphics tiers . Additional resources: Gra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7dd5bd0b8617
unity_docs
ui
In Unity's 'Relative and absolute positioning', what is 'Create the example for the runtime UI' and how does it work?
Create a USS file named PositioningTest.uss with the following content: ```.box { height: 70px; width: 70px; margin-bottom: 2px; background-color: gray; } #relative{ width: 70px; height: 70px; background-color: purple; left: 25px; margin-bottom: 2px; position:relative; } #absolutePositionElement{ left: 25px;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c90b310c2468
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.B8G8R8_UInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.B8G8R8_UInt Description A three-component, 24-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99aefc0e2b9d
unity_docs
rendering
What are the parameters of `ImageConversion.EncodeArrayToEXR` in Unity?
Description Encodes this array into the EXR format. This function returns a byte array which is the EXR file data. You can store the encoded data as a file or send it over the network without further processing. This function does not work on any compressed format. Although it is best to use this fu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16040b4c6695
unity_docs
rendering
What is `PlayerSettings.spriteBatchVertexThreshold` in Unity? Explain its purpose and usage.
PlayerSettings.spriteBatchVertexThreshold public static int spriteBatchVertexThreshold ; Description Specifies the max vertex limit for Sprite batching. Unity will automatically batch SpriteRenderers into the same draw call if they share the same Material and fulfill other criteria. The default limit is 300 ve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0794c5eee706
unity_docs
scripting
What is `TerrainTools.TerrainPaintTool_1.GetDescription` in Unity? Explain its purpose and usage.
TerrainPaintTool<T0>.GetDescription Declaration public string GetDescription (); Returns string Tool description. Description Retrieves the description of the custom terrain tool. This function must be implemented. Unity calls this method to populate the terrain tool inspector. Additional resources: Ter...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1e24d0a683b
unity_docs
rendering
What is `ParticleSystem.RotationOverLifetimeModule.x` in Unity? Explain its purpose and usage.
ParticleSystem.RotationOverLifetimeModule.x public ParticleSystem.MinMaxCurve x ; Description Rotation over lifetime curve for the x-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBeh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6e0c9ccf4a9
unity_docs
scripting
Show me a Unity C# example demonstrating `MeshUtility.Optimize`.
icant as both will change. You should only use this function on meshes you generate procedurally in code, for regular mesh assets it is called automatically by the import pipeline when 'Optimize Mesh' is enabled in the mesh importer settings. This function is effectively the same as calling Mesh.Optimize or Mesh.Opt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9fe1f7291ef
unity_docs
scripting
What is `IntegrityCheckLevel` in Unity? Explain its purpose and usage.
IntegrityCheckLevel enumeration Description Enumeration specifying a integrity check level. Additional resources: Debug.CheckIntegrity Properties Property Description Low Fast checks. Medium Moderate checks. High Thorough but slow checks.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1d3c0d7ac608
github
scripting
Write a Unity C# MonoBehaviour script called A Managed Behaviour
```csharp using UnityEngine; namespace Gilzoide.UpdateManager { /// <summary> /// <see cref="MonoBehaviour"/> abstract class with automatic registration in <see cref="UpdateManager"/>. /// </summary> /// <remarks> /// Instances will register themselves for updates in the <c>OnEnable</c> message and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ec24b79b3bb
unity_docs
editor
Show me a Unity C# example demonstrating `PrefabUtility.InstantiatePrefab`.
he Prefab is instantiated in the active Scene. Note: You should not instantiate Prefabs from the OnValidate() or Awake() method. This is because the order in which GameObjects become awake is not deterministic, and therefore can result in unexpected behaviour. If you try this, Unity will generate a warning reading...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_938b3b03e198_doc_2
github
scripting
What does `InheritorAwake` do in this Unity script? Explain its purpose and signature.
Called in Awake when object is not destroyed immediately. Signature: ```csharp protected virtual void InheritorAwake() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_c112e98925c1
unity_docs
scripting
In Unity's 'The Debug class', what is 'Excluding Debug code from non-development builds' and how does it work?
The UnityEngine.Debug logging APIs aren’t stripped from release builds , and write to log files if called. You can prevent this by using #if directives or a conditional attribute to make compilation of Debug calls dependent on a scripting symbol that’s only defined in development builds . The following example uses a c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bb31fe7867b
unity_docs
performance
Give me an overview of the `PickingIncludeExcludeList` class in Unity.
PickingIncludeExcludeList struct in UnityEditor Description Represents a list of Unity Object and DOTS Entity IDs that picking algorithms can either consider or discard. Properties Property Description ExcludeEntities An array of DOTS Entity IDs that the picking algorithm doesn't consider when it selects the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93ab72ccd15e
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddTargetDependency` in Unity?
Description Creates a dependency between this target and another target. The other target may be in a different project. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_AddTargetDependency { [PostProcessBuild] public static void OnPost...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b7bb41972949
unity_docs
xr
In Unity's 'Introduction to packages', what is 'Manifests' and how does it work?
There are two types of manifest files: Project manifests ( manifest.json ) store information that the Package Manager needs to locate and load the right packages, including a list of packages and versions declared as dependencies. Package manifests ( package.json ) store information about a specific package, and a list...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb5b0dde18b8
unity_docs
audio
What is `AudioClip.LoadAudioData` in Unity? Explain its purpose and usage.
AudioClip.LoadAudioData Declaration public bool LoadAudioData (); Returns bool Returns true if the clip is loaded into memory. Description Loads the asset data of an AudioClip into memory, so it will immediately be ready to play. Use this method when your application can afford an upfront performance o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5cafc9bbe00
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryEngine_1.ParseQuery`.
string. useFastYieldingQueryHandler Set to true to get a query that yields null results for elements that don't pass the query, instead of only the elements that pass the query. Returns ParsedQuery<TData> ParsedQuery operation of type TData. Description Parses a query string into a ParsedQuery operation. This...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_15
github
scripting
What does `GetIndoorMapFloorId` do in this Unity script? Explain its purpose and signature.
Get the Indoor Map Floor Id of this Positioner.The Indoor Map Floor Id of this Positioner. Signature: ```csharp public int GetIndoorMapFloorId() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_4327b6de4850
unity_docs
scripting
What is `SceneTemplate.SceneTemplateAsset` in Unity? Explain its purpose and usage.
SceneTemplateAsset class in UnityEditor.SceneTemplate / Inherits from: ScriptableObject Description An Asset that stores everything required to instantiate a new Scene from a templated Scene. Properties Property Description addToDefaults Use this field to add this template to the list of default templates in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc8565b2e99b
unity_docs
scripting
In Unity's 'Apple’s privacy manifest policy requirements', what is 'Privacy manifest for third-party SDKs, packages, and plug-ins' and how does it work?
If you’re a plug-in, package, or SDK owner, and you provide a service or package to be included within a Unity project as a .framework, follow these steps: Assess if your native code or native library includes any of the following categories of information: Any type of data categorized by Apple Any APIs listed under re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0fbcb62f224b
unity_docs
editor
What is `SettingsProvider.GetSearchKeywordsFromPath` in Unity? Explain its purpose and usage.
SettingsProvider.GetSearchKeywordsFromPath Declaration public static IEnumerable<string> GetSearchKeywordsFromPath (string path ); Parameters Parameter Description path Path of the Asset on disk. Returns IEnumerable<string> Returns the list of keywords. Description Extract search keywords from the se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1899536b090b
unity_docs
scripting
What are the parameters of `Actions.ContextMenuUtility.AddMenuItemsForType` in Unity?
Description Adds all MenuItem of a specific type to the Scene view context menu. ```csharp using UnityEditor; using UnityEditor.Actions; using UnityEditor.Overlays; using UnityEngine; using UnityEngine.UIElements; [Overlay(typeof(SceneView), "Context Menu Example", defaultDisplay = true)] class ContextMenuExample : Ov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7d58355d662
unity_docs
physics
Show me a Unity code example for 'Uses of layers in Unity'.
Unity uses Physics.DefaultRaycastLayers which matches every layer except Ignore Raycast. The Physics.Raycast function uses a bitmask, and each bit determines if a layer is ignored by rays or not. If all bits in the layerMask are on, the ray collides against all colliders . If the layerMask = 0, there are no collisions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dcb5f62802f7
unity_docs
editor
What is `Build.IPreprocessBuildWithReport` in Unity? Explain its purpose and usage.
IPreprocessBuildWithReport interface in UnityEditor.Build Implements interfaces: IOrderedCallback Description Implement this interface to receive a callback before the Player build is started. Public Methods Method Description OnPreprocessBuild Implement this function to receive a callback before the build is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0a212619fc54_doc_2
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Retrieves an object from the MonoBehaviour-based pool for the specified type.The type of the poolable MonoBehaviour object.The poolable object from the pool. Signature: ```csharp public static T GetMono<T>() where T : MonoBehaviour, IPoolable => _poolService.GetMono<T>(); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7d7104391a68
unity_docs
rendering
What is `TextureFormat.RGB48_SIGNED` in Unity? Explain its purpose and usage.
TextureFormat.RGB48_SIGNED Description Three color (RGB) texture format, 16-bits signed integer per channel. 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...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34e1df70b799
unity_docs
rendering
What is `U2D.SpriteAtlasExtensions.GetPlatformSettings` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.GetPlatformSettings Declaration public static TextureImporterPlatformSettings GetPlatformSettings ( U2D.SpriteAtlas spriteAtlas , string buildTarget ); Parameters Parameter Description buildTarget The name of the build target. Description Returns the platform settings of the build...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15dff678f66d
unity_docs
editor
What are the parameters of `PrefabUtility.SaveAsPrefabAssetAndConnect` in Unity?
Returns GameObject The root GameObject of the saved Prefab Asset, if available. Description Creates a Prefab Asset at the given path from the given GameObject, including any children in the Scene and at the same time make the given GameObject into an instance of the new Prefab. In case some of the children are Prefab i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8a61a2f5a56
unity_docs
xr
What is `XR.XRSettings.enabled` in Unity? Explain its purpose and usage.
XRSettings.enabled public static bool enabled ; Description Globally enables or disables XR for the application. Set this to true to enable XR mode for the application. Note that this does not activate XR mode. XR mode is activated when a supported Head Mounted Display (HMD) is connected. The GearVR cannot be d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0619dc8dddec
unity_docs
rendering
In Unity's 'Mesh asset Inspector window reference', what is 'View mode dropdown' and how does it work?
For more information, refer to Use the Mesh asset Inspector Preview . Value Description Shaded Provides a visualization of the mesh with a basic light. This is the default view. For more information, see Shaded view . UV Checker Applies a checkerboard texture to the mesh to visualize how the mesh’s UV layout maps textu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4cddf2eb1805
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.invalidSampleId` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.invalidSampleId public static int invalidSampleId ; Description Index of the invalid item. If the invalidSampleId is the same item as returned by HierarchyFrameDataView.GetRootItemID , then the data is unavailable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b141c36d9019
unity_docs
scripting
What is `Toolbars.EditorToolbarDropdownToggle` in Unity? Explain its purpose and usage.
EditorToolbarDropdownToggle class in UnityEditor.Toolbars / Inherits from: UIElements.BaseField_1 Description A control that is both a toggle and a dropdown used with EditorToolbarElementAttribute . Properties Property Description dropdownClickable Clickable object for this dropdown. icon The text associ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b09bea7375f3
github
scripting
Write a Unity C# script called Singleton Attribute
```csharp using System; using UnityEngine; namespace E { [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)] public sealed class SingletonAttribute : Attribute { public SingletonAttribute() { HideFlags = HideFlags.None; } public boo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb239f8b6f6f
unity_docs
rendering
What is `ScreenCapture.CaptureScreenshot` in Unity? Explain its purpose and usage.
ScreenCapture.CaptureScreenshot Declaration public static void CaptureScreenshot (string filename , int superSize ); Declaration public static void CaptureScreenshot (string filename , ScreenCapture.StereoScreenCaptureMode stereoCaptureMode ); Parameters Parameter Description filename The path to sa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c55e799a528c
unity_docs
rendering
In Unity's 'Upgrade to Unity 2023.2', what is 'Auto-generated lighting has been removed' and how does it work?
The Auto Generate setting in the Lighting window has been removed, and related APIs are now obsolete. To generate baked lighting for a scene, you can do any of the following: Select Generate Lighting in the Lighting window. Use the Lightmapping.Bake API. Use the Lightmapping.BakeAsync API. To check lightmaps while you’...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0a108399fcce
unity_docs
rendering
Show me a Unity code example for 'Custom data Surface Shader example in the Built-In Render Pipeline'.
ective vertex:functionName is used, but the function should take two parameters: inout appdata_full and out Input . You can fill in any Input member that is not a built-in value there. Note: Custom Input members used in this way must not have names beginning with ‘uv’ or they won’t work properly. The example below defi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f335d81bdc5
unity_docs
animation
What is `Animator.writeDefaultValuesOnDisable` in Unity? Explain its purpose and usage.
Animator.writeDefaultValuesOnDisable public bool writeDefaultValuesOnDisable ; Description Specifies whether playable graph values are reset or preserved when the Animator is disabled. Set this property to true to reset the playable graph to its default values when the Animator is disabled. Set to this pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98f07313dc81
unity_docs
editor
What is `RuntimePlatform.WindowsEditor` in Unity? Explain its purpose and usage.
RuntimePlatform.WindowsEditor Description In the Unity editor on Windows. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.WindowsEditor) { Debug.Log("Do some...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e44acff7d8aa
unity_docs
scripting
What is `Video.VideoPlayer.Pause` in Unity? Explain its purpose and usage.
VideoPlayer.Pause Declaration public void Pause (); Description Pauses the playback and leaves the current time intact. Use this method to pause the playback of a video. This method sets VideoPlayer.isPlaying to false . To play again, use VideoPlayer.Play . If you pause the video when the VideoPlayer isn't...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b7dada2a871
unity_docs
input
What is `Touch.position` in Unity? Explain its purpose and usage.
Touch.position public Vector2 position ; Description The position of the touch in screen space pixel coordinates. Position returns the current position of a touch contact as it's dragged. If you need the original position of the touch see Touch.rawPosition . The bottom-left of the screen or window is at (0, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53c5d2133143
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.RoundToInt`.
Mathf.RoundToInt Declaration public static int RoundToInt (float f ); Description Returns f rounded to the nearest integer. If the number ends in .5 so it is halfway between two integers, one of which is even and the other odd, the even number is returned. ```csharp using UnityEngine;public class ExampleSc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.