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_e9282605c6fc
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh.Optimize`.
ry and vertices is not significant as both will change. You should only use this function on meshes you generate procedurally in code, for regular mesh assets it is called automatically by the import pipeline when 'Optimize Mesh' is enabled in the mesh importer settings. This function is effectively the same as calling...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab5dfc654917
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8G8B8_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8G8B8_UNorm Description A three-component, 24-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08cc7ea750c3
unity_docs
editor
What is `Build.Content.AssetBundleInfo` in Unity? Explain its purpose and usage.
AssetBundleInfo class in UnityEditor.Build.Content Description Container for holding asset loading information for an AssetBundle to be built. Note: this class and its members exist to provide low-level support for the Scriptable Build Pipeline package. This is intended for internal use only; use the Scriptabl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7578a97ed26
unity_docs
rendering
What is `EditorGUI` in Unity? Explain its purpose and usage.
EditorGUI class in UnityEditor Description These work pretty much like the normal GUI functions - and also have matching implementations in EditorGUILayout . Static Properties Property Description actionKey Is the platform-dependent "action" modifier key held down? (Read Only) indentLevel The indent level of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00b56498d229
unity_docs
rendering
What is `Rendering.SupportedRenderingFeatures.defaultReflectionProbeBaking` in Unity? Explain its purpose and usage.
SupportedRenderingFeatures.defaultReflectionProbeBaking public bool defaultReflectionProbeBaking ; Description Specifies whether this renderer bakes a default Reflection Probe. This property enables default reflection probe generation for projects using compatible render pipelines. Additional resources: Reflec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_49345ff4ae2b
unity_docs
animation
Show me a Unity code example for 'Animation tab'.
ey reduction on position and scale curves Set the error tolerance percentage to determine whether or not Unity can remove a key on a position or scale curve as a strategy for animation compression . When you set the Anim. Compression property to Keyframe Reduction or Optimal , Unity compares the original curve to what...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c2dae97ec7a2
unity_docs
xr
In Unity's 'Foveated rendering', what is 'Enable foveated rendering' and how does it work?
To enable foveated rendering for a Unity project, go to the XR Plug-in Management section of your Project Settings (menu: Edit > Project Settings ). An option to enable the feature appears in the settings section for each plug-in that supports foveated rendering. Refer to the documentation of the XR provider plug-in fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c5d533e3c9e7
unity_docs
scripting
In Unity's 'Leaderboards Building Block', what is 'Deploy the Leaderboards configuration file' and how does it work?
The test scene uses a configuration file to add data to a leaderboard. The Leaderboards test scene includes the simple_leaderboards.lb configuration file. To display a populated leaderboard in the test scene, deploy this file: Go to Services > Deployment . In the Deployment window, select the simple_leaderboard.lb chec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25f9babe508a
unity_docs
scripting
Show me a Unity C# example demonstrating `MeshFilter.sharedMesh`.
MeshFilter.sharedMesh public Mesh sharedMesh ; Description Returns the shared mesh of the mesh filter. It is recommended to use this function only for reading mesh data and not for writing, since you might modify imported assets and all objects that use this mesh will be affected. Also, be aware that is no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7114d7c9ba95
unity_docs
scripting
What is `Random.InitState` in Unity? Explain its purpose and usage.
Random.InitState Declaration public static void InitState (int seed ); Parameters Parameter Description seed Seed used to initialize the random number generator. Description Initializes the random number generator state with a seed. The random number generator is not truly random, but produces numbers in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcf5f3a58245
unity_docs
scripting
What is `Physics.ContactEventDelegate` in Unity? Explain its purpose and usage.
Physics.ContactEventDelegate Declaration public delegate void ContactEventDelegate ( PhysicsScene scene , ReadOnly<ContactPairHeader> headerArray ); Parameters Parameter Description scene The physics scene that the contacts belong to. headerArray A contact buffer where all the contact data of the previou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_326f6788d11f
unity_docs
rendering
Show me a Unity code example for 'Add built-in keyword sets'.
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 `
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e75c4ea070f6
unity_docs
rendering
Give me an overview of the `ParticleSystemRenderMode` class in Unity.
ParticleSystemRenderMode enumeration Description The rendering mode for particle systems. This is used by the ParticleSystemRenderer to determine how to render the particles. Properties Property Description Billboard Render particles as billboards facing the active camera. (Default) Stretch Stretch particle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d81f80071fe
unity_docs
physics
What is `Joint2D.connectedBody` in Unity? Explain its purpose and usage.
Joint2D.connectedBody public Rigidbody2D connectedBody ; Description The Rigidbody2D object to which the other end of the joint is attached (ie, the object without the joint component). If this property is set to null then the joint attaches to a fixed point in space rather than another Rigidbody2D. Unity doe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51101638c917
unity_docs
audio
What is `AudioSource.ignoreListenerPause` in Unity? Explain its purpose and usage.
AudioSource.ignoreListenerPause public bool ignoreListenerPause ; Description Allows AudioSource to play even though AudioListener.pause is set to true. This is useful for the menu element sounds or background music in pause menus. This property can only be set via the script and is not serialized.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ae04db195b11_doc_0
github
scripting
What does `CanShake` do in this Unity script? Explain its purpose and signature.
Returns true if current settings actually call for a camera shake. Signature: ```csharp private bool CanShake() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_e48ba3febdb5
unity_docs
ui
Explain 'Navigation events' in Unity.
Navigation events occur at runtime when the user presses the D-pad, moves a joystick, or presses the Escape , Enter or arrow keys. They’re an indicator that the user is trying to navigate the UI, but they’re not limited to a specific input device, such as a keyboard. The difference from a Focus event is that the naviga...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_430708b9cb14
unity_docs
rendering
What is `RenderTextureDescriptor.mipCount` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.mipCount public int mipCount ; Description User-defined mipmap count. Use this property to override the number of mipmaps that will be generated for this render texture. Only supported on devices that return true for SystemInfo.hasMipMaxLevel . Additional resources: RenderTextureDescri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a24302c10dff
unity_docs
scripting
What is `Overlays.OverlayAttribute.priority` in Unity? Explain its purpose and usage.
OverlayAttribute.priority public int priority ; Description Sets the order that overlays are displayed in the overlay menu. The default value is 100. Lower values are displayed before higher values.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a941cf55ab6
unity_docs
scripting
What is `Windows.CrashReporting` in Unity? Explain its purpose and usage.
CrashReporting class in UnityEngine.Windows / Implemented in: UnityEngine.CoreModule Description Provides information specific to crash reporting on Windows platform. Static Properties Property Description crashReportFolder Contains the path to the crash report folder on Windows.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2ee9e9529f1
unity_docs
editor
What are the parameters of `UIElements.DropdownMenu.RemoveItemAt` in Unity?
Description Removes the menu item at index. ```csharp using UnityEditor; using UnityEngine; using UnityEngine.UIElements;public class ContextMenuWindow : EditorWindow { [MenuItem("My/Context Menu Window")] static void ShowMe() => GetWindow<ContextMenuWindow>(); void CreateGUI() { var contextMenuC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_3
github
scripting
What does `StreamResourcesForCamera` do in this Unity script? Explain its purpose and signature.
Calculates the ECEF origin point from the camera, builds up a frustum and updates these values in the native plugin which then uses this data to make streaming requests. This should be called once per frame in the Update() method.A Unity camera that can provide the frustum for streaming. Signature: ```csharp public vo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e7d32b51a6d
unity_docs
rendering
What is `Material.GetPropertyNames` in Unity? Explain its purpose and usage.
Material.GetPropertyNames Declaration public string[] GetPropertyNames ( MaterialPropertyType type ); Parameters Parameter Description type The type to use to query the material for named properties. Description Retrieves a list of the named properties in the material that match the input property type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_43fcf02dfb90
unity_docs
scripting
In Unity's 'HelpBox', what is 'Create a HelpBox' and how does it work?
You can create a HelpBox with UXML and C#. The following C# example creates a HelpBox with the message “Help text” and the information icon: ``` HelpBox helpBox = new HelpBox("Help text", HelpBoxMessageType.Info); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb4d08776e01
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.AnimationLayerMixerPlayable.SetLayerMaskFromAvatarMask`.
arMask mask ); Parameters Parameter Description layerIndex The layer index. mask The AvatarMask used to create the new LayerMask. Description Sets the mask for the current layer. This function generates a layer mask from the specified AvatarMask, and applies it to the specified Layer index. If you change ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_982c85173185_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The point of contact if it exists in Screen space. Signature: ```csharp public Vector2 touchPosition ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_75fc4f56b2f8
unity_docs
scripting
Show me a Unity code example for 'Recommended Player settings to optimize your Web build'.
your project. The recommended setting is.Net Standard 2.1 because this setting produces smaller builds and has cross-platform support. However, you need to check if your platform fully supports .Net Standard 2.1. For other options, refer to Web player settings . ## Change the API Compatibility Level To change the API...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a55941b566b8
github
scripting
Write a Unity C# ScriptableObject for Scriptable Object Extensions
```csharp using System.Diagnostics; using System.Linq; using UnityEngine; namespace yaSingleton.Helpers { public static class ScriptableObjectExtensions { [Conditional("UNITY_EDITOR")] public static void AddToPreloadedAssets(this ScriptableObject scriptableObject) { #if UNITY_EDITOR var...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_ad64fc88e9ac
unity_docs
scripting
What is `ParticleSystem.shape` in Unity? Explain its purpose and usage.
ParticleSystem.shape public ParticleSystem.ShapeModule shape ; Description Script interface for the ShapeModule of a Particle System. Configures the initial positions and directions of particles. Particle System modules do not need to be reassigned back to the system; they are interfaces and not independent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_185eeacfe808
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Action.AttributesContainer` in Unity? Explain its purpose and usage.
AttributesContainer class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseAttributesContainer Description The attributes container for the <action> element. Properties Property Description Name The C# definition of the android:name Android Manifest attribute. Inherite...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9d2857288a14
github
scripting
Write a Unity C# XR/VR script for Web Cam Texture Manager
```csharp // Copyright (c) Meta Platforms, Inc. and affiliates. using System.Collections; using System.Linq; using Meta.XR.Samples; using UnityEngine; using UnityEngine.Assertions; using PCD = PassthroughCameraSamples.PassthroughCameraDebugger; namespace PassthroughCameraSamples { [MetaCodeSample("PassthroughCame...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_2b7bc6bed554
unity_docs
rendering
Explain 'Background Tasks window reference' in Unity.
The Background Tasks window displays the progress of any running asynchronous tasks. For example, you can see the progress for shader compilation , lightmap baking, and occlusion culling . To open the Background Tasks window, do one of the following: From the menu, select Window > General > Progress . From the Unity Ed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e7c763caacf
unity_docs
scripting
What is `Progress.GetProgress` in Unity? Explain its purpose and usage.
Progress.GetProgress Declaration public static float GetProgress (int id ); Parameters Parameter Description id The progress indicator's unique ID. Returns float The current progress. Description Gets a progress indicator's progress.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b9738b45d845
github
scripting
Write a Unity Editor script for Gaussian Scale Tool
```csharp // SPDX-License-Identifier: MIT using GaussianSplatting.Runtime; using UnityEditor; using UnityEditor.EditorTools; using UnityEngine; namespace GaussianSplatting.Editor { /* // not working correctly yet when the GS itself has scale [EditorTool("Gaussian Scale Tool", typeof(GaussianSplatRenderer), t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8aff379a35b9
unity_docs
networking
What is `Android.AndroidScreenLayoutLong` in Unity? Explain its purpose and usage.
AndroidScreenLayoutLong enumeration Description Options to indicate whether the aspect ratio of the screen is taller or wider than normal. Additional resources: AndroidConfiguration.screenLayoutLong Properties Property Description Undefined Mirrors the Android property value SCREENLAYOUT_LONG_UNDEFINED. No M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_53ef0a28ecba
unity_docs
rendering
In Unity's 'Web template variables', what is 'JavaScript macros' and how does it work?
JavaScript macros are blocks of JavaScript code in template files, surrounded by three sets of curly brackets. This JavaScript code can use the internal preprocessor variables listed above. These variables are assigned at build time according to the values the Editor supplies. During the build, the preprocessor evaluat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6813b26e27e2
unity_docs
rendering
Show me a Unity code example for 'Shadow casting shader example in the Built-In Render Pipeline'.
es not do anything. The shadowmap is only the depth buffer , so even the color output by the fragment shader does not really matter. This means that for a lot of shaders, the shadow caster pass is going to be almost exactly the same (unless object has custom vertex shader based deformations, or has alpha cutout / semit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_76a8ae6cff40
unity_docs
physics
Explain 'Triggers module reference' in Unity.
The Built-in Particle System’s Triggers module allows you to access and modify particles based on their interaction with one or more Colliders in the Scene . ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Parti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d05382a2d058
unity_docs
rendering
Explain 'Vertex modifier Surface Shader example in the Built-In Render Pipeline' in Unity.
It is possible to use a “vertex modifier” function that will modify the incoming vertex data in the vertex Shader . This can be used for things like procedural animation and extrusion along normals. Surface Shader compilation directive vertex:functionName is used for that, with a function that takes inout appdata_full ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ad2b34b1954
unity_docs
rendering
What is `Gradient.mode` in Unity? Explain its purpose and usage.
Gradient.mode public GradientMode mode ; Description Controls how the gradient colors are interpolated. The default interpolation mode is GradientMode.Blend . Note that GradientMode.PerceptualBlend can often result in a more natural looking color blend, especially between very different colors. It is sligh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cabab1366bad
unity_docs
scripting
Give me an overview of the `DestroyGameObjectHierarchyEventArgs` class in Unity.
DestroyGameObjectHierarchyEventArgs struct in UnityEditor Description A change of this type indicates that a GameObject and the entire hierarchy below it has been destroyed. This happens for example when Undo.DestroyObjectImmediate is used with an GameObject . Properties Property Description instanceId Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7525ea22874
unity_docs
rendering
What is `ParticleSystemJobs.IJobParticleSystemParallelForBatchExtensions` in Unity? Explain its purpose and usage.
IJobParticleSystemParallelForBatchExtensions class in UnityEngine.ParticleSystemJobs / Implemented in: UnityEngine.ParticleSystemModule Description Extension methods for Jobs using the IJobParticleSystemParallelForBatch interface. Static Methods Method Description EarlyJobInit Gathers and caches reflection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d9bed0a2b52
unity_docs
physics
What is `RigidbodyInterpolation2D` in Unity? Explain its purpose and usage.
RigidbodyInterpolation2D enumeration Description Interpolation mode for Rigidbody2D objects. Properties Property Description None Do not apply any smoothing to the object's movement. Interpolate Smooth movement based on the object's positions in previous frames. Extrapolate Smooth an object's movement based o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2794c736356
unity_docs
editor
Show me a Unity C# example demonstrating `AssetImporters.AssetImportContext.DependsOnCustomDependency`.
ss all your Assets, it can be useful to use a naming convention (eg a path-based naming system as in the example below) to avoid clashes with other custom dependency names. Description Allows you to specify that an Asset has a custom dependency. Use custom dependency if need to setup a dependency to something that c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ef6ada87ce0
unity_docs
scripting
What is `Compilation.AssemblyBuilderStatus` in Unity? Explain its purpose and usage.
AssemblyBuilderStatus enumeration Description Status of the AssemblyBuilder build. Properties Property Description NotStarted Indicates the AssemblyBuilder build has not been started. IsCompiling Indicates the AssemblyBuilder build is compiling. Finished Indicates the AssemblyBuilder build has finished.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62ff88546e2e
unity_docs
editor
What is `AndroidAssetPackImporter.GetAllImporters` in Unity? Explain its purpose and usage.
AndroidAssetPackImporter.GetAllImporters Declaration public static AndroidAssetPackImporter[] GetAllImporters (); Returns AndroidAssetPackImporter[] Returns an array with all Android asset pack importers. Description Gets all Android asset pack importers. ```csharp using UnityEditor; using UnityEngine;pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e956c2b0f959
unity_docs
ui
Show me a Unity code example for 'Bind with binding path in C# script'.
property of a GameObject and make an explicit call to the Bind() method. Create a project in Unity with any template. In your Project window , create a folder named bind-with-binding-path folder to store your file. In the bind-with-binding-path folder, create a folder named Editor . In the Editor folder, create a C# sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2d339da0de8d
github
scripting
Write a Unity C# script called Render Texture Resizer
```csharp using CoreLibrary; using UIToolkitXRAdapter.AngularResizing; using UnityEngine; using UnityEngine.UI; using UnityEngine.UIElements; namespace UIToolkitXRAdapter.XRAdapter { [RequireComponent(typeof(RectTransform), typeof(UIDocument), typeof(RawImage))] public class RenderTextureResizer : Base...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_7f64dcf20b38
unity_docs
editor
What is `VersionControl.VersionControlDescriptor` in Unity? Explain its purpose and usage.
VersionControlDescriptor class in UnityEditor.VersionControl Description Contains unique version control system name. Additional resources: VersionControlObject , VersionControlManager . Properties Property Description displayName Version control system display name. name Version control system name.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61a234ac0e93
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.consumeSampleFramesNativeFunction` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.consumeSampleFramesNativeFunction public static Experimental.Audio.AudioSampleProvider.ConsumeSampleFramesNativeFunction consumeSampleFramesNativeFunction ; Description Pointer to the native function tha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1061c3fdb9b0
unity_docs
physics
Show me a Unity C# example demonstrating `ArticulationBody.GetAccumulatedTorque`.
GetAccumulatedTorque (float step = Time.fixedDeltaTime); Parameters Parameter Description step The timestep of the next physics simulation. Returns Vector3 Accumulated torque expressed in ForceMode.Force . Description Returns the torque that the ArticulationBody has accumulated before the simulation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ff2cfeb8392
unity_docs
performance
What is `Unity.Collections.LowLevel.Unsafe.NativeDisableContainerSafetyRestrictionAttribute` in Unity? Explain its purpose and usage.
NativeDisableContainerSafetyRestrictionAttribute class in Unity.Collections.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Explicitly disable the safety system for a NativeContainer. By default, the safety system tracks native containers to avoid race conditions. The safety system catches ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_23e44a4d8cc6
unity_docs
rendering
Show me a Unity code example for 'Best practice for DOTS Instancing shaders in URP'.
d z of the first column, the next three floats are the x, y, and z of the second column, and so on. The matrices don’t store the w element of each column. The transform matrices this affects are: unity_ObjectToWorld unity_WorldToObject unity_MatrixPreviousM unity_MatrixPreviousMI The following code sample includes a st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7fc167d5d34d_doc_21
github
scripting
What does `DestroyInstance` do in this Unity script? Explain its purpose and signature.
Destroy a created instances. Signature: ```csharp public static void DestroyInstance(in GlobalBehaviour behaviour) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_222339c29e68
unity_docs
math
What is `UIElements.Background.FromVectorImage` in Unity? Explain its purpose and usage.
Background.FromVectorImage Declaration public static UIElements.Background FromVectorImage ( UIElements.VectorImage vi ); Parameters Parameter Description vi The vector image to use as a background. Returns Background A new background object. Description Creates a background from a VectorImage .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a21cb3fad76f
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchContextAttribute.instantiableProviders`.
SearchContextAttribute.instantiableProviders public Type[] instantiableProviders ; Description Search provider concrete types that will be instantiated and assigned to the Object Picker search context. ```csharp [SearchContext("my search", new[] { typeof(MyTextureProvider) })] public Texture2D mySpecialTexture2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9139fd3ba9f2
unity_docs
rendering
What is `ParticleSystemStopBehavior` in Unity? Explain its purpose and usage.
ParticleSystemStopBehavior enumeration Description The behavior to apply when calling Stop . Properties Property Description StopEmittingAndClear Stops Particle System emitting and removes all existing emitted particles. StopEmitting Stops Particle System emitting any further particles. All existing particles...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_927bcce9d19e
unity_docs
input
What is `UnityEngine.AIModule` in Unity? Explain its purpose and usage.
UnityEngine.AIModule Description The AI module implements the path finding features in Unity. Classes Class Description NavMesh Singleton class to access the baked NavMesh. NavMeshAgent Navigation mesh agent. NavMeshBuilder Navigation mesh builder interface. NavMeshData Contains and represents NavMesh data. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7e7b536613c
unity_docs
scripting
What is `FilePathAttribute.ctor` in Unity? Explain its purpose and usage.
FilePathAttribute Constructor Declaration public FilePathAttribute (string relativePath , FilePathAttribute.Location location ); Parameters Parameter Description relativePath Relative path to the specified 'location'. location Location option that specifies which root folder to combine the 'relativePath...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e19aa3644d8
unity_docs
editor
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorder.ctor`.
ample storage. In this case, use 0 as a capacity parameter when creating ProfilerRecorder. Using a negative number as a capacity parameter throws ArgumentException . For a list of built-in Profiler markers and counters available, refer to Profiler markers reference and Profiler counters reference . Note: Profi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a618abf61fb0
unity_docs
rendering
Give me an overview of the `MixedLightingMode` class in Unity.
MixedLightingMode enumeration Description Enum describing what lighting mode to be used with Mixed lights. Summary of the baked data associated with each mode: IndirectOnly Lightmaps direct: no occlusion: no Light probes direct: no occlusion: no Shadowmask Lightmaps direct: no occlusion: yes Ligh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7d19d3d2b496
unity_docs
scripting
In Unity's 'Introduction to the Resources system', what is 'Impact of large asset sets on the Resources system' and how does it work?
It’s best practice to avoid putting a lot of content into the Resources system for the following reasons: It makes memory management more difficult. Placing a lot of content in the Resources folder slows down application startup and the length of builds. The Resources system makes it harder to deliver custom content to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd8f9fc5bc7b
unity_docs
scripting
What is `Unity.Properties.PropertyVisitor.AddAdapter` in Unity? Explain its purpose and usage.
PropertyVisitor.AddAdapter Declaration public void AddAdapter ( Unity.Properties.IPropertyVisitorAdapter adapter ); Parameters Parameter Description adapter The adapter to add. Description Adds an adapter to the visitor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19c0fe85f70b
unity_docs
editor
What is `VersionControl.Provider.ResolveIsValid` in Unity? Explain its purpose and usage.
Provider.ResolveIsValid Declaration public static bool ResolveIsValid ( VersionControl.AssetList assets ); Parameters Parameter Description assets The list of asset to be resolved. Description Tests if any of the assets in the list have the conflicted state and can be resolved. Returns true if one or mor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1c9438543e6
unity_docs
scripting
Give me an overview of the `SceneAsset` class in Unity.
SceneAsset class in UnityEditor / Inherits from: Object Description SceneAsset is used to reference Scene objects in the Editor. This can be used as the type for ObjectField UI elements, to allow the user to pick a Scene object as the value of the field. This example shows how to pick a Scene in the editor. The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bb8307f5d4a
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsUnsignedFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsUnsignedFormat Declaration public static bool IsUnsignedFormat ( Experimental.Rendering.GraphicsFormat format ); Declaration public static bool IsUnsignedFormat ( TextureFormat format ); Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2469201bc34
unity_docs
scripting
What is `PlayerSettings.iOS.appleEnableAutomaticSigning` in Unity? Explain its purpose and usage.
PlayerSettings.iOS.appleEnableAutomaticSigning public static bool appleEnableAutomaticSigning ; Description Set this property to true for Xcode to attempt to automatically sign your app based on your appleDeveloperTeamID .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e171bfe42e98
github
scripting
Write a Unity Editor script for Manual XR Control
```csharp using System.Collections; using UnityEngine; using UnityEngine.XR.Management; public class ManualXRControl { public static IEnumerator StartXRCoroutine() { if (XRGeneralSettings.Instance.Manager.isInitializationComplete) { yield return true; yield break; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_9bb0b7543a6c
unity_docs
scripting
What is `Input.GetTouch` in Unity? Explain its purpose and usage.
Input.GetTouch Declaration public static Touch GetTouch (int index ); Parameters Parameter Description index The touch input on the device screen. Returns Touch Touch details in the struct. Description Call Input.GetTouch to obtain a Touch struct. Note : This API is part of the legacy Input Ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b398dafbe71
unity_docs
scripting
What is `VersionControl.Provider.Add` in Unity? Explain its purpose and usage.
Provider.Add Declaration public static VersionControl.Task Add ( VersionControl.AssetList assets , bool recursive ); Declaration public static VersionControl.Task Add ( VersionControl.Asset asset , bool recursive ); Parameters Parameter Description assets List of assets to add to version control...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_225f094ad4fd
unity_docs
rendering
What is `TextureFormat.Alpha8` in Unity? Explain its purpose and usage.
TextureFormat.Alpha8 Description Alpha-only texture format, 8 bit integer. This format only stores the alpha channel and doesn't hold any color data. It can be used by custom shaders for computing alpha independently of the other channels. Set the texture data in the same way as with other textures, for example usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1a4ede898bc
unity_docs
scripting
What is `Debug.IsValidationLevelEnabled` in Unity? Explain its purpose and usage.
Debug.IsValidationLevelEnabled Declaration public static bool IsValidationLevelEnabled ( ValidationLevel level ); Parameters Parameter Description level The validation level to test. Description Returns whether a given validation level is currently enabled.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_984924d728b1
unity_docs
scripting
In Unity's 'Introduction to programming in Unity', what is 'Editor and runtime scripts' and how does it work?
There are two distinct contexts in which your code might run: In the Unity Editor at authoring time, usually as part of custom editing tools and windows that support your own development process. In your application at runtime, as part of your user’s experience. Source files that contain Editor-only code are commonly r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_777441a443cc
unity_docs
scripting
What is `SystemInfo.supportsDynamicResolution` in Unity? Explain its purpose and usage.
SystemInfo.supportsDynamicResolution public static bool supportsDynamicResolution ; Description Indicates whether the platform supports dynamic resolution scaling. (Read Only) Returns true if the current platform or graphics device supports dynamic resolution scaling, otherwise false . Dynamic resolution sca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_43cc15388780
unity_docs
math
What is `AndroidJNI.CallBooleanMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallBooleanMethodUnsafe Declaration public static bool CallBooleanMethodUnsafe (IntPtr obj , IntPtr methodID , jvalue* args ); Description Calls a Java instance method defined by methodID , optionally passing an array of arguments ( args ) to the method. Additional resources: Java Native Interfa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_756158febb30
unity_docs
scripting
What is `HideFlags.NotEditable` in Unity? Explain its purpose and usage.
HideFlags.NotEditable Description The object is not editable in the Inspector. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Create a plane and dont let it be modificable in the Inspector // nor in the Sceneview. void Start() { GameObject createdGO = GameObject.CreatePrimitive(PrimitiveT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8097c1b2962d
unity_docs
scripting
What is `Unity.Properties.IPropertyBag.Accept` in Unity? Explain its purpose and usage.
IPropertyBag.Accept Declaration public void Accept ( Unity.Properties.ITypeVisitor visitor ); Parameters Parameter Description visitor The visitor being run. Description Call this method to invoke ITypeVisitor.Visit_1 with the strongly typed container type. Declaration public void Accept ( Unity.Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_84fb37c95df4
github
scripting
Write a Unity C# XR/VR script for Hand Processor
```csharp using System.Collections.Generic; using UnityEngine.XR.Hands.Processing; namespace UnityEngine.XR.Hands.Samples.VisualizerSample { /// <summary> /// Example hand processor that applies transformations on the root poses to /// modify the hands skeleton. Note it is possible to modify the bones ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_aa9480f9f0f2
unity_docs
rendering
Explain 'Implementation details of shadow cascades' in Unity.
This page describes the technical implementation details of shadow cascades. ## Perspective aliasing A directional light typically simulates sunlight, and a single directional light can illuminate the entire Scene . This means that its shadow map covers a large portion of the Scene, which can lead to a problem called...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4ae94d62948
unity_docs
scripting
What is `ParticleSystem.InheritVelocityModule.curve` in Unity? Explain its purpose and usage.
ParticleSystem.InheritVelocityModule.curve public ParticleSystem.MinMaxCurve curve ; Description Curve to define how much of the emitter velocity the system applies during the lifetime of a particle. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fae0845a2219
unity_docs
physics
Explain 'Character Controller component reference' in Unity.
The Character Controller is mainly used for third-person or first-person player control that does not make use of Rigidbody physics. ## Properties Property Description Slope Limit Limits the collider to only climb slopes that are less steep (in degrees) than the indicated value. Step Offset The character will step up...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_41842917bef8
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.ToString`.
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.
local_man_ab462fba6d5d
unity_docs
rendering
In Unity's 'Virtual Texturing error material', what is 'Error naming convention' and how does it work?
When Unity logs a validation error, it names the Texture Stacks according to the following convention: The number of layers the Texture Stack has. The Texture Stack’s layer names as set in ShaderGraph. Here are two examples of this naming convention: An error name in a Texture Stack with two layers: Texture 2(Layer_Nam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_992bcca30ded
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.InstantiateGameObjects`.
d to the currently active Scene. Description Creates a specified number of instances of a GameObject identified by its instance ID and populates NativeArrays with the instance IDs of the new GameObjects and their Transform components. Use InstantiateGameObjects to instantiate multiple GameObjects as a batch. An in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4caf045acff
unity_docs
scripting
What is `Mesh.GetBlendShapeFrameWeight` in Unity? Explain its purpose and usage.
Mesh.GetBlendShapeFrameWeight Declaration public float GetBlendShapeFrameWeight (int shapeIndex , int frameIndex ); Parameters Parameter Description shapeIndex The shape index of the frame. frameIndex The frame index to get the weight from. Description Returns the weight of a blend shape frame.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73bc33be5014
unity_docs
scripting
What is `Unity.Profiling.Memory.CaptureFlags.NativeObjects` in Unity? Explain its purpose and usage.
CaptureFlags.NativeObjects Description Specifies that information about Native Objects should be collected. This includes information about their Types, names, Native Root, instance IDs, sizes, Flags denoting their status and their connection to their corresponding Managed Objects. Corresponds to the NativeObject ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0afc87e6809
unity_docs
scripting
What is `ClipboardUtility.canCutGameObject` in Unity? Explain its purpose and usage.
ClipboardUtility.canCutGameObject public static Func<GameObject,bool> canCutGameObject ; Description Optional filtering functions invoked to determine if a GameObject can be cut before any action is taken. All registered delegates of canCutGameObject will be evaluated and must return true for a GameObject to be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62283456722d
unity_docs
ui
Show me a Unity C# example demonstrating `Editor.SaveChanges`.
sUnsavedChanges property is not reset to false. Note, if the Editor has multiple prompts to the user to save their changes, the Editor will call this method as part of a list of changes that need saving. Unity cancels the save process for all remaining prompts if this method throws an exception. In this case, you wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d994340585d
unity_docs
editor
What is `SerializedProperty.DuplicateCommand` in Unity? Explain its purpose and usage.
SerializedProperty.DuplicateCommand Declaration public bool DuplicateCommand (); Description Duplicates the array element referenced by the SerializedProperty. Used to insert another element in the array, initialized to the same contents as the SerializedProperty. Additional resources: InsertArrayElementAtInd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90bcdd699e79
unity_docs
editor
What is `Rendering.EditorGraphicsSettings.TryGetRenderPipelineSettingsForPipeline` in Unity? Explain its purpose and usage.
EditorGraphicsSettings.TryGetRenderPipelineSettingsForPipeline Declaration public static bool TryGetRenderPipelineSettingsForPipeline (out TSettings settings ); Declaration public static bool TryGetRenderPipelineSettingsForPipeline (Type renderPipelineType , out TSettings settings ); Parameters Parameter ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c588879080e8
unity_docs
physics
What is `CharacterController.detectCollisions` in Unity? Explain its purpose and usage.
CharacterController.detectCollisions public bool detectCollisions ; Description Determines whether other rigidbodies or character controllers collide with this character controller (by default this is always enabled). This method does not affect collisions detected during the character controller's movement bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_14e8b0702dfa
github
scripting
Write a Unity C# script called Object Bar Theme
```csharp // Copyright (c) Mixed Reality Toolkit Contributors // Licensed under the BSD 3-Clause using System; using UnityEngine; namespace MixedReality.Toolkit.UX.Experimental { /// <summary> /// All theme elements of the MRTK <c>ObjectBar</c>. /// </summary> /// <remarks> /// <para> /// A MR...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7943666150e3
unity_docs
rendering
What are the parameters of `GUI.DrawTextureWithTexCoords` in Unity?
Description Draw a texture within a rectangle with the given texture coordinates. Use this function for clipping or tiling the image within the given rectangle. The second Rect texCoords describes how the texture is adjusted to fit the position Rect . The first rectangle has its size in pixels provided; the second re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_177c83b97d06
unity_docs
animation
What is `ModelImporter.defaultClipAnimations` in Unity? Explain its purpose and usage.
ModelImporter.defaultClipAnimations public ModelImporterClipAnimation[] defaultClipAnimations ; Description Generate a list of all default animation clip based on TakeInfo. Additional resources: ModelImporterClipAnimation . Additional resources: TakeInfo . ```csharp using UnityEngine; using UnityEditor; publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_19
github
scripting
What does `SetShouldConsumeInputDelegate` do in this Unity script? Explain its purpose and signature.
Sets a delegate to control whether or not our built-in camera controls should respond to input. It is called once a frame formouse interfaces, and once for every active touch when using touch controls. The pointer id associated with the input event ispassed as a parameter.If a delegate is supplied here, it will take p...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_19dec2fc263f
unity_docs
rendering
What is `EditorUtility.SetCameraAnimateMaterials` in Unity? Explain its purpose and usage.
EditorUtility.SetCameraAnimateMaterials Declaration public static void SetCameraAnimateMaterials ( Camera camera , bool animate ); Description Sets this camera to allow animation of materials in the Editor. If enabled, any rendered objects take global time into consideration. This means that any custom previ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3fef4e6f8bab
unity_docs
physics
What is `ArticulationDriveType` in Unity? Explain its purpose and usage.
ArticulationDriveType enumeration Description The drive type applied to a particular drive of an ArticulationBody . Additional resources: ArticulationDrive.driveType . Properties Property Description Force Drives in this mode output forces and torques. Acceleration Drives in this mode output accelerations i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_115ea744ba7d
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R32G32B32A32_UInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R32G32B32A32_UInt Description A four-component, 128-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4427805634f1_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Commit a video pixel buffer for encoding.The pixel buffer MUST have an RGBA8888 pixel layout.Pixel buffer containing video frame to commit.Not used. Signature: ```csharp public void CommitFrame<T> (T[] pixelBuffer, long timestamp = default) where T : struct ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_dba91e69b965
unity_docs
scripting
Show me a Unity C# example demonstrating `PenStatus.Barrel`.
PenStatus.Barrel Description The barrel button on the pen is currently pressed. On macOS, this flag will always correspond to the lower barrel button. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event m_Event = Event.current; if (m_Event.type == EventType.MouseDown) { if ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.