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_a95fbe6b4bd5
unity_docs
rendering
What is `WebCamTexture.videoVerticallyMirrored` in Unity? Explain its purpose and usage.
WebCamTexture.videoVerticallyMirrored public bool videoVerticallyMirrored ; Description Returns if the texture image is vertically flipped. Please note, that this will query platform-specific part, which might be not ready before actual video feed started; so it is not enough to call it once after play.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f4fcb237b74
unity_docs
editor
What is `PlayerSettings.Android.blitType` in Unity? Explain its purpose and usage.
PlayerSettings.Android.blitType public static AndroidBlitType blitType ; Description Choose how content is drawn to the screen. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class BlitTypeSample : MonoBehaviour { [MenuItem("Build/BlitType Sample")] public static void BuildB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbab3e222b6a
unity_docs
scripting
What is `Color.red` in Unity? Explain its purpose and usage.
Color.red public static Color red ; Description Solid red. RGBA is (1, 0, 0, 1). Returns a solid red Color. RGBA is (1, 0, 0, 1). Use it to change or compare the Color of a GameObject. ```csharp //Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79827a5c9350
unity_docs
audio
What are the parameters of `AudioSource.PlayOneShot` in Unity?
Description Plays an AudioClip , and scales the AudioSource volume by volumeScale. AudioSource.PlayOneShot does not cancel clips that are already being played by AudioSource.PlayOneShot and AudioSource.Play . For more information on how this method differs from AudioSource.Play , see AudioSource . ```csharp using Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b67220a3f0a
unity_docs
rendering
What is `DefaultLightingExplorerExtension.GetLightColumns` in Unity? Explain its purpose and usage.
DefaultLightingExplorerExtension.GetLightColumns Declaration protected LightingExplorerTableColumn[] GetLightColumns (); Returns LightingExplorerTableColumn[] Column definitions for Lights. Description Returns column definitions for Lights.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ff298738de6
unity_docs
rendering
What is `LightmapParameters.backFaceTolerance` in Unity? Explain its purpose and usage.
LightmapParameters.backFaceTolerance public float backFaceTolerance ; Description The percentage of rays shot from a ray origin that must hit front faces to be considered usable. The precompute calculates visibility from ray origins to clusters, but attempts to reject ray origins that are inside geometry. If t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d10a42c73de
unity_docs
physics
What is `PhysicsScene2D` in Unity? Explain its purpose and usage.
PhysicsScene2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Represents a single instance of a 2D physics Scene. A 2D physics Scene owns all 2D physics component objects added to it and can perform a simulation of them as well as execute queries against them. All of this functi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c7b11f419d51
unity_docs
rendering
Explain 'Get started with textures' in Unity.
Learn about texture types, GPU texture formats , and mipmaps. Page Description Introduction to textures Learn about how textures provide the fine detail of a surface, and how different features use textures. Texture types Learn about albedo textures, alpha maps, normal maps , detail maps, and terrain heightmaps . Textu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4fc53bdc4762
unity_docs
scripting
Explain 'Vector2Field' in Unity.
A Vector2Field lets users enter a Vector2 value. Note : To align a Vector2Field with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a Vector2Field You can create a Vector2Field with UI Builder, UXML, and C#. The fol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7828dd6fc181
unity_docs
editor
What is `SceneManagement.RemovedGameObject.Revert` in Unity? Explain its purpose and usage.
RemovedGameObject.Revert Declaration public void Revert ( InteractionMode mode ); Description Restore the removed GameObject to the Prefab instance. See PrefabOverride.Revert . Additional resources: PrefabOverride.Revert , PrefabUtility.RevertRemovedGameObject .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d58845fd583c
unity_docs
scripting
Explain 'Load SSH keys automatically on Windows (OpenSSH)' in Unity.
If you use Windows and its built-in OpenSSH client, follow these steps to configure the OpenSSH client so you can use your passphrase-protected SSH key without prompts. ## Before you begin Check if you have any existing SSH keys. Refer to the GitHub Docs article, Checking for existing SSH keys . If you don’t have an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_640b875cf8bb
unity_docs
scripting
Show me a Unity code example for 'Registering a Search Provider'.
new SearchProvider instance. The SearchProvider instance must have the following: A unique type . For example, Asset , Menu , or Scene . A displayName to use in the Filters pane . The optional filterId provides a search token for text-based filtering . For example, p: is the filter ID for Asset searches . ## Registeri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86befb41aeb0
unity_docs
xr
What is `Unity.Hierarchy.HierarchyViewModel` in Unity? Explain its purpose and usage.
HierarchyViewModel class in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Description A hierarchy view model is a read-only filtering view of a HierarchyFlattened . Properties Property Description Count The total number of nodes. Hierarchy Accesses the Hierarchy. HierarchyFl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_954b97a0b605
github
scripting
Write a Unity C# UI script for TMP_Example Script_01
```csharp using UnityEngine; using UnityEngine.UI; using System.Collections; using TMPro; namespace TMPro.Examples { public class TMP_ExampleScript_01 : MonoBehaviour { public enum objectType { TextMeshPro = 0, TextMeshProUGUI = 1 }; public objectType ObjectType; public bool isStati...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_0c224e90813b
unity_docs
rendering
Explain 'Noise module reference' in Unity.
Add turbulence to particle movement using this module. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Separate Axes Control the strength and remapping in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e0b8dcaa337
unity_docs
scripting
What is `AndroidJNI.SetStaticStringField` in Unity? Explain its purpose and usage.
AndroidJNI.SetStaticStringField Declaration public static void SetStaticStringField (IntPtr clazz , IntPtr fieldID , string val ); Description Sets the value of a static field in the specified object. This is a convenience function that calls SetStaticObjectField() with the same parameters, but performs the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5e4659c76f3
unity_docs
xr
Show me a Unity C# example demonstrating `Networking.DownloadHandlerScript`.
lowly, over many frames, the supplied byte array might be too small. Note : The actual downloads occur on a worker thread, but all DownloadHandlerScript callbacks operate on the main thread. Avoid performing computationally heavy operations from these callbacks. Additional resources: DownloadHandler.ReceiveData , D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_673cecbee049
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.TimestampConversionRatio`.
TimestampConversionRatio struct in Unity.Profiling.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description Fraction that converts the Profiler timestamp to nanoseconds. Use to convert the Profiler timestamp value obtained with GetTimestamp to nanoseconds. ```csharp using Unity.Profiling.LowLevel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f16813b8d184
unity_docs
scripting
What is `Keyframe.ctor` in Unity? Explain its purpose and usage.
Keyframe Constructor Declaration public Keyframe (float time , float value ); Description Create a keyframe. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Make a GameObject follow a sine function. // Over the X and Y axis. AnimationCurve anim; Keyframe[] ks; void Start() { ks = ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5f7486d74507
unity_docs
physics
In Unity's 'Create functional layers in Unity', what is 'Add a new layer' and how does it work?
There are two ways you can create a new layer: Select the Tags and Layers window (main menu: Edit > Project Settings > Tags and Layers > Layers ). Select a GameObject, select the Layer dropdown in the Inspector window, and select Add Layer from the menu. To remember the intended function for a layer, give it a descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a43ca50fab04
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.enumDisplayNames`.
SerializedProperty.enumDisplayNames public string[] enumDisplayNames ; Description Display-friendly names of enumeration of an enum property. Similar to enumNames, but formatted with spaces and capitalization. Additional resources: enumNames , propertyType , SerializedPropertyType.Enum , enumValueIndex , I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_05971749c5be
unity_docs
audio
Explain 'Audio Profiler module reference' in Unity.
The Audio Profiler module monitors the performance of the audio system in your application, such as the total load and voice counts. To open the Profiler window, go to menu: Window > Analysis > Profiler . For information on how to use the Profiler, refer to Profiler introduction The Audio Profiler module’s chart tracks...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5dbc40ba7989
unity_docs
rendering
In Unity's 'AlphaToMask command in ShaderLab reference', what is 'Syntax' and how does it work?
This command makes a change to the render state. Use it in a Pass block to set the render state for that Pass, or use it in a SubShader block to set the render state for all Passes in that SubShader. Signature Example syntax Function AlphaToMask <state> AlphaToMask Off Enables or disables alpha-to-coverage mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_01cbdc4ddfe2
unity_docs
rendering
In Unity's 'Cull command in ShaderLab reference', what is 'Syntax' and how does it work?
This command makes a change to the render state. Use it in a Pass block to set the render state for that Pass, or use it in a SubShader block to set the render state for all Passes in that SubShader. Signature Example syntax Function Cull <state> Cull Back Sets which polygons the GPU should cull, based on the direction...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77546ffd54c6
unity_docs
math
What is `AndroidJNI.CallStaticSByteMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticSByteMethodUnsafe Declaration public static sbyte CallStaticSByteMethodUnsafe (IntPtr clazz , IntPtr methodID , jvalue* args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Java N...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e7347e0b559
unity_docs
math
What is `Rendering.RayTracingAABBsInstanceConfig.dynamicGeometry` in Unity? Explain its purpose and usage.
RayTracingAABBsInstanceConfig.dynamicGeometry public bool dynamicGeometry ; Description Whether the data in RayTracingAABBsInstanceConfig.aabbBuffer is dynamic. If the data is dynamic and changes frequently, Unity rebuilds the acceleration structure of the geometry referenced by this ray tracing instance conf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_17
github
scripting
What does `IsBehindGlobeHorizon` do in this Unity script? Explain its purpose and signature.
Returns true if the screen projection of this Positioner would appear beyond the horizon for the current viewpoint.For example, when viewing the map zoomed out so that the entire globe is visible, calling this method on aPositioner that is located on the opposite side of the Earth from the camera would return true.Whet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8c57c1dfd0a
unity_docs
scripting
What is `ClipboardUtility.canCopyGameObject` in Unity? Explain its purpose and usage.
ClipboardUtility.canCopyGameObject public static Func<GameObject,bool> canCopyGameObject ; Description Optional filtering functions invoked to determine if a GameObject can be copied before any action is taken. All registered delegates of canCopyGameObject will be evaluated and must return true for a GameObject...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa4b4e85a57b
unity_docs
scripting
What is `Compass.headingAccuracy` in Unity? Explain its purpose and usage.
Compass.headingAccuracy public float headingAccuracy ; Description Accuracy of heading reading in degrees. Negative value means unreliable reading. If accuracy is not supported or not available, 0 is returned. Not all platforms support this precise accuracy, so the value may vary between few constant values.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65a04ed18236
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.ProcessingState` in Unity? Explain its purpose and usage.
ProcessingState enumeration Description The state of the read request at the time of retrieval of AsyncReadManagerMetrics . Properties Property Description Unknown The read request status was unknown. InQueue The read request was waiting in the queue to be read. Reading The read request was in the process of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_511706c65278
unity_docs
editor
Show me a Unity C# example demonstrating `ObjectNames.GetUniqueName`.
Returns string A name not found in the list of pre-existing names. Description Make a unique name using the provided name as a base. If the target name is in the provided list of existing names, a unique name is generated by appending the next available numerical increment. Additional resources: GameObjectUtil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_df072ccb7c4d
unity_docs
scripting
Show me a Unity code example for 'Mouse events'.
moves over an element, or buttons are pressed on the mouse. This code sample highlights the event firing of both MouseDownEvent and MouseEnterEvent , and how to use the event parameters. To see the example in action, do the following: Create a new C# script called MouseEventTestWindow.cs . Copy the example into the C# ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c15cf364d31d
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.GetCompileFlagsForFile` in Unity?
Returns List<string> The compile flags for the specified file. Description Returns compile flags set for the specific file on a given target. Null is returned if the file has no configured compile flags or the file is not configured for building on the given target. ```csharp using UnityEditor; using System.Collections...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f45a8224b64b
unity_docs
editor
What is `IMGUI.Controls.CapsuleBoundsHandle` in Unity? Explain its purpose and usage.
CapsuleBoundsHandle class in UnityEditor.IMGUI.Controls / Inherits from: IMGUI.Controls.PrimitiveBoundsHandle Description A compound handle to edit a capsule-shaped bounding volume in the Scene view. A capsule volume is defined by two parameters. The height specifies the upper and lower bounds along the heig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa1e075c96f6
unity_docs
rendering
Explain 'Scriptable Render Pipeline Core' in Unity.
com.unity.render-pipelines.core ## Description SRP Core makes it easier to create or customize a Scriptable Render Pipeline (SRP). SRP Core contains reusable code, including boilerplate code for working with platform-specific graphics APIs, utility functions for common rendering operations, and shader libraries. The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a5355a085b36
unity_docs
ui
Show me a Unity C# example demonstrating `EditorWindow.DiscardChanges`.
sUnsavedChanges property is not reset to false. Note, if the Editor has multiple prompts to the user to discard their changes, the Editor will call this method as part of a list of changes that need to be discarded. If this method throws an exception, Unity cancels the discard process for all remaining prompts. In t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_709481846c07
unity_docs
rendering
What is `Rendering.RayTracingAccelerationStructure.Settings.buildFlagsDynamicGeometries` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.Settings.buildFlagsDynamicGeometries public Rendering.RayTracingAccelerationStructureBuildFlags buildFlagsDynamicGeometries ; Description The flags Unity uses when it builds acceleration structures associated with dynamic geometries. The flags can be customized per ray tracin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ec9cc6db45b
unity_docs
physics
What is `UIElements.BaseBoolField.SetValueWithoutNotify` in Unity? Explain its purpose and usage.
BaseBoolField.SetValueWithoutNotify Declaration public void SetValueWithoutNotify (bool newValue ); Description Sets the value of the BaseBoolField , but does not notify the rest of the hierarchy of the change. This method is useful when you want to change the control's value without triggering events. Fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fd887ae9e1a
unity_docs
rendering
What is `TextureImporter.textureShape` in Unity? Explain its purpose and usage.
TextureImporter.textureShape public TextureImporterShape textureShape ; Description The shape of the imported texture. The default value is Texture2D . The texture can also be imported as a Cubemap , Texture2DArray or a Texture3D . Additional resources: TextureImporterShape , Texture Assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47346600cca8
unity_docs
rendering
What is `TileBaseEditor.RenderStaticPreview` in Unity? Explain its purpose and usage.
TileBaseEditor.RenderStaticPreview Declaration public Texture2D RenderStaticPreview (string assetPath , Object[] subAssets , int width , int height ); Parameters Parameter Description assetPath The asset to operate on. subAssets An array of all Assets at assetPath. width Width of the created texture...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7d6e195f947c
unity_docs
scripting
Show me a Unity code example for 'Enable optional features for QNX'.
al time from the time the application launches. There are two types of Startup time logging: Real: This is the actual wall or clock time, similar to a stopwatch used for calculating the time. User: This is the time an application or one of its threads has spent on a CPU core. This can be higher than the Real time if mu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec8eeb9ef0bd
unity_docs
editor
What is `EditorGUILayout.ToolContextToolbarForTarget` in Unity? Explain its purpose and usage.
EditorGUILayout.ToolContextToolbarForTarget Declaration public static void ToolContextToolbarForTarget ( GUIContent content , Object target ); Parameters Parameter Description content An optional prefix label. Pass null to omit the label. target The target object. This may be either a Component or an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f8177d96cf5
unity_docs
rendering
What is `Rendering.RealtimeGICPUUsage.Medium` in Unity? Explain its purpose and usage.
RealtimeGICPUUsage.Medium Description 50% of the allowed CPU threads are used as worker threads. 50% of the total number of allowed logical CPU cores are populated with Enlighten Realtime Global Illumination worker threads. Additional resources: TierSettings.realtimeGICPUUsage .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6fc4aecf0e9
unity_docs
scripting
What is `Windows.WebCam.VideoCapture.OnVideoCaptureResourceCreatedCallback` in Unity? Explain its purpose and usage.
VideoCapture.OnVideoCaptureResourceCreatedCallback Declaration public delegate void OnVideoCaptureResourceCreatedCallback ( Windows.WebCam.VideoCapture captureObject ); Parameters Parameter Description captureObject The VideoCapture instance. Description Called when a VideoCapture resource has been create...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_efbfe39ea8c4
unity_docs
rendering
What is `XR.XRDisplaySubsystem.TextureLayout` in Unity? Explain its purpose and usage.
TextureLayout enumeration Description Flags that represents supported texture layout. Properties Property Description Texture2DArray Textures could be configured to a texture2DArray type. SingleTexture2D Textures could be configured to a texture2D that represents multiple views. SeparateTexture2Ds Textures co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b388765dd8e8
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startSpeed`.
ParticleSystem.MainModule.startSpeed public ParticleSystem.MinMaxCurve startSpeed ; Description The initial speed of particles when the Particle System first spawns them. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] pub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b916a8c6e299
unity_docs
performance
In Unity's 'Copying NativeContainer structures', what is 'Secondary version numbers' and how does it work?
To support situations when the size of the dynamic native container changes, the safety system includes a secondary version number in an AtomicSafetyHandle . This mechanism is similar to the versioning mechanism, but uses a second version number stored in the central record which can be incremented independently of the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_518d4f7363fc
unity_docs
scripting
What is `Accessibility.AssistiveSupport.screenReaderStatusChanged` in Unity? Explain its purpose and usage.
AssistiveSupport.screenReaderStatusChanged Description Event that is invoked on the main thread when the screen reader is enabled or disabled. For all the supported platforms, refer to AssistiveSupport .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e9455062c76
unity_docs
editor
Explain 'Update the GameActivity library' in Unity.
The GameActivity application entry point is implemented as a library separate from the Unity Editor which means that you can update the library independently. This is useful if Google provides bug fixes that your project requires because you can acquire the fixes via a GameActivity library version update. Note : Unity ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f67d02521138
unity_docs
physics
What are the parameters of `Physics.Simulate` in Unity?
Description Simulate physics in the Scene. Call this to simulate physics manually when the simulation mode is set to Script. Simulation includes all the stages of collision detection, rigidbody and joints integration, and filing of the physics callbacks (contact, trigger and joints). Calling Physics.Simulate does not c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f4dc0999eb02
unity_docs
animation
What is `Animations.LookAtConstraint.AddSource` in Unity? Explain its purpose and usage.
LookAtConstraint.AddSource Declaration public int AddSource ( Animations.ConstraintSource source ); Parameters Parameter Description source The source object and its weight. Returns int Returns the index of the added source. Description Adds a constraint source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_378000d6c52f
unity_docs
editor
What is `SerializedProperty.numericType` in Unity? Explain its purpose and usage.
SerializedProperty.numericType public SerializedPropertyNumericType numericType ; Description Return the precise type for Integer and Floating point properties. (Read Only) The propertyType property classifies all supported Integer types as SerializedPropertyType.Integer , and both single and double preci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cd7c4f56275
unity_docs
editor
What is `Experimental.Rendering.ScriptableBakedReflectionSystem.Tick` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ScriptableBakedReflectionSystem.Tick Declaration public void Tick ( Experimental.Rendering.SceneStateHash sceneStateHash , Experimental.Rendering.IScriptableBakedReflectionSystemStageNotifier handle ); Parameters Paramet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c911eeef2fc
unity_docs
rendering
What is `Rendering.BatchCullingOutputDrawCommands.visibleInstances` in Unity? Explain its purpose and usage.
BatchCullingOutputDrawCommands.visibleInstances public int* visibleInstances ; Description The indices of visible instances to render. Because each draw command can have a different number of instances, BatchRendererGroup stores the instance indices here, and each draw command indexes them with the visibleOffse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_24ff92555cc5
unity_docs
animation
Explain 'Create presets to save and reuse settings' in Unity.
Presets are assets used to save and reuse settings configurations from Unity Editor windows. Presets help you avoid having to manually configure the same settings repeatedly. You can save the property configuration of a component, asset, or Project Settings window and then apply that configuration in other instances of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cf5ca456c7bb
unity_docs
xr
Show me a Unity code example for 'Use private repositories with HTTPS Git URLs'.
he different credential store configurations supported by GCM. ## Procedures The procedure you follow depends on whether your repository uses two-factor authentication (2FA). ## Procedure for repositories that don’t use 2FA Follow these steps to access packages in private repositories that use HTTPS Git URLs withou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_052d64198810
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.ToString`.
oString Declaration public string ToString (); Declaration public string ToString (string format ); Declaration public string ToString (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifies cultur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d4ce3daa948b
github
scripting
Write a Unity C# script called Player Manager System
```csharp using System.Diagnostics.Contracts; using UnityEngine; using GameFramework; using GameFramework.Logging; // [RegisterGameSystem(typeof(PlayerManagerSystem))] class PlayerManagerSystem : GameSystem { protected override void OnRegistered(GameSystem system) { PlayerManager.System = this; ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_479a491208ee
unity_docs
networking
What is `Android.AndroidScreenLayoutSize.XLarge` in Unity? Explain its purpose and usage.
AndroidScreenLayoutSize.XLarge Description Mirrors the Android property value SCREENLAYOUT_SIZE_XLARGE . For information about the property value, refer to the Android developer documentation on SCREENLAYOUT_SIZE_XLARGE .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_160feb314fe5
unity_docs
rendering
What is `Texture.allowThreadedTextureCreation` in Unity? Explain its purpose and usage.
Texture.allowThreadedTextureCreation public static bool allowThreadedTextureCreation ; Description Allow Unity internals to perform Texture creation on any thread (rather than the dedicated render thread). When set to true, Unity internals will try to create Textures on a separate worker thread, rather than the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97523c55fad1
unity_docs
scripting
What is `Device.Application.persistentDataPath` in Unity? Explain its purpose and usage.
Application.persistentDataPath public static string persistentDataPath ; Description This has the same functionality as Application.persistentDataPath . At the moment, the Device Simulator doesn't support simulation of this property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_462de09cf88a
github
scripting
Write a Unity C# XR/VR script for Device Interactor Pos Rot Offset
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR; public class DeviceInteractorPosRotOffset : MonoBehaviour { // Start is called before the first frame update void Awake() { Debug.Log("In DeviceInteractorPosRotOffset, XRSettings.loadedD...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_543256b89274
unity_docs
rendering
Explain 'Example of a shader that supports GPU Instancing in the Built-In Render Pipeline' in Unity.
The following example demonstrates how to create an instanced vertex and fragment shader with different color values for each instance. Unlike the surface shader , when you create the vertex and fragment shader you must use UNITY_SETUP_INSTANCE_ID to manually set up an instance ID. ``` Shader "Custom/SimplestInstancedS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdfc55e53fb5
unity_docs
scripting
What is `Playables.DirectorUpdateMode.Manual` in Unity? Explain its purpose and usage.
DirectorUpdateMode.Manual Description Update mode is manual. You need to manually call PlayableGraph.Evaluate with your own deltaTime. This can be useful for graphs that are completely disconnected from the rest of the game. For example, localized bullet time.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_50fa493a152d
unity_docs
scripting
What is `TerrainWizard` in Unity? Explain its purpose and usage.
TerrainWizard class in UnityEditor / Inherits from: ScriptableWizard Description Provides methods for displaying the terrain wizard. Base class that manages the wizards used for displaying and altering terrain data. Additional resources: DetailMeshWizard Public Methods Method Description ResetDefaults In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d465d72d97ed
unity_docs
scripting
What is `Progress.Item.priority` in Unity? Explain its purpose and usage.
Progress.Item.priority public int priority ; Description Returns the progress indicator's priority. Additional resources: Progress.Item.SetPriority , Progress.GetPriority , Progress.SetPriority .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7a0ab71b40f
unity_docs
ui
What is `EditorWindow.ShowNotification` in Unity? Explain its purpose and usage.
EditorWindow.ShowNotification Declaration public void ShowNotification ( GUIContent notification ); Parameters Parameter Description notification The contents of the notification message. fadeoutWait The duration the notification is displayed. Measured in seconds. Description Show a notification message...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16fe628ff29c
unity_docs
math
Show me a Unity C# example demonstrating `HandleUtility.GUIPointToScreenPixelCoordinate`.
oScreenPixelCoordinate Declaration public static Vector2 GUIPointToScreenPixelCoordinate ( Vector2 guiPoint ); Description Converts a 2D GUI position to screen pixel coordinates. The bottom-left of the screen or window is at (0, 0). The top-right of the screen or window is at ( Screen.width , Screen.height...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_396c74ae21ed
unity_docs
rendering
In Unity's 'Reflection Probe Inspector window reference', what is 'Runtime Settings' and how does it work?
Property Description Importance A value that indicates the relative priority of this Reflection Probe for sorting. Unity renders probes with a higher value on top of those with a lower value where an object is in range of more than one probe. This setting also affects Blending . Refer to Using Reflection Probes for mor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_09421087904a
unity_docs
physics
Show me a Unity code example for 'Example scripts for collider events'.
gure your scripts to trigger different events based on the properties of the other collider ’s associated GameObject , such as its name or tag. This is useful if, for example, you want to allow some colliders to produce an event, but not others. The following example prints a different message depending on whether the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ea5a1058c3c
unity_docs
editor
What are the parameters of `AssetDatabase.LoadObjectAsync` in Unity?
Returns AssetDatabaseLoadOperation A UnityEditor.AssetDatabaseLoadOperation which you can use to track the progress of the operation. Description Loads a specific Object and its dependencies from an Asset file asynchronously. All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png". Addi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60ec14b208ec
unity_docs
rendering
What is `ImageConversion.EncodeArrayToEXR` in Unity? Explain its purpose and usage.
ImageConversion.EncodeArrayToEXR Declaration public static byte[] EncodeArrayToEXR (Array array , Experimental.Rendering.GraphicsFormat format , uint width , uint height , uint rowBytes , Texture2D.EXRFlags flags ); Parameters Parameter Description array The byte array to convert. format The pixel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f629d908a043
unity_docs
rendering
What is `MaterialEditor.TextureCompatibilityWarning` in Unity? Explain its purpose and usage.
MaterialEditor.TextureCompatibilityWarning Declaration public void TextureCompatibilityWarning ( MaterialProperty prop ); Parameters Parameter Description prop The texture property to check and display warning for, if necessary. Description Checks if particular property has incorrect type of texture speci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3a6207b87b1
unity_docs
scripting
What is `Networking.UnityWebRequestTexture.GetTexture` in Unity? Explain its purpose and usage.
UnityWebRequestTexture.GetTexture Declaration public static Networking.UnityWebRequest GetTexture (string uri ); Declaration public static Networking.UnityWebRequest GetTexture (Uri uri ); Declaration public static Networking.UnityWebRequest GetTexture (string uri , bool nonReadable ); Declarati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a8ab9732ad8
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingFlags.ComputeMaterialsCRC` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingFlags.ComputeMaterialsCRC Description Causes RayTracingAccelerationStructure.CullInstances to compute the CRC hash values of all unique Materials used by ray tracing instances that were added to the acceleration structure. The array of Material CRC values is returned by RayTracingAcceler...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fcdccbd5073c
unity_docs
xr
In Unity's 'Verifying downloaded AssetBundles', what is 'Cyclic redundancy checks' and how does it work?
To check that AssetBundles aren’t corrupted, you can use cyclic redundancy checks (CRC) against the 32-bit checksum that Unity generates during the AssetBundle build process. The checksum is stored in the.manifest file, and accessible via BuildPipeline.GetCRCForAssetBundle . When downloading AssetBundles via UnityWebRe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d26c6d1391aa
unity_docs
scripting
What is `ParticleSystem.CustomDataModule.SetVectorComponentCount` in Unity? Explain its purpose and usage.
ParticleSystem.CustomDataModule.SetVectorComponentCount Declaration public void SetVectorComponentCount ( ParticleSystemCustomData stream , int count ); Parameters Parameter Description stream The name of the custom data stream to apply the curve to. curveCount The number of curves to generate data for....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef989055012d
unity_docs
performance
What are the parameters of `Profiling.CustomSampler.Create` in Unity?
Returns CustomSampler CustomSampler object or null if a built-in Sampler with the same name exists. Description Creates a new CustomSampler for profiling parts of your code. Multiple calls with the same name parameter return different CustomSampler objects which refer to the same native representation. CustomSampler re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eecfa8c8a033
unity_docs
scripting
What is `PlayerSettings` in Unity? Explain its purpose and usage.
PlayerSettings class in UnityEditor / Inherits from: Object Description Use Player settings to define how Unity builds and displays your final application. Static Properties Property Description accelerometerFrequency Accelerometer update frequency. actionOnDotNetUnhandledException Sets the crash behavior ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f39112f43504
unity_docs
scripting
Explain 'Object-oriented development' in Unity.
Traditional Unity projects are grounded in object-oriented design principles and programming philosophy, which is centered around objects, their properties and functions, and the relations between these objects. Code is organized around GameObjects whose behavior is controlled by attached MonoBehaviour components . In ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_620edd8c61fc
unity_docs
scripting
What is `Build.Content.GameManagerDependencyInfo.referencedObjects` in Unity? Explain its purpose and usage.
GameManagerDependencyInfo.referencedObjects public ReadOnlyCollection<ObjectIdentifier> referencedObjects ; Description The project-wide identifiers for any objects referenced by the manager classes in the managerObjects list.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99ca861083ef
unity_docs
editor
What is `ObjectNames` in Unity? Explain its purpose and usage.
ObjectNames class in UnityEditor Description Helper class for constructing displayable names for objects. Static Methods Method Description GetClassName Class name of an object. GetDragAndDropTitle Drag and drop title for an object. GetInspectorTitle Inspector title for an object. GetUniqueName Make a uniqu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b14daa7c6a5
unity_docs
ui
Show me a Unity C# example demonstrating `AssetImporters.AssetImporterEditor.ApplyRevertGUI`.
orterEditor.ApplyRevertGUI Declaration protected void ApplyRevertGUI (); Description Add's the 'Apply' and 'Revert' buttons to the editor. To be called from the OnInstpectorGUI event handler method as this is where the Apply/Revert buttons are placed on editor. This method may not be overridden but custom behav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b29c81b1a3b1
unity_docs
editor
Give me an overview of the `Sysroot` class in Unity.
Sysroot class in UnityEditor Description Base class for implementing sysroots and toolchains for IL2CPP Properties Property Description HostArch Returns name of the host architecture HostPlatform Returns name of the host platform Name Returns name of the sysroot TargetArch Returns name of the target archite...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e31e752cd158
unity_docs
rendering
What is `Rendering.BatchCullingContext.cullingSplits` in Unity? Explain its purpose and usage.
BatchCullingContext.cullingSplits public NativeArray<CullingSplit> cullingSplits ; Description The array of CullingSplit structs. A Camera and a Spot Light have one culling split. A Point Light has six splits, one split per cubemap face. Directional Lights have 1-4 splits depending on their shadow cascade cou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5903bc3e1756
unity_docs
editor
What is `SettingsProvider` in Unity? Explain its purpose and usage.
SettingsProvider class in UnityEditor Description SettingsProvider is the configuration class that specifies how a Project setting or a preference should appear in the Settings or Preferences window. In order to add new Project settings or preference pages, define a SettingsProvider. The SettingsProvider class pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc7f9186fd0b
unity_docs
scripting
What is `Search.SearchColumnFlags` in Unity? Explain its purpose and usage.
SearchColumnFlags enumeration Description Search column flags are used to set multiple states. Properties Property Description None Indicates that no column options are used. Hidden Indicates that the search column is currently hidden in the Search Table view. Sorted Indicates that the search column in the Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3d435180cde
unity_docs
scripting
Give me an overview of the `TerrainQualityOverrides` class in Unity.
TerrainQualityOverrides enumeration Description Flags used by QualitySettings to specify which Terrain fields the quality settings should override. Properties Property Description None Override no field. PixelError Override Terrain.heightmapPixelError. BasemapDistance Override Terrain.basemapDistance. Det...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed00aa0748f3
unity_docs
ui
What is `UIElements.VisualElement.scaledPixelsPerPoint` in Unity? Explain its purpose and usage.
VisualElement.scaledPixelsPerPoint public float scaledPixelsPerPoint ; Description Return the resulting scaling from the panel that considers the screen DPI and the customizable scaling factor, but not the transform scale of the element and its ancestors. See Panel.scaledPixelsPerPoint. This should only be ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e4e5bc064c77
unity_docs
physics
In Unity's 'Box collider component reference', what is 'Layer overrides' and how does it work?
The Layer Overrides section provides properties that allow you to override the project-wide Layer-based collision detection settings for this collider. Property Description Layer Override Priority Define the priority of this collider override. When two colliders have conflicting overrides, the settings of the collider ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24f95cfcff7e
unity_docs
math
What is `XR.XRNodeState` in Unity? Explain its purpose and usage.
XRNodeState struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description Describes the state of a node tracked by an XR system. To track available XR nodes and acquire state data, handle the InputTracking.nodeAdded and InputTracking.nodeRemoved events or call InputTracking.GetNodeStates . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64eccfd754b9
unity_docs
rendering
What are the parameters of `ImageConversion.EncodeArrayToJPG` in Unity?
Description Encodes this array into JPG format. This function returns a byte array which is the JPG file data. You can store the encoded data as a file or send it over the network without further processing. This function does not work on any compressed format. The encoded JPG data will be either 8b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_afee4fa24e4f
unity_docs
ui
In Unity's 'ToolbarSearchField', what is 'Create a ToolbarSearchField' and how does it work?
You can create a ToolbarSearchField with UI Builder, UXML, or C#. The following C# example creates a ToolbarSearchField a placeholder text and a value changed callback: ```csharp using UnityEditor.UIElements; ... var toolbarSearchField = new ToolbarSearchField(); toolbarSearchField.value = "Search me"; toolbarSearchFie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aac93c4568a3
unity_docs
editor
What is `Search.QueryValidationOptions.skipUnknownFilters` in Unity? Explain its purpose and usage.
QueryValidationOptions.skipUnknownFilters public bool skipUnknownFilters ; Description Boolean indicating if unknown filters should be skipped. If true, unknown filters are skipped. If false and validateFilters is true, unknown filters will generate errors if no default handler is provided with QueryEngine.S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6c92f1730ae0
unity_docs
ui
Show me a Unity code example for 'RadioButtonGroup'.
Group by entering the choices you want separated by commas in the Choices field located within the Inspector panel of the RadioButtonGroup. To set the default value, in the Inspector of the RadioButtonGroup, enter the numbering sequence of the option in Value , starting at 0 . C# The following C# example creates a new ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_409180bb5afe
unity_docs
scripting
Explain 'Awaitable code example reference' in Unity.
The examples in this reference demonstrate Awaitable solutions to common scenarios encountered when writing asynchronous code. ## Asynchronous tests Unity’s Test Framework doesn’t recognize Awaitable as a valid test return type. However, the following example shows how you can use the Awaitable implementation of IEnu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_530ca038f77e
unity_docs
xr
What is `AssetBundleCreateRequest.assetBundle` in Unity? Explain its purpose and usage.
AssetBundleCreateRequest.assetBundle public AssetBundle assetBundle ; Description Asset object being loaded (Read Only). Note that accessing asset before isDone is true will stall the loading process.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e93bf351a43
unity_docs
scripting
What is `Experimental.GraphView.Scope.AcceptsElement` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.AcceptsElement Declaration public bool AcceptsElement ( Experimental.GraphView.GraphElement element , ref string reasonWhyNotAccepted ); Parameters Parameter Description element The element to add. reasonWhyNotAc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5cbed6a40ca9
unity_docs
performance
What is `Jobs.IJobParallelForTransformExtensions` in Unity? Explain its purpose and usage.
IJobParallelForTransformExtensions class in UnityEngine.Jobs / Implemented in: UnityEngine.CoreModule Description Contains extension methods for IJobParallelForTransform. Static Methods Method Description EarlyJobInit Gathers and caches reflection data for the internal job system's managed bindings. RunRead...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6d9c95c7f83
unity_docs
rendering
What is `Texture2D.UpdateExternalTexture` in Unity? Explain its purpose and usage.
Texture2D.UpdateExternalTexture Declaration public void UpdateExternalTexture (IntPtr nativeTex ); Parameters Parameter Description nativeTex Native 2D texture object. Description Updates Unity texture to use different native texture object. This function is mostly useful for native code plugins that cr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.