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_4f72f371538a
unity_docs
ui
Show me a Unity code example for 'Migrate from uGUI to UI Toolkit'.
onoBehaviour, and can expose their events in the Editor. This allows to set up logic with other GameObjects, for example to hide or show other UI elements, or to assign callback functions. In UI Toolkit, logic and UI layout are stored separately. Callbacks can no longer be set up directly on GameObjects or stored in Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2a952e0294d
unity_docs
editor
What is `AssetPostprocessor.OnPostprocessAllAssets` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload) Parameters Parameter Description importedAssets Array of paths to imported assets. deletedAssets Array of paths to deleted assets. movedAssets Ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_25
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive two or more arguments as part of its initialization process,with the second one being an object of type . Type of the second argument. Signature: ```csharp public interface ISecondArgument<TSecondArgument> ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_7fc167d5d34d_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Manage all , you can change instantiate function if you need.See also:,, Signature: ```csharp public sealed partial class BehaviourManager ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a803eb3cdb82
unity_docs
animation
What is `AnimationMode.EndSampling` in Unity? Explain its purpose and usage.
AnimationMode.EndSampling Declaration public static void EndSampling (); Description Finish the sampling of the animation clip. EndSampling is called after SampleAnimationClip returns. This function must be called immediately following SampleAnimationClip . See the script example on the AnimationMode p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c499af517ae
unity_docs
ui
What is `UIElements.BaseListView.onRemove` in Unity? Explain its purpose and usage.
BaseListView.onRemove public Action<BaseListView> onRemove ; Description This callback allows the user to implement their own code to be executed when the Remove Button is clicked. This callback will only be called if showAddRemoveFooter is set to true . Setting this callback to anything other than null ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82bebeada123
unity_docs
rendering
What is `Video.VideoPlayer.texture` in Unity? Explain its purpose and usage.
VideoPlayer.texture public Texture texture ; Description Internal texture in which video content is placed. (Read Only) The texture is used to send the video content to the desired target. When the VideoPlayer.renderMode is set to Video.VideoTarget.APIOnly, the content is still accessible from scripts using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8f92f7189154
unity_docs
rendering
Explain 'Check whether a GameObject is compatible with the SRP Batcher in URP' in Unity.
## GameObject compatibility In any given scene , some GameObjects are compatible with the SRP Batcher, and some aren’t. Compatible GameObjects use the SRP Batcher code path, and non-compatible GameObjects use the standard SRP code path. For more information, see How the SRP Batcher works . A GameObject must meet the f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36b314e415e6
unity_docs
scripting
What is `Quaternion.x` in Unity? Explain its purpose and usage.
Quaternion.x public float x ; Description X component of the Quaternion. Don't modify this directly unless you know quaternions inside out. ```csharp //Create three Sliders (Create>UI>Slider) and three Text GameObjects (Create>UI>Text). These are for manipulating the x, y, and z values of the Quaternion. The t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20eaa04e6eb4
unity_docs
audio
Show me a Unity C# example demonstrating `Input.deviceOrientation`.
Input.deviceOrientation public static DeviceOrientation deviceOrientation ; Description Device physical orientation as reported by OS. (Read Only) Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd0866753b8b
unity_docs
rendering
Show me a Unity code example for 'Strip shader variants'.
ate conditional shader code using a target platform preprocessor macro , so you can limit variants on platforms with limited memory. The code sample does the following: If you build for a SHADER_API_DESKTOP platform , Unity builds variants for every possible keyword combination. If you build for another platform, Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_69b3b5a5f187
unity_docs
scripting
In Unity's 'Create a custom Inspector', what is 'Example overview' and how does it work?
This example creates a custom Inspector for a MonoBehaviour class. It uses both C# scripts and UI Builder to create the UI. The custom Inspector also features a custom property drawer . The custom Inspector displays the properties of a Car class, including the make, year built, color, and a list of tires. The Inspector...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1970cebc946e
unity_docs
physics
What is `ArticulationBody.GetJointVelocities` in Unity? Explain its purpose and usage.
ArticulationBody.GetJointVelocities Declaration public int GetJointVelocities (List<float> velocities ); Parameters Parameter Description velocities Supplied list of floats to read back and store the joint velocities data. Returns int Total degrees of freedom for the entire hierarchy of articulation bo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0caf294a0842
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManager.GetFileInfo` in Unity? Explain its purpose and usage.
AsyncReadManager.GetFileInfo Declaration public static Unity.IO.LowLevel.Unsafe.ReadHandle GetFileInfo (string filename , FileInfoResult* result ); Parameters Parameter Description filename The name of the file to query. result A struct that this function fills in with information about the file upon co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30cf53cb4ff5
unity_docs
scripting
Show me a Unity C# example demonstrating `QualitySettings.GetQualityLevel`.
QualitySettings.GetQualityLevel Declaration public static int GetQualityLevel (); Returns int Obtains the current Quality Level. Description Returns the current graphics quality level. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { int qualityLevel = QualitySettings....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_141d4f35fafc
unity_docs
scripting
What is `UIElements.MouseCaptureEventBase_1` in Unity? Explain its purpose and usage.
MouseCaptureEventBase<T0> class in UnityEngine.UIElements / Inherits from: UIElements.PointerCaptureEventBase_1 / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IMouseCaptureEvent Description Event sent when the handler capturing the mouse changes. Properties Property Description r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d56017d7bca4
unity_docs
editor
What is `Experimental.GraphView.GraphViewToolWindow.SelectGraphViewFromWindow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewToolWindow.SelectGraphViewFromWindow Declaration public void SelectGraphViewFromWindow ( Experimental.GraphView.GraphViewEditorWindow window , Experimental.GraphView.GraphView graphView , int graphViewIndexInWindow...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1bea9791a360
unity_docs
input
What is `tvOS.Remote.touchesEnabled` in Unity? Explain its purpose and usage.
Remote.touchesEnabled public static bool touchesEnabled ; Description Disables Apple TV Remote touch propagation to Unity Input.touches API. Useful for third-party frameworks, which ignore Touch.type == Indirect . The default setting is false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33e5001e9354
unity_docs
editor
What is `GlobalObjectId.ToString` in Unity? Explain its purpose and usage.
GlobalObjectId.ToString Declaration public string ToString (); Returns string The string representation of the GlobalObjectId . Description Obtains the string representation of the unique object identifier. The string representation of a GlobalObjectId can be serialized, then used at a later time to re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c5564a9cc8a9_doc_5
github
scripting
What does `SetAROnly` do in this Unity script? Explain its purpose and signature.
Make all active object disappear, except for OpenXR specific objects Signature: ```csharp public void SetAROnly(bool enableAROnly = true) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_caa6c0249773
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.Play`.
the delay in seconds. If AudioSource.clip is set to the same clip that is playing then the clip will sound like it is re-started. AudioSource will assume any Play call will have a new audio clip to play. Note: The AudioSource.PlayScheduled API will give you more accurate control over when the audio clip is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df917eacd076
unity_docs
physics
What is `ParticleCollisionEvent.velocity` in Unity? Explain its purpose and usage.
ParticleCollisionEvent.velocity public Vector3 velocity ; Description Incident velocity at the intersection point of the collision. The velocity is reported in world coordinates regardless of whether the Particle System is simulated in local coordinates.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57a8dd613129
unity_docs
rendering
Show me a Unity code example for 'Create a quad mesh via script'.
for procedural mesh generation. Note : Unity processes and displays geometry in triangles, and not quads. This means that the Quad primitive consists of two triangles. ## Vertex array The first thing you need to do is set up the array of vertices that your shape uses. This example assumes that the quad lies on the x-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be643b6ce131
unity_docs
physics
What is `PhysicsVisualizationSettings.maxNumberOfQueries` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.maxNumberOfQueries public static int maxNumberOfQueries ; Description The maximum number of queries that the PhysicsDebugWindow will visualize at one given time. PhysicsDebugWindow takes the PhysicsVisualizationSettings filtering settings into account before appending a query t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6ab6fd340f9
unity_docs
rendering
What is `Experimental.GlobalIllumination.DirectionalLight.shadow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. DirectionalLight.shadow public bool shadow ; Description True if the light casts shadows, otherwise False.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62ba30cd61c3
unity_docs
scripting
Show me a Unity C# example demonstrating `AndroidJavaObject.Set`.
vaObject.Set Declaration public void Set (string fieldName , FieldType val ); Parameters Parameter Description fieldName The name of the field (e.g. int counter; would have fieldName = "counter"). val The value to assign to the field. It has to match the field type. Description Set the value of a fiel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d0110d197569
unity_docs
scripting
Explain 'APK expansion files' in Unity.
APK expansion files are the asset splitting solution for the APK publishing format. They enable an application to split its assets into: Core assets like scripts , plug-ins , and assets that the application requires for the first scene . Additional assets like Streaming Assets and assets that the application requires f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_26a3e256deb2
unity_docs
rendering
In Unity's 'Texture Sheet Animation module reference', what is 'Sprite mode properties' and how does it work?
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 Particle System properties over time . Property Function Mode popup Select Sprites mode. Frame over Time A curve that specifies how the frame of animation increases as time progre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b298c4dadef
unity_docs
rendering
What is `MaterialPropertyBlock.GetInteger` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.GetInteger Declaration public int GetInteger (string name ); Declaration public int GetInteger (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. Description Get an integer from t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2abacea7805b
unity_docs
physics
What is `PackageManager.RegistryInfo.isDefault` in Unity? Explain its purpose and usage.
RegistryInfo.isDefault public bool isDefault ; Description Whether this is the default, Unity registry or one of the scoped registries configured in the project manifest. The default registry hosts the standard Unity packages. The Package Manager always looks for packages in the default registry unless a proje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1f1ae3008cc
unity_docs
rendering
What is `Rendering.DrawingSettings.fallbackMaterial` in Unity? Explain its purpose and usage.
DrawingSettings.fallbackMaterial public Material fallbackMaterial ; Description Sets the Material to use for any drawers in this group that don't meet the requirements. For Motion Vectors for Universal this would mean any drawer that has a Material with a Shader that does not have a Motion Vector Pass.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_82166edb5e67
unity_docs
xr
Explain 'Verifying downloaded AssetBundles' in Unity.
You can distribute AssetBundles with your application or set up remote servers to download the AssetBundles from. When downloading AssetBundles, precautions are necessary to prevent data corruption and attacks from malicious actors. Data corruption in downloaded AssetBundles is a common cause of crashes on user devices...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5889bb29b1c_doc_24
github
scripting
What does `SetScale` do in this Unity script? Explain its purpose and signature.
Sets a scale at the position in the brush.Position to set the scale in the brush.Scale to set in the brush. Signature: ```csharp public void SetScale(Vector3Int position, Vector3 scale) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_606597e5ccd3
unity_docs
scripting
What is `SerializedProperty.isFixedBuffer` in Unity? Explain its purpose and usage.
SerializedProperty.isFixedBuffer public bool isFixedBuffer ; Description Is this property a fixed buffer? (Read Only) See GetFixedBufferElementAtIndex for an example of how to use this property. Additional resources: fixedBufferSize , GetFixedBufferElementAtIndex .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74c1ab31a503
unity_docs
rendering
What is `AssetDatabase.DeleteAssets` in Unity? Explain its purpose and usage.
AssetDatabase.DeleteAssets Declaration public static bool DeleteAssets (string[] paths , List<string> outFailedPaths ); Parameters Parameter Description paths Project relative paths of the assets or folders to be deleted. outFailedPaths Project relative paths which could not be deleted. Returns bool R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b35c810a218
unity_docs
scripting
What is `Tilemaps.Tilemap.tilemapTileChanged` in Unity? Explain its purpose and usage.
Tilemap.tilemapTileChanged Parameters Parameter Description value A callback set by a user to notify them when Tiles are changed on a Tilemap. Description Callback when Tiles on a Tilemap have changed. This returns the positions on the Tilemap which have been updated and the Tile Data of each position that has...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36d3b1f427f5
unity_docs
editor
Show me a Unity C# example demonstrating `ObjectFactory.CreatePrimitive`.
ObjectFactory.CreatePrimitive Declaration public static GameObject CreatePrimitive ( PrimitiveType type ); Parameters Parameter Description type The type of primitive to create. Description Creates a GameObject primitive with Undo support. The created primitive will have any existing Preset applied to i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_812e42b6eb6d
unity_docs
ui
What is `UIElements.IPointerEvent.button` in Unity? Explain its purpose and usage.
IPointerEvent.button public int button ; Description Gets a value that indicates which mouse button was pressed or released (if any) to cause this event: 0 is the left button, 1 is the right button, 2 is the middle button. A negative value indicates that no mouse button changed state during this event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f09e821814fa
unity_docs
scripting
What is `Camera.WorldToScreenPoint` in Unity? Explain its purpose and usage.
Camera.WorldToScreenPoint Declaration public Vector3 WorldToScreenPoint ( Vector3 position ); Declaration public Vector3 WorldToScreenPoint ( Vector3 position , Camera.MonoOrStereoscopicEye eye ); Parameters Parameter Description position A 3D point in world space. eye Optional argument that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a5889bb29b1c_doc_11
github
scripting
What does `BoxFill` do in this Unity script? Explain its purpose and signature.
Box fills GameObjects into given bounds within the selected layers.The GameObjectBrush overrides this to provide GameObject box-filling functionality.Grid to box fill data to.Target of the box fill operation. By default the currently selected GameObject.The bounds to box fill data into. Signature: ```csharp public ove...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_170b3bc5f64d
unity_docs
scripting
What is `Rendering.VisibleReflectionProbe.isBoxProjection` in Unity? Explain its purpose and usage.
VisibleReflectionProbe.isBoxProjection public bool isBoxProjection ; Description Should probe use box projection. Additional resources: CullingResults.visibleReflectionProbes , ReflectionProbe .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bcf1253b38fc
unity_docs
editor
What is `Rendering.EditorGraphicsSettings.GetTierSettings` in Unity? Explain its purpose and usage.
EditorGraphicsSettings.GetTierSettings Declaration public static Rendering.TierSettings GetTierSettings ( Build.NamedBuildTarget target , Rendering.GraphicsTier tier ); Declaration public static Rendering.TierSettings GetTierSettings ( BuildTargetGroup target , Rendering.GraphicsTier tier ); Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_512d515b92ba
unity_docs
animation
What is `AnimationCurve.SmoothTangents` in Unity? Explain its purpose and usage.
AnimationCurve.SmoothTangents Declaration public void SmoothTangents (int index , float weight ); Parameters Parameter Description index The index of the keyframe to be smoothed. weight The smoothing weight to apply to the keyframe's tangents. Description Smooth the in and out tangents of the keyframe a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9752408de92d
unity_docs
physics
What is `ParticleSystemSubEmitterType` in Unity? Explain its purpose and usage.
ParticleSystemSubEmitterType enumeration Description The events that cause new particles to be spawned. Properties Property Description Birth Spawns new particles when particles from the parent system are born. Collision Spawns new particles when particles from the parent system collide with something. Death ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9611f4c28bc7
unity_docs
scripting
What is `SearchService.VisibleObjects` in Unity? Explain its purpose and usage.
VisibleObjects enumeration Description A bit field that contains the different categories of object that the object selector window can display. Properties Property Description None The object selector window cannot display any objects. Assets The object selector window can only display Assets. Scene The obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ef196115c0a
unity_docs
scripting
What is `AssetPipelineMode` in Unity? Explain its purpose and usage.
AssetPipelineMode enumeration Description Selects the Assetpipeline mode to use. Properties Property Description Version1 Use this if you want to use assetpipeline version 1. Version2 Use this if you want to use assetpipeline version 2.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ff8ba1aa6fa
unity_docs
editor
What are the parameters of `ShortcutManagement.ShortcutManager.UnregisterTag` in Unity?
Description Removes a tag from the custom context list. ```csharp using UnityEditor; using UnityEditor.ShortcutManagement; using UnityEngine;public class MyWindow : EditorWindow { const KeyCode shortcutKey = KeyCode.A; bool customTag; bool CustomTag { get => customTag; set { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f58f8c3f782e
unity_docs
scripting
What is `KeyCode.UpArrow` in Unity? Explain its purpose and usage.
KeyCode.UpArrow Description Up arrow key. Use this as a parameter to a function like Input.GetKey to detect when the user presses the up arrow key. Additional resources: Input.GetKey , Input.GetKeyDown , Input.GetKeyUp . ```csharp //Attach this to a GameObject //This script tells when the up arrow key is pres...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4231ebaf5039
unity_docs
editor
Show me a Unity C# example demonstrating `AnimationMode.IsPropertyAnimated`.
mated. IsPropertyAnimated checks whether a property is being animated. This check requires also the object where the property can be found. color is searched for in the following script example . It is part of the Renderer object. Note that the example uses a sphere GameObject and an animation file, color.anim. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0a7d4540dc3
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Czech`.
SystemLanguage.Czech Description Czech. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Czech language if (Application.systemLanguage == SystemLanguage.Czech) { //Outputs into console that the system is in Czech Deb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_785c65e8e1de
unity_docs
physics
In Unity's 'Reference other files from UXML', what is 'Thesrcattribute' and how does it work?
This is the recommended way to reference other files. Use the following syntax for the src attribute: ``` src="<path-to-file>/<file-name-with-extension>" ``` Any errors during import, such as missing files, trigger an error message. You can use a relative or an absolute path: Absolute paths start from the project’s Ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7b30b989152
unity_docs
scripting
What is `Search.QueryListBlockAttribute.ctor` in Unity? Explain its purpose and usage.
QueryListBlockAttribute Constructor Declaration public QueryListBlockAttribute (string category , string name , string id , string op ); Declaration public QueryListBlockAttribute (string category , string name , string[] ids , string op ); Parameters Parameter Description category Category of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7a15356d7261
unity_docs
rendering
Explain 'Web browser access to device features' in Unity.
The Unity Web platform supports WebCam access . To allow a Web application to access the webcam on a device, the browser must request its user to provide access to the camera . Without the permission to access the camera, the browser returns incomplete or inaccurate information. Note: Currently, the Web platform suppor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00403df08362
unity_docs
scripting
What is `UIElements.StyleInt` in Unity? Explain its purpose and usage.
StyleInt struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Implements interfaces: IStyleValue<T0> Description Style value that can be either an integer or a StyleKeyword . Properties Property Description keyword The style keyword. value The integer value. Construc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_feb0a465a673
github
scripting
Write a Unity C# MonoBehaviour script called Targeting
```csharp using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace PlainSaveLoad { public class Targeting : MonoBehaviour { private DemoManager dm; private IdentificationManager idm; private GameObject target; public int targetId = ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_9e9dc102bb91
unity_docs
scripting
What is `Component.GetComponentsInParent` in Unity? Explain its purpose and usage.
Component.GetComponentsInParent Declaration public T[] GetComponentsInParent (); Declaration public T[] GetComponentsInParent (bool includeInactive ); Parameters Parameter Description includeInactive Whether to include inactive parent GameObjects in the search. Returns T[] An array containing all mat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a447c12d4b50
unity_docs
scripting
What is `UIElements.IStyle.flexBasis` in Unity? Explain its purpose and usage.
IStyle.flexBasis public UIElements.StyleLength flexBasis ; Description Initial main size of a flex item, on the main flex axis. The final layout might be smaller or larger, according to the flex shrinking and growing determined by the other flex properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42fc0a596417
unity_docs
rendering
What is `TextureImporterSettings.alphaSource` in Unity? Explain its purpose and usage.
TextureImporterSettings.alphaSource public TextureImporterAlphaSource alphaSource ; Description Select how the alpha of the imported texture is generated. Additional resources: TextureImporterAlphaSource .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ab6d8cc6d5e1
unity_docs
rendering
In Unity's 'Types of Reflection Probe', what is 'Custom Reflection Probes' and how does it work?
By default, Custom probes work the same way as Baked probes but they also have additional options that change this behaviour. The Dynamic Objects property on a custom probe’s inspector allows objects that are not marked as Reflection Probe Static to be included in the reflection cubemap. Note : The positions of these o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01807531cb78
unity_docs
math
What is `TextGenerator` in Unity? Explain its purpose and usage.
TextGenerator class in UnityEngine / Implemented in: UnityEngine.TextRenderingModule Description Class that can be used to generate text for rendering. Caches vertices, character info, and line info for memory friendlyness. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c96cd91402d3
unity_docs
rendering
Explain 'Unity 6.0 User Manual' in Unity.
Unity 6.0 is a long-term supported (LTS) release in the next generation of the Unity Engine. It combines the latest technologies and tools to deliver high-quality, high-performance experiences for all supported platforms. Unity 6 contains all features, updates, and improvements made in Unity 2023.1 Tech stream, Unity 2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67aa23304159
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystemRenderer.SetMeshWeightings`.
nUniformRandom . The weightings are relative to each other but can be any positive value. For example, if you set the weights to 6 and 3, the ParticleSystemRenderer randomly selects the first Mesh approximately twice as often as the second Mesh. It can be most intuitive to use percentages for the weightings and ensure...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96f1f83d9f12
unity_docs
physics
What is `Collision.articulationBody` in Unity? Explain its purpose and usage.
Collision.articulationBody public ArticulationBody articulationBody ; Description The ArticulationBody of the collider that your GameObject collides with (Read Only). This returns the ArticulationBody of the collider that your GameObject collides with. If the collider doesn't have an articulation body att...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf4a399c687e
unity_docs
rendering
What is `Rendering.RayTracingInstanceMaterialCRC.crc` in Unity? Explain its purpose and usage.
RayTracingInstanceMaterialCRC.crc public int crc ; Description The CRC hash value of a Material that was computed during a RayTracingAccelerationStructure.CullInstances call. Additional resources: Material.ComputeCRC .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a825751c5276
unity_docs
rendering
Explain 'Scriptable Render Pipeline Batcher in URP' in Unity.
The Scriptable Render Pipeline (SRP) Batcher is a draw call optimization that significantly improves performance for applications that use an SRP. The SRP Batcher reduces the CPU time Unity requires to prepare and dispatch draw calls for materials that use the same shader variant. ## Requirements and compatibility Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5d03af82f9d
unity_docs
scripting
What is `Search.SearchIndexer.Merge` in Unity? Explain its purpose and usage.
SearchIndexer.Merge Declaration public void Merge (string[] removeDocuments , Search.SearchIndexer other , int baseScore , Action<int,SearchIndexer,int> documentIndexing ); Parameters Parameter Description removeDocuments Documents to be removed as part of the merge operation. Can be null or empty. oth...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_464fae188b38
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.AnimatorController.FindStateMachineBehaviourContext`.
Description behaviour The State Machine Behaviour to get context for. Returns StateMachineBehaviourContext[] Returns the State Machine Behaviour edition context. Description Use this function to retrieve the owner of this behaviour. Please note that this function is very slow. It is not recommended to use th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8d86507c52d
unity_docs
rendering
What is `CanvasRenderer.CreateUIVertexStream` in Unity? Explain its purpose and usage.
CanvasRenderer.CreateUIVertexStream Declaration public static void CreateUIVertexStream (List<UIVertex> verts , List<Vector3> positions , List<Color32> colors , List<Vector4> uv0S , List<Vector4> uv1S , List<Vector3> normals , List<Vector4> tangents , List<int> indices ); Declaration public static void C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_54dfb579b89c
unity_docs
rendering
In Unity's 'Create your first project', what is 'Create a project' and how does it work?
In the Unity Hub, select New project . From the template list, select Get Started With Unity . This template provides a sample game with in-Editor tutorials that help you learn the basics of the Unity Editor. Select Download template . Name your project and select a location to save it. Select Create project . Unity op...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_26c3b2cc3bd7
unity_docs
audio
In Unity's 'Introduction to audio files', what is 'Audio data and Audio Clips' and how does it work?
Unity audio data is separate from the actual Audio Clips . Audio data is the raw information about an audio file. It contains information such as length, channel count, sample rate, and compression format. Audio Clips are assets that contain the audio data and processes the audio data for use with Unity Engine. Audio C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9db4c4cb75ee
unity_docs
scripting
In Unity's 'Integrating Unity into native iOS applications', what is 'Limitations' and how does it work?
Unity doesn’t control the runtime lifecycle, so Unity as a Library might not work for all possible use cases. Known limitations include: Unity as a Library only supports full-screen rendering, and doesn’t support rendering on part of the screen. You can’t load more than one instance of the Unity runtime. You might need...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_43f8e0276e5a
unity_docs
rendering
Show me a Unity code example for 'Mesh normals shader example in the Built-In Render Pipeline'.
``` Shader "Unlit/WorldSpaceNormals" { // no Properties block this time! SubShader { Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag // include file that contains UnityObjectToWorldNormal helper function #include "UnityCG.cginc" struct v2f { // we'll output world space normal as one of regular...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b31e9dcc72b0
unity_docs
scripting
What is `GUISettings` in Unity? Explain its purpose and usage.
GUISettings class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description General settings for how the GUI behaves. These are shared by all elements in a GUISkin . Properties Property Description cursorColor The color of the cursor in text fields. cursorFlashSpeed The speed of text field curs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79e64b140a19
unity_docs
ui
What is `Experimental.GraphView.Pill.ctor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Pill Constructor Declaration public Pill (); Declaration public Pill ( UIElements.VisualElement left , UIElements.VisualElement right ); Description Constructs a pill with its optional left and right child VisualElem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6a93e413c58b
unity_docs
scripting
Explain 'Author native UWP plug-ins' in Unity.
To author native Universal Windows Platform (UWP) plug-ins , you need to know how to create native plug-ins for Unity. For more information about native plug-ins and their uses, refer to Native plug-ins . To author native UWP plug-ins, you can use either a precompiled dynamic-link library (DLL) or the C++ source code. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b851e75e2e0
unity_docs
editor
Show me a Unity C# example demonstrating `MenuCommand.context`.
urrent selection or the item under the mouse when invoking a context menu. The new menu item is added to the list supplied by the selected component. The component in the Inspector has a clickable circular item at the top right. The image below shows how the Rigidbody has a MenuItem that is accessible with a click. The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9862cb862fd
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.GetBuildPhaseName` in Unity?
Returns string The build phase name if it's defined. Description Returns the name of the build phase with the specified GUID. For shell script and copy file build phases, the name is returned. For all the other phases, the type is returned. This is the same behavior as GetBuildPhaseType . If a phase with the given GUID...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a1c389fa220
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.MoveTowards`.
t The value to move towards. maxDelta The maximum change applied to the current value. Description Moves a value current towards target . This function is similar Mathf.Lerp except that this function ensures the rate of change never exceeds maxDelta and that the current value is never greater than the tar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4f3ca8f9a08e
github
scripting
Write a Unity Editor script for Lynx Switch Button Editor
```csharp // ============================================================================== // | LynxInterfaces (2023) | // |====================================== | // | LynxSimpleButton Editor Script ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_a3fbc5794311
unity_docs
rendering
What is `Camera.transparencySortAxis` in Unity? Explain its purpose and usage.
Camera.transparencySortAxis public Vector3 transparencySortAxis ; Description An axis that describes the direction along which the distances of objects are measured for the purpose of sorting. If the TransparencySortMode of the Camera or GraphicsSettings are set to TransparencySortMode.CustomAxis , th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8aa8de2fa4dd
unity_docs
rendering
Explain 'Creating custom shaders that support GPU instancing in the Built-In Render Pipeline' in Unity.
Resources for writing HLSL shaders or Surface Shaders in the Built-In Render Pipeline that support GPU instancing. Page Description GPU instancing Learn about GPU Instancing in the Built-In Render Pipeline. Add per-instance properties to GPU instancing shaders Add per-instanced properties such as color to HLSL shaders ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5b7bf824397
unity_docs
rendering
What are the parameters of `LightTransport.InputExtraction.ExtractFromScene` in Unity?
Returns bool True if extraction completed successfully, false if errors occurred. Description Extracts all relevant scene data for light transport calculations from the currently open scenes. This method scans all currently open scenes and extracts objects that affect global illumination calculations. It processes: Geo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3d1831597eb
unity_docs
scripting
What is `RuntimePlatform.Switch` in Unity? Explain its purpose and usage.
RuntimePlatform.Switch Description In the player on Nintendo Switch. Additional resources: RuntimePlatform , Platform dependent compilation . ```csharp using UnityEngine;public class ExampleClass : MonoBehaviour { void Example() { if (Application.platform == RuntimePlatform.Switch) Debug.Log("Do something sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f102c51d44db
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.ChangeSetStatus`.
sk ChangeSetStatus (string changesetID ); Parameters Parameter Description changeset Changeset to query for assets. changesetID ChangesetID to query for assets. Description Retrieves a list of assets belonging to a changeset. This is intended to work only with outgoing changesets. Use Provider.IncomingC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5e221cf5941a
unity_docs
networking
In Unity's 'Web networking', what is 'UnityWebRequest downloads' and how does it work?
Don’t use code that blocks a UnityWebRequest download, such as this: ``` while(!www.isDone) {} ``` Web browsers do not allow synchronously blocking code execution to wait for a network transfer. Therefore, if you need to perform a synchronous style UnityWebRequest, use a Coroutine and a yield statement to wait for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd540e26879e
unity_docs
rendering
What is `TextureImporterSwizzle.A` in Unity? Explain its purpose and usage.
TextureImporterSwizzle.A Description Use the alpha color channel. Additional resources: TextureImporter.swizzleR , TextureImporter.swizzleG , TextureImporter.swizzleB , TextureImporter.swizzleA .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94c216cb2541
github
scripting
Write a Unity C# ScriptableObject for Button Quiz Config
```csharp using UnityEngine; using ExPresSXR.Experimentation.DataGathering; using System; using System.Linq; using System.Collections.Generic; namespace ExPresSXR.Interaction.ButtonQuiz { [Serializable] // ExPresSXR.Interaction.ButtonQuiz.ButtonQuizConfig, Assembly-CSharp public class ButtonQuizConfig : Sc...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_60b5a02b6fea
unity_docs
rendering
In Unity's 'Reducing the file size of a build', what is 'Build Report Inspector' and how does it work?
Use the Build Report Inspector package to add an Inspector to the BuildReport file that Unity generates when it creates a build. The build report file is located at Library/LastBuild.buildreport . The package uses the BuildReport API to create the Inspector window. It displays information such as the build steps, and a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a49275f35f71
unity_docs
scripting
Show me a Unity C# example demonstrating `Event.clickCount`.
Event.clickCount public int clickCount ; Description How many consecutive mouse clicks have we received. Used in EventType.MouseDown event; use this to differentiate between a single and double clicks. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event e = Event.curren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ec9570db156
unity_docs
editor
What is `SerializedProperty.isDefaultOverride` in Unity? Explain its purpose and usage.
SerializedProperty.isDefaultOverride public bool isDefaultOverride ; Description Allows you to check whether his property is a default override . Certain properties on Prefab instances are default overrides. See PrefabUtility.IsDefaultOverride for more information.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32194517aba9
unity_docs
math
Show me a Unity C# example demonstrating `GameObject.FindGameObjectsWithTag`.
iption tag The name of the tag to search for GameObjects by. Description Retrieves an array of all active GameObjects tagged with the specified tag. Returns an empty array if no GameObjects have the tag. Tags must be declared in the tag manager before using them. A UnityException will be thrown if the tag does...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_644ab634e6cf
unity_docs
rendering
What is `LightProbeProxyVolume.qualityMode` in Unity? Explain its purpose and usage.
LightProbeProxyVolume.qualityMode public LightProbeProxyVolume.QualityMode qualityMode ; Description Determines how many Spherical Harmonics bands will be evaluated to compute the ambient color. Additional resources: Light Probes , Light Probe Proxy Volume , Spherical Harmonics(SH) .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b182e90b4662
unity_docs
xr
What is `Rendering.CommandBuffer.ConvertTexture` in Unity? Explain its purpose and usage.
CommandBuffer.ConvertTexture Declaration public void ConvertTexture ( Rendering.RenderTargetIdentifier src , Rendering.RenderTargetIdentifier dst ); Declaration public void ConvertTexture ( Rendering.RenderTargetIdentifier src , int srcElement , Rendering.RenderTargetIdentifier dst , int dstElement )...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_232d6bb1342e
unity_docs
performance
What is `Jobs.IJobParallelForTransformExtensions.ScheduleByRef` in Unity? Explain its purpose and usage.
IJobParallelForTransformExtensions.ScheduleByRef Declaration public static Unity.Jobs.JobHandle ScheduleByRef (ref T jobData , Jobs.TransformAccessArray transforms , Unity.Jobs.JobHandle dependsOn ); Parameters Parameter Description jobData The job to schedule. transforms The TransformAccessArray ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ccca55164ec2
unity_docs
math
What is `AI.NavMesh.FindClosestEdge` in Unity? Explain its purpose and usage.
NavMesh.FindClosestEdge Declaration public static bool FindClosestEdge ( Vector3 sourcePosition , out AI.NavMeshHit hit , int areaMask ); Parameters Parameter Description sourcePosition The origin of the distance query. hit Holds the properties of the resulting location. areaMask A bitfield mask spe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e12b7b53a8b6
unity_docs
rendering
Show me a Unity code example for 'Customizing the Player loop'.
o identify Player loop subsystems to add, remove, or replace. Valid types for default systems are available in the UnityEngine.PlayerLoop namespace. The API reference PlayerLoop.GetDefaultPlayerLoop includes an example of how to retrieve the default Player loop, iterate over the nested Player loop systems and print the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c352bfb2afc7
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.LightsModule.enabled`.
ParticleSystem.LightsModule.enabled public bool enabled ; Description Specifies whether the LightsModule is enabled or disabled. Additional resources: ParticleSystem.lights . ```csharp using UnityEngine; using System.Collections;// For best results, use Deferred Rendering (see Camera settings) [RequireCompon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ea81354d594c
unity_docs
ui
Explain 'ToolbarToggle' in Unity.
A ToolbarToggle is an Editor-only control that serves as a toggle in a Toolbar . It’s a Toggle with a predefined style that matches the Toolbar style. It looks like a button that you can toggle on and off. ## Create a ToolbarToggle You can create a ToolbarToggle with UI Builder, UXML, or C#. The following C# example ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_317bdba82340
unity_docs
math
What is `GlobalObjectId.GlobalObjectIdentifiersToObjectsSlow` in Unity? Explain its purpose and usage.
GlobalObjectId.GlobalObjectIdentifiersToObjectsSlow Declaration public static void GlobalObjectIdentifiersToObjectsSlow (GlobalObjectId[] identifiers , out Object[] outputObjects ); Parameters Parameter Description identifiers Array of GlobalObjectIds to convert to object references. outputObjects Array o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0186e2d02bc
unity_docs
scripting
What is `UIElements.FloatField.ValueToString` in Unity? Explain its purpose and usage.
FloatField.ValueToString Declaration protected string ValueToString (float v ); Parameters Parameter Description v The float to be converted to string. Returns string The float as string. Description Converts the given float to a string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.