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_9fcd92163041
unity_docs
scripting
What is `GameObject.Find` in Unity? Explain its purpose and usage.
GameObject.Find Declaration public static GameObject Find (string name ); Parameters Parameter Description name The name or hierarchy path of the GameObject to find. Description Finds and returns a GameObject with the specified name or hierarchy path. Only returns active GameObjects. Returns null if ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3aad4bf86958
unity_docs
physics
In Unity's 'Call Unity C# script functions from JavaScript', what is 'Example SendMessage code' and how does it work?
To make the call from a JavaScript plug-in embedded in your project, use the following code: ``` MyGameInstance.SendMessage(objectName, methodName, value); ``` objectName is the name of an object in your scene . methodName is the name of a method in the script, currently attached to that object. value can be a string, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_113cd3aa867f
unity_docs
scripting
In Unity's 'App slicing', what is 'Modify a variant' and how does it work?
There might be times where you want to use a variant on a specific device, or on devices that run over a set memory limit. To do this, you can change the settings of each variant you use. To modify a variant, navigate to Player Settings > Other Settings > Configuration and expand Variant map for app slicing . Note : En...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e68f378d147
unity_docs
rendering
What is `Rendering.DrawingSettings.GetShaderPassName` in Unity? Explain its purpose and usage.
DrawingSettings.GetShaderPassName Declaration public Rendering.ShaderTagId GetShaderPassName (int index ); Parameters Parameter Description index Index of the shader pass to use. Description Get the name of the shader pass.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1faa4f292d5
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.inheritVelocity`.
em. This module applies velocities to particles based on the velocity of the object that spawned them. For most Particle Systems, this is the GameObject velocity, but for sub-emitters, the velocity comes from the parent particle that the sub-emitter particle originated from. Particle System modules do not need to be r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64119931c773
unity_docs
ui
What is `GUI.VerticalScrollbar` in Unity? Explain its purpose and usage.
GUI.VerticalScrollbar Declaration public static float VerticalScrollbar ( Rect position , float value , float size , float topValue , float bottomValue ); Declaration public static float VerticalScrollbar ( Rect position , float value , float size , float topValue , float bottomValue , GUIStyle st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6176837b515e
unity_docs
rendering
In Unity's 'Mesh Renderer component reference', what is 'Lightmapping' and how does it work?
The Lightmapping section contains properties relating to baked and real-time lightmaps . This section is visible only if only if Receive Global Illumination is set to Lightmaps . Property: Function: Scale in Lightmap Specify the relative size of the Renderer’s UVs within a lightmap. A value of 0 results in the Renderer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e309a4767e7a
unity_docs
physics
In Unity's 'Texture compression in Web', what is 'Precedence for compression format settings' and how does it work?
You can set the default texture compression format for your Web application from either the Web build settings window or the Web Player settings window. Before you set the texture compression format, it’s important to decide which of these settings take precedence. The texture compression format value you set in build ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f15aae0e7364
unity_docs
audio
Show me a Unity C# example demonstrating `AudioChorusFilter.wetMix1`.
AudioChorusFilter.wetMix1 public float wetMix1 ; Description Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5. ```csharp using UnityEngine;[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioChorusFilter))] public class Example : MonoBehaviour { // Produce random mixes with the Chorus fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48989b2baaf0
unity_docs
scripting
What is `Rendering.RenderPipelineAsset.pipelineType` in Unity? Explain its purpose and usage.
RenderPipelineAsset.pipelineType public Type pipelineType ; Description Returns a RenderPipeline type associated with the given RenderPipelineAsset instance. The result is based on the generic parameter type of RenderPipelineAsset<T0> . If a custom Render Pipeline Asset does not inherit from the RenderPip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_640a5125412e
unity_docs
editor
What is `AndroidJNI.RegisterNatives` in Unity? Explain its purpose and usage.
AndroidJNI.RegisterNatives Declaration public static int RegisterNatives (IntPtr clazz , JNINativeMethod[] methods ); Returns int Zero on success, negative value on error. Falsely succeeds in Editor. Description Registers native methods with the class specified by the clazz argument. See JNINativeMetho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0eed1de434c
unity_docs
rendering
What is `Camera.orthographic` in Unity? Explain its purpose and usage.
Camera.orthographic public bool orthographic ; Description Is the camera orthographic ( true ) or perspective ( false )? When ortho is true , camera's viewing volume is defined by orthographicSize . When orthographic is false , camera's viewing volume is defined by fieldOfView . NOTE: Deferred rendering i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_df429f317b75
unity_docs
rendering
In Unity's 'Set the lighting model in a Surface Shader in the Built-In Render Pipeline', what is 'Custom GI' and how does it work?
Declare the following function to customize the decoding lightmap data and probes: void Lighting<Name>_GI (SurfaceOutput s, UnityGIInput data, inout UnityGI gi); Note that to decode standard Unity lightmaps and SH probes, you can use the built-in DecodeLightmap and ShadeSHPerPixel functions, as seen in UnityGI_Base in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_930249988d07
unity_docs
scripting
Show me a Unity C# example demonstrating `Event.numeric`.
Event.numeric public bool numeric ; Description Is the current keypress on the numeric keyboard? (Read Only) Use this flag to destinguish between main & numeric keys. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Creates a Label and prints Numeric Key pad is on/off // depending on the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d2c2dc5cf65
unity_docs
scripting
What is `UIElements.UxmlLongAttributeDescription.TryGetValueFromBag` in Unity? Explain its purpose and usage.
UxmlLongAttributeDescription.TryGetValueFromBag Declaration public bool TryGetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc , ref long value ); Parameters Parameter Description bag The bag of attributes. cc The context in which the values are retrieved. value The valu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48b288227e0a
unity_docs
animation
What is `Animations.CurveFilterOptions.rotationError` in Unity? Explain its purpose and usage.
CurveFilterOptions.rotationError public float rotationError ; Description The amount the rotation animation curve is allowed to deviate from its original curve. This amount is expressed as a number of degrees. It should be a positive value between 0 and 180.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2137351d8261
unity_docs
physics
What is `Rigidbody.isKinematic` in Unity? Explain its purpose and usage.
Rigidbody.isKinematic public bool isKinematic ; Description Controls whether physics affects the rigidbody. If isKinematic is enabled, Forces, collisions or joints will not affect the rigidbody anymore. The rigidbody will be under full control of animation or script control by changing transform.position. Kine...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c0b6c6a526b
unity_docs
scripting
What is `Progress` in Unity? Explain its purpose and usage.
Progress class in UnityEditor Description The Progress utility class reports the progress of asynchronous tasks to Unity. The Progress utility class can be used to report progress of asynchronous tasks in multiple ways. Here is an example of a task that runs on the EditorApplication.update loop and reports prog...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b526d92bda2c
unity_docs
audio
What is `Audio.AudioMixerUpdateMode` in Unity? Explain its purpose and usage.
AudioMixerUpdateMode enumeration Description The mode in which an AudioMixer should update its time. Use this with AudioMixer.updateMode to define how the AudioMixer time is updated. Properties Property Description Normal Update the AudioMixer with scaled game time. UnscaledTime Update the AudioMixer with uns...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_729701531be5
unity_docs
scripting
What is `Experimental.GraphView.MiniMap.zoomFactorTextChanged` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. MiniMap.zoomFactorTextChanged public Action<string> zoomFactorTextChanged ; Description Callback for when the zoom factor text has changed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1e0cb5d47d7
unity_docs
input
Give me an overview of the `IMECompositionMode` class in Unity.
IMECompositionMode enumeration Description Controls IME input. Properties Property Description Auto Enable IME input only when a text field is selected (default). On Enable IME input. Off Disable IME input.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d88df27e7805
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.multiplyDragByParticleVelocity`.
ParticleSystem.LimitVelocityOverLifetimeModule.multiplyDragByParticleVelocity public bool multiplyDragByParticleVelocity ; Description Adjust the amount of drag this module applies to particles, based on their speeds. Additional resources: ParticleSystem.LimitVelocityOverLifetimeModule.drag , ParticleSystem....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de602edd0617
unity_docs
animation
What is `Animations.IAnimationJobPlayable` in Unity? Explain its purpose and usage.
IAnimationJobPlayable interface in UnityEngine.Animations Implements interfaces: IPlayable Description The interface defining an animation playable that uses IAnimationJob . Additional resources: AnimationScriptPlayable . Public Methods Method Description GetJobData Gets the job data contained in the playa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76704983695b
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.FileHandle.Close` in Unity? Explain its purpose and usage.
FileHandle.Close Declaration public Unity.Jobs.JobHandle Close ( Unity.Jobs.JobHandle dependency ); Parameters Parameter Description dependency (Optional) The JobHandle to wait on before closing the file. Returns JobHandle The JobHandle for the asynchronous close operation. You can use this JobHandle ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4b9840e9a32
unity_docs
physics
What is `TerrainTools.TerrainPaintUtility.EndPaintHoles` in Unity? Explain its purpose and usage.
TerrainPaintUtility.EndPaintHoles Declaration public static void EndPaintHoles ( TerrainTools.PaintContext ctx , string editorUndoName ); Parameters Parameter Description ctx The Terrain holes PaintContext to complete. editorUndoName Unique name used for the undo stack. Description Helper function to c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_79c253bb1511
unity_docs
ui
In Unity's 'Bind to a list without ListView', what is 'Create and style a custom control' and how does it work?
Create a custom control with C# that represents a reference to a 2D texture asset, and style it with USS. In that folder, create a folder named Editor . In the Editor folder, create a C# script named TexturePreviewElement.cs . Replace the contents of TexturePreviewElement.cs with the following: ```csharp using System; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ae2e9fb64f1
unity_docs
rendering
What is `Editor.GetPreviewTitle` in Unity? Explain its purpose and usage.
Editor.GetPreviewTitle Declaration public GUIContent GetPreviewTitle (); Description Override this method if you want to change the label of the Preview area. If null is returned the default text "Preview" will be used. Note: Inspector previews are limited to the primary editor of persistent objects (assets)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_20c5ac1ddb31
github
scripting
Write a Unity C# script called Player Input
```csharp using Unity.Entities; using Unity.Collections; using UnityEngine; namespace Farmer.Core { public struct PlayerInput : IComponentData { } class PlayerInputSystem : ComponentSystem { public struct Group { public int Length; [ReadOnly] public ComponentDa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e46af5a2d9b4
unity_docs
rendering
In Unity's 'Writing compute shaders for multiple platforms', what is 'Cross-platform best practices' and how does it work?
DirectX 11 (DX11) supports many actions that are not supported on other platforms (such as Metal or OpenGL ES ). Therefore, you should always ensure your shader has well-defined behavior on platforms that offer less support, rather than only on DX11. Here are few things to consider: Out-of-bounds memory accesses are ba...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_11e0216824b0
unity_docs
scripting
What is `Experimental.GraphView.StackNode.DragLeave` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StackNode.DragLeave Declaration public bool DragLeave ( UIElements.DragLeaveEvent evt , IEnumerable<ISelectable> selection , Experimental.GraphView.IDropTarget leftTarget , Experimental.GraphView.ISelection dragSource );...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d2c451d504d
unity_docs
math
What is `Rendering.RayTracingAccelerationStructure.Settings.managementMode` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.Settings.managementMode public Rendering.RayTracingAccelerationStructure.ManagementMode managementMode ; Description An enum that determines whether Unity or the user updates a RayTracingAccelerationStructure. Additional resources: ManagementMode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d873d88fa31c
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.GetCategoryByName` in Unity? Explain its purpose and usage.
ProfilerUnsafeUtility.GetCategoryByName Declaration public static ushort GetCategoryByName (char* name , int nameLen ); Parameters Parameter Description name Category name. nameLen Category name length. Returns ushort Returns Profiler category identifier. Description Gets the Profiler category ide...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2322da140164
unity_docs
scripting
What is `U2D.SpriteAtlasAsset.GetMasterAtlas` in Unity? Explain its purpose and usage.
SpriteAtlasAsset.GetMasterAtlas Declaration public U2D.SpriteAtlas GetMasterAtlas (); Returns SpriteAtlas Returns the Master Sprite Atlas if set. Otherwise, returns null. Description Gets the Master Sprite Atlas for the given Variant Sprite Atlas.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c4ba1b539cb
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseElement.SetCustomAttribute` in Unity? Explain its purpose and usage.
BaseElement.SetCustomAttribute Declaration public Unity.Android.Gradle.Manifest.BaseAttribute SetCustomAttribute (string name , string value ); Parameters Parameter Description name Attribute name with namespace. value Attribute value. Description Sets a custom attribute with name and value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf55c521bd4b
unity_docs
editor
What is `AssetBundle.memoryBudgetKB` in Unity? Explain its purpose and usage.
AssetBundle.memoryBudgetKB public static uint memoryBudgetKB ; Description Controls the size of the shared AssetBundle loading cache. Default value is 1MB. Depending on your AssetBundle build and load strategy, sections of the AssetBundle file may be accessed multiple times. To improve loading performance, the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f90633174947
unity_docs
rendering
What is `Rendering.ShaderPropertyType` in Unity? Explain its purpose and usage.
ShaderPropertyType enumeration Description Type of a given shader property. Properties Property Description Color The property holds a Vector4 value representing a color. Vector The property holds a Vector4 value. Float The property holds a floating number value. Range The property holds a floating number va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1184dd7d9e8
unity_docs
scripting
Give me an overview of the `GradientAlphaKey` class in Unity.
GradientAlphaKey struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Alpha key used by Gradient. Additional resources: GradientColorKey , Gradient . Properties Property Description alpha Alpha channel of key. time Time of the key (0 - 1). Constructors Constructor Description Gr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_43ae3647ed58
unity_docs
math
In Unity's 'Load SSH keys automatically on Windows (PuTTY)', what is 'Before you begin' and how does it work?
Make sure you’ve installed the PuTTY suite, which includes Pageant. If it’s not installed, its download link is available at https://www.putty.org/ . Check if you have any existing SSH keys. Refer to the GitHub Docs article, Checking for existing SSH keys . If you don’t have an SSH key: Use the PuTTYgen application to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2536cc2ba392
unity_docs
physics
What is `Canvas.ForceUpdateCanvases` in Unity? Explain its purpose and usage.
Canvas.ForceUpdateCanvases Declaration public static void ForceUpdateCanvases (); Description Force all canvases to update their content. A canvas performs its layout and content generation calculations at the end of a frame, just before rendering, in order to ensure that it's based on all the latest changes th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_182b50db01f5
unity_docs
scripting
Explain 'Aim Constraint component' in Unity.
An Aim Constraint rotates a GameObject to face its source GameObjects. It can also maintain a consistent orientation for another axis. For example, you can add an Aim Constraint to a Camera . To keep the Camera upright while the Constraint aims it, specify the up axis of the Camera and an up direction to align it to. U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_678446fe0d94
github
scripting
Write a Unity C# XR/VR script for Look At Player
```csharp using UnityEngine; using UnityEngine.XR.Interaction.Toolkit; /// <summary> /// Make the object look at the xr rig's camera /// </summary> public class LookAtPlayer : MonoBehaviour { [Tooltip("Follow x axis")] public bool lookX = false; [Tooltip("Follow y axis")] public bool lookY = false; ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_833923d60421
unity_docs
scripting
In Unity's 'Game view reference', what is 'Game view control bar' and how does it work?
The Game view control bar is at the top of the Game view and contains options to control the Game view. Property Description Game/Simulator Select the Game or Simulator view. Use the Game view to preview how your final, built application looks. Use the Simulator view to preview how your built application looks on a mob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a45a37e1dd6b
unity_docs
math
What is `AndroidJNI.CallCharMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallCharMethodUnsafe Declaration public static char CallCharMethodUnsafe (IntPtr obj , IntPtr methodID , jvalue* args ); Description Calls a Java instance method defined by methodID , optionally passing an array of arguments ( args ) to the method. Additional resources: Java Native Interface Spe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a60c6e32c707
unity_docs
audio
Explain 'Web request low-level API reference' in Unity.
While the high-level web request API minimizes the need for boilerplate code, the low-level web request API offers more flexibility and control. This section lists key members of the low-level API and the scenarios they’re intended for. In general, using the low-level API involves creating a UnityWebRequest to which yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ece71f76a919
unity_docs
scripting
What is `UIElements.ContextClickEvent` in Unity? Explain its purpose and usage.
ContextClickEvent class in UnityEngine.UIElements / Inherits from: UIElements.MouseEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description The event sent when clicking the right mouse button. Inherited Members Properties Property Description bubbles Returns whether this event type bubble...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61a1d8afd70a
unity_docs
animation
Show me a Unity C# example demonstrating `Tilemaps.Tilemap.RefreshTile`.
Tilemap.RefreshTile Declaration public void RefreshTile ( Vector3Int position ); Parameters Parameter Description position Position of the Tile on the Tilemap . Description Refreshes a Tile at the given XYZ coordinates of a cell in the Tilemap . The Tilemap will retrieve the rendering data, anima...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_75d8548a7b48
unity_docs
rendering
Explain 'macOS Player settings reference' in Unity.
This page details the Player settings specific to macOS. For a description of the general Player settings, refer to Player Settings . You can find documentation for the properties in the following sections: Icon Resolution and Presentation Splash Image Other Settings ## Icon Activate the Override for Windows, Mac, Li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f09a9ff9e20
unity_docs
scripting
Show me a Unity C# example demonstrating `Cursor.visible`.
Cursor.visible public static bool visible ; Description Determines whether the hardware pointer is visible or not. Set this to true to reveal the cursor. Set it to false to hide the cursor. Note that in CursorLockMode.Locked mode, the cursor is invisible regardless of the value of this property. ```csharp us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81e4df238eba
unity_docs
rendering
Show me a Unity C# example demonstrating `Renderer.OnBecameInvisible`.
Renderer.OnBecameInvisible() Description OnBecameInvisible is called when the object is no longer visible by any camera. This message is sent to all scripts attached to the renderer. OnBecameVisible and OnBecameInvisible are useful to avoid computations that are only necessary when the object is visible. ```c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d36043d140e5
unity_docs
editor
What is `Profiling.Sampler.GetNames` in Unity? Explain its purpose and usage.
Sampler.GetNames Declaration public static int GetNames (List<string> names ); Parameters Parameter Description names Preallocated list the Sampler names are written to. Or null if you want to get number of Samplers only. Returns int Number of active Samplers. Description Returns number and names o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a65ba41ca4e5
unity_docs
rendering
What is `Search.SearchItem.GetPreview` in Unity? Explain its purpose and usage.
SearchItem.GetPreview Declaration public Texture2D GetPreview ( Search.SearchContext context , Vector2 size , Search.FetchPreviewOptions options , bool cacheThumbnail ); Parameters Parameter Description context Search context used to fetch the preview. size Indicates the size of the desired previ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2fe1e7d655ac_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A base class for MonoBehaviours that can beinstantiatedor addedto a with three arguments passed to the function of the created instance.Instances of classes inheriting from receive the argumentsvia the method where they can be assigned to member fields or properties. Type of the first argument received in the func...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_ca79a230c784
unity_docs
rendering
What is `Resources.LoadAll` in Unity? Explain its purpose and usage.
Resources.LoadAll Declaration public static Object[] LoadAll (string path ); Declaration public static Object[] LoadAll (string path , Type systemTypeInstance ); Parameters Parameter Description path Pathname of the target folder. When using the empty string (i.e., ""), the function will load the entir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff6000b8bb41
unity_docs
scripting
Show me a Unity C# example demonstrating `Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetrics`.
either GetSummaryOfMetrics or GetCurrentSummaryMetrics , you can filter the data used to compute the summary by passing in a set of AsyncReadManagerMetricsFilters objects. The AsyncReadManagerMetrics class is only available in development builds and the Editor. You should guard usage of this class using the scrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dea6ab5a03a7
unity_docs
rendering
What is `SystemInfo.supportsTextureWrapMirrorOnce` in Unity? Explain its purpose and usage.
SystemInfo.supportsTextureWrapMirrorOnce public static int supportsTextureWrapMirrorOnce ; Description Returns a value of 1 or higher if the 'Mirror Once' texture wrap mode is supported. (Read Only) The property returns a value of 1 or higher if the 'Mirror Once' texture wrap mode is supported, or a value of 0 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a86f1e1867ab
unity_docs
scripting
Give me an overview of the `OperatingSystemFamily` class in Unity.
OperatingSystemFamily enumeration Description Enumeration for SystemInfo.operatingSystemFamily . Determines the operating system family application is running on. Properties Property Description Other Returned for operating systems that do not fall into any other category. MacOSX macOS operating system famil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6300438b6504
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime.operator_ne` in Unity? Explain its purpose and usage.
DiscreteTime.operator != public static bool operator != ( Unity.IntegerTime.DiscreteTime lhs , Unity.IntegerTime.DiscreteTime rhs ); Description Returns whether two time values are different.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee42f5503315
unity_docs
editor
What is `SettingsProviderGroupAttribute` in Unity? Explain its purpose and usage.
SettingsProviderGroupAttribute class in UnityEditor Description Attribute used to register multiple SettingsProvider items. Use this attribute to decorate a function that returns an array of SettingsProvider instances. If the function returns null, no SettingsProvider appears in the Settings window. ```csharp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9c923ba427f
unity_docs
networking
What is `Android.AndroidConfiguration.colorModeWideColorGamut` in Unity? Explain its purpose and usage.
AndroidConfiguration.colorModeWideColorGamut public Android.AndroidColorModeWideColorGamut colorModeWideColorGamut ; Description Mirrors the Android property colorMode based on the COLOR_MODE_WIDE_COLOR_GAMUT_MASK value. For information about this property, refer to the Android developer documentation on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5cebedcbfa82
unity_docs
scripting
Explain 'Server configuration code samples' in Unity.
Set up your server configuration file to make your server interact with your Unity Web build. The following topics give you code samples that you can use in your server projects that set them up for use with your Web build. For further information on server configuration for the Web platform, refer to Compressed builds...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e608bb87aa95
unity_docs
editor
What is `UIElements.AssetMonitoringUtilities.SetResetPanelRenderingOnAssetChange` in Unity? Explain its purpose and usage.
AssetMonitoringUtilities.SetResetPanelRenderingOnAssetChange Declaration public static void SetResetPanelRenderingOnAssetChange ( EditorWindow window , bool reset ); Description Sets the state that controls if the panel of the EditorWindow should reset its rendering data when an asset changes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c384eb465997
unity_docs
rendering
What are the parameters of `Playables.ScriptPlayableBinding.Create` in Unity?
Returns PlayableBinding Returns a PlayableBinding that contains information that is used to create a ScriptPlayableOutput . Description Creates a PlayableBinding that contains information representing a ScriptPlayableOutput . ```csharp using System.Collections.Generic; using UnityEngine; using UnityEngine.Playables;pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd76dce1ae17
unity_docs
physics
What are the parameters of `ArticulationBody.GetAccumulatedTorque` in Unity?
Returns Vector3 Accumulated torque expressed in ForceMode.Force . Description Returns the torque that the ArticulationBody has accumulated before the simulation step. The accumulated torque is reset during each physics simulation step. ```csharp using UnityEngine;public class AddTorqueScript : MonoBehaviour { priva...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_983cb9579222_doc_6
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Unity overloads the == operator and this is quite slow. So instead of (instance != null) we use a flag for comparison. Signature: ```csharp private static bool _instantiated = false; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_bba5463b490b
unity_docs
scripting
What is `SceneManagement.SceneManager` in Unity? Explain its purpose and usage.
SceneManager class in UnityEngine.SceneManagement / Implemented in: UnityEngine.CoreModule Description Scene management at run-time. Static Properties Property Description loadedSceneCount The number of loaded Scenes. sceneCount The current number of Scenes. sceneCountInBuildSettings Number of Scenes in Bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e306d9049ff7
unity_docs
physics
What is `ShaderKeywordFilter.ApplyRulesIfNotGraphicsAPIAttribute` in Unity? Explain its purpose and usage.
ApplyRulesIfNotGraphicsAPIAttribute class in UnityEditor.ShaderKeywordFilter / Inherits from: ShaderKeywordFilter.GraphicsAPIConstraintAttribute Description Enable or disable shader keyword filter attributes based on the graphics API. If you use this attribute, Unity enables filter attributes if the current b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb32a269237f
unity_docs
rendering
In Unity's 'Customize the Light Explorer', what is 'Useful classes and methods' and how does it work?
Here is a list of classes and methods that you can use to extend the Light Explorer: ILightingExplorerExtension: ```csharp public virtual LightingExplorerTab[] GetContentTabs(); public virtual void OnEnable() {} public virtual void OnDisable() {} ``` DefaultLightingExplorerExtension (inherit from ILightingExplorerExten...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32ceb19ad7c5
unity_docs
scripting
What is `GridLayout.CellToLocal` in Unity? Explain its purpose and usage.
GridLayout.CellToLocal Declaration public Vector3 CellToLocal ( Vector3Int cellPosition ); Parameters Parameter Description cellPosition Cell position to convert. Returns Vector3 Local position of the cell position. Description Converts a cell position to local position space. ```csharp // Snap t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42fd70b098b2
unity_docs
rendering
What is `RenderingPath.DeferredShading` in Unity? Explain its purpose and usage.
RenderingPath.DeferredShading Description Deferred Shading. This is a standard deferred shading path, that renders Scene information into G-Buffers using multiple render targets, and computes lighting afterwards. Due to use of multiple render targets, it requires GPU with MRT support. Note: Deferred rendering is no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d580c03076b5_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Returns true if the current headset supports Passthrough Camera API Signature: ```csharp public static bool IsSupported ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_95c71f24d65e_doc_4
github
scripting
What does `ContextWithLocator` do in this Unity script? Explain its purpose and signature.
Create a new Context with a built-in Use this key for registry to the Will delete any entry with conflicting contextKey (if exists) Signature: ```csharp public ContextWithLocator(string contextKey, bool willOverwriteByContextKey) : base() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_45b12bb2b8fa
unity_docs
rendering
What is `Search.SearchProvider.id` in Unity? Explain its purpose and usage.
SearchProvider.id public string id ; Description Search provider unique ID. ```csharp using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class SearchProvider_id { internal static string id = "exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fbda086f5780
github
scripting
Write a Unity C# UI script for Base Interaction
```csharp using UnityEngine; using UnityEngine.UI; public class BaseInteraction : MonoBehaviour { public Image m_BtnBg;//sample 1 // Start is called before the first frame update void Start() { } public void SwitchBtnBg() { m_BtnBg.color = new Color(Random.value, Random.v...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_e88aa342a4c2_doc_10
github
scripting
What does `MuteSelfMicrophone` do in this Unity script? Explain its purpose and signature.
Mute self microphoneMuted state, True is muted otherwise is unmuted Signature: ```csharp public void MuteSelfMicrophone(bool _muted) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_fc29c23ddc83
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.RenderPipeline.Render`.
t defined points during this method. If you are writing a custom SRP, you can either add code directly to this method body, or call the delegates yourself using RenderPipeline.BeginContextRendering , RenderPipeline.BeginCameraRendering , RenderPipeline.EndCameraRendering and RenderPipeline.EndContextRendering . Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf214c39257e
unity_docs
rendering
What is `Device.SystemInfo.supportsCubemapArrayTextures` in Unity? Explain its purpose and usage.
SystemInfo.supportsCubemapArrayTextures public static bool supportsCubemapArrayTextures ; Description This has the same functionality as SystemInfo.supportsCubemapArrayTextures and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad4d593a8c47
unity_docs
xr
What is `XR.XRDevice.DisableAutoXRCameraTracking` in Unity? Explain its purpose and usage.
XRDevice.DisableAutoXRCameraTracking(Camera, Disabled) Parameters Parameter Description Camera The camera that we wish to change behavior on Disabled True if the camera's transform is set externally. False if the camera is to be driven implicitly by XRDevice, Returns void Nothing.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7d68ebb6608
unity_docs
xr
What is `WSA.Tile` in Unity? Explain its purpose and usage.
Tile class in UnityEngine.WSA / Implemented in: UnityEngine.CoreModule Description Represents tile on Windows start screen This class can be used to create or update secondary tiles on start screen and get instances of tiles to send notifications to them. Static Properties Property Description main Returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c490f9a8c0d
unity_docs
scripting
What is `ParticleSystem.LimitVelocityOverLifetimeModule.dampen` in Unity? Explain its purpose and usage.
ParticleSystem.LimitVelocityOverLifetimeModule.dampen public float dampen ; Description Controls how much this module dampens particle velocities that exceed the velocity limit. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBeha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43143e3c4f44
unity_docs
scripting
What is `SerializedPropertyNumericType.Unknown` in Unity? Explain its purpose and usage.
SerializedPropertyNumericType.Unknown Description Represents a type that is not a numeric type. Returned by SerializedProperty.numericType if the type of the property is not a numeric type. Additional resources: SerializedProperty.propertyType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1428e9ed6a1c
unity_docs
scripting
What is `ParticleSystem.InheritVelocityModule.mode` in Unity? Explain its purpose and usage.
ParticleSystem.InheritVelocityModule.mode public ParticleSystemInheritVelocityMode mode ; Description Specifies how to apply emitter velocity to particles. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private Par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_707acc57594b
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.RawFrameDataView`.
its from: Profiling.FrameDataView Description Provides access to the Profiler data for a specific frame and thread. Use RawFrameDataView to retrieve unstructured Profiler samples data for the particular frame. The order of samples is determined by the order they are generated in the code. RawFrameDataView can q...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b9a6c586071
unity_docs
scripting
What is `UIElements.BaseListViewController.RemoveItems` in Unity? Explain its purpose and usage.
BaseListViewController.RemoveItems Declaration public void RemoveItems (List<int> indices ); Parameters Parameter Description indices A list of indices to remove. Description Removes items from the source, by indices.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_42ab324b724a
unity_docs
rendering
In Unity's 'Autodesk Interactive shader in the Built-In Render Pipeline', what is 'Properties' and how does it work?
The properties of the Autodesk Interactive shader work in the same way as the Material Properties in the Standard Shader, with the exception of Roughness . For more information on all other properties, see Material Parameters . Property Description Rendering Mode Controls how Unity displays this material. Choose from O...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ccdf74fd50e
unity_docs
editor
What is `Search.SearchAction.closeWindowAfterExecution` in Unity? Explain its purpose and usage.
SearchAction.closeWindowAfterExecution public bool closeWindowAfterExecution ; Description Indicates if the search view should be closed after the action execution. ``` new SearchAction("asset", "print_dependencies", new GUIContent("Print Dependencies", null, "Print all dependencies of an asset.")) { // If thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09aa47964f8e
unity_docs
physics
What is `ArticulationBody.GetDriveForces` in Unity? Explain its purpose and usage.
ArticulationBody.GetDriveForces Declaration public int GetDriveForces (List<float> forces ); Parameters Parameter Description forces Supplied list of floats to store the drive force data. Returns int Total degrees of freedom (DOF) for the entire hierarchy of Articulation Bodies. Description Reads th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59fe80d07f1e
unity_docs
scripting
What is `RenderingLayerMask.GetDefinedRenderingLayerNames` in Unity? Explain its purpose and usage.
RenderingLayerMask.GetDefinedRenderingLayerNames Declaration public static string[] GetDefinedRenderingLayerNames (); Returns string[] List of the defined Rendering Layers names. Description Returns a names of the defined Rendering Layers in the Tags and Layers manager .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9801bf7c4289
unity_docs
performance
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManager.Read` in Unity? Explain its purpose and usage.
AsyncReadManager.Read Declaration public static Unity.IO.LowLevel.Unsafe.ReadHandle Read (string filename , ReadCommand* readCmds , uint readCmdCount , string assetName , ulong typeID , Unity.IO.LowLevel.Unsafe.AssetLoadingSubsystem subsystem ); Parameters Parameter Description filename The filename...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49cb70efd655
unity_docs
scripting
What is `GUISettings.tripleClickSelectsLine` in Unity? Explain its purpose and usage.
GUISettings.tripleClickSelectsLine public bool tripleClickSelectsLine ; Description Should triple-clicking select whole text in text fields. Bu default is set to true. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Disables line selecting with triple click on the text area string str =...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19851a5d99be
unity_docs
scripting
What is `Assertions.Comparers.FloatComparer.ctor` in Unity? Explain its purpose and usage.
FloatComparer Constructor Declaration public FloatComparer (); Declaration public FloatComparer (bool relative ); Declaration public FloatComparer (float error ); Declaration public FloatComparer (float error , bool relative ); Parameters Parameter Description relative Should a relative check ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3258d204168
unity_docs
scripting
Give me an overview of the `ObjectChangeEvents` class in Unity.
ObjectChangeEvents class in UnityEditor Description Exposes events that allow you to track undoable changes to objects in the editor. Any undoable change to any object loaded in the editor (both GameObject and assets such as Material object) are recorded and exposed as a stream of events. See ObjectChangeKin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f1197e99dc2
unity_docs
rendering
Explain 'Smart merge' in Unity.
Use the UnityYAMLMerge tool to merge scene and prefab files in a semantically correct way. The tool can be accessed from the command line and is also available to third-party version control software. ## Setting up smart merging in Unity In the Version Control project settings (menu: Edit > Project Settings > Version...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2467587b2c9
unity_docs
editor
What is `EditorGUI.HelpBox` in Unity? Explain its purpose and usage.
EditorGUI.HelpBox Declaration public static void HelpBox ( Rect position , string message , MessageType type ); Declaration public static void HelpBox ( Rect position , GUIContent content ); Parameters Parameter Description position Rectangle on the screen to draw the help box within. message ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6694bb1f47b
unity_docs
physics
Show me a Unity C# example demonstrating `RaycastHit.triangleIndex`.
RaycastHit.triangleIndex public int triangleIndex ; Description The index of the triangle that was hit. Triangle index is only valid if the collider that was hit is a MeshCollider . ```csharp // This script draws a debug line around mesh triangles // as you move the mouse over them. using UnityEngine; using S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31435beec2ef
unity_docs
rendering
What is `SceneView.CameraSettings.dynamicClip` in Unity? Explain its purpose and usage.
SceneView.CameraSettings.dynamicClip public bool dynamicClip ; Description When enabled, the SceneView Camera's near and far clipping planes are calculated relative to the viewport size of the Scene. When disabled, nearClip and farClip are used instead.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0bb9100aad7
unity_docs
rendering
What is `WebCamTexture.requestedWidth` in Unity? Explain its purpose and usage.
WebCamTexture.requestedWidth public int requestedWidth ; Description Set the requested width of the camera device. It will use a closest resolution to the one requested which is supported by the camera. The requested values only have an effect when set while the camera is not running.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7fe1fc6816c1_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Example of a "Plain" version of a Unity component. In this case, Material is simply convertedto its plain version by loading it by its material name and folder. Signature: ```csharp public class PlainMaterial ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_061bde422157
unity_docs
rendering
What is `TerrainTools.TerrainPaintUtilityEditor` in Unity? Explain its purpose and usage.
TerrainPaintUtilityEditor class in UnityEditor.TerrainTools Description Terrain paint utility editor helper functions. Static Methods Method Description DrawBrushPreview Draws a Terrain brush preview mesh from a heightmap PaintContext using the provided procedural material. GetDefaultBrushPreviewMaterial Retu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c43cb32057b7
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startSizeMultiplier`.
ParticleSystem.MainModule.startSizeMultiplier public float startSizeMultiplier ; Description A multiplier for the initial size of particles when the Particle System first spawns them. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall size multiplie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef4a11669e5d
unity_docs
physics
What is `AnchoredJoint2D` in Unity? Explain its purpose and usage.
AnchoredJoint2D class in UnityEngine / Inherits from: Joint2D / Implemented in: UnityEngine.Physics2DModule Description Parent class for all joints that have anchor points. Additional resources: DistanceJoint2D class, HingeJoint2D class, SliderJoint2D class, SpringJoint2D class, WheelJoint2D class. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.