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_95ee4cf31b67
unity_docs
scripting
What is `Animations.TransformStreamHandle` in Unity? Explain its purpose and usage.
TransformStreamHandle struct in UnityEngine.Animations / Implemented in: UnityEngine.AnimationModule Description Position, rotation and scale of an object in the AnimationStream . ```csharp using UnityEngine; using UnityEngine.Playables; using UnityEngine.Animations;public struct TransformStreamHandleJob : IAn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_25a38d61bacc
unity_docs
rendering
What is `Rendering.VisibleReflectionProbe.hdrData` in Unity? Explain its purpose and usage.
VisibleReflectionProbe.hdrData public Vector4 hdrData ; Description Shader data for probe HDR texture decoding. 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_c7ec1c8815a8
unity_docs
rendering
What is `ParticleSystem.LightsModule.maxLights` in Unity? Explain its purpose and usage.
ParticleSystem.LightsModule.maxLights public int maxLights ; Description Set a limit on how many Lights this Module can create. This value is useful for avoiding bad performance. It is very easy to create a high number of Lights, which negatively effects performance. Capping the number of Lights helps to maint...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1ba712b13a2
unity_docs
performance
What is `Unity.Jobs.IJobExtensions.Schedule` in Unity? Explain its purpose and usage.
IJobExtensions.Schedule Declaration public static Unity.Jobs.JobHandle Schedule (T jobData , Unity.Jobs.JobHandle dependsOn ); Parameters Parameter Description jobData The job and data to schedule. dependsOn The dependency of the job. Dependencies ensure that a job executes on worker threads after the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9fbf83e1d5d
unity_docs
rendering
What is `Shader.globalKeywords` in Unity? Explain its purpose and usage.
Shader.globalKeywords public static GlobalKeyword[] globalKeywords ; Description An array containing the global shader keywords that currently exist. This includes enabled and disabled global shader keywords. Shader keywords determine which shader variants Unity uses. For information on working with local sha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32b6ed5b0647
unity_docs
physics
What is `PhysicsVisualizationSettings.SetShowMeshColliders` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.SetShowMeshColliders Declaration public static void SetShowMeshColliders ( PhysicsVisualizationSettings.MeshColliderType colliderType , bool show ); Description Should MeshColliders be shown. Convex and non-convex MeshColliders are controlled separately by colliderType . Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6a3e75c416d
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerRecorder.Start`.
ProfilerRecorder.Start Declaration public void Start (); Description Start data collection. Newly constructed recorder is not collecting samples unless ProfilerRecorderOptions.StartImmediately option is specified. Use Start to attach ProfilerRecorder to the Profiler metric and start data collection. Note: St...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39aa55464004
unity_docs
performance
What is `Unity.Collections.NativeArrayOptions` in Unity? Explain its purpose and usage.
NativeArrayOptions enumeration Description Options for controlling how memory is cleared. You can either clear memory on allocation or leave it uninitialized. NativeArrayOptions.ClearMemory is the default. Properties Property Description UninitializedMemory Leaves NativeArray<T0> memory uninitialized. Clear...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77620127ba36
unity_docs
scripting
What is `UIElements.UxmlDoubleAttributeDescription` in Unity? Explain its purpose and usage.
UxmlDoubleAttributeDescription class in UnityEngine.UIElements / Inherits from: UIElements.TypedUxmlAttributeDescription_1 / Implemented in: UnityEngine.UIElementsModule Description Describes a UXML double attribute. Properties Property Description defaultValueAsString The default value for the attr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f665db1dad2d
github
scripting
Write a Unity C# UI script for FPS
```csharp using UnityEngine; using UnityEngine.UI; public class FPS : MonoBehaviour { Text fps = null; void Start () { fps = GetComponent<Text>(); } // Update is called once per frame void Update () { fps.text = string.Format("{0}", 1 / Time.deltaTime); } } ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_9f2818a199cc
unity_docs
rendering
What is `Rendering.RayTracingMeshInstanceConfig.lightProbeProxyVolume` in Unity? Explain its purpose and usage.
RayTracingMeshInstanceConfig.lightProbeProxyVolume public LightProbeProxyVolume lightProbeProxyVolume ; Description The LightProbeProxyVolume the ray tracing instance uses. When you specify a LightProbeProxyVolume , you must set lightProbeUsage to LightProbeUsage.UseProxyVolume .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_100f87cb16a4
unity_docs
rendering
What are the parameters of `Screen.SetMSAASamples` in Unity?
Description Sets the given number of MSAA samples for the screen buffer. The value indicates the number of anti-aliasing samples per pixel that is requested for the screen buffer. Valid values are 0 (use the Quality settings value), 1, 2, 4, and 8. This function is a low level method that does not affect the rendering ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a49b8d6f7b4
unity_docs
scripting
What are the parameters of `Search.IQueryEngineFilter.RemoveMetaInfo` in Unity?
Returns IQueryEngineFilter The current filter. Description Remove information on the filter. You can use this function to remove additional information that is no longer needed. ``` var descriptionMetaInfoKey = "desc"; filter.RemoveMetaInfo(descriptionMetaInfoKey); ``` See metaInfo for a complete example.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad2ba84cdbe9
unity_docs
ui
What is `EditorGUI.MinMaxSlider` in Unity? Explain its purpose and usage.
EditorGUI.MinMaxSlider Obsolete Switch the order of the first two parameters. Declaration public static void MinMaxSlider ( GUIContent label , Rect position , ref float minValue , ref float maxValue , float minLimit , float maxLimit ); Declaration public static void MinMaxSlider ( Rect position , r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b29b1d937558
unity_docs
rendering
Explain 'Become a Verified Solution' in Unity.
The Verified Solutions program is a curated library of high-quality third-party assets and solutions. You can apply to become a Verified Solution through Unity’s testing process. Topic Description Introduction to Verified Solutions Understand Verified Solutions, which are Unity’s curated library of third-party solution...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a50ed2b2000
unity_docs
xr
Give me an overview of the `InsecureHttpOption` class in Unity.
InsecureHttpOption enumeration Description Options for allowing plain text HTTP connections for UnityWebRequest . Plain text HTTP connections are not secure, and can make your application vulnerable to security threats. By default, UnityWebRequest uses secure HTTPS connections instead. Use this enum to configur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_617582b771f7
unity_docs
math
What is `U2D.SpriteAtlas.GetSprites` in Unity? Explain its purpose and usage.
SpriteAtlas.GetSprites Declaration public int GetSprites (Sprite[] sprites ); Parameters Parameter Description sprites Array of Sprite that will be filled. Returns int The size of the returned array. Description Clone all the Sprite in this atlas and fill them into the supplied array. The array ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89b16a8c67a4
unity_docs
math
What is `Jobs.TransformAccess.GetLocalPositionAndRotation` in Unity? Explain its purpose and usage.
TransformAccess.GetLocalPositionAndRotation Declaration public void GetLocalPositionAndRotation (out Vector3 localPosition , out Quaternion localRotation ); Description Gets the position and rotation of the transform in local space relative to its parent transform. When getting both the position and rotat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe3ad49dc24c
unity_docs
ui
What is `CursorLockMode` in Unity? Explain its purpose and usage.
CursorLockMode enumeration Description How the cursor should behave. These are various modes that control the behaviour of the Cursor. A default cursor must be set in PlayerSettings > Default Cursor . ```csharp //This script makes Buttons that control the Cursor's lock state. Note that the Confined mode only w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13da6ea8ae08
unity_docs
scripting
What is `Android.AndroidProjectFilesModifier.Setup` in Unity? Explain its purpose and usage.
AndroidProjectFilesModifier.Setup Declaration public Android.AndroidProjectFilesModifierContext Setup (); Description A callback for setting up prerequisites for modifying custom Android Gradle project files. You must use Setup if your AndroidProjectFilesModifier.OnModifyAndroidProjectFiles callback depen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8410262693b
unity_docs
scripting
What is `WSA.Toast` in Unity? Explain its purpose and usage.
Toast class in UnityEngine.WSA / Implemented in: UnityEngine.CoreModule Description Represents a toast notification in Windows Store Apps. Application must be declared "Toast capable" in manifest for toast notifications to work. Properties Property Description activated true if toast was activated by user...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2192279bdaa7
unity_docs
scripting
What is `UIElements.BaseTreeViewController.ExpandItemByIndex` in Unity? Explain its purpose and usage.
BaseTreeViewController.ExpandItemByIndex Declaration public void ExpandItemByIndex (int index , bool expandAllChildren , bool refresh ); Parameters Parameter Description index The item index. expandAllChildren Whether the whole hierarchy under that item will be expanded. refresh Whether to refresh item...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44e3010a4fc6
unity_docs
scripting
What is `Experimental.GraphView.SearchTreeEntry.userData` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SearchTreeEntry.userData public object userData ; Description A user specified object for attaching application specific data to a search tree entry.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cefd944bc6ac
unity_docs
rendering
What is `Viewpoint_1.CreateVisualElement` in Unity? Explain its purpose and usage.
Viewpoint<T0>.CreateVisualElement Declaration public UIElements.VisualElement CreateVisualElement (); Returns VisualElement The VisualElement to attach to the Cameras Overlay when the associated camera is active. Description CreateVisualElement is called when a Viewpoint is selected in the Cameras Overla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd31bf12ed29
unity_docs
rendering
What is `ICameraLensData` in Unity? Explain its purpose and usage.
ICameraLensData interface in UnityEditor Description Implements this interface on a Viewpoint<T0> to define a camera frustum when a Viewpoint is enabled in the Cameras Overlay. These fields can be modified in the Scene view: Field of View Orthographic mode Orthographic size Properties Property Descriptio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_164f987f4769
unity_docs
math
What is `UIElements.PanelSettings.referenceResolution` in Unity? Explain its purpose and usage.
PanelSettings.referenceResolution public Vector2Int referenceResolution ; Description The resolution the UI is designed for. If the screen resolution is larger than the reference resolution, Unity scales the UI up in the Game view. If it's smaller, Unity scales the UI down. Unity scales the UI according...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_78c510b61e94
unity_docs
rendering
In Unity's 'Shader keywords workflow', what is 'Declare a shader keyword' and how does it work?
Declare a shader keyword, or a set of shader keywords, using a #pragma statement. The following example defines a set of 2 keywords called RED and GREEN : ``` #pragma shader_feature RED GREEN ``` For more information, refer to Declare shader keywords .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67cde505e417
unity_docs
editor
What is `SerializedProperty.intValue` in Unity? Explain its purpose and usage.
SerializedProperty.intValue public int intValue ; Description Value of an integer property. Contains a valid value when propertyType is SerializedPropertyType.Integer and the underlying type is signed 32 bit or smaller (e.g. sbyte, short and int). It is also appropriate for small unsigned types (ushort and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_74fc56c7f25a_doc_2
github
scripting
What does `Vector3` do in this Unity script? Explain its purpose and signature.
Anchor Point of the Instantiated Prefab in the cell when painting Signature: ```csharp public Vector3 m_Anchor = new Vector3(0.5f, 0.5f, 0.5f); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15f08555675f
unity_docs
rendering
What is `Rendering.GraphicsSettings.cameraRelativeShadowCulling` in Unity? Explain its purpose and usage.
GraphicsSettings.cameraRelativeShadowCulling public static bool cameraRelativeShadowCulling ; Description Enable or disable using the camera position as the reference point for culling shadows. When Unity culls distant shadows, a shadow that's far away from the world space origin can flicker. The flickering hap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd766b28c47a
unity_docs
performance
What is `WSABuildType` in Unity? Explain its purpose and usage.
WSABuildType enumeration Description Build configurations for Windows Store Visual Studio solutions. Properties Property Description Debug Debug configuation. No optimizations, profiler code enabled. Release Release configuration. Optimization enabled, profiler code enabled. Master Master configuation. Optimi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_887e72212c4f
unity_docs
physics
What is `Physics.OverlapSphere` in Unity? Explain its purpose and usage.
Physics.OverlapSphere Declaration public static Collider[] OverlapSphere ( Vector3 position , float radius , int layerMask = AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters Parameter Description position Center of the sphere. radius Radius...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfbc05af2cdd
unity_docs
scripting
What is `AudioType.XM` in Unity? Explain its purpose and usage.
AudioType.XM Description The audio file you want to stream has the FastTracker 2 XM audio file format. Use this enumeration value to ensure the format type of the audio file has the FastTracker 2 XM audio file format. Use this audio type for files with the extension .xm . If the audio file has a different format, U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5a1faf86d6ef
unity_docs
rendering
What is `Rendering.ReflectionProbeUsage` in Unity? Explain its purpose and usage.
ReflectionProbeUsage enumeration Description Reflection Probe usage. Properties Property Description Off Reflection probes are disabled, skybox will be used for reflection. BlendProbes Reflection probes are enabled. Blending occurs only between probes, useful in indoor environments. The renderer will use defau...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbc17052c9c0
unity_docs
rendering
What is `Rendering.LightProbeUsage.UseProxyVolume` in Unity? Explain its purpose and usage.
LightProbeUsage.UseProxyVolume Description Uses a 3D grid of interpolated light probes. A Light Probe Proxy Volume component which may reside on the same game object or on another game object will be required. In order to use a Light Probe Proxy Volume component which resides on another game object, you must us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7d2d599ce9b7
unity_docs
editor
In Unity's 'Check the consistency of the import process', what is 'Manually reimport assets' and how does it work?
Manually reimporting an asset causes Unity to check whether a new import result matches the previous cached import results. To start a manual reimport, select an asset and perform one of the following actions: Right-click on the asset and select Reimport from the context menu. Go to Assets > Reimport . Unity then check...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bd678326c25e
unity_docs
input
Explain 'Input System' in Unity.
com.unity.inputsystem ## Description A new input system which can be used as a more extensible and customizable alternative to Unity’s classic input system in UnityEngine.Input. ## Released for Unity Package version 1.19.0 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2329a7941cc1_doc_11
github
scripting
What does `Enter` do in this Unity script? Explain its purpose and signature.
Enter this state, performs a set of changes to the associated components to enable things Signature: ```csharp public void Enter() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_c5486e40102b
unity_docs
scripting
What is `VersionControl.Provider.PreCheckoutCallback` in Unity? Explain its purpose and usage.
Provider.PreCheckoutCallback Declaration public delegate bool PreCheckoutCallback ( VersionControl.AssetList list , ref string changesetID , ref string changesetDescription ); Parameters Parameter Description list The list of Assets that will be passed on to the Checkout command. Assets can be removed fro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_16653336b245
unity_docs
scripting
Explain 'Layout Element' in Unity.
If you want to override the minimum, preferred, or flexible size of a layout element, you can do that by adding a Layout Element component to the GameObject. A layout controller allocates width or height to a layout element in the following order: First, the layout controller allocates the minimum size properties ( Min...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5eed166acef8
unity_docs
editor
What are the parameters of `UIElements.IEventHandler.HandleEvent` in Unity?
Description Handles an event according to its propagation phase and current target, by executing the element's default action or callbacks associated with the event. The EventDispatcher might invoke this method multiple times for the same event: once for each propagation phase and each target along the event's propag...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_399886252478
unity_docs
rendering
Explain 'GrabPass directive in ShaderLab reference' in Unity.
GrabPass is a command that creates a special type of Pass that grabs the contents of the frame buffer into a texture. This texture can be used in subsequent Passes to do advanced image based effects. This command can significantly increase both CPU and GPU frame times. You should generally avoid using this command othe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79b9be93b591
unity_docs
scripting
What is `Experimental.GraphView.EdgeDragHelper.edgeCandidate` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper.edgeCandidate public Experimental.GraphView.Edge edgeCandidate ; Description The edge being dragged.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b83fe44f93de
unity_docs
xr
What is `Rendering.OnDemandRendering` in Unity? Explain its purpose and usage.
OnDemandRendering class in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Use the OnDemandRendering class to control and query information about your application's rendering speed independent from all other subsystems (such as physics, input, or animation). If you use this with Opti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd0caf9ae8c4
unity_docs
animation
What is `SceneView.pivot` in Unity? Explain its purpose and usage.
SceneView.pivot public Vector3 pivot ; Description The central point that the camera orbits within the Scene view. Use with size , rotation , and CameraSettings.fieldOfView to calculate camera transformation. To create a smooth animation, use the camera LookAt .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d89cf1e705ef
unity_docs
scripting
Show me a Unity C# example demonstrating `Logger`.
Logger class in UnityEngine / Implemented in: UnityEngine.CoreModule Implements interfaces: ILogger , ILogHandler Description Initializes a new instance of the Logger. Create a new instance or use default Debug.unityLogger . Additional resources: ILogger , ILogHandler . ```csharp using UnityEngine; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_063aa7191020
unity_docs
audio
Explain 'Audio High Pass Effect' in Unity.
The Highpass Effect passes high frequencies of an AudioMixer group and cuts off signals with frequencies lower than the Cutoff Frequency . ## Properties Property: Function: Cutoff freq Highpass cutoff frequency in Hertz (range 10.0 to 22000.0, default = 5000.0). Resonance Highpass resonance quality value (range 1.0 t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0a610b0c2b6
unity_docs
editor
Show me a Unity C# example demonstrating `TypeCache.GetTypesDerivedFrom`.
fied, returns only types defined in this assembly. Description Retrieves an unordered collection of types derived from the T type. This method provides fast access to all classes loaded from a given assembly or all Unity domain assemblies, which are derived from a specific class or implement a specific interface...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a81d2e7ac6a2
unity_docs
scripting
What is `DestroyAssetObjectEventArgs.scene` in Unity? Explain its purpose and usage.
DestroyAssetObjectEventArgs.scene public SceneManagement.Scene scene ; Description The scene that contained the asset. This is usually an invalid scene unless the asset is explicitly associated in a scene (e.g. RenderSettings ).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4edeb1fe4a0e
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.AddRelativeTorque`.
y relative to its coordinate system. Force can be applied only to an active rigidbody. If a GameObject is inactive, AddRelativeTorque has no effect. Wakes up the Rigidbody by default. If the torque size is zero then the Rigidbody will not be woken up. For more information on how ForceMode affects angular velocity, see...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_995e7c863f36
unity_docs
editor
Explain '2D Aseprite Importer' in Unity.
com.unity.2d.aseprite ## Description 2D Aseprite Importer is a package which enables the import of .aseprite files from the Pixel Art tool Aseprite. ## Released for Unity Package version 1.1.11 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_73f821a94a15
unity_docs
rendering
What is `RenderParams.rendererPriority` in Unity? Explain its purpose and usage.
RenderParams.rendererPriority public int rendererPriority ; Description Renderer priority. This property controls rendering order and is only supported in the High Definition Render Pipeline (HDRP).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df2f6806cd63
unity_docs
rendering
What is `Rendering.GraphicsSettings.defaultGateFitMode` in Unity? Explain its purpose and usage.
GraphicsSettings.defaultGateFitMode public static Camera.GateFitMode defaultGateFitMode ; Description Stores the default value for the GateFit property of newly created Cameras. This property allows you to define the default value for the GateFit property of newly created Cameras.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ab0d5d40a9f8
github
scripting
Write a Unity C# script called Example Test Data
```csharp using System; using System.Collections.Generic; using UnityEngine; namespace GameUtil.Config.Example { [Serializable] public class ExampleTestData { public int Data1; public Color Data2; public int Data3; public string Data4; public string Data5; pu...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_66113d9622cf
unity_docs
editor
What are the parameters of `Awaitable.EndOfFrameAsync` in Unity?
Description Resumes execution after all Unity subsystems have run for the current frame. Note: This method can only be called from the main thread and always completes on main thread. Also, in Editor, this awaitable is incompatible with BatchMode and requires the game to be in play mode (in edit mode, it will never com...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e93721bfaf59
unity_docs
scripting
What is `UIElements.TabView.activeTab` in Unity? Explain its purpose and usage.
TabView.activeTab public UIElements.Tab activeTab ; Description Property that holds the current active tab. Setting a valid tab will also deselect the previous active tab before setting the newly assigned tab to active.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d13748ebdc0f
unity_docs
math
What is `AndroidJNI.CallStringMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStringMethodUnsafe Declaration public static string CallStringMethodUnsafe (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. This is a convenience function that calls ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cee411fa30b1
unity_docs
physics
Give me an overview of the `JointLimits` class in Unity.
JointLimits struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description JointLimits is used by the HingeJoint to limit the joints angle. Additional resources: HingeJoint . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Set the hinge limits for a doo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77fed6ce5932
unity_docs
scripting
What is `Experimental.GraphView.EdgeManipulator.RegisterCallbacksOnTarget` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeManipulator.RegisterCallbacksOnTarget Declaration protected void RegisterCallbacksOnTarget (); Description Called to register click event callbacks on the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33c744bcf69f
unity_docs
rendering
What is `Unwrapping` in Unity? Explain its purpose and usage.
Unwrapping class in UnityEditor Description Utility class for computing mesh UVs. This class allows you to compute UVs for procedurally generated meshes. Computing UVs is also called "unwrapping". Additional resources: Mesh class, Generating Lightmap UVs . Static Methods Method Description GeneratePerTrian...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d44d067e4ff
unity_docs
physics
What is `ShaderKeywordFilter.SelectIfNotAttribute` in Unity? Explain its purpose and usage.
SelectIfNotAttribute class in UnityEditor.ShaderKeywordFilter / Inherits from: ShaderKeywordFilter.FilterAttribute Description Include only the specified shader keywords in the build if the data field doesn't match the condition. If the data field under SelectIf doesn't match the value of condition , Unity i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_167a822a31b3
github
scripting
Write a Unity Editor script for Signal List Factory
```csharp using System; using UnityEditor.IMGUI.Controls; using UnityEngine.Timeline; namespace UnityEditor.Timeline.Signals { static class SignalListFactory { public static SignalReceiverTreeView CreateSignalInspectorList(TreeViewState state, SignalReceiverHeader header, SignalReceiver target, Seriali...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d32936eef06
unity_docs
rendering
What is `ParticleSystemInheritVelocityMode` in Unity? Explain its purpose and usage.
ParticleSystemInheritVelocityMode enumeration Description How to apply emitter velocity to particles. Properties Property Description Initial Each particle inherits the emitter's velocity on the frame when it was initially emitted. Current Each particle's velocity is set to the emitter's current velocity value...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4fc32641299
unity_docs
animation
What is `Animations.PositionConstraint.SetSource` in Unity? Explain its purpose and usage.
PositionConstraint.SetSource Declaration public void SetSource (int index , Animations.ConstraintSource source ); Parameters Parameter Description index The index of the source to set. source The source object and its weight. Description Sets a source at a specified index. Throws ArgumentOutOfRangeEx...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d4b39312d2c
unity_docs
editor
Explain 'Sequences' in Unity.
com.unity.sequences ## Description Efficiently create movies, game cinematics or any other linear content. Organize your project’s editorial structure and your creative content, assemble the elements for easy authoring and collaboration, and try out new ideas in a non-destructive way. ## Released for Unity Package ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf036b0d6229
unity_docs
scripting
Show me a Unity C# example demonstrating `TextMesh.offsetZ`.
TextMesh.offsetZ public float offsetZ ; Description How far should the text be offset from the transform.position.z when drawing. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { GetComponent<TextMesh>().offsetZ = 5; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ac8024098a53
unity_docs
scripting
In Unity's 'Reference type management', what is 'Avoid converting value types to reference types' and how does it work?
When a value-typed variable gets automatically converted to a reference type this is called boxing . Boxing is one of the most common sources of unintended temporary memory allocations found in Unity projects. This most often happens when passing primitive value-typed variables (such as int and float ) to object-typed ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21d8626a630c
unity_docs
rendering
What is `Networking.DownloadedTextureFlags` in Unity? Explain its purpose and usage.
DownloadedTextureFlags enumeration Description Flags to be set in DownloadedTextureParams to indicate properties of the texture that will be created. These flags should be combined using bitwise-or operator. Properties Property Description None Special value indicating that none of the other options are bein...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6927b8d9cdc8
unity_docs
ui
Explain 'Universal selectors' in Unity.
A USS universal selector, also called the wildcard selector, matches any element. USS universal selectors are analogous to CSS universal selectors. ## Syntax The following is the syntax for a USS universal selector: ``` * { ... } ``` ## Example To demonstrate how simple selectors match elements, here is an example ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5065c6f5300
unity_docs
xr
What is `Rendering.BatchCullingOutputDrawCommands` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Draw commands generated by the culling request. Properties Property Description drawCommandCount The number of elements in the BatchCullingOutputDrawCommands.drawCommands array. drawCommandPic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_793e46c54748
unity_docs
rendering
What is `SkinnedMeshRenderer.GetPreviousVertexBuffer` in Unity? Explain its purpose and usage.
SkinnedMeshRenderer.GetPreviousVertexBuffer Declaration public GraphicsBuffer GetPreviousVertexBuffer (); Returns GraphicsBuffer The skinned mesh vertex buffer as a GraphicsBuffer . Description Retrieves a GraphicsBuffer that provides direct access to the GPU vertex buffer for this skinned mesh, for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e5f9b05f44e
unity_docs
scripting
Give me an overview of the `ParticleSystemForceField` class in Unity.
ParticleSystemForceField class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for Particle System Force Fields. Particle System Force Fields can be used to influence groups of particles that enter each field's zone of influence. The s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_933775e94663_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This class allows us to start Coroutines from Non-Monobehaviour scripts.It has all the functions for coroutine actions e.g. a delayed call back method => AfterWait() Signature: ```csharp public class MonoRunner : MonoBehaviour ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_34e8706a5f61
unity_docs
rendering
Give me an overview of the `StaticBatchingUtility` class in Unity.
StaticBatchingUtility class in UnityEngine / Implemented in: UnityEngine.CoreModule Description StaticBatchingUtility can prepare your objects to take advantage of Unity's static batching. This step is useful as a performance optimization allowing engine to reduce number of draw-calls dramatically, but keep amo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_324d4303aeb5
unity_docs
performance
What is `Jobs.IJobParallelForTransformExtensions.ScheduleReadOnlyByRef` in Unity? Explain its purpose and usage.
IJobParallelForTransformExtensions.ScheduleReadOnlyByRef Declaration public static Unity.Jobs.JobHandle ScheduleReadOnlyByRef (ref T jobData , Jobs.TransformAccessArray transforms , int batchSize , Unity.Jobs.JobHandle dependsOn ); Parameters Parameter Description jobData The job to schedule. trans...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_da092f97f7f3
github
scripting
Write a Unity Editor script for Readme Editor
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System; using System.IO; using System.Reflection; [CustomEditor(typeof(Readme))] [InitializeOnLoad] public class ReadmeEditor : Editor { static string s_ShowedReadmeSessionStateName = "ReadmeEditor.sh...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_473e1211532f
unity_docs
editor
Show me a Unity C# example demonstrating `Search.QueryValidationOptions.skipIncompleteFilters`.
QueryValidationOptions.skipIncompleteFilters public bool skipIncompleteFilters ; Description Boolean indicating if incomplete filters should be skipped. If true, incomplete filters are skipped. If false and validateFilters is true, incomplete filters will generate errors when parsed. ```csharp using System.G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49a0b60b846f
unity_docs
rendering
What is `Device.SystemInfo.supportsGeometryShaders` in Unity? Explain its purpose and usage.
SystemInfo.supportsGeometryShaders public static bool supportsGeometryShaders ; Description This has the same functionality as SystemInfo.supportsGeometryShaders and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf7c20993c83
unity_docs
rendering
What is `Texture3D.GetPixel` in Unity? Explain its purpose and usage.
Texture3D.GetPixel Declaration public Color GetPixel (int x , int y , int z , int mipLevel = 0); Parameters Parameter Description x The x coordinate of the pixel to get. The range is 0 through the (texture width - 1). y The y coordinate of the pixel to get. The range is 0 through the (texture he...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c4c7a932cc8a
github
scripting
Write a Unity C# script called Pass Out
```csharp using System.Collections; using UnityEngine; using UnityEngine.AI; public class PassOut : ClientState { public NavMeshAgent Agent; public float MinPointDist = 0.75f; public float TimeToDisapear; public float TimeToPassOut; private float _currentTime = 0; private bool triggered = fal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91e3582e5fe1
unity_docs
rendering
What is `Rendering.ScriptableCullingParameters.cullingMask` in Unity? Explain its purpose and usage.
ScriptableCullingParameters.cullingMask public uint cullingMask ; Description The mask for the culling operation. Unity copies this value from the Camera.cullingMask property of the Camera from which you obtained the CullingParameters object. You can override this value before performing the culling operation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7c59f1b91a24_doc_2
github
scripting
What does `OnDestroy` do in this Unity script? Explain its purpose and signature.
A Unity event function that is called when the script component has been destroyed. Signature: ```csharp protected virtual void OnDestroy() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c0d3fee1387
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.dampen`.
ParticleSystem.LimitVelocityOverLifetimeModule.dampen public float dampen ; Description Controls how much this module dampens particle velocities that exceed the velocity limit. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBeha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cb653088411
unity_docs
rendering
What is `Device.SystemInfo.supportsTessellationShaders` in Unity? Explain its purpose and usage.
SystemInfo.supportsTessellationShaders public static bool supportsTessellationShaders ; Description This has the same functionality as SystemInfo.supportsTessellationShaders and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d21a35836396
unity_docs
input
What is `WebGLInput` in Unity? Explain its purpose and usage.
WebGLInput class in UnityEngine / Implemented in: UnityEngine.WebGLModule Description WebGLInput provides support for WebGL specific functionalities. Important: Browsers only allow sensor input in secure contexts, which means you must use HTTPS except during development where you might use http://localhost. Sta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0704a39d7e7
unity_docs
scripting
What is `UIElements.UxmlDescriptionCache.RegisterType` in Unity? Explain its purpose and usage.
UxmlDescriptionCache.RegisterType Declaration public static void RegisterType (Type type , UxmlAttributeNames[] attributeNames ); Parameters Parameter Description type The type to register. attributeNames The pre-processed UXML attribute information. Description Registers pre-processed UXML attribute d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d084a6080b9f
unity_docs
physics
What is `Physics2D.IgnoreLayerCollision` in Unity? Explain its purpose and usage.
Physics2D.IgnoreLayerCollision Declaration public static void IgnoreLayerCollision (int layer1 , int layer2 , bool ignore ); Parameters Parameter Description layer1 ID of the first layer. layer2 ID of the second layer. ignore Should collisions between these layers be ignored? Description Choose wheth...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_082bd4e59a19
unity_docs
ui
Explain 'USS built-in variable references' in Unity.
The following tables list all the USS built-in variables. ## metrics Group Role/Control Name Description Professional Personal Runtime metrics --unity-metrics-default-border_radius The default border radius for controls 3px 3px 0px --unity-metrics-default-font_big_size The big font size 14px 14px 15px --unity-metrics...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_139b1e861240
unity_docs
scripting
What is `Unity.Properties.Property_2` in Unity? Explain its purpose and usage.
Property<T0,T1> class in Unity.Properties / Implemented in: UnityEngine.PropertiesModule Implements interfaces: IProperty , IProperty<T0> , IPropertyAccept<T0> Description Base class for implementing properties. This is an abstract class. A IProperty is used as an accessor to the underlying data of a c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f19acd6b147a
unity_docs
animation
Explain '1D Blending' in Unity.
The first option in the Inspector of a Blend Node is the Blend Type . Use this drop-down to select one of the different blend types that can blend according to one or two parameters. 1D Blending blends child motions according to a single parameter. After setting the Blend Type, select the Animation Parameter that contr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51011798a85e
unity_docs
scripting
Show me a Unity C# example demonstrating `Editor.OnPreviewGUI`.
then this method is only called for non-interactive custom previews. The overidden method should render a preview of the asset in the specified rectangle (r). The default implementation is a no-op. Note: Inspector previews are limited to the primary Editor of persistent objects, such as GameObjectInspector, MaterialEd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6fa51f807fa8
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.UpdateIncremental` in Unity? Explain its purpose and usage.
Hierarchy.UpdateIncremental Declaration public bool UpdateIncremental (); Returns bool true if additional invocations are needed to complete the update, false otherwise. Description Updates the hierarchy incrementally.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d751bd2bf17
unity_docs
physics
What is `PhysicsScene2D.IsValid` in Unity? Explain its purpose and usage.
PhysicsScene2D.IsValid Declaration public bool IsValid (); Returns bool True when the physics Scene valid. Description Determines whether the physics Scene is valid or not. If the physics Scene is associated with a specific Scene which has been destroyed then the physics Scene is no longer valid. Note t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1f91200e3113
unity_docs
editor
Explain 'InspectorElement' in Unity.
An InspectorElement is a UI control that displays the properties of a SerializedObject in the Inspector window. You can use it to display the properties of a SerializedObject in a custom Editor window. ## Create an InspectorElement You can create an InspectorElement with UXML or C#. The following C# example creates a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_057c0d5c33a7
unity_docs
xr
Show me a Unity C# example demonstrating `Application.targetFrameRate`.
ded down to the nearest number that does. XR platforms XR platforms ignore both QualitySettings.vSyncCount and Application.targetFrameRate . Instead, the XR SDK controls the frame rate. Unity Editor In the Editor, Application.targetFrameRate affects only the Game view. It has no effect on other Editor windows. A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c66c9c3dc4b
unity_docs
rendering
Show me a Unity C# example demonstrating `GL.TexCoord3`.
ionality is emulated. The Z component is used only when: 1. You access a cubemap (which you access with a vector coordinate, hence x,y & z). 2. You do "projective texturing", where the X & Y coordinates are divided by Z to get the final coordinate. This would be mostly useful for water reflections and similar thing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ee511956131
unity_docs
math
What is `Quaternion.ToAngleAxis` in Unity? Explain its purpose and usage.
Quaternion.ToAngleAxis Declaration public void ToAngleAxis (out float angle , out Vector3 axis ); Parameters Parameter Description angle The rotation angle in degrees. The value is in the range [0, 360]. axis The axis of rotation as a normalized Vector3 . If the quaternion represents no rotation, the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_af1e8cffef46
github
scripting
Write a Unity C# MonoBehaviour script called Event Link Base
```csharp using System; using System.Linq; using System.Reflection; using UnityEngine; namespace Hudossay.AttributeEvents.Assets.Runtime.EventLinks { /// <summary> /// Links one event from broadcaster GameObject to one method from listener GameObject. /// </summary> [Serializable] public class Even...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_d20c7889071a
unity_docs
physics
What are the parameters of `Collider2D.Cast` in Unity?
Returns int The number of results returned. Description Casts the Collider shape into the Scene starting at the Collider position ignoring the Collider itself. This function will take the Collider shape and cast it into the Scene starting at the Collider position in the specified direction for an optional distance and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af790b922fcd
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerMarker.ctor`.
Level.MarkerFlags flags ); Declaration public ProfilerMarker (char* name , int nameLen ); Parameters Parameter Description name Marker name. category Profiler category. nameLen Marker name length. flags The marker flags. Description Constructs a new performance marker for code instrumentation. U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.