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_fbdf1f1ff6e4
unity_docs
rendering
Explain 'Create batches with the BatchRendererGroup API in URP' in Unity.
BatchRendererGroup (BRG) doesn’t automatically provide any instance data. Instance data includes many properties which are normally built in for GameObjects , such as transform matrices, light probe coefficients, and lightmap texture coordinates. This means features like ambient lighting only work if you provide instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_357a69a69585
unity_docs
rendering
What is `Camera.CameraCallback` in Unity? Explain its purpose and usage.
Camera.CameraCallback Declaration public delegate void CameraCallback ( Camera cam ); Description Delegate type for camera callbacks. Use this with Camera.onPreCull , Camera.onPreRender or Camera.onPostRender to get callbacks when any camera does rendering. Camera that invokes the callback will be passe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb12e8068ac2
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.managedReferenceValue`.
ializeReference attribute. For use when propertyType is SerializedPropertyType.ManagedReference . The value object must be a type that is compatible with the base type of the managed reference field (that is, the managed reference field that the serialized property is referencing). Additional resources: Ser...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e0206a5924f
unity_docs
physics
Explain 'Feature sets' in Unity.
Feature sets are groups of packages that enable you to achieve specific results in Unity. For example, the 2D feature set provides all the functionality you need to create 2D games for various art styles. All the packages in a feature set are compatible with each other for that version of the feature set. You can insta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc311c139e1d
unity_docs
scripting
Show me a Unity C# example demonstrating `ReflectionProbe.defaultReflectionTexture`.
ReflectionProbe.defaultReflectionTexture Description Adds a delegate to get notifications when the default specular Cubemap is changed. Additional resources: ReflectionProbe . ```csharp using UnityEngine; using UnityEngine.Rendering;public class ReflectionProbeManager : MonoBehaviour { private static void OnSet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbe9d6508cad
unity_docs
rendering
Give me an overview of the `DrawCameraMode` class in Unity.
DrawCameraMode enumeration Description Drawing modes for Handles.DrawCamera . Properties Property Description UserDefined A custom mode defined by the user. Normal Draw the camera like it would be drawn in-game. This uses the clear flags of the camera. Textured Draw the camera textured with selection wirefra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d02dc1f483bf
unity_docs
rendering
What is `Video.VideoPlayer.targetMaterialRenderer` in Unity? Explain its purpose and usage.
VideoPlayer.targetMaterialRenderer public Renderer targetMaterialRenderer ; Description Renderer which is targeted when VideoPlayer.renderMode is set to Video.VideoTarget.MaterialOverride Setting this to null causes the VideoPlayer to use the first Renderer of the current GameObject .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9ffbf0aa341
unity_docs
rendering
What is `ParticleSystem.MainModule.startRotationZ` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.startRotationZ public ParticleSystem.MinMaxCurve startRotationZ ; Description The initial rotation of particles around the z-axis when the Particle System first spawns them Note that you should specify the value in radians.. Additional resources: MinMaxCurve . ```csharp using Unit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_023573c59bac
unity_docs
editor
What is `StaticEditorFlags.NavigationStatic` in Unity? Explain its purpose and usage.
Method group is Obsolete StaticEditorFlags.NavigationStatic Obsolete Enum member StaticEditorFlags.NavigationStatic has been deprecated. The precise selection of the objects is now done using NavMeshBuilder.CollectSources() and NavMeshBuildMarkup. Description Include the GameObject when precomputing navigation d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_66f756ec019b
unity_docs
scripting
Show me a Unity code example for 'Use environment variables to identify your web proxy'.
configuration. The environment variables you use and the values you assign vary, based on your environment. Use the guidance in the following section or sections that best describe your situation. ## Proxy environment variable values that exclude authentication information If your environment variable definitions can...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_db8ae468108d
unity_docs
rendering
In Unity's 'Customize the global cache', what is 'Using the user configuration file' and how does it work?
You can manually edit the user configuration file to override the location of the global cache root, or the maximum size of the db subdirectory, or both. Follow these steps to edit the user configuration file: Locate the.upmconfig.toml user configuration file. To find the file location, refer to Configuration files . I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c62fd853990d
unity_docs
rendering
What is `LightTransport.IProbeIntegrator` in Unity? Explain its purpose and usage.
IProbeIntegrator interface in UnityEngine.LightTransport Description Interface for light probe integration operations, typically used for global illumination baking. The IProbeIntegrator interface provides methods for computing various lighting contributions at light probe positions, including direct radiance, in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6b3506e019bc
unity_docs
rendering
Explain 'Lightmap UVs' in Unity.
Approaches and resources for creating and troubleshooting UV coordinates for lightmaps . Page Description Introduction to lightmap UVs Compare the differences between lightmap UVs in baked lightmaps and real-time lightmaps, and learn about how Unity calculates lightmap UVs. Generate lightmap UVs Generate lightmap UVs a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2693e826d59
unity_docs
scripting
Give me an overview of the `Effector2D` class in Unity.
Effector2D class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.Physics2DModule Description A base class for all 2D effectors. Properties Property Description colliderMask The mask used to select specific layers allowed to interact with the effector. useColliderMask Should the col...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8ae7d6276f6
unity_docs
rendering
Show me a Unity C# example demonstrating `ShaderKeywordFilter.ApplyRulesIfTagsNotEqualAttribute`.
derKeywordFilter.TagConstraintAttribute Description Enable or disable shader keyword filter attributes based on shader tags. If you use this attribute, Unity enables filter attributes if the shader compilation context does not contain matching tags. The following example builds only variants including the Featu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_63fac5b05996
unity_docs
rendering
Show me a Unity C# example demonstrating `LightTransport.RadeonRaysContext.ctor`.
RadeonRaysContext Constructor Declaration public RadeonRaysContext (); Declaration public RadeonRaysContext (IntPtr ptr ); Description Constructor. Create a new RadeonRaysContext . ```csharp using UnityEngine.LightTransport;using var ctx = new RadeonRaysContext(); ``` How to create a RadeonRaysContext.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ced49027d9f2
unity_docs
scripting
What is `Mesh.Clear` in Unity? Explain its purpose and usage.
Mesh.Clear Declaration public void Clear (bool keepVertexLayout = true); Parameters Parameter Description keepVertexLayout True if the existing Mesh data layout should be preserved. Description Clears all vertex data and all triangle indices. You should call this function before rebuilding triangles a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69892c20e4ce
unity_docs
audio
What is `PlayerSettings.muteOtherAudioSources` in Unity? Explain its purpose and usage.
PlayerSettings.muteOtherAudioSources public static bool muteOtherAudioSources ; Description Stops or allows audio from other applications to play in the background while your Unity application is running. This setting is shared between iOS and Android platforms. Set this to true and your Unity application sto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5147069e67fc
unity_docs
math
Show me a Unity C# example demonstrating `Display.Activate`.
ay. For example, a secondary monitor connected to the system. Creates a window with screen width and screen height, and with the default refresh rate. Displays have the following indices in the Display.displays array: The primary display is 0 . Secondary displays are 1 to 7 . Make sure an external display is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb1dfc7ca126
unity_docs
physics
Explain 'Customize movement constraint with Configurable Joints' in Unity.
You can use the Configurable Joint to constrain both the linear and rotational movement on each joint axis independently. Use X, Y, Z Motion for linear movement, and X, Y, Z Rotation for rotational movement. By default, these axes correspond to the object’s local axes, defined by the Axis property. To constrain movemen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b76ab5157e1
unity_docs
rendering
What are the parameters of `ComputeBuffer.SetData` in Unity?
Description Set the buffer with values from an array. The input data must follow the data layout rules of the graphics API in use. See Compute Shaders for cross-platform compatibility information. Note: Because only blittable data types can be copied from the array to the buffer, the array must only contain elements of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89858fe571a6
unity_docs
math
What are the parameters of `AndroidJavaObject.CallStatic` in Unity?
Description Call a static Java method on a class. To call a static method with return type 'void', use the regular version. Declaration public ReturnType CallStatic (string methodName , params object[] args ); Declaration public ReturnType CallStatic (string methodName , T[] args ); Parameters Parameter Description met...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_31
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive eight or more arguments as part of its initialization process,with the twelfth one being an object of type . Type of the twelfth argument. Signature: ```csharp public interface IEighthArgument<TEighthArgument> ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5035790d462
unity_docs
scripting
What is `UIElements.Clickable.ProcessCancelEvent` in Unity? Explain its purpose and usage.
Clickable.ProcessCancelEvent Declaration protected void ProcessCancelEvent ( UIElements.EventBase evt , int pointerId ); Description This method processes the up cancel sent to the target Element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6686b6812dfe
unity_docs
editor
What is `SearchService.ObjectSelectorSearch` in Unity? Explain its purpose and usage.
ObjectSelectorSearch class in UnityEditor.SearchService Description Use this API to select objects. Engines for this type of search implement the IObjectSelectorEngine interface. When a custom ObjectSelector search engine is active, the object selector calls registered ObjectSelector search engines. When the de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf30e79abca7
unity_docs
editor
What is `Search.SearchMonitorView` in Unity? Explain its purpose and usage.
SearchMonitorView struct in UnityEditor.Search Description Scoped search monitor view. This struct provides a view on Search's main PropertyDatabases . Search offers some convenient PropertyDatabases to cache data. If this data comes from scenes or assets, those will be invalidated automatically whenever the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f56376794903
unity_docs
scripting
What is `CustomPreviewAttribute.ctor` in Unity? Explain its purpose and usage.
CustomPreviewAttribute Constructor Declaration public CustomPreviewAttribute (Type type ); Parameters Parameter Description type The type you want to create a custom preview for. Description Tells a DefaultPreview which class it's a preview for. When you make a custom preview, you need put this attribute ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76dbe7813420
unity_docs
scripting
What are the parameters of `GameObject.TryGetComponent` in Unity?
Returns bool Returns true if the component is found, false otherwise. Description Retrieves the component of the specified type, if it exists. TryGetComponent attempts to retrieve the component of the given type. The notable difference compared to GameObject.GetComponent is that this method does not allocate memory in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_81789185eed5
unity_docs
scripting
What is `PackageManager.StatusCode` in Unity? Explain its purpose and usage.
StatusCode enumeration Description Unity Package Manager operation status. Properties Property Description InProgress Package manager operation is in progress. Success Package manager operation completed successfully. Failure Package manager operation failed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6196ebc8a9a
unity_docs
rendering
What is `Rendering.RenderPipelineAsset.default2DMaterial` in Unity? Explain its purpose and usage.
RenderPipelineAsset.default2DMaterial public Material default2DMaterial ; Returns Material Default material. Description Return the default 2D Material for this pipeline. This is used whenever a Sprite is created in the Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_419d6ab395da
unity_docs
rendering
Show me a Unity code example for 'Audio Spatializer SDK'.
patializer Unity applies spatialization effects directly after the Audio Source decodes audio data. This produces a stream of audio data in which each source has its own separate effect instance. Unity only processes the audio from that source with its corresponding effect instance. To enable a plugin to operate as a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52eaa4e8887c
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchIndexer`.
SearchIndexer class in UnityEditor.Search Description Base class for a document Indexer which provides methods for retrieving a document given a specific pattern in roughly log(n). This allows you to search a large index more quickly. This class contains resources that must be disposed when it is no longer needed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8cdb8d9aef8
unity_docs
rendering
What is `AssetPostprocessor.OnPreprocessLightDescription` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPreprocessLightDescription(LightDescription,Light, AnimationClip[]) Parameters Parameter Description description A LightDescription that describes the imported camera properties and animations. light The light generated by the Model Importer. animations The animation clips generated by ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba53c320151e
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.B5G5R5A1_UNormPack16` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.B5G5R5A1_UNormPack16 Description A four-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit R component in bits 1..5, and a 1-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7a68d6ebcdc
unity_docs
editor
What is `EditorWindow.OnGUI` in Unity? Explain its purpose and usage.
EditorWindow.OnGUI() Description Implement your own editor GUI here. Use OnGUI to draw all the controls of your window. ```csharp // A simple script that saves frames from the Game view when in Play mode. // // You can put the frames together later to create a video. // The frames are saved in the project, at the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c895eba2817c
unity_docs
scripting
What is `ParticlePhysicsExtensions.GetCollisionEvents` in Unity? Explain its purpose and usage.
ParticlePhysicsExtensions.GetCollisionEvents Declaration public static int GetCollisionEvents ( ParticleSystem ps , GameObject go , List<ParticleCollisionEvent> collisionEvents ); Parameters Parameter Description go The GameObject for which to retrieve collision events. collisionEvents Array to write ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55eac94a5de4
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.CreateViewController` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.CreateViewController Declaration protected UIElements.CollectionViewController CreateViewController (); Returns CollectionViewController The view controller. Description Creates the view controller for this view. Override this method in inheritors to change the controller typ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5cfca87bea7
unity_docs
rendering
In Unity's 'Upgrade to Unity 2022 LTS', what is 'Articulation DriveforceLimitproperty now accepts force input instead of impulse' and how does it work?
The Articulation Drive forceLimit feature was used previously as an impulse limit instead of a force limit. This made the force limit dependent on the fixedDeltaTime value. If you have already adapted to the use of this value as an impulse, when you upgrade, your values for forceLimit in your Articulation Drive in the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9e22b7d1ea90
unity_docs
rendering
Explain 'Transparent Parallax Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . One consideration for this shader is that the Base texture’s alpha channel defines both the Transparent areas as well as the Specular Map. ## Transparent Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_19
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Get accessor for the transport network API Signature: ```csharp public TransportApi TransportApi ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e74187f1dc3
unity_docs
scripting
In Unity's 'Per-pixel and per-vertex lights in the Built-In Render Pipeline', what is 'How Unity classifies lights' and how does it work?
By default, Unity groups lights using the following criteria: The brightest light is always a per-pixel light. This is usually the main Directional Light. The 4 next most important lights are per-vertex lights. The remaining lights are SH lights. During rendering, Unity finds all lights surrounding a mesh and calculate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be197e58e0e8
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.BaseElement.ResolveConflict` in Unity? Explain its purpose and usage.
BaseElement.ResolveConflict Declaration public void ResolveConflict (); Description Resolve a conflict if element was already modified by another script. If element was not modified, the build will fail. This is to make sure that the method was used explicitly for resolving an existing conflict.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e86ebf2b0978_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The PoolService class manages and operates the object pools for both MonoBehaviour and non-MonoBehaviour based poolable objects.It provides methods to get, release, and destroy poolable objects. Signature: ```csharp public sealed class PoolService ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_cfdc5985d64a
unity_docs
math
Show me a Unity C# example demonstrating `Search.QueryEngine_1.SetSearchWordMatcher`.
the search word. The second parameter is a boolean for exact match or not. The third parameter is the StringComparison options. The fourth parameter is an element of the array returned by the search data callback. The function returns true for a match or false for no match. Description Set the search word matching fu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8b7a9c50aed
unity_docs
scripting
What is `DetailScatterMode` in Unity? Explain its purpose and usage.
DetailScatterMode enumeration Description Provides options to specify how details are scattered on the terrain. Properties Property Description CoverageMode The detail map holds values that represent how much area to cover at each sample, based on the detail's density. InstanceCountMode The detail map holds va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_092018292461
unity_docs
scripting
What is `Object.ToString` in Unity? Explain its purpose and usage.
Object.ToString Declaration public string ToString (); Returns string The name returned by ToString. Description Returns the name of the object. ```csharp //This script changes Text to the name of the GameObject with the script attached //Attach this script to a GameObject //Attach a Text GameObject in t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e92130de69d7
github
scripting
Write a Unity C# MonoBehaviour script called Coroutine Update
```csharp using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace THEBADDEST.Coroutines { public class CoroutineUpdate { Dictionary<float, UpdateData> updateCoroutines = new Dictionary<float, UpdateData>(); MonoBehaviour mono; public Coroutin...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_ac96ea2671e7
unity_docs
scripting
What are the parameters of `Search.SearchUtils.CreateGroupProvider` in Unity?
Returns SearchProvider A new search provider that can be used temporarily for a given search session. Description Copy of a search provider to create a new group copy. This can be useful to base a new search provider on an existing one simply by replacing a few handlers. Note that this search provider will not be globa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35f0c628195e
unity_docs
rendering
What is `Texture2DArray.GetPixelData` in Unity? Explain its purpose and usage.
Texture2DArray.GetPixelData Declaration public NativeArray<T> GetPixelData (int mipLevel , int element ); Parameters Parameter Description mipLevel The mipmap level to read from. The range is 0 through the texture's Texture.mipmapCount . The default value is 0 . element The array slice to read from. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2a6f570f89b
unity_docs
editor
What is `ShortcutManagement.ShortcutBindingChangedEventArgs` in Unity? Explain its purpose and usage.
ShortcutBindingChangedEventArgs struct in UnityEditor.ShortcutManagement Description Provides data for the IShortcutManager.shortcutBindingChanged event. Properties Property Description newBinding The new binding for the shortcut that had its binding changed. oldBinding The old binding for the shortcut that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08009684d525
unity_docs
scripting
What is `ShortcutManagement.ShortcutArguments.stage` in Unity? Explain its purpose and usage.
ShortcutArguments.stage public ShortcutManagement.ShortcutStage stage ; Description The stage at which a shortcut action was invoked. This is used to determine if the action of a clutch shortcut was invoked due to pressing the binding (ShortcutManagement.ShortcutState.Begin) or releasing the binding (Shortcut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1de52076f320
unity_docs
physics
In Unity's 'Cinemachine', what is 'Keywords' and how does it work?
camera , follow , rig , fps , cinematography , aim , orbit , cutscene , cinematic , collision , freelook , cinemachine , compose , composition , dolly , track , clearshot , noise , framing , handheld , lens , impulse
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5bf1179f4e1
unity_docs
rendering
What is `XR.XRDisplaySubsystem.EndRecordingIfLateLatched` in Unity? Explain its purpose and usage.
XRDisplaySubsystem.EndRecordingIfLateLatched Declaration public void EndRecordingIfLateLatched ( Camera camera ); Parameters Parameter Description camera The camera where late latch end recording is to be done. Description This function disables late latching recording of constant buffer locations.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85b7a4d57149
unity_docs
physics
What is `ForceMode2D.Impulse` in Unity? Explain its purpose and usage.
ForceMode2D.Impulse Description Add an instant force impulse to the rigidbody2D, using its mass. Apply the impulse force instantly. This mode depends on the mass of rigidbody so more force must be applied to move higher-mass objects the same amount as lower-mass objects. This mode is useful for applying forces that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9659ad6f36a
unity_docs
rendering
What is `LightTransport.RadeonRaysContext.DestroyBuffer` in Unity? Explain its purpose and usage.
RadeonRaysContext.DestroyBuffer Declaration public void DestroyBuffer ( LightTransport.BufferID id ); Parameters Parameter Description id ID of the buffer to destroy. Description Destroy the buffer with the given ID. ```csharp using UnityEngine.LightTransport;IDeviceContext ctx = new RadeonRaysContext();...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35a7f6b82ecf
unity_docs
scripting
Show me a Unity C# example demonstrating `AI.NavMeshAgent.SamplePathPosition`.
ample a position along the current path. This function looks ahead a specified distance along the current path. Details of the mesh at that position are then returned in a NavMeshHit object. This could be used, for example, to check the type of surface that lies ahead before the character gets there - a character ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_70f800c419d6
unity_docs
scripting
In Unity's 'Programming with gizmos and handles', what is 'Handles' and how does it work?
Handles are similar to gizmos, but provide more interactivity and manipulation. The default 3D controls that Unity provides to manipulate items in the Scene view are a combination of gizmos and handles. There are a number of built-in handle GUIs, such as the familiar tools to position, scale and rotate an object via th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_230ed688808e
unity_docs
scripting
What is `UIElements.Columns.ReorderDisplay` in Unity? Explain its purpose and usage.
Columns.ReorderDisplay Declaration public void ReorderDisplay (int from , int to ); Parameters Parameter Description from The display index of the column to move. to The display index where the column will be moved to. Description Reorders the display of a column at the specified source index, to the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_726a54010c9c
unity_docs
rendering
What is `SpeedTreeImporter.enableSettingOverride` in Unity? Explain its purpose and usage.
SpeedTreeImporter.enableSettingOverride public bool[] enableSettingOverride ; Description Gets and sets an array of booleans to customize importer settings for a specific LOD. The number of elements in this array must match the number of LODs in the model. The following are the per-LOD settings: enableSetting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f801d4af60f1
unity_docs
scripting
What is `Build.IUnityLinkerProcessor.GenerateAdditionalLinkXmlFile` in Unity? Explain its purpose and usage.
IUnityLinkerProcessor.GenerateAdditionalLinkXmlFile Declaration public string GenerateAdditionalLinkXmlFile ( Build.Reporting.BuildReport report , UnityLinker.UnityLinkerBuildPipelineData data ); Parameters Parameter Description report The current built report. data Information about the current run of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5351017dd514
unity_docs
ui
What is `UIElements.MinMaxSlider.ctor` in Unity? Explain its purpose and usage.
MinMaxSlider Constructor Declaration public MinMaxSlider (); Description Constructor. Declaration public MinMaxSlider (float minValue , float maxValue , float minLimit , float maxLimit ); Parameters Parameter Description minValue The minimum value in the range to be represented. maxValue The ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3eaf99387588
unity_docs
scripting
What is `Unity.Collections.NativeSlice_1.SliceConvert` in Unity? Explain its purpose and usage.
NativeSlice<T0>.SliceConvert Declaration public NativeSlice<U> SliceConvert (); Returns NativeSlice<U> A new NativeSlice<T0> that views the same memory, but is reinterpreted as the target type. Description Reinterprets a NativeSlice with a different data type (type punning).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cedbc737195
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.operator_ne`.
Object.operator != public static bool operator != ( Object x , Object y ); Description Compares if two objects refer to a different object. ```csharp using UnityEngine;public class Example : MonoBehaviour { Transform target; void Update() { // the target object does not refer to the same object as our...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b664c3bc9d07
unity_docs
xr
What is `StereoRenderingPath.Instancing` in Unity? Explain its purpose and usage.
StereoRenderingPath.Instancing Description Single pass VR rendering ( via instanced rendering ). This is an optimization over the StereoRenderingPath.SinglePass method. The Scene graph is traversed only once and there will be only one instanced draw call issued for each render node thus reducing the bandwidth req...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_36b8b9ff13ba_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Total bytes currently used by preloaded assets in RAM. Signature: ```csharp public long PreloadCachedBytes ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_c052e120d3fd
unity_docs
scripting
What is `Device.Application.genuine` in Unity? Explain its purpose and usage.
Application.genuine public static bool genuine ; Description This has the same functionality as Application.genuine . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7cd1020d246f
unity_docs
rendering
In Unity's 'Add GameObjects to reflections', what is 'Add GameObjects to realtime Reflection Probes' and how does it work?
You don’t need to mark objects as Reflection Probe Static to capture their reflections (as you would with a baked probe). However, you can selectively exclude objects from the reflection cubemap using the Culling Mask and Clipping Planes properties, which work the same way as for a Camera (the probe is essentially like...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_18a18e22d9ba_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Runtime rotation control for the GaussianSplat GameObject.Attach this to the same GameObject that has GaussianSplatRenderer.Desktop controls: Q / E → rotate around Y axis Mouse wheel → uniform scale up/downLegacy desktop controls are still available: Arrow Left / Right → rotate around Y axi...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_3ddfa8ff86eb
unity_docs
scripting
What is `QualitySettings.terrainDetailDensityScale` in Unity? Explain its purpose and usage.
QualitySettings.terrainDetailDensityScale public static float terrainDetailDensityScale ; Description Value set to Terrain.detailObjectDensity if TerrainQualityOverrides.DetailDensity is set in terrainQualityOverrides .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b177acb6751
unity_docs
physics
What is `SimulationMode2D.Update` in Unity? Explain its purpose and usage.
SimulationMode2D.Update Description Use this enumeration to specify to Unity that it should execute the physics simulation immediately after MonoBehaviour.Update . Executing the physics simulation during MonoBehaviour.Update provides a less stable and deterministic physics simulation due to the unpredictable flu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f540355df988
unity_docs
scripting
Give me an overview of the `WebGLMemoryGrowthMode` class in Unity.
WebGLMemoryGrowthMode enumeration Description An enum containing different memory growth modes. This enum is used within the WebGL platform to define how the WASM memory heap grows. Properties Property Description None The WASM memory heap has a fixed size. Linear The WASM memory heap is increased by constant...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c64371aa606b
unity_docs
scripting
What is `Build.Content.ProfileCaptureOptions` in Unity? Explain its purpose and usage.
ProfileCaptureOptions enumeration Description Options for filtering captured profile events using the ContentBuildInterface.BeginProfileCapture and ContentBuildInterface.EndProfileCapture APIs. Properties Property Description None Use to exclude none of the captured events. IgnoreShortEvents Use to exclude all...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ae6d4c5c524
unity_docs
input
Give me an overview of the `GUIUtility` class in Unity.
GUIUtility class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Utility class for making new GUI controls. Unless you are creating your own GUI controls from scratch, you should not use these functions. Static Properties Property Description hasModalWindow A global property, which is t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d39cb7ecb8ca
unity_docs
animation
Give me an overview of the `AvatarIKGoal` class in Unity.
AvatarIKGoal enumeration Description IK Goal. Used to set and get IK weights, position and rotation. Additional resources: Animator.SetIKPosition , Animator.SetIKPositionWeight , Animator.SetIKRotation and Animator.SetIKRotationWeight . Properties Property Description LeftFoot The left foot. RightFoot Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a55921c77d28
unity_docs
editor
Explain 'Unity debugging guide for Windows' in Unity.
Use Windows debugging tools to help resolve errors and bugs in your Unity application or the Unity Editor. This information covers the different types of debugging available in Unity and how to set up your Windows debugging tools for use with Unity. Topic Description Introduction to debugging Unity in Windows Learn the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a30b674e704b
unity_docs
editor
What is `Unity.Profiling.Editor.ProfilerCounterDescriptor.CategoryName` in Unity? Explain its purpose and usage.
ProfilerCounterDescriptor.CategoryName public string CategoryName ; Description The category name of the described Profiler counter. The name of the category that the described Profiler belongs to, as a string. Read-only. Additional resources: ProfilerCounterDescriptor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d068bc48a1e
unity_docs
input
In Unity's 'Create a custom control', what is 'Create and use a custom control' and how does it work?
To create a custom control, do the following: Add the UxmlElement attribute to the custom control class definition. Declare the custom control class as a partial class. Inherit it from VisualElement or one of its derived classes. For example: ```csharp using UnityEngine; using UnityEngine.UIElements; [UxmlElement] pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bf7447000bfb
github
scripting
Write a Unity C# script called Tetrimino Block
```csharp using pooling; using UnityEngine; //Single block from pieces in view public class TetriminoBlock : PoolingObject { public override string objectName { get { return "TetriminoBlock"; } } public Vector2Int position { get; private set; } private SpriteRenderer mSpriteRenderer; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b29172294fef
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetCacheServerEnableUpload`.
AssetDatabase.GetCacheServerEnableUpload Declaration public static bool GetCacheServerEnableUpload (); Returns bool Returns true when Upload to the Cache Server is enabled. Returns false otherwise. Description Gets the Cache Server Upload option from Editor Settings. ```csharp using UnityEngine; using Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_546cd27bc3b8
unity_docs
rendering
Show me a Unity code example for 'Checkerboard pattern shader example in the Built-In Render Pipeline'.
Here’s a shader that outputs a checkerboard pattern based on texture coordinates of a mesh : ``` Shader "Unlit/Checkerboard" { Properties { _Density ("Density", Range(2,50)) = 30 } SubShader { Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct v2f { float2 uv : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f70155d15b4a
unity_docs
rendering
What is `Experimental.GlobalIllumination.RenderSettings` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RenderSettings class in UnityEngine.Experimental.GlobalIllumination / Implemented in: UnityEngine.CoreModule Description Experimental render settings features. Additional resources: RenderSettings . Static Properties Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ba9bb44e1b5
unity_docs
scripting
Show me a Unity C# example demonstrating `RuntimePlatform.Android`.
RuntimePlatform.Android Description In the player on Android devices. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { if (Application.platform == RuntimePlatform.Android) { Debug.Log("Do something spec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a14818a690d3
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.BuildConfigNames`.
rns the names of the build configurations available in the project. The number and names of the build configurations is a project-wide setting. Each target has the same number of build configurations and the names of these build configurations is the same. In other words, BuildConfigByName will succeed for all targe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57f5dc30a287
unity_docs
scripting
What is `PlayerPrefsException` in Unity? Explain its purpose and usage.
PlayerPrefsException class in UnityEngine / Implemented in: UnityEngine.CoreModule Description An exception thrown by the PlayerPrefs class in a web player build. The exception is thrown when writing to a preference file exceeds the allotted storage space. This exception is not thrown on other platforms. ```...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9bcc3a1c7b2
unity_docs
editor
What is `VersionControl.Provider.GetAssetByGUID` in Unity? Explain its purpose and usage.
Provider.GetAssetByGUID Declaration public static VersionControl.Asset GetAssetByGUID (string guid ); Parameters Parameter Description guid GUID of asset. Description Returns version control information about an asset from a given GUID. Returns null if the GUID is not known by the Unity Editor. ```csha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1f7cd42d9f45
unity_docs
rendering
In Unity's 'Reuse HLSL code', what is 'Duplicate HLSL in multiple places' and how does it work?
To duplicate HLSL code in all the sections of your code, for example to add the same variables in multiple Pass blocks, wrap the code you want to reuse in HLSLINCLUDE and ENDHLSL macros. Unity adds the code at the top of every HLSLPROGRAM block. For example: ``` Shader "Examples/ExampleShader" { HLSLINCLUDE // Add HL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6751bcaa47e
unity_docs
scripting
Show me a Unity C# example demonstrating `AudioType.AIFF`.
oType.AIFF Description The audio file you want to stream has the Audio Interchange File Format (AIFF) audio file format. Unity doesn’t support this format. Use this enumeration value to specify the format type of the audio file has the AIFF audio file format. If the audio file has a different format, Unity might fa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0dc5ed42ab0
unity_docs
scripting
What is `AndroidJNI.ThrowNew` in Unity? Explain its purpose and usage.
AndroidJNI.ThrowNew Declaration public static int ThrowNew (IntPtr clazz , string message ); Description Constructs an exception object from the specified class with the message specified by message and causes that exception to be thrown. 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_cf373b742f61
unity_docs
editor
What is `AssetDatabase.GlobalArtifactProcessedVersion` in Unity? Explain its purpose and usage.
AssetDatabase.GlobalArtifactProcessedVersion public static uint GlobalArtifactProcessedVersion ; Description Changes whenever a new artifact is added to the artifact database. If this version doesn't change then there's no new artifact available.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8787f45008dd
unity_docs
xr
In Unity's 'Audio spatializers in XR', what is 'Enable an audio spatializer plug-in' and how does it work?
After you have added the package containing an audio spatializer plug-in to your project, you can enable the plug-in in the project audio settings. To enable a plug-in: Open the Project Settings window (menu: Edit > Project Settings ). Select the Audio category. Choose the plug-in from the Spatializer Plugin dropdown m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c87d196a7c0d
unity_docs
rendering
What is `TextureMipmapLimitBiasMode` in Unity? Explain its purpose and usage.
TextureMipmapLimitBiasMode enumeration Description An enumeration that represents the bias mode to use for TextureMipmapLimitSettings.limitBias . For additional information, see TextureMipmapLimitSettings.limitBias . Additional resources: TextureMipmapLimitSettings , TextureMipmapLimitSettings.limitBiasMode . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9f4a1780b4fd
unity_docs
rendering
In Unity's 'Web graphics', what is 'Camera clear' and how does it work?
By default, Unity Web clears the drawing buffer after each frame, which means the content of the frame buffer clears regardless of the Camera.clearFlags setting. However, you can change this behavior at instantiation time. To do this, set webglContextAttributes.preserveDrawingBuffer to true in the index.html file of yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c328ff6f5a5
unity_docs
performance
What is `Unity.Jobs.LowLevel.Unsafe.JobRanges` in Unity? Explain its purpose and usage.
JobRanges struct in Unity.Jobs.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Provides information about a range that a job is allowed to work on. Properties Property Description TotalIterationCount The total iteration count.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d4429a5e5e07
unity_docs
rendering
In Unity's '2D game development', what is 'Additional resources and examples' and how does it work?
📖 E-Book : 2D game art, animation, and lighting for artists ⚙️ Sample project : Dragon Crashers - URP 2D Sample Project ⚙️ Sample project : Happy Harvest - 2D Sample Project ⚙️ Sample project : Gem Hunter Match - 2D Sample Project 📝 How-to guide : How to use 2D lights in Unity to set the mood 📝 How-to guide : Optimi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff23a7ef3888
unity_docs
scripting
What is `Build.Reporting.BuildReport.strippingInfo` in Unity? Explain its purpose and usage.
BuildReport.strippingInfo public Build.Reporting.StrippingInfo strippingInfo ; Description The StrippingInfo object for the build. The StrippingInfo object contains information about which native code modules in the engine are still present in the build, and the reasons why they are still present. This is o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b366a0a9cbd3
unity_docs
physics
What is `BuoyancyEffector2D` in Unity? Explain its purpose and usage.
BuoyancyEffector2D class in UnityEngine / Inherits from: Effector2D / Implemented in: UnityEngine.Physics2DModule Description Applies forces to simulate buoyancy, fluid-flow and fluid drag. When any Collider2D overlap the area defined by the effector, calculations are made to determine if they are below the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e72727509cf
unity_docs
performance
What is `Progress.Item.SetStepLabel` in Unity? Explain its purpose and usage.
Progress.Item.SetStepLabel Declaration public void SetStepLabel (string label ); Parameters Parameter Description label The steps label. Description Sets the label that displays the progress indicator's steps. This label displays a progress indicator's reported steps. For example, a progress indicator tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5db22ec91fb5
unity_docs
ui
Show me a Unity C# example demonstrating `GUI.skin`.
GUI.skin public static GUISkin skin ; Description The global skin to use. You can set this at any point to change the look of your GUI. If you set it to null, the skin will revert to the default Unity skin. ```csharp // Press space to change between added GUI skins.using UnityEngine; using System.Collections...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_36b8b9ff13ba_doc_11
github
scripting
What does `BeginMovieLoad` do in this Unity script? Explain its purpose and signature.
Progressively load all files into movie frames on a background thread.Call PumpMovieLoad() each frame to finalize completed frames.The onProgress callback receives (loadedCount, totalCount).Returns false if loading cannot start. Signature: ```csharp public bool BeginMovieLoad(IReadOnlyList<string> files, Action<int, i...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_327690ac2e81
unity_docs
audio
Show me a Unity C# example demonstrating `AudioClip.LoadAudioData`.
rns true . It doesn't reload clips that have AudioClip.preloadAudioData set to true . It loads the AudioClip synchronously, unless AudioClip.loadInBackground is set to true . If you play a clip that is loading in the background, the audio source will delay playback until the clip is ready to play. You can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.