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_c700cc532c63
unity_docs
editor
Explain 'Set a layerMask' in Unity.
This page explains how to set up a layerMask correctly so you can use it in API calls that use a serialized layerMask property. ## Use a serialized layerMask property The simplest way to set a layermask in the Unity Editor is to create a property that uses Unity’s LayerMask class. If the property is public or uses th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a660380aa8f4
unity_docs
ui
What is `GUILayout.VerticalScope` in Unity? Explain its purpose and usage.
VerticalScope class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Disposable helper class for managing BeginVertical / EndVertical . All controls rendered inside this element will be placed vertically below each other. The group is automatically closed when the scope ends. Vertical La...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a17d8d4aa23
unity_docs
performance
What is `ParticleSystemJobs.ParticleSystemJobData.customData2` in Unity? Explain its purpose and usage.
ParticleSystemJobData.customData2 public ParticleSystemJobs.ParticleSystemNativeArray4 customData2 ; Description This array contains the custom data values when you use a CustomDataModule, or when you call SetCustomParticleData.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8393019604e5
unity_docs
editor
What is `StatusQueryOptions.UseCachedAsync` in Unity? Explain its purpose and usage.
StatusQueryOptions.UseCachedAsync Description This option sets the status query to first use the latest valid version control system status of the file and query for a valid status asynchronously if otherwise. Note that AssetDatabase.IsOpenForEdit and AssetDatabase.IsMetaFileOpenForEdit returns false while a qu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b566b7035f2e
unity_docs
editor
In Unity's 'Configuration files', what is 'User configuration file location' and how does it work?
Package Manager uses a user configuration file named.upmconfig.toml . This file isn’t created when you install the Unity Hub or Editor, but you can create it in the following location if you need to customize your configuration: Environment Location Windows (user account) %USERPROFILE%\.upmconfig.toml (for example, C:\...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e462dcadbf4
unity_docs
rendering
What is `Light.luxAtDistance` in Unity? Explain its purpose and usage.
Light.luxAtDistance public float luxAtDistance ; Description How far away to measure LightUnit.Lux from. Indicates the distance, in meters, where a surface should receive the amount of light equivalent to the provided number of LightUnit.Lux . Only relevant for lights with range attenuation & intensity meas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e832f417afe
unity_docs
scripting
Show me a Unity C# example demonstrating `Bounds.Contains`.
ontains ( Vector3 point ); Description Is point contained in the bounding box? If the point passed into Contains is inside the bounding box a value of True is returned. Points on the min and max limits (corners and edges) of the bounding box are considered inside. Note: If Bounds.extents contains a neg...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f5673f7ea789_doc_3
github
scripting
What does `ResetToSpawnPoint` do in this Unity script? Explain its purpose and signature.
Resets the rig to its spawn point position and heading. Signature: ```csharp public void ResetToSpawnPoint(GaussianSplatRenderer renderer = null) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_1354d9a4c45f
unity_docs
rendering
Explain 'Troubleshooting' in Unity.
Use the following links to get area-specific information to troubleshoot issues you might encounter while using Unity. ## Cameras Troubleshooting cameras Troubleshooting camera output Troubleshooting occlusion culling ## Debugging and performance Troubleshooting debugging Troubleshoot the Scriptable Render Pipeline...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9f881d64b5e
unity_docs
scripting
What is `SceneManagement.SceneManagerAPI.GetNumScenesInBuildSettings` in Unity? Explain its purpose and usage.
SceneManagerAPI.GetNumScenesInBuildSettings Declaration protected int GetNumScenesInBuildSettings (); Returns int Number of Scenes handled by SceneManagement.SceneManagerApi.GetSceneByBuildIndex. Description Override for customizing the behavior of the SceneManager.sceneCountInBuildSettings function.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05fa22296c89
unity_docs
physics
Show me a Unity C# example demonstrating `PhysicsShapeGroup2D.AddBox`.
x shape ( PhysicsShapeType2D.Polygon ) to the shape group. A box shape is a form of convex polygon with four vertices and an edgeRadius that extends around the four edges. The ability to add a box shape is a convenience only and does not represent an actual primitive shape. NOTE : A box forms a closed shape and does...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83a93fd8c4b7
unity_docs
rendering
What are the parameters of `AssetDatabase.CreateFolder` in Unity?
Returns string The GUID of the newly created folder, if the folder was created successfully. Otherwise returns an empty string. Description Creates a new folder, in the specified parent folder. The parent folder string must start with the "Assets" folder, and all folders within the parent folder string must already exi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b24baedef27a
unity_docs
scripting
Explain 'Search presets' in Unity.
The Presets search provider finds presets in your project. Presets are assets that you can use to apply identical property settings across multiple components, assets, or settings for projects. The Project and Asset Database providers can find preset assets, but the Presets provider can search for specific preset types...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1ffed93ff67
unity_docs
math
What is `UIElements.BoundsField.ctor` in Unity? Explain its purpose and usage.
BoundsField Constructor Declaration public BoundsField (); Description Initializes and returns an instance of BoundsField. Declaration public BoundsField (string label ); Parameters Parameter Description label The text to use as a label. Description Initializes and returns an instance of BoundsFi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9a1ec89f5bd
unity_docs
editor
What are the parameters of `AssetDatabase.GetDefaultImporter` in Unity?
Returns Type Importer type. Description Returns the Default Importer associated with the asset located at the supplied path. When no Importer override is set, then the default importer is used. Additional resources: AssetDatabase.GetImporterOverride , AssetDatabase.ClearImporterOverride . ```csharp using System; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17084d004134
unity_docs
rendering
What is `CameraClearFlags.Skybox` in Unity? Explain its purpose and usage.
CameraClearFlags.Skybox Description Clear with the skybox. If a skybox is not set up, the Camera will clear with a backgroundColor . Additional resources: Camera.clearFlags property, camera component , Graphics Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7b913cb44c9
unity_docs
scripting
What is `GradientColorKey` in Unity? Explain its purpose and usage.
GradientColorKey struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Color key used by Gradient. Additional resources: GradientAlphaKey , Gradient . Properties Property Description color Color of key. time Time of the key (0 - 1). Constructors Constructor Description GradientCo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a087f5588eb
unity_docs
scripting
Show me a Unity C# example demonstrating `Pool.DictionaryPool_2`.
DictionaryPool<T0,T1> class in UnityEngine.Pool / Inherits from: Pool.CollectionPool_2 / Implemented in: UnityEngine.CoreModule Description A version of CollectionPool<T0,T1> for Dictionaries. ```csharp using UnityEngine.Pool;public class Example { void GetPooled() { // Get a pooled instance var instanc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a79d8b39a32e
unity_docs
scripting
What is `SystemInfo.SupportsVertexAttributeFormat` in Unity? Explain its purpose and usage.
SystemInfo.SupportsVertexAttributeFormat Declaration public static bool SupportsVertexAttributeFormat ( Rendering.VertexAttributeFormat format , int dimension ); Parameters Parameter Description format The VertexAttributeFormat format to look up. dimension The dimension of vertex data to check for. Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59d9847fdfb3
unity_docs
rendering
Show me a Unity C# example demonstrating `GUIContent.ctor`.
ent Constructor Declaration public GUIContent (); Description Constructor for GUIContent in all shapes and sizes. Build an empty GUIContent. Declaration public GUIContent (string text ); Description Build a GUIContent object containing only text. When using the GUI, you don't need to create GUIContents ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_41e02be4e70f
unity_docs
rendering
Explain 'Example of changing per-instance data at runtime in the Built-In Render Pipeline' in Unity.
The following example demonstrates how to use MaterialPropertyBlock objects to set per-instance data for a group of GameObjects at runtime. It sets the _Color property from the above shader examples to a random color. Important : MaterialPropertyBlocks break SRP Batcher compatibility. For more information, see GPU inst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29bcfdbbb48c
unity_docs
scripting
Show me a Unity C# example demonstrating `LightTransport.IDeviceContext.WriteBuffer`.
the operation. Use Flush to ensure the operation begins executing, then use Wait or IsCompleted with the provided event to determine when the transfer is complete. The source NativeArray<T0> must remain allocated and unchanged until the write operation completes, as indicated by the event. Warning: EventID instanc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4a5b0ac3a5f
unity_docs
rendering
What is `TextureImporter.IsDefaultPlatformTextureFormatValid` in Unity? Explain its purpose and usage.
TextureImporter.IsDefaultPlatformTextureFormatValid Declaration public static bool IsDefaultPlatformTextureFormatValid ( TextureImporterType textureType , TextureImporterFormat currentFormat ); Parameters Parameter Description currentFormat The TextureImporterType that the importer uses. textureType T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1981945ccffc
unity_docs
xr
What is `XR.MeshVertexAttributes.Tangents` in Unity? Explain its purpose and usage.
MeshVertexAttributes.Tangents Description Vertex tangents Used by XRMeshSubsystem.GenerateMeshAsync to request tangents be generated, or by MeshGenerationResult to indicate tangents were written to the Mesh .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2112300e00b
unity_docs
scripting
What is `SceneManagement.EditorSceneManager.SceneManagerSetupRestoredCallback` in Unity? Explain its purpose and usage.
EditorSceneManager.SceneManagerSetupRestoredCallback Declaration public delegate void SceneManagerSetupRestoredCallback (Scene[] scenes ); Parameters Parameter Description scenes Scenes that has been opened. Description Callbacks of this type which have been added to the sceneManagerSetupRestored event a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65aa6b8dc7f7
unity_docs
scripting
What is `IMGUI.Controls.TreeView.BuildRoot` in Unity? Explain its purpose and usage.
TreeView.BuildRoot Declaration protected IMGUI.Controls.TreeViewItem BuildRoot (); Returns TreeViewItem The root of the tree. This item can later be accessed by 'rootItem'. Description Abstract method that is required to be implemented. By default this method should create the full tree of TreeViewItems ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75e2d735e692
unity_docs
scripting
What is `Unity.Android.Gradle.Ndk` in Unity? Explain its purpose and usage.
Ndk class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description The C# definition of the Ndk element in a gradle file. For more information about the file, see Android's documentation: Ndk Properties Property Description AbiFilters The C# definition of the abiFlags property....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d147da64333d
unity_docs
ui
In Unity's 'Introduction to USS', what is 'Style matching with rules' and how does it work?
When you define a style sheet, you can apply it to a visual tree . Selectors match against elements to resolve which properties apply from the USS file. If a selector matches an element, the style declarations apply to the element. For example, the following rule matches any Button object: ``` Button { width: 200px; }...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3fd09f675d5e
unity_docs
rendering
Explain 'Texture formats in memory' in Unity.
Resources for choosing and using texture compression formats on the GPU. Page Description GPU texture format fundamentals Learn about the optimized texture formats that GPUs use at runtime. Choose a GPU texture format by platform Choose suitable GPU texture formats for desktop, iOS and Android platforms. GPU texture fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5387921cc0f2
unity_docs
scripting
Show me a Unity C# example demonstrating `WWWForm`.
WWWForm class in UnityEngine / Implemented in: UnityEngine.UnityWebRequestModule Description Helper class to generate form data to post to web servers using the UnityWebRequest or WWW classes. ```csharp using UnityEngine; using UnityEngine.Networking; using System.Collections;public class WWWFormImage : MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3ebbeeee2d45
unity_docs
ui
Explain 'Screen configuration' in Unity.
Unity provides features that you can use to configure the screen when in the Editor and at runtime. ## Screen orientation You can control the screen orientation of your application on Android devices. Detecting a change in orientation or forcing a specific orientation is useful for creating behaviors that depend on h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee5804559621
unity_docs
rendering
Show me a Unity C# example demonstrating `Graphics.RenderMeshInstanced`.
rParams.worldBounds . Unity uses the bounds to cull and sort all the instances of this Mesh as a single entity, relative to other rendered Meshes in the scene. The passed instanceData can either be an array of Matrix4x4 (object-to-world transformation per instance) or a custom data structure. When the instanceData...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ea045d21f7b
unity_docs
ui
Show me a Unity C# example demonstrating `EditorWindow.RemoveNotification`.
EditorWindow.RemoveNotification Declaration public void RemoveNotification (); Description Stop showing notification message. Notification message fades away automatically after some time. This function will remove it immediately. Show a notification in an editor window. ```csharp // Simple example that shows...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_371664f5cdc5
unity_docs
rendering
In Unity's 'Add trees to the terrain', what is 'Select trees' and how does it work?
To add trees to the terrain, add a tree prototype to the Paint Tree tool: Select Edit Trees > Add Tree . Select a tree. The Add Tree window has different options based on the tree you’re adding: Bend Factor : Adjust the tree’s responsiveness to the wind in the scene . Trees from the SpeedTree Modeler don’t have a Bend ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_847426704430
unity_docs
editor
What is `VersionControl.Provider.CheckoutIsValid` in Unity? Explain its purpose and usage.
Provider.CheckoutIsValid Declaration public static bool CheckoutIsValid ( VersionControl.AssetList assets ); Declaration public static bool CheckoutIsValid ( VersionControl.Asset asset ); Declaration public static bool CheckoutIsValid ( VersionControl.AssetList assets , VersionControl.CheckoutMode m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e00d5bc6d98c
unity_docs
rendering
What is `ShaderKeywordFilter.RemoveIfAttribute.ctor` in Unity? Explain its purpose and usage.
RemoveIfAttribute Constructor Declaration public RemoveIfAttribute (object condition , bool overridePriority , string filePath , int lineNumber , params string[] keywordNames ); Parameters Parameter Description condition Unity compares the data field to this value. The outcome determines the filter behav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a74671f4bc1
unity_docs
scripting
What is `Rendering.CommandBuffer.CreateAsyncGraphicsFence` in Unity? Explain its purpose and usage.
CommandBuffer.CreateAsyncGraphicsFence Declaration public Rendering.GraphicsFence CreateAsyncGraphicsFence (); Declaration public Rendering.GraphicsFence CreateAsyncGraphicsFence ( Rendering.SynchronisationStage stage ); Parameters Parameter Description stage Which SynchronisationStage to insert t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_004227c8ecbb
unity_docs
editor
What is `Experimental.GraphView.GraphViewEditorWindow.graphViews` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewEditorWindow.graphViews public IEnumerable<GraphView> graphViews ; Description The enumeration of the GraphViews that belong to an editor window. In most cases, there is only one GraphView.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77528d6656dc
unity_docs
physics
What is `Rigidbody2D.sleepMode` in Unity? Explain its purpose and usage.
Rigidbody2D.sleepMode public RigidbodySleepMode2D sleepMode ; Description The sleep state that the rigidbody will initially be in. Sleeping is an optimisation that is used to temporarily remove an object from physics simulation when it is at rest. This property chooses whether the rigidbody should start off ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a69fec207393
unity_docs
networking
What is `XR.XRDisplaySubsystemDescriptor.GetAvailableMirrorBlitModeCount` in Unity? Explain its purpose and usage.
XRDisplaySubsystemDescriptor.GetAvailableMirrorBlitModeCount Declaration public int GetAvailableMirrorBlitModeCount (); Returns int Number of supported mirror blit modes. Description Get current display subsystem's total number of supported mirror blit modes.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aef093989240
unity_docs
animation
What is `Animations.AnimatorState.RemoveTransition` in Unity? Explain its purpose and usage.
AnimatorState.RemoveTransition Declaration public void RemoveTransition ( Animations.AnimatorStateTransition transition ); Parameters Parameter Description transition Transition to remove. Description Utility function to remove a transition from the state. If the transition is a sub asset of the state, i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea80130ca313
unity_docs
rendering
What is `AssetBundleBuild.assetBundleName` in Unity? Explain its purpose and usage.
AssetBundleBuild.assetBundleName public string assetBundleName ; Description AssetBundle name. When building an AssetBundle this property is converted to lowercase and used as the filename of the AssetBundle. On platforms with case sensitive file systems, such as Linux, the AssetBundle load would fail unless th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5dc8b982d5c
unity_docs
scripting
Give me an overview of the `InspectorNameAttribute` class in Unity.
InspectorNameAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Use this attribute on enum value declarations to change the display name shown in the Inspector. Additional resources: SerializedProperty.enumDisplayNames ```csharp using Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a3b80130db31
unity_docs
ui
Show me a Unity C# example demonstrating `GUISkin.horizontalScrollbarLeftButton`.
GUISkin.horizontalScrollbarLeftButton public GUIStyle horizontalScrollbarLeftButton ; Description Style used by default for the left button on GUI.HorizontalScrollbar controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the horizontal scrollbar // left button of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_29b55e48074a
unity_docs
rendering
In Unity's 'Modify source assets from code', what is 'Temporary modification' and how does it work?
Modifications to assets at application runtime are usually temporary. For example, you might want to modify the shader component of the material for a character to represent a temporary invincibility power-up. The shader modification in this case is not permanent and does not persist on exiting Play mode. The following...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2feed94ab13d
unity_docs
animation
What is `Animator.HasState` in Unity? Explain its purpose and usage.
Animator.HasState Declaration public bool HasState (int layerIndex , int stateID ); Parameters Parameter Description layerIndex The layer index. stateID The state ID. Returns bool True if the state exists in this layer, false otherwise. Description Returns true if the state exists in this layer, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a6ed25cdcef
unity_docs
scripting
What is `FullScreenMovieScalingMode` in Unity? Explain its purpose and usage.
FullScreenMovieScalingMode enumeration Description Describes scaling modes for displaying movies. Properties Property Description None Do not scale the movie. AspectFit Scale the movie until one dimension fits on the screen exactly. AspectFill Scale the movie until the movie fills the entire screen. Fill Sca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d07196ec6476
unity_docs
scripting
Explain 'License troubleshooting' in Unity.
This section provides information on the following licensing management issues: Activation issues Issues with returns Unity license file location Answers to other questions Additional resources ## Activation issues The following issues can cause error codes or other problems during the activation process: Issue Solut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e308b0e00da
unity_docs
scripting
What is `TrailRenderer.maskInteraction` in Unity? Explain its purpose and usage.
TrailRenderer.maskInteraction public SpriteMaskInteraction maskInteraction ; Description Specifies how the TrailRenderer interacts with SpriteMask . By default, trails do not interact with SpriteMasks and are visible regardless of whether you assign a SpriteMask or not. You can make the TrailRenderer visibl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_014d386a5b09
unity_docs
editor
Explain 'Customizing the Unity Editor' in Unity.
You can customize the Unity Editor to rearrange the interface to suit your needs. It’s possible to extend the interface with custom tools, or save different workspace layouts. Topic Description Customize your workspace layout Arrange the windows in the Editor to create a personalized workspace. Custom Unity Editor tool...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94cf9aaf552d
unity_docs
rendering
What is `Rendering.DrawingSettings` in Unity? Explain its purpose and usage.
DrawingSettings struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Settings for ScriptableRenderContext.DrawRenderers. DrawingSettings describes how to sort visible objects ( sortingSettings ) and which shader passes to use ( shaderPassName ). Additional resources: ScriptableRe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0e5a32ce980
unity_docs
editor
Show me a Unity C# example demonstrating `Android.AndroidProjectFiles.SetGradlePropertiesFile`.
e gradle.properties file at. This path is relative to the gradle project path. gradleProperties The representation of module gradle.properties file. Description Sets a new gradle.properties file. To use this method, you must also declare your new file in AndroidProjectFilesModifier.Setup using the Android...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_756a7d9d3f3b
unity_docs
xr
What is `XR.InputDevice` in Unity? Explain its purpose and usage.
InputDevice struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description Defines an input device in the XR input subsystem. To retrieve input features or route haptic feedback to XR input devices, specify an XRNode as the destination. Use XRNode.LeftHand and XRNode.RightHand to send haptic ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_17caa195da9d
unity_docs
editor
What is `EditorGUILayout.DelayedIntField` in Unity? Explain its purpose and usage.
EditorGUILayout.DelayedIntField Declaration public static int DelayedIntField (int value , params GUILayoutOption[] options ); Declaration public static int DelayedIntField (int value , GUIStyle style , params GUILayoutOption[] options ); Declaration public static int DelayedIntField (string label , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ec029d18db76
unity_docs
rendering
In Unity's 'Platform-specific texture overrides panel reference', what is 'Default tab' and how does it work?
The Default tab lets you set the final size and format of the imported texture on all platforms. Property Description Max Size Sets the maximum dimensions of the imported texture in pixels . Resize Algorithm Sets the algorithm Unity uses to downscale the texture, if the texture file has larger dimensions than Max Size ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51b810925a8b
unity_docs
physics
What is `Physics2D.BoxCastAll` in Unity? Explain its purpose and usage.
Physics2D.BoxCastAll Declaration public static RaycastHit2D[] BoxCastAll ( Vector2 origin , Vector2 size , float angle , Vector2 direction , float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Param...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0477f6faeaa
unity_docs
editor
What are the parameters of `Presets.Preset.GetDefaultPresetsForType` in Unity?
Returns DefaultPreset[] Returns a list of DefaultPreset from the PresetManager that match the specified PresetType . Description Gets an ordered list of DefaultPreset based on the specified PresetType . See also Preset.SetDefaultPresetsForType . ```csharp using UnityEditor.Presets; using System.Linq;public static class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_952a48a34ddc
unity_docs
xr
Show me a Unity C# example demonstrating `U2D.SpriteAtlasManager.atlasRegistered`.
SpriteAtlasManager.atlasRegistered Description Trigger when a SpriteAtlas is registered via invoking the callback in SpriteAtlasManager.atlasRequested . ```csharp using UnityEngine; using UnityEngine.U2D;public class AtlasRegistrationListener : MonoBehaviour { void OnEnable() { SpriteAtlasManager.atlasRegiste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85eeb0c6d437
unity_docs
rendering
What are the parameters of `GUILayout.Toolbar` in Unity?
Returns int The index of the selected button. Description Make a toolbar. Toolbar in the Game View. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { int toolbarInt = 0; string[] toolbarStrings = {"Toolbar1", "Toolbar2", "Toolbar3"}; void OnGUI() { toolbarInt = GUILayout.To...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f7673ae4b6dd
unity_docs
xr
What is `Networking.UnityWebRequest.UnEscapeURL` in Unity? Explain its purpose and usage.
UnityWebRequest.UnEscapeURL Declaration public static string UnEscapeURL (string s ); Declaration public static string UnEscapeURL (string s , Encoding e ); Parameters Parameter Description s A string containing escaped characters. e The text encoding to use. Description Converts URL-friendly escap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d05069e0659
unity_docs
math
What is `Vector3.Normalize` in Unity? Explain its purpose and usage.
Vector3.Normalize Declaration public void Normalize (); Description Normalizes the magnitude of the current vector to 1 while maintaining the direction. This method converts the current vector to a unit vector. The converted vector has a magnitude of 1 and is in the same direction. Only the magnitude of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_346f363261a4
unity_docs
editor
What is `Search.IQueryEngineFilter.metaInfo` in Unity? Explain its purpose and usage.
IQueryEngineFilter.metaInfo public IReadOnlyDictionary<string,string> metaInfo ; Description Additional information specific to the filter. You can add and remove any additional information on a filter at any given time. This information is not used by the QueryEngine and does not affect the filtering in any ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f56c1d9e4a5
unity_docs
animation
What is `Animations.ScaleConstraint.GetSources` in Unity? Explain its purpose and usage.
ScaleConstraint.GetSources Declaration public void GetSources (List<ConstraintSource> sources ); Parameters Parameter Description sources The list of sources to be filled by the component. Description Gets the list of sources. Throws ArgumentNullException, if the list of sources is null.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50625ecdf05a
unity_docs
rendering
What are the parameters of `AssetDatabase.GenerateUniqueAssetPath` in Unity?
Description Creates a new unique path for an asset. When you call this method, Unity checks to see whether an asset already exists with the matching path and filename you supply. If it doesn't exist, Unity returns the same string you supplied. If an existing asset has the same path and filename, Unity appends the numbe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6d570d3be5db
unity_docs
ui
Explain 'GroupBox' in Unity.
A GroupBox is a container element for a logical group of multiple buttons (including radio buttons) or toggles. You can use a combination of GroupBox and RadioButton if you want to have multiple groups of options in the same panel. If you want to treat your group of radio buttons as a single field, use RadioButtonGroup...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0590578a31b7
unity_docs
scripting
What is `UIElements.BaseTreeView.SetViewController` in Unity? Explain its purpose and usage.
BaseTreeView.SetViewController Declaration public void SetViewController ( UIElements.CollectionViewController controller ); Parameters Parameter Description controller The controller to use with this view. Description Assigns the view controller for this view and registers all events required for it to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8564b97dadd0
unity_docs
scripting
What is `AndroidJNI.PushLocalFrame` in Unity? Explain its purpose and usage.
AndroidJNI.PushLocalFrame Declaration public static int PushLocalFrame (int capacity ); Description Creates a new local reference frame, in which at least a given number of local references can be created. 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_sr_5fe86cd6047c
unity_docs
scripting
What are the parameters of `KeyCode.DownArrow` in Unity?
```csharp //Attach this to a GameObject //This script tells when the down arrow key is pressed and when it is released using UnityEngine;public class Example : MonoBehaviour { void Update() { //Detect when the down arrow key is pressed down if (Input.GetKeyDown(KeyCode.DownArrow)) De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d4260b73ee4
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.back`.
Vector3.back public static Vector3 back ; Description Shorthand for writing Vector3(0, 0, -1) . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { transform.position += Vector3.back * Time.deltaTime; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a89ade69a45
unity_docs
scripting
What is `ChangeSceneEventArgs.ctor` in Unity? Explain its purpose and usage.
ChangeSceneEventArgs Constructor Declaration public ChangeSceneEventArgs ( SceneManagement.Scene scene ); Parameters Parameter Description scene The Scene that was changed. Description Constructs a new instance.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df36b067103c
unity_docs
scripting
What is `LightProbes.Tetrahedralize` in Unity? Explain its purpose and usage.
LightProbes.Tetrahedralize Declaration public static void Tetrahedralize (); Description Synchronously tetrahedralize the currently loaded LightProbe positions. Call this function to tetrahedralize the currently loaded LightProbe positions. You should generally only call this function upon receiving a LightPro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7886296cb33
unity_docs
scripting
What is `PrefabUtility.IsPartOfPrefabAsset` in Unity? Explain its purpose and usage.
PrefabUtility.IsPartOfPrefabAsset Declaration public static bool IsPartOfPrefabAsset ( Object componentOrGameObject ); Parameters Parameter Description componentOrGameObject The object to check. Must be a component or GameObject. Returns bool True if the object is part of a Prefab Asset. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4dd73b92368
unity_docs
scripting
What is `Color.magenta` in Unity? Explain its purpose and usage.
Color.magenta public static Color magenta ; Description Magenta. RGBA is (1, 0, 1, 1). ```csharp //Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options to create a GameObject with a Renderer automatically attached). //This script changes the Color of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9e7814aae50
unity_docs
scripting
What is `UIElements.SortColumnDescriptions.Add` in Unity? Explain its purpose and usage.
SortColumnDescriptions.Add Declaration public void Add ( UIElements.SortColumnDescription item ); Parameters Parameter Description item The sort description to add. Description Adds a sort description at the end of the collection.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c59ac37600e
unity_docs
ui
Show me a Unity C# example demonstrating `GUI.contentColor`.
GUI.contentColor public static Color contentColor ; Description Tinting color for all text rendered by the GUI. This gets multiplied by color . Additional resources: backgroundColor , color . Yellow content color (font) in a button. ```csharp // Tints with yellow the letters of the button.using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71eb9f357918
unity_docs
scripting
What is `Events.UnityEvent` in Unity? Explain its purpose and usage.
UnityEvent class in UnityEngine.Events / Inherits from: Events.UnityEventBase / Implemented in: UnityEngine.CoreModule Description A zero argument persistent callback that can be saved with the Scene. ```csharp using UnityEngine; using UnityEngine.Events;public class ExampleClass : MonoBehaviour { UnityEvent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a8cee9c4a2f
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.Lerp`.
tion a The start value. b The end value. t The interpolation value between the two floats. Returns float The interpolated float result between the two float values. Description Linearly interpolates between a and b by t . The parameter t is clamped to the range [0, 1]. When t = 0 returns a . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2144b214eea5
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.GetItemName` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemName Declaration public string GetItemName (int id ); Parameters Parameter Description id Hierarchy item identifier. Returns string Returns item name. Returns null if identifier is invalid. Description Gets the sample name associated with the item.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57fc67ca80f3
unity_docs
rendering
Explain 'Enable the SRP Batcher in URP' in Unity.
To activate the SRP Batcher in URP: In the Project window , select the URP Asset . In the Inspector for the URP asset, in the Rendering section, enable SRP Batcher . If this option is not visible, configure Unity to display advanced properties in a URP Asset . Note : If assets or shaders in a project are not optimized ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_319787a81dc0
unity_docs
rendering
What is `UIElements.Background.FromTexture2D` in Unity? Explain its purpose and usage.
Background.FromTexture2D Declaration public static UIElements.Background FromTexture2D ( Texture2D t ); Parameters Parameter Description t The texture to use as a background. Returns Background A new background object. Description Creates a background from a Texture2D .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_63037030bd3c
github
scripting
Write a Unity C# MonoBehaviour script called Game Object Linker
```csharp using Hudossay.AttributeEvents.Assets.Runtime.CouplingStructure; using Hudossay.AttributeEvents.Assets.Runtime.EventLinks; using Hudossay.AttributeEvents.Assets.Runtime.Static.LabeledMemberMatchers; using System; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace Hudossay.Attr...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_c708e9294059
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchProvider.fetchPropositions`.
SearchProvider.fetchPropositions public Func<SearchContext,SearchPropositionOptions,IEnumerable<SearchProposition>> fetchPropositions ; Description Handler used to enumerate search propositions when the user is using TAB to auto-complete a query. ``` IEnumerable<SearchProposition> FetchPropositions(SearchContex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62caa580e763
unity_docs
editor
What is `PlayerSettings.Android.renderOutsideSafeArea` in Unity? Explain its purpose and usage.
PlayerSettings.Android.renderOutsideSafeArea public static bool renderOutsideSafeArea ; Description Extends rendering layout into display cutout area, utilizing all of the available screen space. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class RenderOutsideSafeAreaSample : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_721c7e3e8a36
unity_docs
physics
What is `ArticulationBody` in Unity? Explain its purpose and usage.
ArticulationBody class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.PhysicsModule Description A body that forms part of a Physics articulation. An articulation is a set of bodies arranged in a logical tree. The parent-child link in this tree reflects that the bodies have their rela...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d74ecfe94eda
unity_docs
rendering
Give me an overview of the `LightingWindowTab` class in Unity.
LightingWindowTab class in UnityEditor Description Base class to add custom tabs to the Lighting window. See also LightingWindowEnvironmentSection . ```csharp using UnityEditor; using UnityEditor.Rendering; using UnityEngine; using UnityEngine.Rendering;class CustomLightingTab : LightingWindowTab { public over...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b3aa5ce257b
unity_docs
editor
What are the parameters of `Search.SearchExpressionContext.ResolveAlias` in Unity?
Returns string Returns a resolved alias. Description Try to resolve an alias value using the SearchExpressionRuntime attached to this context. Each frame if asked to resolve a SearchExpression.alias . ```csharp [Description("Returns ids of current selection")] [SearchExpressionEvaluator(SearchExpressionEvaluationHints....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da9c99dac378
unity_docs
scripting
What is `SystemInfo.processorType` in Unity? Explain its purpose and usage.
SystemInfo.processorType public static string processorType ; Description Processor name (Read Only). Will return SystemInfo.unsupportedIdentifier on platforms which don't support this property. ```csharp using UnityEngine; using System; using System.Globalization;public class Example : MonoBehaviour { void...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6ed541e4c10
unity_docs
editor
What is `Embree.GpuBvhBuildOptions` in Unity? Explain its purpose and usage.
GpuBvhBuildOptions struct in UnityEditor.Embree Description Options for bounding volume hierarchy (BVH) build. Properties Property Description allowPrimitiveSplits With this option enabled, Unity performs spatial splits. This increases the memory footprint, but the resulting BVH makes the ray tracing stage fas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e0287da24c3
unity_docs
scripting
What are the parameters of `LightTransport.RadeonRaysContext.Wait` in Unity?
Returns bool Returns true of the event completed successfully. Description Wait for an asynchronous event. This is a blocking method which stalls the current CPU thread until the operation represented by the EventID is complete. Adding a stall can have a significant performance impact during regular execution. To avoid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e114e72edbe
unity_docs
rendering
What is `PlayerSettings.SetShaderPrecisionModel` in Unity? Explain its purpose and usage.
PlayerSettings.SetShaderPrecisionModel Declaration public static void SetShaderPrecisionModel ( ShaderPrecisionModel model ); Parameters Parameter Description model The new precision model to use. Description Sets the shader precision model.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_287120a92924_doc_5
github
scripting
What does `StartMoviePlayback` do in this Unity script? Explain its purpose and signature.
Start movie playback (all frames must be loaded first). Signature: ```csharp public void StartMoviePlayback() ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_285c0c10f448
unity_docs
physics
What is `PhysicsVisualizationSettings.contactSeparationColor` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.contactSeparationColor public static Color contactSeparationColor ; Description Contact point separation color. The color of the line that represents the ContactPoint.separation distance. This color is also used by the disc that shows where the separation ends and the ContactPo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b79c35951579
unity_docs
animation
Explain 'Animator window' in Unity.
Use the Animator window to create, view, and modify Animator Controller assets. The Animator window displays the state machine from the most recently selected.controller asset, regardless of which scene is loaded. The Animator window contains: Animation Layers Animation Parameters The Animator Controller view where you...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f9501138e5ee
unity_docs
rendering
In Unity's 'Audio overview', what is 'Working with audio assets' and how does it work?
Unity can import audio files in AIFF , WAV , MP3 , and Ogg formats in the same way as other assets. Drag the files into the Project panel. Import an audio file to create an Audio Clip that you can then drag to an Audio Source or use from a script. The Audio Clip reference page has more details about the import options ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a946df4dd894
unity_docs
math
What is `UIElements.SortColumnDescriptions` in Unity? Explain its purpose and usage.
SortColumnDescriptions class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description This represents a collection or SortColumnDescriptions in multi SortColumnDescription views. Properties Property Description Count Gets the number of sort descriptions in the collection. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_632574665a3e
unity_docs
scripting
What is `EditorGUILayout.InspectorTitlebar` in Unity? Explain its purpose and usage.
EditorGUILayout.InspectorTitlebar Declaration public static bool InspectorTitlebar (bool foldout , Object targetObj ); Declaration public static bool InspectorTitlebar (bool foldout , Object[] targetObjs ); Parameters Parameter Description foldout The foldout state shown with the arrow. targetObj ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12a11c3ede8f
unity_docs
rendering
What is `TextAsset.bytes` in Unity? Explain its purpose and usage.
TextAsset.bytes public byte[] bytes ; Description The raw bytes of the text asset. (Read Only) This returns an array containing all the data in a file, including invisible characters such as byte-order marks for Unicode text files. This property returns a new C# array with a copy of the asset data every time i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_52dc511e41e7
unity_docs
rendering
Explain 'Set shader variables with material property values' in Unity.
## Using material properties to set variables in ShaderLab code To set the value of a variable in your ShaderLab code from a material property, put the material property name in square brackets in your ShaderLab code. This example code demonstrates the syntax for using a material property to set the units value of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_722c05b43f55
unity_docs
physics
What is `PhysicsVisualizationSettings.SetShowKinematicBodies` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.SetShowKinematicBodies Declaration public static void SetShowKinematicBodies (bool show ); Description Should the kinematic Rigidbodies be considered by the display filter. Additional resources: Rigidbody.isKinematic .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5ba6e979100
unity_docs
scripting
What is `Unity.IntegerTime.RationalTimeExtensions.Add` in Unity? Explain its purpose and usage.
RationalTimeExtensions.Add Declaration public static Unity.IntegerTime.RationalTime Add ( Unity.IntegerTime.RationalTime lhs , Unity.IntegerTime.RationalTime rhs ); Parameters Parameter Description t The left hand side. r The right hand side. Returns RationalTime A new instance that is the sum of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.