id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_b39cc1bea4d3
unity_docs
rendering
In Unity's 'Theme Style Sheet (TSS)', what is 'Apply a TSS' and how does it work?
You can reference a TSS in UXML or C# the same way as you do with USS. You can also set a TSS as the default theme for a Panel Setting asset. If you have more than one Panel Setting, each one can use a different TSS file. Note : If you set a TSS for a Panel Setting asset, it doesn’t make the TSS a global style for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4cd379c8a302
unity_docs
input
What is `Playables.PlayableExtensions.GetPropagateSetTime` in Unity? Explain its purpose and usage.
PlayableExtensions.GetPropagateSetTime Declaration public static bool GetPropagateSetTime (U playable ); Parameters Parameter Description playable The Playable used by this operation. Returns bool True if time propagation is enabled. Description Returns the time propagation behavior of this Playab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4888345d9536
unity_docs
editor
What are the parameters of `AssetModificationProcessor.IsOpenForEdit` in Unity?
Returns void Returns true if all files are editable. Description This is called by Unity when inspecting assets to determine if an editor should be disabled. Although this is called by Unity's own systems, you can also call it if you are implementing your own Editor tools such as a custom version control integration. A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8cbfb1243c7
unity_docs
physics
Give me an overview of the `BoxCollider` class in Unity.
BoxCollider class in UnityEngine / Inherits from: Collider / Implemented in: UnityEngine.PhysicsModule Description A box-shaped primitive collider. Additional resources: SphereCollider , CapsuleCollider , PhysicsMaterial , Rigidbody . Properties Property Description center The center of the box, meas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b29cef2434c9
unity_docs
animation
What is `UIElements.Experimental.Easing` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Easing class in UnityEngine.UIElements.Experimental / Implemented in: UnityEngine.UIElementsModule Description A collection of easing curves to be used with ValueAnimations. Easing curves control the rate of change of a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fa6eb785598e
github
scripting
Write a Unity C# script called Type Ref Dropdown Attribute
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using UnityEngine; namespace FieldSearch.Attributes { /// <summary> /// Dropdown list attribute for type, inherited from BaseType /// </summary> [AttributeUsage(AttributeTargets.Property | AttributeTa...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_7b772d6d3c9a
unity_docs
scripting
What is `ModelImporter.normalCalculationMode` in Unity? Explain its purpose and usage.
ModelImporter.normalCalculationMode public ModelImporterNormalCalculationMode normalCalculationMode ; Description Normal generation options for ModelImporter . Normals can be calculated by Unity using several methods. They can be either unweighted or weighted by area, angle or both. This setting is only used...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ccb5818e6160
unity_docs
math
What are the parameters of `Mathf.SmoothStep` in Unity?
Returns float The interpolated float result between from and to . Description Interpolates between from and to with smoothing at the limits. This function interpolates between from and to in a similar way to Lerp . However, the interpolation will gradually speed up from the start and slow down toward the end. This is u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b7cf6eeb072
unity_docs
math
What is `AndroidJNI.NewFloatArray` in Unity? Explain its purpose and usage.
AndroidJNI.NewFloatArray Declaration public static IntPtr NewFloatArray (int size ); Description Constructs a new primitive array object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8aee4a1263c6
unity_docs
rendering
Explain 'Reflective Shader Family' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces these shaders . Reflective shaders will allow you to use a Cubemap which will be reflected on your mesh . You can also define areas of more or less reflectivity on your object through the alpha channel of the Base texture. High reflectivity is a great effect f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_38af1a9b120a
unity_docs
input
In Unity's 'IntegerField', what is 'Set a placeholder text' and how does it work?
You can set a placeholder text for the element. You can also hide the placeholder text on focus. Note : The placeholder text won’t display if you set a value for the element. To unset a value in UI Builder, right-click the Value field in the element’s Inspector tab and select Unset . In C#, use the placeholder and the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8953d7d08b3
unity_docs
scripting
What is `Gizmos.CalculateLOD` in Unity? Explain its purpose and usage.
Gizmos.CalculateLOD Declaration public static float CalculateLOD ( Vector3 position , float radius ); Parameters Parameter Description position The centre of the gizmo in world space. radius The maximum extent of the gizmo. Returns float Returns a value between 0 and 1 that represents the level of de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b48de88cfdee
unity_docs
physics
Show me a Unity code example for 'Android symbols'.
ols . Use UserBuildSettings.DebugSymbols.level to generate the required type of symbol file. Note: By default, Gradle generates symbol files with.so.sym or.so.dbg extensions. Some digital distribution services don’t recognize these extensions and require files with.so extension. In such cases, use Unity.Android.Types.D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_806e53c94a51
unity_docs
scripting
Show me a Unity C# example demonstrating `Resources`.
might want to create a GameObject procedurally from a script and assign a texture to a procedurally generated mesh. Some loaded assets, most notably textures, can use up memory even when no instance exists in the Scene. To reclaim this memory when the asset is no longer needed, you can use Resources.UnloadUnusedAssets...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_948f4258606e
unity_docs
editor
Give me an overview of the `AssetPathToGUIDOptions` class in Unity.
AssetPathToGUIDOptions enumeration Description Asset path to GUID options. Additional resources: AssetDatabase.AssetPathToGUID . Properties Property Description IncludeRecentlyDeletedAssets Return a GUID if the asset exists, or has recently been deleted. OnlyExistingAssets Return a GUID only if the asset exi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fbbb495ce2ba
unity_docs
rendering
What is `Rendering.BuiltinShaderDefine.UNITY_HARDWARE_TIER1` in Unity? Explain its purpose and usage.
BuiltinShaderDefine.UNITY_HARDWARE_TIER1 Description UNITY_HARDWARE_TIER1 is set when compiling shaders for GraphicsTier.Tier1 . Note: Graphics tiers are only supported in the Built-in Render Pipeline. Unity generates tier shader variants if your shader source code includes #pragma hardware_tier_variants , or if...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbd309923c15
unity_docs
math
Give me an overview of the `Color` class in Unity.
Color struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Representation of RGBA colors. This structure is used throughout Unity to pass colors around. Each color component is a floating point value with a range from 0 to 1. Components ( r , g , b ) define a color in RGB color space. Alph...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5c1ef387b92c
unity_docs
rendering
In Unity's 'Android requirements and compatibility', what is 'Render pipeline compatibility' and how does it work?
Not every render pipeline is compatible with Android due to hardware and graphics API limitations. Feature Built-in Render Pipeline Universal Render Pipeline High Definition Render Pipeline Custom Scriptable Render Pipeline Android Yes Yes No Yes
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_621f7b2ad40b
unity_docs
scripting
What is `UIElements.BaseTreeViewController.GetAllItemIds` in Unity? Explain its purpose and usage.
BaseTreeViewController.GetAllItemIds Declaration public IEnumerable<int> GetAllItemIds (IEnumerable<int> rootIds ); Parameters Parameter Description rootIds Root IDs to start from. If null, will use the tree root ids. Returns IEnumerable<int> All items IDs in the tree, starting from the specified IDs. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d251fa755634
unity_docs
editor
Show me a Unity C# example demonstrating `SearchService.SceneSearch`.
ass in UnityEditor.SearchService Description Use this API to perform searches in the Scene. Engines for this type of search implement the ISceneSearchEngine interface. Registered Scene search engines are called during searches in the Scene hierarchy. When the default object selector is used, they are also called...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_217ac6dede60
unity_docs
xr
Explain 'Refund a customer' in Unity.
The Asset Store manages customer refunds. This means that if a customer requests a refund for a package that you own, you need to request a refund through the Asset Store support center . A customer’s refund request must meet the Asset Store’s Refund Requirements . If the user has an issue that you can solve then try t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b5533c0a249c
unity_docs
ui
Explain 'Bind with UXML and C# script' in Unity.
Version : 2021.3+ This example demonstrates how to create a binding and set the binding path with UXML, and call the Bind() method with a C# script. ## Example overview This example creates a custom Editor window with a TextField that binds to the name property of any GameObject in a scene . You can find the complete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_83b580c117c1
unity_docs
editor
In Unity's 'Introduction to assemblies in Unity', what is 'Finding which assembly a script belongs to' and how does it work?
To identify which assembly a script belongs to, select the script file in the Project window to view its properties in the Inspector window. The assembly filename and the Assembly Definition, if one exists, are shown in the Assembly Information section of the Inspector .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e61e69c9a9ff
unity_docs
math
Show me a Unity C# example demonstrating `UIElements.UxmlAttributeConverter_1`.
char string short ushort int uint long ulong Enum float double Type( UxmlTypeReferenceAttribute ) Color Hash128 Length Bounds BoundsInt Rect RectInt Vector2 Vector2Int Vector3 Vector3Int Vector4 Gradient AnimationCurve ToggleButtonGroupState The following example creates a custom control tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e244e8aa0412
unity_docs
xr
In Unity's 'XR architecture', what is 'Subsystems' and how does it work?
XR subsystems give you access to XR features in your Unity app. Unity defines a common interface for subsystems so that all provider plug-ins implementing a feature generally work the same way in your app. Often you can change the active provider and rebuild your app to run on a different XR platform, as long as the pl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f140284ced1
unity_docs
input
What is `TouchScreenKeyboard.status` in Unity? Explain its purpose and usage.
TouchScreenKeyboard.status public TouchScreenKeyboard.Status status ; Description Returns the status of the on-screen keyboard. (Read Only) The status specifies if the on-screen keyboard is visible or if it was closed. The keyboard is closed when it loses focus or when the input is finished or canceled.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5067f0e9c985
unity_docs
rendering
Show me a Unity C# example demonstrating `Material.SetTexture`.
elect Shader . By specifying a `RenderTextureSubElement`, you can indicate which type of data to set from the RenderTexture. The possible options are: RenderTextureSubElement.Color , RenderTextureSubElement.Depth , and RenderTextureSubElement.Stencil . Additional resources: mainTexture property, GetTexture , Sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_654622e50e87
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.BeginHorizontal`.
tyle . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Description Begin a horizontal group and get its rect back. This is an extension to GUILayout.BeginHorizon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65fa1f7e42cf
unity_docs
rendering
What is `MaterialPropertyBlock.SetVector` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.SetVector Declaration public void SetVector (string name , Vector4 value ); Declaration public void SetVector (int nameID , Vector4 value ); Parameters Parameter Description name The name of the property. nameID The name ID of the property retrieved by Shader.PropertyToID ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b1c87f2f64b
unity_docs
scripting
What is `Handles.DrawDottedLines` in Unity? Explain its purpose and usage.
Handles.DrawDottedLines Declaration public static void DrawDottedLines (Vector3[] lineSegments , float screenSpaceSize ); Parameters Parameter Description lineSegments A list of pairs of points that represent the start and end of line segments. screenSpaceSize The size in pixels for the lengths of the lin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd48c6578687
unity_docs
scripting
What is `BuildPlayerWindow` in Unity? Explain its purpose and usage.
BuildPlayerWindow class in UnityEditor / Inherits from: EditorWindow Description The default build settings window. Static Methods Method Description RegisterBuildPlayerHandler Register a delegate to intercept or override the build process executed with the "Build" and "Build and Run" buttons. Registering a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5195a5a6c5a
unity_docs
physics
What is `ParticleSystemForceField.rotationAttraction` in Unity? Explain its purpose and usage.
ParticleSystemForceField.rotationAttraction public ParticleSystem.MinMaxCurve rotationAttraction ; Description Controls how strongly particles are dragged into the vortex motion. Set in conjunction with ParticleSystemForceField.rotationSpeed to create a vortex effect within the volume of the Force Field. A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_070f39f4354e
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.undoRedoEvent`.
Undo.undoRedoEvent public static Undo.UndoRedoEventCallback undoRedoEvent ; Description Callback that is triggered after any undo or redo event. ```csharp using UnityEditor; using UnityEngine;public class ExampleUndoRedoEventScript : MonoBehaviour { void Start() { Undo.undoRedoEvent += OnUndoRedoEvent; } ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba840be8da39
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.SetSampleFramesOverflowNativeHandler` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.SetSampleFramesOverflowNativeHandler Declaration public void SetSampleFramesOverflowNativeHandler ( Experimental.Audio.AudioSampleProvider.SampleFramesEventNativeFunction handler , IntPtr userData ); Par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2f86018c2b84
unity_docs
rendering
Explain 'Choose a GPU texture format by platform' in Unity.
## Desktop For devices with DirectX 11 or better class GPUs, where support for BC7 and BC6H formats is guaranteed to be available, the recommended choice of compression formats is: RGB textures - DXT1 at four bits/ pixel . RGBA textures - BC7 (higher quality, slower to compress) or DXT5 (faster to compress), both at e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b09f332c151
unity_docs
physics
In Unity's 'Configure driving forces on a Configurable Joint', what is 'Configure driving forces' and how does it work?
For each axis drive you want to apply force on, use Position Spring to configure the spring force to apply, and Position Damper to configure the damping effect on that spring force. Apply trial and error on the spring and damper values to achieve the results you need, and test at run time to check that the forces you a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa28cda7e3a3
unity_docs
rendering
In Unity's 'Customize the Standard shader source code in the Built-In Render Pipeline', what is 'Download the Standard shader source code' and how does it work?
To download the source code for the Standard shader: Go to the Unity download archive . Select the Editor version that you are using from the row at top of the page. When you select an Editor version, the page displays the version history and download links for that version. Select See all to open the manual download p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_86b66016cb94
unity_docs
scripting
Explain 'Horizontal Layout Group' in Unity.
The Horizontal Layout Group component places its child layout elements next to each other, side by side. Their widths are determined by their respective minimum, preferred, and flexible widths according to the following model: The minimum widths of all the child layout elements are added together and the spacing betwee...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c82dbc85f72
unity_docs
scripting
What is `PlayerSettings.iOS.iOSManualProvisioningProfileID` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.iOSManualProvisioningProfileID public static string iOSManualProvisioningProfileID ; Description A provisioning profile Universally Unique Identifier (UUID) that Xcode will use to build your iOS app in Manual Signing mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa570a2ff5e0
unity_docs
scripting
What is `Android.AndroidApplication.InvokeOnUnityMainThread` in Unity? Explain its purpose and usage.
AndroidApplication.InvokeOnUnityMainThread Declaration public static void InvokeOnUnityMainThread ( Unity.Android.Gradle.Manifest.Action action ); Description Invokes delegate on Android application's main thread. This is useful if you receive a Java callback on the UI thread, but want to process result on Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d2908b1ea95
unity_docs
performance
What is `Profiling.Profiler.EmitSessionMetaData` in Unity? Explain its purpose and usage.
Profiler.EmitSessionMetaData Declaration public static void EmitSessionMetaData (Guid id , int tag , Array data ); Declaration public static void EmitSessionMetaData (Guid id , int tag , List<T> data ); Declaration public static void EmitSessionMetaData (Guid id , int tag , NativeArray<T> data ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8a16bd01c1f
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.Tan`.
Mathf.Tan Declaration public static float Tan (float f ); Description Returns the tangent of angle f in radians. Additional resources: Cos , Sin . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { print(Mathf.Tan(0.5F)); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfff538d7750
unity_docs
xr
What is `Texture.desiredTextureMemory` in Unity? Explain its purpose and usage.
Texture.desiredTextureMemory public static ulong desiredTextureMemory ; Description The total size of the Textures, in bytes, that Unity loads if there were no other constraints. Before Unity loads any Textures, it applies the memory budget which reduces the loaded Texture resolution if the Texture sizes excee...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea2f8f42b7d3
unity_docs
editor
What is `TerrainData.RefreshPrototypes` in Unity? Explain its purpose and usage.
TerrainData.RefreshPrototypes Declaration public void RefreshPrototypes (); Description Reloads all the values of the available prototypes (ie, detail mesh assets) in the TerrainData Object. This can be used in editor scripts to update the terrain when the prototype assets change, much like the Terrain > Refres...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_66dbf2d80e5f
unity_docs
audio
Explain 'Native audio plug-in SDK' in Unity.
The Unity native audio plug-in SDK lets you develop custom audio plug-ins for Unity. You can use this SDK to extend the audio capabilities of Unity and create advanced audio processing solutions tailored to your project’s needs. Examples of custom audio plug-ins you can create include audio effects and audio spatialize...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d44155e8d196
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.ViewportToWorldPoint`.
a. The bottom-left of the viewport is (0,0); the top-right is (1,1). The z position is in world units from the camera. Note that ViewportToWorldPoint transforms an x-y screen position into a x-y-z position in 3D space. Provide the function with a vector where the x-y components of the vector are the screen coordinat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_638648fcfe8b
unity_docs
rendering
Give me an overview of the `TextureImporterShape` class in Unity.
TextureImporterShape enumeration Description The shape of the imported texture. The default value is Texture2D . The texture can also be imported as a Cubemap , Texture2DArray or a Texture3D . Additional resources: TextureImporterSettings.textureShape , Texture Assets . Properties Property Description T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9a5f3c78643
unity_docs
rendering
What is `QualitySettings.realtimeGICPUUsage` in Unity? Explain its purpose and usage.
QualitySettings.realtimeGICPUUsage public static int realtimeGICPUUsage ; Description How much CPU usage to assign to the final lighting calculations at runtime. Increase the CPU Usage setting for Realtime GI in the Quality Settings window. If you dedicate more CPU time, then the runtime lighting converges fa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_700e3ccf34ef
unity_docs
math
What is `Transform.TransformVector` in Unity? Explain its purpose and usage.
Transform.TransformVector Declaration public Vector3 TransformVector ( Vector3 vector ); Description Transforms vector from local space to world space. This operation is not affected by position of the transform, but it is affected by scale. The returned vector may have a different length than vector . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_235f6f60345f
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.FloatField`.
e style = EditorStyles.numberField); Parameters Parameter Description position Rectangle on the screen to use for the float field. label Optional label to display in front of the float field. value The value to edit. style Optional GUIStyle . Returns float The value entered by the user. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1ab2b306a63
unity_docs
editor
What are the parameters of `VersionControl.Provider.DiffIsValid` in Unity?
Description Returns true if starting a Diff task is a valid operation for at least one asset in the given AssetList . When all of the assets in the list are not added to version control the task will return false, otherwise the result will always be true. ```csharp using System.Collections.Generic; using UnityEditor; u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_463bc0fd492f
unity_docs
editor
What is `EditorGUI.LayerField` in Unity? Explain its purpose and usage.
EditorGUI.LayerField Declaration public static int LayerField ( Rect position , int layer , GUIStyle style = EditorStyles.popup); Declaration public static int LayerField ( Rect position , string label , int layer , GUIStyle style = EditorStyles.popup); Declaration public static int LayerField...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b092491eff5f
unity_docs
rendering
In Unity's 'HDR in the Built-in Render Pipeline', what is 'Forward Rendering' and how does it work?
In the Forward rendering path, a Camera only supports HDR if you have a post-processing effect on the Camera. This is due to performance considerations. If you have no post-processing effect on the Camera, the scene will be rendered directly to the back buffer where HDR is not supported.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_960a04bd5534
unity_docs
editor
What is `Experimental.RenderSettings` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RenderSettings class in UnityEditor.Experimental / Implemented in: UnityEngine.CoreModule Description Experimental render settings features. Additional resources: RenderSettings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22edeafdc065
unity_docs
scripting
Show me a Unity C# example demonstrating `Random.rotation`.
Random.rotation public static Quaternion rotation ; Description Returns a random rotation (Read Only). Randomize the x , y , z , and w of a Quaternion each to [-1.0..1.0] (inclusive) via Range and normalize the result. See also rotationUniform for a slower but higher quality algorithm. ```csharp ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8670dc5c348
unity_docs
performance
What is `Profiling.FrameDataView.GetFrameMetaDataCount` in Unity? Explain its purpose and usage.
FrameDataView.GetFrameMetaDataCount Declaration public int GetFrameMetaDataCount (Guid id , int tag ); Parameters Parameter Description id Project or package identifier. tag Data stream index. Returns int Returns count of metadata chunks. Description Gets the total number of metadata chunks for ea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_df845d62ac29
unity_docs
scripting
Explain 'Reusing settings with preset assets' in Unity.
Presets are assets that you can use to save and apply identical property settings across multiple components, assets, or Project Settings windows. You can also use presets to specify default settings for new components and default import settings for assets in the Preset Manager . The Preset Manager supports any import...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de63efa12790
unity_docs
rendering
What is `Experimental.Rendering.IScriptableRuntimeReflectionSystem.TickRealtimeProbes` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableRuntimeReflectionSystem.TickRealtimeProbes Declaration public bool TickRealtimeProbes (); Returns bool Whether a reflection probe was updated. Description Update the reflection probes. The implementation of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6028f927c143
unity_docs
rendering
What is `RenderTextureFormat.RG32` in Unity? Explain its purpose and usage.
RenderTextureFormat.RG32 Description Two color (RG) render texture format, 16 bits per channel, fixed point, unsigned normalized. Note that not all graphics cards support this format. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_85c763782d96
unity_docs
scripting
Explain 'Get started with Universal Windows Platform' in Unity.
Before you get started with Universal Windows Platform (UWP), learn about UWP-specific settings and how to set up a project for UWP development. Topic Description Set up your environment for UWP Set up your Unity Project for UWP development. UWP Player settings Refer to the UI description of UWP Player settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4476e77731e
unity_docs
scripting
What is `ContextMenuItemAttribute` in Unity? Explain its purpose and usage.
ContextMenuItemAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Use this attribute to add a context menu to a field that calls a named method. ```csharp using UnityEngine;public class Example : MonoBehaviour { [ContextMenuItem("Reset", "Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_865957312453
unity_docs
scripting
Give me an overview of the `GUILayoutUtility` class in Unity.
GUILayoutUtility class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Utility functions for implementing and extending the GUILayout class. Use this class to make your own GUI layouting code. Static Methods Method Description GetAspectRect Reserve layout space for a rectangle with a sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_af2b904ffd60
unity_docs
editor
In Unity's 'Introduction to runtime asset management', what is 'Effect of runtime asset management on builds' and how does it work?
By default, Unity uses the Scene List to determine which scenes and assets to include in a build and their load order. Unity only includes scenes in the Scene List in a build, and unused scenes and assets not referenced from these scenes are excluded from a build. You can also use the SceneManager API to determine how ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3655f703e13
unity_docs
input
What is `Experimental.GraphView.EdgeDragHelper.HandleMouseDown` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper.HandleMouseDown Declaration public bool HandleMouseDown ( UIElements.MouseDownEvent evt ); Parameters Parameter Description evt The event. Returns bool True if the drag has been started. False otherwis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a761902582bc
unity_docs
rendering
In Unity's 'Introduction to shader variants', what is 'Advantages and disadvantages of shader variants' and how does it work?
The main advantage of shader variants is that they allow you to use runtime conditionals in your shader programs, without the GPU performance impact of dynamic branching . The main disadvantage of shader variants is that a large number of them can lead to longer build times, high shader memory usage, and shader compila...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f652ef7802da
unity_docs
animation
What is `AssetPostprocessor.OnPreprocessAsset` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPreprocessAsset() Description Add this function to a subclass to get a notification just before any Asset is imported. This lets you control the import settings through code. ```csharp using UnityEditor;class MyModelPostprocessor : AssetPostprocessor { void OnPreprocessAsset() { if (assetIm...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76bcf6ba94ad
unity_docs
rendering
What is `Rendering.SortingSettings.worldToCameraMatrix` in Unity? Explain its purpose and usage.
SortingSettings.worldToCameraMatrix public Matrix4x4 worldToCameraMatrix ; Description Used to calculate the distance to objects. Together with cameraPosition , this is used to determine distances to objects for sorting. Additional resources: DrawingSettings , ScriptableRenderContext.DrawRenderers.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_07398acf620d
unity_docs
physics
In Unity's '2D game creation workflow', what is 'Fundamentals' and how does it work?
GameObjects are fundamental objects in Unity that represent characters, props, scenery, and more. Every object in your game is a GameObject. GameObjects represent the items in your game; the space in which you place them to build your level is called a scene . Scenes in Unity are always 3D; when you make a 2D game in U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be961167b058
unity_docs
animation
What is `Animations.ChildAnimatorState` in Unity? Explain its purpose and usage.
ChildAnimatorState struct in UnityEditor.Animations Description Structure that represents a state in the context of its parent state machine. Properties Property Description position The position the the state node in the context of its parent state machine. state The state.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_959ae174482e
unity_docs
scripting
What is `Actions.ContextMenuUtility.AddMenuItem` in Unity? Explain its purpose and usage.
ContextMenuUtility.AddMenuItem Declaration public static void AddMenuItem ( UIElements.DropdownMenu menu , string menuItemPath , string contextMenuPath ); Parameters Parameter Description menu The Scene view context menu to add a MenuItem to. menuItemPath The menu item path that is registered with Me...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32b17b5e5448
unity_docs
physics
What is `TerrainTools.PaintContext.ScatterHoles` in Unity? Explain its purpose and usage.
PaintContext.ScatterHoles Declaration public void ScatterHoles (string editorUndoName ); Parameters Parameter Description editorUndoName Unique name used for the undo stack. Description Applies an edited Terrain holes PaintContext by copying modifications back to the source Terrain tiles. Once the edits ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa9a45edf955
unity_docs
rendering
What is `Material.GetInteger` in Unity? Explain its purpose and usage.
Material.GetInteger Declaration public int GetInteger (string name ); Declaration public int GetInteger (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. Description Get a named integer value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a608eb6d626
unity_docs
math
What is `AnimationCurve.ctor` in Unity? Explain its purpose and usage.
AnimationCurve Constructor Declaration public AnimationCurve (params Keyframe[] keys ); Parameters Parameter Description keys An array of Keyframes used to define the curve. Description Creates an animation curve from an arbitrary number of keyframes. This creates a curve from variable number of Keyframe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6aa7d48b80b1
unity_docs
editor
What are the parameters of `Search.ISearchView.AddSelection` in Unity?
Description Adds new items to the current selection. . ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_AddSelection { static ISearchView s_View; [MenuItem("Examples/ISearchView/AddSelection")] public static void Run() { s_View = Search...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8491ed3523b
unity_docs
ui
Show me a Unity C# example demonstrating `UIElements.PointerDownEvent`.
PointerDownEvent follows the default pointer event propagation path . It trickles down, bubbles up, and is cancellable. Disabled elements don't receive this event. For information about how the PointerDownEvent relates to other pointer events, refer to PointerEventBase<T0> and Pointer events . Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fe604b43ccf
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.availableSampleFrameCount` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.availableSampleFrameCount public uint availableSampleFrameCount ; Description Number of sample frames available for consuming with AudioSampleProvider.ConsumeSampleFrames .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b111e7994823
unity_docs
ui
What is `UIElements.BaseSlider_1.AdjustDragElement` in Unity? Explain its purpose and usage.
BaseSlider<T0>.AdjustDragElement Declaration public void AdjustDragElement (float factor ); Parameters Parameter Description factor The factor used to adjust the drag element, where a value &gt; 1 will make it invisible. Description Method used to adjust the dragelement. Mainly used in a scroller.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb7df8092809
unity_docs
physics
What is `ParticlePhysicsExtensions.GetSafeCollisionEventSize` in Unity? Explain its purpose and usage.
ParticlePhysicsExtensions.GetSafeCollisionEventSize Declaration public static int GetSafeCollisionEventSize ( ParticleSystem ps ); Description Safe array size for use with ParticleSystem.GetCollisionEvents. This is guaranteed to be large enough to use with ParticleSystem.GetCollisionEvents for the current fra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c809027b4073
unity_docs
rendering
What is `ShaderUtil.GetPropertyName` in Unity? Explain its purpose and usage.
ShaderUtil.GetPropertyName Declaration public static string GetPropertyName ( Shader s , int propertyIdx ); Parameters Parameter Description s The shader to check against. propertyIdx The property index to use. Description Get the name of the shader propery at index propertyIdx of Shader s.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c005334032b4
unity_docs
scripting
What is `TerrainData.GetSteepness` in Unity? Explain its purpose and usage.
TerrainData.GetSteepness Declaration public float GetSteepness (float x , float y ); Description Gets the gradient of the terrain at point (x,y). The gradient's value is always positive. The x and y values are normalized coordinates in the range 0 to 1.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9323ca36adfe
unity_docs
scripting
What is `D3D11FullscreenMode` in Unity? Explain its purpose and usage.
D3D11FullscreenMode enumeration Description Direct3D 11 fullscreen mode. This defines how fullscreen mode is handled in Windows standalone builds when using Direct3D 11. Properties Property Description ExclusiveMode Exclusive mode. FullscreenWindow Fullscreen window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_025da13f58fc
unity_docs
input
In Unity's 'UI Toolkit project settings', what is 'UI Builder' and how does it work?
When you create a new UI Document (UXML) in the UI Builder, certain features are set by default: The UI Document is set to suit runtime UI. The UI Builder library only displays UI controls that are available for runtime UI. You can easily zoom in and out of the canvas of the Viewport window in UI Builder using your mou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4ee69f2d603
unity_docs
rendering
What is `RenderTextureFormat.RG16` in Unity? Explain its purpose and usage.
RenderTextureFormat.RG16 Description Two channel (RG) render texture format, 8 bits per channel. Note that not all graphics cards support integer render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f01cb5997e0
unity_docs
scripting
What is `Il2CppStacktraceInformation` in Unity? Explain its purpose and usage.
Il2CppStacktraceInformation enumeration Description Stack trace information options to choose how much information to include in IL2CPP generated stack traces. Properties Property Description MethodOnly MethodOnly will only provide the method name in managed stack traces. MethodFileLineNumber MethodFileLineNum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e647e3e1f6d
unity_docs
scripting
What is `Experimental.GraphView.EdgeControl.Overlaps` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeControl.Overlaps Declaration public bool Overlaps ( Rect rect ); Parameters Parameter Description rect The rectangle. Returns bool True if the edge overlaps the rectangle. Description Check if edge overlaps r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_571820e17d03
unity_docs
ui
What is `GUISkin.button` in Unity? Explain its purpose and usage.
GUISkin.button public GUIStyle button ; Description Style used by default for GUI.Button controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the button style of the current GUISkin GUIStyle style; void OnGUI() { GUI.skin.box = style; GUILayout.Button("This is a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d74f78d4bf0f
unity_docs
input
In Unity's 'TextField', what is 'Create a TextField' and how does it work?
You can create a TextField with UI Builder, UXML, and C#. The following C# example creates a TextField that allows multiple lines text input: ``` var textField = new TextField(); textField.label = "Enter your text here:"; textField.multiline = true; textField.maxLength = 140; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_efcb03a46a75
unity_docs
rendering
Explain 'Lighting Data Assets' in Unity.
A Lighting Data Asset stores precomputed lighting data for a Scene in the Unity Editor. Lighting Data Assets exist as separate files in your Project for workflow reasons; storing precomputed lighting data in a separate file means that changes to the precomputed lighting data do not result in changes to the Scene file. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e92dbbdc0b7
unity_docs
physics
What are the parameters of `MonoBehaviour.OnTriggerStay` in Unity?
Description Called once per physics update for every collider that is touching the trigger. OnTriggerStay is called on every physics update while a collider remains touching the trigger. Both GameObjects must contain a Collider component. At least one of the colliders must be a trigger collider and at least one must be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c304644e2752
unity_docs
rendering
What is `Rendering.RayTracingAccelerationStructure.RayTracingModeMask` in Unity? Explain its purpose and usage.
RayTracingModeMask enumeration Description An enum controlling which RayTracingAccelerationStructure.RayTracingModes a Renderer must have in order to be added to the RayTracingAccelerationStructure. Properties Property Description Nothing Disable adding Renderers to this RayTracingAccelerationStructure. Stat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6b07b2f1b34
unity_docs
math
What is `Pool.CollectionPool_2.Get` in Unity? Explain its purpose and usage.
CollectionPool<T0,T1>.Get Declaration public static TCollection Get (); Returns TCollection A pooled object or a new instance if the pool is empty. Description Get an instance from the pool. If the pool is empty then a new instance will be created. ```csharp using System.Collections.Generic; using UnityEn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88a9562cc094
unity_docs
editor
What is `VersionControl.IInspectorWindowExtension` in Unity? Explain its purpose and usage.
IInspectorWindowExtension interface in UnityEditor.VersionControl Description Version control system extension that allows extending inspector. Additional resources: VersionControlObject . Public Methods Method Description InvalidateVersionControlBarState Resets any cached state for the version control bar. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83febf703d7b
unity_docs
xr
What is `Accessibility.IAccessibilityNotificationDispatcher.SendLayoutChanged` in Unity? Explain its purpose and usage.
IAccessibilityNotificationDispatcher.SendLayoutChanged Declaration public void SendLayoutChanged ( Accessibility.AccessibilityNode nodeToFocus ); Parameters Parameter Description nodeToFocus Optional node to be focused by the screen reader. Description Sends a notification to the screen reader when the l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a81682bc8b56
unity_docs
scripting
Show me a Unity C# example demonstrating `JointDrive.maximumForce`.
JointDrive.maximumForce public float maximumForce ; Description Amount of force applied to push the object toward the defined direction. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Create a JointDrive, configure it and assign the JointDrive to // the zDrive element of a configurable ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_300ced6e6fe4
unity_docs
rendering
In Unity's 'Reflective Parallax Diffuse', what is 'Reflective Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader will simulate reflective surfaces such as cars, metal objects etc. It requires an environment Cubemap which will define what exactly is reflected. The main texture’s alpha channel defines the strength of reflection on the object’s surf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_95bdb3a44cf6
unity_docs
input
Show me a Unity code example for 'Manipulators'.
ith the button field set to MouseButton.LeftMouse . Use the target property to access the element that the manipulator is attached to. Override the RegisterCallbacksOnTarget and UnregisterCallbacksFromTarget methods to register and unregister the event callbacks. ## Create an ExampleDragger manipulator The following ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f9efb2e762e
unity_docs
input
Show me a Unity C# example demonstrating `KeyCode.Mouse0`.
KeyCode.Mouse0 Description The Left (or primary) mouse button. Use this to detect left mouse button presses. The “0” mouse button is the main button on the user’s mouse, which is usually the left mouse button. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Update() { //Detect if the lef...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_394521149bf0
unity_docs
rendering
Explain 'Self-Illuminated Vertex-Lit' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Self-Illuminated Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82a0778f4cb8
unity_docs
rendering
What is `MaterialEditor.DoubleSidedGIField` in Unity? Explain its purpose and usage.
MaterialEditor.DoubleSidedGIField Declaration public bool DoubleSidedGIField (); Returns bool True if the UI is displayed, false otherwise. Description Display UI for editing a material's Double Sided Global Illumination setting. Returns true if the UI is indeed displayed i.e. the material supports the Dou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_169096b9f501
unity_docs
scripting
What is `Material.CopyPropertiesFromMaterial` in Unity? Explain its purpose and usage.
Material.CopyPropertiesFromMaterial Declaration public void CopyPropertiesFromMaterial ( Material mat ); Description Copy properties from other material into this material. This function copies property values (both serialized and set at runtime), as well as shader keywords, render queue and global illuminat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.