id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_4d7f4796f8bf
unity_docs
scripting
What are the parameters of `AI.NavMeshAgent.CalculatePath` in Unity?
Returns bool True if either a complete or partial path is found. False otherwise. Description Calculate a path to a specified point and store the resulting path. Use this function to avoid gameplay delays by planning a path before it is needed. You can also use this function to check if a target position is reachable b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72a085334c2b
unity_docs
rendering
What are the parameters of `AssetImporters.AssetImportContext.AddObjectToAsset` in Unity?
Description Adds an object to the result of the import operation. Use this method to add objects to the resulting asset. AddObjectToAsset can be called multiple times if more than one unity object is the result of the import process. Note: You must make sure that your importer provides a unique identifier for each adde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_83aaf7670107
unity_docs
rendering
Explain 'Graphics for Android' in Unity.
This section of the User Manual contains Android-specific graphics information. Android device hardware capabilities vary between models, and there are many different Android models on the market. This is important to consider when you develop graphics features and write shaders . Topic Description Screen configuration...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_37435a57b125
github
scripting
Write a Unity C# MonoBehaviour script called Singleton Test Object_D
```csharp using System; using UnityEngine; using DyrdaDev.Singleton; public class SingletonTestObject_D : SingletonMonoBehaviour<SingletonTestObject_D> { protected override void Awake() { base.Awake(); Debug.Log("Inside overwritten Awake."); } } ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_ec77c2740cba
unity_docs
physics
What is `Physics.CheckBox` in Unity? Explain its purpose and usage.
Physics.CheckBox Declaration public static bool CheckBox ( Vector3 center , Vector3 halfExtents , Quaternion orientation = Quaternion.identity, int layermask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters Parameter Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86903f945b36
unity_docs
rendering
What is `Profiling.HierarchyFrameDataView.GetItemCategoryIndex` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemCategoryIndex Declaration public ushort GetItemCategoryIndex (int id ); Parameters Parameter Description id Hierarchy item identifier. Returns ushort Returns Profiler category index. Description Gets Profiler marker category for the specific marker identifier. Use Profi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dacf3662284
unity_docs
scripting
What is `SubsystemManager.GetSubsystemDescriptors` in Unity? Explain its purpose and usage.
SubsystemManager.GetSubsystemDescriptors Declaration public static void GetSubsystemDescriptors (List<T> descriptors ); Parameters Parameter Description descriptors Subsystem specific descriptors. Description Returns a list of SubsystemDescriptors which describe additional functionality that can be enabled...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5948d65c1f62
unity_docs
rendering
In Unity's 'Check how many shader variants you have', what is 'Get a list of shader variants Unity compiles at runtime' and how does it work?
To get a list of shader variants Unity compiles at runtime, record which pipeline state objects (PSOs) your application uses with the experimental GraphicStateCollection API. For more information, refer to Trace and manage PSO data collections . You can also log compiled shader variants in the Console window and in a l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1a05e8f1c11
unity_docs
physics
What is `SimulationStage.PrepareSimulation` in Unity? Explain its purpose and usage.
SimulationStage.PrepareSimulation Description This stage prepares the physics scene for simulation. Specifically, this stage: Displays any pending errors from the physics system. Calls Physics.SyncTransforms to apply any pending Transform changes to the physics system. Stores interpolation poses.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7110e54069da
unity_docs
ui
Explain 'Keyboard events' in Unity.
Keyboard events occur when you press or release keys on the keyboard. Each event includes information about the modifier , text character , and related key code for the event. Many standard controls use the KeyDownEvent to encode shortcuts or accessibility behaviors. The following examples all use keyboard events: The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a573389809d
unity_docs
rendering
What is `WaitForEndOfFrame` in Unity? Explain its purpose and usage.
WaitForEndOfFrame class in UnityEngine / Inherits from: YieldInstruction / Implemented in: UnityEngine.CoreModule Description Suspends a coroutine until the end of the frame after Unity has rendered every Camera and GUI, just before displaying the frame on screen. WaitForEndOfFrame can only be used with a y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a09e8544ff09
unity_docs
scripting
What is `WebGLWasmArithmeticExceptions` in Unity? Explain its purpose and usage.
WebGLWasmArithmeticExceptions enumeration Description An enum containing different trapping modes for WebAssembly code. This enum is used within the WebGL platform to define the type of trapping that is used when performing arithmetic operations in WebAssembly code. Properties Property Description Ignore This ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_967a6307b5d9_doc_14
github
scripting
What does `ApplyOverrides` do in this Unity script? Explain its purpose and signature.
Applies Tiling Rule overrides to thisA list of Tiling Rule overrides to applyThe input overrides list is not valid Signature: ```csharp public void ApplyOverrides(IList<KeyValuePair<RuleTile.TilingRule, RuleTile.TilingRule>> overrides) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_492757025cbe
unity_docs
performance
What are the parameters of `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.EndSample` in Unity?
Description End profiling a piece of code marked with a custom name defined by this instance of ProfilerMarker . Code marked with BeginSample and EndSample shows up in the Profiler hierarchy. Always use BeginSample or BeginSampleWithMetadata to start a section of the instrumented code. Note: EndSample is thread safe an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1b5eda91526
unity_docs
scripting
What is `UIElements.IEventHandler.SendEvent` in Unity? Explain its purpose and usage.
IEventHandler.SendEvent Declaration public void SendEvent ( UIElements.EventBase e ); Parameters Parameter Description e The event to send. Description Sends an event to the event handler. The event is forwarded to the event dispatcher for processing. For more information, refer to Synthesize and s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_081975028686
unity_docs
rendering
What is `Terrain.SetSplatMaterialPropertyBlock` in Unity? Explain its purpose and usage.
Terrain.SetSplatMaterialPropertyBlock Declaration public void SetSplatMaterialPropertyBlock ( MaterialPropertyBlock properties ); Description Set the additional material properties when rendering the terrain heightmap using the splat material. Additional resources: GetSplatMaterialPropertyBlock , Renderer.S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a93ec1727d01
github
scripting
Write a Unity C# script called Move Target
```csharp using UnityEngine; namespace Gilzoide.UpdateManager.Sample.FollowTarget { public class MoveTarget : AManagedBehaviour, IUpdatable { [SerializeField] private Camera _camera; void Awake() { if (_camera == null) { _camera = Camera.main; ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_29429515ea73
unity_docs
editor
Explain 'Assign USS variables in UI Builder' in Unity.
USS variables define values that you can reuse in other USS rules. USS variables are primarily used for themes, with the default Unity themes exposing a long list of standard variables to make your UI more consistent with standard controls. You can’t create USS variables with UI Builder. You must use a text editor to c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9663efe5b5fe
unity_docs
rendering
What is `Rendering.CommandBuffer.SetRayTracingBufferParam` in Unity? Explain its purpose and usage.
CommandBuffer.SetRayTracingBufferParam Declaration public void SetRayTracingBufferParam ( Rendering.RayTracingShader rayTracingShader , string name , ComputeBuffer buffer ); Declaration public void SetRayTracingBufferParam ( Rendering.RayTracingShader rayTracingShader , int nameID , ComputeBuffer buf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6214fba4906c
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_DXT5_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_DXT5_UNorm Description A four-component, block-compressed format (also known as BC3) where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aeab62400115
unity_docs
scripting
What is `AI.NavMesh.SetLinkActive` in Unity? Explain its purpose and usage.
NavMesh.SetLinkActive Declaration public static void SetLinkActive ( AI.NavMeshLinkInstance handle , bool value ); Parameters Parameter Description handle The link instance whose active state to modify. value Whether agents can plan paths through, and traverse, the link. When the value is true, agents ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04244eed1cac
unity_docs
scripting
What is `UIElements.UxmlSerializedData.UxmlAttributeFlags` in Unity? Explain its purpose and usage.
UxmlAttributeFlags enumeration Description Used to indicate if a field is overridden in a UXML file. Properties Property Description Ignore The serialized field is ignored and not applied during Deserialize. OverriddenInUxml The serialized field is overridden in a UXML file and will be applied during ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0fe09114524b
unity_docs
rendering
What is `TerrainLayerUtility.ValidateMaskMapTextureUI` in Unity? Explain its purpose and usage.
TerrainLayerUtility.ValidateMaskMapTextureUI Declaration public static void ValidateMaskMapTextureUI ( Texture2D texture ); Parameters Parameter Description texture The texture to validate. Description Checks whether the texture is a valid TerrainLayer mask map texture. If it detects that the texture is n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e8520a0a8eb
unity_docs
editor
What is `AssetImporters.AssetImporterEditor.extraDataTargets` in Unity? Explain its purpose and usage.
AssetImporterEditor.extraDataTargets protected Object[] extraDataTargets ; Description An array of objects associated with each Editor.targets . This array is only created when extraDataType is provided and will always have the same size as Editor.targets . Each object has to be initialized inside Initiali...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b2f52555fba
unity_docs
editor
What is `EditorUserBuildSettings.activeBuildTarget` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.activeBuildTarget public static BuildTarget activeBuildTarget ; Description The currently active build target. Note: If you are writing an importer, you must use AssetImportContext.selectedBuildTarget .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f736cd59949
unity_docs
scripting
What are the parameters of `UIElements.CallbackEventHandler.HandleEventTrickleDown` in Unity?
Description Executes logic on this element during the TrickleDown phase, immediately after this element's TrickleDown callbacks. Calling StopPropagation will prevent further invocations of this method along the propagation path. This method is designed to be overriden by subclasses. Use it to implement event handling...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d98de19e4809
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.freeSampleFrameCountLowThreshold` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.freeSampleFrameCountLowThreshold public uint freeSampleFrameCountLowThreshold ; Description When the free sample count falls below this threshold, the AudioSampleProvider.sampleFramesAvailable event and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8b03e98a107
unity_docs
rendering
What is `WebGLTextureSubtarget` in Unity? Explain its purpose and usage.
WebGLTextureSubtarget enumeration Description Compressed texture format for target build platform. Additional resources: EditorUserBuildSettings.webGLBuildSubtarget . Properties Property Description Generic Don't override texture compression. DXT S3 texture compression. Supported on devices with NVidia Tegra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60dfa1819cf4
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.fixedWidth`.
GUIStyle.fixedWidth public float fixedWidth ; Description If non-0, any GUI elements rendered with this style will have the width specified here. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints the value of fixedWidth. void OnGUI() { Debug.Log(GUI.skin.button.fixedWidth); } } `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2adcf8a82bdb
unity_docs
physics
Explain 'Introduction to joints' in Unity.
A joint connects a Rigidbody to another Rigidbody or to a fixed point in space. Joints apply forces that move rigid bodies, and joint limits restrict that movement. Joints give Rigidbody components the following degrees of freedom: For details on joints in the PhysX system, including how twist and swing axes work, refe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f85b73ffa2b
unity_docs
scripting
What is `SpriteMaskInteraction.VisibleInsideMask` in Unity? Explain its purpose and usage.
SpriteMaskInteraction.VisibleInsideMask Description The sprite will be visible only in areas where a mask is present. The sprite visibility is restricted to areas where one or more masks are present. By "one or more mask be present", we mean that at least one mask will be in scope when the given sprite is rendered.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8292e62571d
unity_docs
scripting
What is `Debug.LogErrorFormat` in Unity? Explain its purpose and usage.
Debug.LogErrorFormat Declaration public static void LogErrorFormat (string format , params object[] args ); Declaration public static void LogErrorFormat ( Object context , string format , params object[] args ); Parameters Parameter Description format A composite format string. args Format argum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab175bf2e444
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.Stop`.
pBehavior.StopEmitting); Parameters Parameter Description withChildren Stop all child Particle Systems as well. stopBehavior Stop emitting or stop emitting and clear the system. Description Stops playing the Particle System using the supplied stop behaviour. Additional resources: Play , Pause functions. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa7eea22652e
unity_docs
rendering
What is `U2D.SpriteAtlasExtensions.SetIncludeInBuild` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.SetIncludeInBuild Declaration public static void SetIncludeInBuild ( U2D.SpriteAtlas spriteAtlas , bool value ); Description Define if this sprite atlas's packed texture is included in the build with the Sprite after packing is done. Include this to ensure that the sprite refers to th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbcec8afe0dd
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.PI`.
Mathf.PI public static float PI ; Description The well-known 3.14159265358979... value (Read Only). The ratio of the circumference of a circle to its diameter. Note that this value is a 32-bit floating point number i.e. a float . Approximately seven digits of precision are provided. ```csharp using UnityEn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_845cf299397d
unity_docs
physics
Explain 'Manage results tables' in Unity.
You can use Search tables to view, compare, and sort Search items by properties. From the table you can also modify data and export data to a .csv file or JSON. ## View Search tables To view your search in table format, enter a search query and click the table icon in the bottom right of the Unity Search window. By d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b00e7c4ddada
unity_docs
scripting
What is `MPE.ChannelClient.GetChannelClientInfo` in Unity? Explain its purpose and usage.
ChannelClient.GetChannelClientInfo Declaration public MPE.ChannelClientInfo GetChannelClientInfo (); Declaration public static MPE.ChannelClientInfo GetChannelClientInfo (string channelName ); Declaration public static MPE.ChannelClientInfo GetChannelClientInfo (int clientId ); Parameters Paramet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f8b2841025f
unity_docs
scripting
What are the parameters of `GameObject.CreatePrimitive` in Unity?
Description Creates a GameObject of the specified PrimtiveType with a mesh renderer and appropriate collider. For CreatePrimitive to succeed at runtime, your project must reference the following components: MeshFilter MeshRenderer BoxCollider SphereCollider To ensure you have the required references, declare private pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f22707b56eaa
unity_docs
physics
Give me an overview of the `CapsuleDirection2D` class in Unity.
CapsuleDirection2D enumeration Description The direction that the capsule sides can extend. Additional resources: :CapsuleCollider::direction. Properties Property Description Vertical The capsule sides extend vertically. Horizontal The capsule sides extend horizontally.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_596bc6add18f
unity_docs
editor
What is `Search.QueryEngine_1.AddOperatorHandler` in Unity? Explain its purpose and usage.
QueryEngine<T0>.AddOperatorHandler Declaration public void AddOperatorHandler (string op , Func<TFilterVariable,TFilterConstant,bool> handler ); Declaration public void AddOperatorHandler (string op , Func<TFilterVariable,TFilterConstant,stringComparison,bool> handler ); Parameters Parameter Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4a5bb5f9266e
unity_docs
performance
In Unity's 'Mono scripting back end', what is 'Optimizing Mono builds' and how does it work?
Mono and IL2CPP use the same base .NET class library so many performance issues and best practices are applicable to both. However, in the Mono context consider the following: The JIT compilation of Mono means that it can have lower runtime performance and longer startup time in large codebases compared to the AOT comp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ddb9a5069a0c
unity_docs
rendering
Show me a Unity C# example demonstrating `ComputeShader.shaderKeywords`.
etermine which shader variants Unity uses. For information on working with local shader keywords and global shader keywords and how they interact, see Using shader keywords with C# scripts . Note: It is more efficient to use enabledKeywords , which returns an array of LocalKeyword structs. This example prints ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49c5c6103970
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.ArrayElementAsRef` in Unity? Explain its purpose and usage.
UnsafeUtility.ArrayElementAsRef Declaration public static ref T ArrayElementAsRef (void* ptr , int index ); Parameters Parameter Description ptr A pointer to the first element of the array. Ensure that this pointer is valid and points to allocated memory. index The zero-based index of the element to refer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fbe1e09155b
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyPropertyString` in Unity? Explain its purpose and usage.
HierarchyPropertyString struct in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Implements interfaces: IHierarchyProperty<T0> Description Provides access to string property data. Properties Property Description IsCreated Returns true if the native property is valid. Public Method...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_083786b1a82f
unity_docs
scripting
In Unity's 'Keystore Manager window reference', what is 'Keystore' and how does it work?
The properties in this section of the interface relate to the keystore that the Keystore Manager window currently manages. Property Description Keystore dropdown Specifies which keystore to use in the Keystore Manager window. You can either create a new keystore, or load an existing one. For more information, refer to:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e70efe965ec
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetImporters.ScriptedImporter.OnImportAsset`.
public void OnImportAsset ( AssetImporters.AssetImportContext ctx ); Parameters Parameter Description ctx This argument contains all the contextual information needed to process the import event and is also used by the custom importer to store the resulting Unity Asset. Description This method must by overr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83c8b8905438
unity_docs
scripting
What is `UIElements.Experimental.StyleValues.paddingRight` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StyleValues.paddingRight public float paddingRight ; Description Space reserved for the right edge of the padding during the layout phase.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28ed363ace95
unity_docs
rendering
What is `Experimental.Playables.CameraPlayable.Create` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. CameraPlayable.Create Declaration public static Experimental.Playables.CameraPlayable Create ( Playables.PlayableGraph graph , Camera camera ); Parameters Parameter Description graph The PlayableGraph object that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_35130e1db60e
unity_docs
rendering
Explain 'Add built-in keyword sets' in Unity.
You can use Unity shader directive shortcuts to create sets of shader keywords and variants. For example, the following example adds SHADOWS_DEPTH and SHADOWS_CUBE keywords and variants: ``` #pragma multi_compile_shadowcaster ``` ## Shader directive shortcuts Shortcut Shader keywords Unity adds Unity adds a shader va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82482539129f
unity_docs
rendering
What is `MonoBehaviour.OnBecameVisible` in Unity? Explain its purpose and usage.
MonoBehaviour.OnBecameVisible() Description Called when the renderer becomes visible to any camera. This message is sent to all scripts attached to the renderer. OnBecameVisible and MonoBehaviour.OnBecameInvisible are useful to avoid computations that are only necessary when the object is visible. The Scene vi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b0222acf0d9
unity_docs
math
Give me an overview of the `GeometryUtility` class in Unity.
GeometryUtility class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Utility class for common geometric functions. Static Methods Method Description CalculateBounds Calculates the bounding box from the given array of positions and the transformation matrix. CalculateFrustumPlanes Calcul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9084a4d303bd
unity_docs
rendering
What is `TextureWrapMode.Clamp` in Unity? Explain its purpose and usage.
TextureWrapMode.Clamp Description Clamps the texture to the last pixel at the edge. This is useful for preventing wrapping artifacts when mapping an image onto an object and you don't want the texture to tile. UV coordinates will be clamped to the range 0...1. When UVs are larger than 1 or smaller than 0, the last ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4d5de0d0c92
unity_docs
rendering
What is `TextureCompressionFormat` in Unity? Explain its purpose and usage.
TextureCompressionFormat enumeration Description Options for the compressed texture formats that are available on the target build platform. Additional resources: PlayerSettings.Android.textureCompressionFormats . Properties Property Description Unknown Use an undefined texture compression format. ETC Use ET...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfc5f7d51bb6
unity_docs
scripting
What is `AndroidJNI.FatalError` in Unity? Explain its purpose and usage.
AndroidJNI.FatalError Declaration public static void FatalError (string message ); Description Raises a fatal error and does not expect the VM to recover. This function does not return. 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_cb5c5a6be29e
unity_docs
rendering
What is `ParticleSystemRenderer.SetMeshes` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.SetMeshes Declaration public void SetMeshes (Mesh[] meshes ); Declaration public void SetMeshes (Mesh[] meshes , int size ); Parameters Parameter Description meshes The array of Meshes to use. size The number of elements from the Mesh array to apply. Description Sets the Mesh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88df060003c4
unity_docs
editor
What is `Compilation.ResponseFileData` in Unity? Explain its purpose and usage.
ResponseFileData class in UnityEditor.Compilation Description Data class used for storing parsed response file data. Properties Property Description Defines Array of define symbols. Errors Error messages that occurred during parsing the response file. FullPathReferences Array of absolute path reference to as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f079ea29d4cf
unity_docs
scripting
Give me an overview of the `BuildCompression` class in Unity.
BuildCompression struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Contains information about compression methods, compression levels and block sizes that are supported by Asset Bundle compression at build time and recompression at runtime. The formats that are currently supported are ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92951239774f
unity_docs
xr
Show me a Unity C# example demonstrating `Android.Permission.HasUserAuthorizedPermission`.
has not predefined, you can provide Android's in-built permission strings such as "android.permission.READ_CONTACTS". For a list of permission strings, refer to Android's documentation on Manifest.permission . Returns bool Whether the requested permission has been granted. Description Check if the user has gr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a27caef8c158
unity_docs
editor
What is `SceneView.duringSceneGui` in Unity? Explain its purpose and usage.
SceneView.duringSceneGui Parameters Parameter Description value The Scene view invoking this callback. Description Subscribe to this event to receive a callback whenever the Scene view calls the OnGUI method. Use this event to implement custom handles and user interface. If you want to draw elements in the Sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b9e0dbde185f
unity_docs
rendering
What is `ModelImporterMaterialImportMode.ImportStandard` in Unity? Explain its purpose and usage.
ModelImporterMaterialImportMode.ImportStandard Description The model importer imports materials in standard mode using OnPostprocessMaterial callback. When selected, the model importer generates and populates materials by applying a set of simple default rules. The ModelImporter will also invoke AssetPostprocessor....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da7f52025e15
unity_docs
rendering
What is `MaterialEditor.FixupEmissiveFlag` in Unity? Explain its purpose and usage.
MaterialEditor.FixupEmissiveFlag Declaration public static MaterialGlobalIlluminationFlags FixupEmissiveFlag ( Color col , MaterialGlobalIlluminationFlags flags ); Parameters Parameter Description col Emission color. flags Current global illumination flag. Returns MaterialGlobalIlluminationFlags ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d936cc81cdd9
unity_docs
xr
What is `Scripting.RequireDerivedAttribute` in Unity? Explain its purpose and usage.
RequireDerivedAttribute class in UnityEngine.Scripting / Implemented in: UnityEngine.CoreModule Description When the type is marked, all types derived from that type will also be marked. ```csharp using System; using UnityEngine; using UnityEngine.Scripting;public class NewBehaviourScript : MonoBehaviour { voi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe0046005466
unity_docs
animation
What is `Animator.GetNextAnimatorStateInfo` in Unity? Explain its purpose and usage.
Animator.GetNextAnimatorStateInfo Declaration public AnimatorStateInfo GetNextAnimatorStateInfo (int layerIndex ); Parameters Parameter Description layerIndex The layer index. Returns AnimatorStateInfo An AnimatorStateInfo with the information on the next state. Description Returns an AnimatorS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48100f619089
unity_docs
editor
What are the parameters of `EditorGUIUtility.SetIconForObject` in Unity?
Description Sets a custom icon to associate with a GameObject or MonoScript . The custom icon is displayed in the Scene view and the Inspector. Custom icons for GameObjects are saved in the scene. ```csharp using UnityEngine; using UnityEditor;class Example { [MenuItem("Examples/Set Custom Icon on GameObject")] ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_35592762373d
unity_docs
rendering
Explain 'Introduction to Custom Render Textures' in Unity.
Custom Render Textures are a special type of texture that allow you to update a texture with a shader . They are an extension to Render Textures . You can use Custom Render Textures to create complex simulations like caustics, ripple simulation for rain effects, and liquid splatters. The Custom Render Textures feature ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7286256c523
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.UpdateBuildPropertyForConfig`.
scription configGuid The GUID of the build configuration as returned by BuildConfigByName . configGuids An array of GUIDs of build configurations. name The name of the build property. addValues The values to add to the build property. removeValues The values to remove from the build property. Description A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2b06cb2cba28
unity_docs
editor
In Unity's 'Assembly Definition file format reference', what is 'Assembly Definition JSON' and how does it work?
An Assembly Definition is a JSON object with the following fields: Key Type Required Description allowUnsafeCode bool Optional False by default. For more information on the meaning of this option, refer to Allow ‘unsafe’ Code in General Options . autoReferenced bool Optional True by default. For more information on the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e0806c325a5
unity_docs
scripting
What is `Rendering.VertexAttributeFormat` in Unity? Explain its purpose and usage.
VertexAttributeFormat enumeration Description Data type of a VertexAttribute. Individual components of a Mesh vertex can use different data types. For example, a vertex normal could be stored as either 32-bit float, or 16-bit float numbers. Additional resources: VertexAttribute , Mesh.GetVertexAttributeFormat ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b6ee0405349f
unity_docs
rendering
Explain 'Add trees to the terrain' in Unity.
Use the Paint Trees tool to place trees on the terrain and customize their painting. You can paint trees with a brush or mass place trees across the entire terrain tile. As an example, use the free Unity Terrain - HDRP Demo Scene , which has six SpeedTree models. You can also create trees with the Tree Editor (for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_38d255e5cbb1
unity_docs
physics
What is `PhysicsVisualizationSettings.InitDebugDraw` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.InitDebugDraw Declaration public static void InitDebugDraw (); Description Initializes the physics debug visualization system. The system must be initialized for any physics objects to be visualized. It is normally initialized by the PhysicsDebugWindow .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd112f0a0af1
unity_docs
ui
What is `GUISkin.horizontalSlider` in Unity? Explain its purpose and usage.
GUISkin.horizontalSlider public GUIStyle horizontalSlider ; Description Style used by default for the background part of GUI.HorizontalSlider controls. The padding property is used to determine the size of the area the thumb can be dragged within. ```csharp using UnityEngine;public class Example : MonoBeh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bdd638ed6375
unity_docs
scripting
What is `TerrainDetailTextureWizard` in Unity? Explain its purpose and usage.
TerrainDetailTextureWizard class in UnityEditor / Inherits from: TerrainWizard Description Provides methods for displaying the detail texture wizard. Derived class that manages the detail mesh wizards used for displaying and altering detail mesh data. Note: This method derives from TerrainWizard. Additiona...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_05f6a82c7ff5
unity_docs
input
Show me a Unity C# example demonstrating `Android.AndroidApplication.currentConfiguration`.
AndroidApplication.currentConfiguration public static Android.AndroidConfiguration currentConfiguration ; Description Provides current configuration for the running application. Additional resources: AndroidApplication.onConfigurationChanged . ```csharp using UnityEngine; using UnityEngine.Android;public cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c18ddf8d9de0
unity_docs
scripting
What is `UIElements.TransformOriginOffset` in Unity? Explain its purpose and usage.
TransformOriginOffset enumeration Description Specifies the alignment keywords for TransformOrigin . Properties Property Description Left The origin of the transform operation is set to the left of the element. Right The origin of the transform operation is set to the right of the element. Top T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5eeb43ed785c
unity_docs
rendering
Show me a Unity C# example demonstrating `WebCamTexture.Pause`.
WebCamTexture.Pause Declaration public void Pause (); Description Pauses the camera. Call Application.RequestUserAuthorization before creating a WebCamTexture. ```csharp // Starts a camera and assigns the texture to the current renderer. // Pauses the camera when the "Pause" button is clicked and released. u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e5bee63e5d0f
unity_docs
xr
Explain 'Unity XR Input' in Unity.
This section of the Unity User Manual provides information about all of the Unity-supported input devices for virtual reality , augmented reality , and Windows Mixed Reality applications. This page covers the following topics: XR input mappings Accessing input devices Accessing input features on an input device Accessi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9e6099d1fa4
unity_docs
editor
What are the parameters of `EditorGUI.Toggle` in Unity?
Returns bool The selected state of the toggle. Description Makes a toggle. Toggle control in an Editor Window. ```csharp // Use a toggle button to show/hide a button that can close the window. using UnityEngine; using UnityEditor;class EditorGUIToggle : EditorWindow { bool showClose = true; [MenuItem("Examples/...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b7e633b6c26e_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The decod logic before and after decoding. Signature: ```csharp public static class WebPDecoderWrapper ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_09449d575553
unity_docs
scripting
What is `PrefabUtility.prefabInstanceReverted` in Unity? Explain its purpose and usage.
PrefabUtility.prefabInstanceReverted Parameters Parameter Description value Instance root GameObject. Description Unity calls this method automatically after a Prefab instance has been reverted. Any revert operation, whether full or partial, will cause this event to be raised.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dc15fb2dd6b3
unity_docs
scripting
Explain 'PropertyField' in Unity.
A PropertyField is a field element specifically designed to be bound to a SerializedProperty . Once you bind a property to a PropertyField, a nested BaseField element is created based on the property type. For example, if you bind an int property to a PropertyField, an IntegerField is nested inside the PropertyField. N...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1a2e047f29e
unity_docs
scripting
What is `Rendering.BatchPackedCullingViewID.Equals` in Unity? Explain its purpose and usage.
BatchPackedCullingViewID.Equals Declaration public bool Equals ( Rendering.BatchPackedCullingViewID other ); Declaration public bool Equals (object obj ); Description Returns true if the ID in the argument equals this view ID.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8f8ed77e0973_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Base editor script template object.Base editor implementation Signature: ```csharp public abstract class BaseEditorScriptTemplate : BaseScriptTemplate ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_71d0905da5c9
unity_docs
networking
Explain 'Collecting performance data on an iOS device' in Unity.
Use the Profiler to collect performance data about your application. You can collect performance data while in Play mode in the Unity Editor. However, to get the most accurate data about your application, you can connect the Profiler directly to an iOS device that’s on your network. ## Enabling remote profiling To en...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d6c0e6e05b4
unity_docs
scripting
What is `BuildTarget.StandaloneOSX` in Unity? Explain its purpose and usage.
BuildTarget.StandaloneOSX Description Build a macOS standalone. Use PlayerSettings.SetArchitecture to specify which architecture to build (Intel, ARM or Universal). Additional resources: BuildPipeline.BuildPlayer .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75a4d39ecfa0
unity_docs
rendering
What is `TextureImporter.wrapModeW` in Unity? Explain its purpose and usage.
TextureImporter.wrapModeW public TextureWrapMode wrapModeW ; Description Texture W coordinate wrapping mode for Texture3D . Controls wrapping mode along texture W (depth, only relevant for Texture3D ) axis. Additional resources: Texture.wrapModeW , wrapMode , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea4a7165bc79
unity_docs
scripting
What is `SystemInfo.supportsLocationService` in Unity? Explain its purpose and usage.
SystemInfo.supportsLocationService public static bool supportsLocationService ; Description Is the device capable of reporting its location? This property does not provide a detailed information on what kind of sensor can be used, it can use all kinds of underlying technology with varying accuracy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_04e9650b6c65
unity_docs
scripting
What is `PlayerSettings.advancedLicense` in Unity? Explain its purpose and usage.
PlayerSettings.advancedLicense public static bool advancedLicense ; Description Is the advanced version being used? Unity is available as Personal or Professional. advancedLicense will return true when running on a Professional version.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_18bf2306f3f3
unity_docs
rendering
Explain 'Debug shaders with PIX' in Unity.
PIX is a performance tuning and debugging tool by Microsoft, for Windows developers. It offers a range of modes for analyzing an application’s performance, and includes the ability to capture frames of DirectX projects from an application for debugging. Use PIX to investigate issues in Windows 64-bit (x86_64) Standalon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1a910c7c83a2_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The Texture2D containing the Sprites to override with Signature: ```csharp public Texture2D m_spriteSet; ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5919570b7c54
unity_docs
rendering
Show me a Unity C# example demonstrating `TrailRenderer.widthMultiplier`.
TrailRenderer.widthMultiplier public float widthMultiplier ; Description Set an overall multiplier that is applied to the TrailRenderer.widthCurve to get the final width of the trail. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(TrailRenderer))] public class ExampleClass : M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8020f343ce32
unity_docs
rendering
Explain 'Create a shader file' in Unity.
A shader asset is an asset in your Unity project that defines a Shader object . It’s a text file with a.shader extension. It contains shader code . Select Assets > Create > Shader from the main menu. Create a shader. You can create the following types of shaders: Shader type Description Standard Surface Shader A shader...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9f39e2f0a299
github
scripting
Write a Unity C# MonoBehaviour script called Gizmo Draw
```csharp using UnityEngine; public class GizmoDraw : MonoBehaviour { [SerializeField] private bool drawGizmo = true; [Header("Gizmo Settings")] [SerializeField] private Color gizmoColor = Color.green; [SerializeField] private float gizmoSize = 0.5f; void OnDrawGizmos() { // Draw a si...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_93432da60e15
unity_docs
scripting
What is `Rendering.MeshUpdateFlags.Default` in Unity? Explain its purpose and usage.
MeshUpdateFlags.Default Description Indicates that Unity should perform the default checks and validation when you update a Mesh's data. You can use this flag with "advanced" Mesh API, which includes the following methods: Mesh.SetVertexBufferData , Mesh.SetIndexBufferData , Mesh.SetSubMesh . For information ab...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_67b0e0a5c77b
unity_docs
rendering
Explain 'Creating models for optimal performance' in Unity.
Here are a few tips for creating models for optimal performance. Some of these tips apply to all models, and some apply only to animated models: Minimize the polygon count Use as few Materials as possible Use a single skinned Mesh Renderer Use as few bones as possible Keep forward and inverse kinematics separate Using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_80de77b950de
unity_docs
ui
Explain 'Align a GameObject to the grid' in Unity.
You can align or push a GameObject to either the closest grid point on a single axis or on all axes at once. To align a GameObject to the closest point on a grid for a specific axis: In the Grid and Snap overlay, select the downward facing arrow next to Toggle grid snapping to open the Snapping menu. In the Align Selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c7bcf55903d
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.selectedItem` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.selectedItem public object selectedItem ; Description Returns the selected item from the data source. If multiple items are selected, returns the first selected item.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f769eb8de39c
unity_docs
performance
What is `Unity.Profiling.ProfilerMarker.AutoScope` in Unity? Explain its purpose and usage.
AutoScope struct in Unity.Profiling / Implemented in: UnityEngine.CoreModule Description Helper IDisposable struct for use with ProfilerMarker.Auto . Use ProfilerMarker.Auto to enclose a piece of code you want to profile in using statement. Constructor of AutoScope calls ProfilerMarker.Begin and Dispo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8d620c36e999
unity_docs
rendering
What are the parameters of `GUI.Button` in Unity?
Returns bool true when the users clicks the button. Description Make a single press button. The user clicks them and something happens immediately. ```csharp // Draws 2 buttons, one with an image, and other with a text // And print a message when they got clicked.using UnityEngine; using System.Collections;public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bbc0ad16ed2
unity_docs
rendering
Give me an overview of the `MeshDeformation` class in Unity.
MeshDeformation enumeration Description Specifies which method Unity uses to process mesh deformations for skinning. Additional resources: PlayerSettings.meshDeformation . Properties Property Description CPU Enables Unity using the CPU to process mesh deformations. GPU Enables Unity using compute shaders to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3504b395a4d
unity_docs
scripting
What is `BuildOptions.BuildScriptsOnly` in Unity? Explain its purpose and usage.
BuildOptions.BuildScriptsOnly Description Only build the scripts in a project. Before you can use BuildScriptsOnly , you need to build the whole Project. Then you can run builds that only have script changes. Rebuilding the player data will be skipped for faster iteration speed. Platforms which support the increme...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.