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_632e123a9375
unity_docs
performance
What is `U2D.SpriteDataAccessExtensions.GetIndices` in Unity? Explain its purpose and usage.
SpriteDataAccessExtensions.GetIndices Declaration public static NativeArray<ushort> GetIndices ( Sprite sprite ); Returns NativeArray<ushort> A read-only list of indices indicating how the triangles are formed between the vertices. The array is marked as undisposable. Description Returns a list of indice...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bb14d0124899
github
scripting
Write a Unity C# MonoBehaviour script called AI State
```csharp using UnityEngine; using System.Collections.Generic; namespace Goon.AI { public class AIState : MonoBehaviour { #if UNITY_EDITOR public string stateName = "State"; public Vector2 nodePos = Vector2.zero; #endif [Space(10)] public AIAction action; ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_43474ed16ce5
unity_docs
scripting
Explain 'Add and remove UPM packages or feature sets' in Unity.
You can perform a variety of package management tasks by using the Package Manager window. Follow these tasks to manage UPM packages or feature sets . For information about managing asset packages , refer to Add and remove asset packages . Install a feature set from the Unity registry Install a UPM package from a regis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9b35af00cd5
unity_docs
audio
What is `AudioSource.PlayClipAtPoint` in Unity? Explain its purpose and usage.
AudioSource.PlayClipAtPoint Declaration public static void PlayClipAtPoint ( AudioClip clip , Vector3 position , float volume = 1.0F); Parameters Parameter Description clip Audio data to play. position Position in world space from which sound originates. volume Playback volume (range from 0.0 - 1....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3863f54e8078_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A GameObject representing a connection to a device over ModBus TCP Signature: ```csharp public class ModBusConnectionInstance : MonoBehaviour ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_32260043d6ba
unity_docs
editor
What is `TreePrototype` in Unity? Explain its purpose and usage.
TreePrototype class in UnityEngine / Implemented in: UnityEngine.TerrainModule Description Simple class that contains a pointer to a tree prototype. This class is used by the TerrainData gameObject. Properties Property Description bendFactor Bend factor of the tree prototype. navMeshLod The LOD index of a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6773e114b41b
unity_docs
rendering
What is `Rendering.BatchCullingContext.receiverPlaneCount` in Unity? Explain its purpose and usage.
BatchCullingContext.receiverPlaneCount public int receiverPlaneCount ; Description The number of receiver planes. The number of receiver planes in the BatchCullingContext.cullingPlanes array. Receiver planes are only present when culling Lights, otherwise the number is zero. You can use receiver planes to rej...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24b200fe160e
unity_docs
networking
Show me a Unity C# example demonstrating `Experimental.Rendering.GraphicsStateCollection.SendToEditor`.
d GraphicsStateCollection to the Editor using PlayerConnection. This method sends serialized GraphicsStateCollection data to a connected Editor instance on-demand. The Editor instance will save the GraphicsStateCollection to disk in the open project's Assets folder. SendToEditor requires you to enable Developme...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_056b99908e60
unity_docs
scripting
What is `Profiling.FrameDataView.HasCounterValue` in Unity? Explain its purpose and usage.
FrameDataView.HasCounterValue Declaration public bool HasCounterValue (int markerId ); Parameters Parameter Description markerId Marker identifier. Description Returns true for a marker that includes a counter in the active frame.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72c25e9a3124
unity_docs
rendering
What is `PlatformIcon.SetTexture` in Unity? Explain its purpose and usage.
PlatformIcon.SetTexture Declaration public void SetTexture ( Texture2D texture , int layer ); Parameters Parameter Description layer Cannot be larger than PlatformIcon.maxLayerCount . Description Assign a texture to the specified layer. Texture file must be stored in the project and instance obtained u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7b67fd15865c
unity_docs
rendering
Explain 'Lighting in the Built-In Render Pipeline' in Unity.
Resources and approaches for lighting in the Built-In Render Pipeline . Page Description Per-pixel and per-vertex lights in the Built-In Render Pipeline Learn about how Unity categorizes Light components so they light objects per-pixel or per-vertex. Emit light from a GameObject Make a material emissive so that it emit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3dd2604f9983
unity_docs
scripting
What is `VersionControl.Message.Severity` in Unity? Explain its purpose and usage.
Severity enumeration Description Severity of a version control message. Properties Property Description Verbose Verbose message. Info Informational message. Warning Warning message. Error Error message.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c1739bb0917
unity_docs
rendering
What is `Rendering.VirtualTexturing.Resolver.Process` in Unity? Explain its purpose and usage.
Virtual Texturing is experimental and not ready for production use. The feature and documentation might be changed or removed in the future. Resolver.Process Declaration public void Process ( Rendering.CommandBuffer cmd , Rendering.RenderTargetIdentifier rt , int x , int width , int y , int height , int m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5b161f57587
unity_docs
scripting
Give me an overview of the `RemoveAssetOptions` class in Unity.
RemoveAssetOptions enumeration Description Options for removing assets Properties Property Description MoveAssetToTrash The asset should be moved to trash. DeleteAssets Delete the asset without moving it to the trash.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d814f450efa
unity_docs
physics
What is `CustomCollider2D` in Unity? Explain its purpose and usage.
CustomCollider2D class in UnityEngine / Inherits from: Collider2D / Implemented in: UnityEngine.Physics2DModule Description Represents a Collider2D that is configured by assigning PhysicsShape2D geometry to it via a PhysicsShapeGroup2D . Unlike all other Collider2D which are defined indirectly by contr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_943b4ef31d60
unity_docs
physics
What is `ShortcutManagement.ReserveModifiersAttribute` in Unity? Explain its purpose and usage.
ReserveModifiersAttribute class in UnityEditor.ShortcutManagement Description Provides an attribute that reserves one or multiple modifiers for a specific shortcut. A reserved modifier does not prevent a shortcut from triggering when another key is pressed. Properties Property Description Modifiers One or mor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7850bfdf5d5
unity_docs
scripting
What is `AndroidJNI.InvokeAttached` in Unity? Explain its purpose and usage.
AndroidJNI.InvokeAttached Declaration public static void InvokeAttached ( Unity.Android.Gradle.Manifest.Action action ); Description Calls AndroidJNI.AttachCurrentThread (if necessary) before invoking a delegate, and then calls AndroidJNI.DetachCurrentThread . Note: Use this method to invoke Java methods ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af633aeb97d8
unity_docs
animation
What is `Animations.TransformStreamHandle.GetLocalToWorldMatrix` in Unity? Explain its purpose and usage.
TransformStreamHandle.GetLocalToWorldMatrix Declaration public Matrix4x4 GetLocalToWorldMatrix ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns Matrix4x4 Returns the local to world matrix. Description Gets ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7456aab8aaea
unity_docs
math
What is `HandleUtility.PointOnLineParameter` in Unity? Explain its purpose and usage.
HandleUtility.PointOnLineParameter Declaration public static float PointOnLineParameter ( Vector3 point , Vector3 linePoint , Vector3 lineDirection ); Description Returns the parameter for the projection of the point on the given line. The return value can be negative if the projected point is in nega...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc993c930053
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.SmoothDamp`.
at a specified velocity. This method smoothes the current value towards a target value with a spring-damper like algorithm. This algorithm is based on Game Programming Gems 4, Chapter 1.10. Note: This method attempts to avoid overshooting the target value. When deltaTime is 0.0f, this yields NaN for the currentVeloci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f8371ec5aa47
unity_docs
rendering
In Unity's 'Configure Gate Fit', what is 'Horizontal' and how does it work?
When Gate Fit is set to Horizontal , Unity fits the resolution gate to the width (X axis) of the film gate. Any change you make to the sensor height (Sensor Size > Y) has no effect on the rendered image. If the sensor aspect ratio is larger than the Game view aspect ratio, Unity overscans the rendered image on the top ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f49703e5d2b
unity_docs
math
What is `XR.XRNodeState.TryGetAngularVelocity` in Unity? Explain its purpose and usage.
XRNodeState.TryGetAngularVelocity Declaration public bool TryGetAngularVelocity (out Vector3 angularVelocity ); Returns bool True if the angular velocity was set in the output parameter. False if the angular velocity is not available due to limitations of the underlying platform or if the node is not presen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3882cbec8042
unity_docs
physics
What is `Physics2D.GetIgnoreLayerCollision` in Unity? Explain its purpose and usage.
Physics2D.GetIgnoreLayerCollision Declaration public static bool GetIgnoreLayerCollision (int layer1 , int layer2 ); Parameters Parameter Description layer1 ID of first layer. layer2 ID of second layer. Returns bool Whether collisions between the specified layers be ignored or not. Description Che...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eaa1c9221dfb
unity_docs
scripting
What is `AudioEchoFilter` in Unity? Explain its purpose and usage.
AudioEchoFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio Echo Filter repeats a sound after a given Delay, attenuating the repetitions based on the Decay Ratio. Additional resources: Audio Echo Filter information. Properties Property ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e7856ef02bb0
github
scripting
Write a Unity C# script called Editable Ordered Dictionary_string_Sprite
```csharp // Copyright (c) Rotorz Limited. All rights reserved. // Licensed under the MIT license. using System; using UnityEngine; namespace Rotorz.Games.Collections { /// <summary> /// An object that allows users to edit <see cref="OrderedDictionary_string_Sprite"/> /// objects when using the Unity insp...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_6cd20a1fe60f
unity_docs
rendering
What is `Rendering.CameraProperties.GetCameraCullingPlane` in Unity? Explain its purpose and usage.
CameraProperties.GetCameraCullingPlane Declaration public Plane GetCameraCullingPlane (int index ); Parameters Parameter Description index Plane index (up to 5). Returns Plane Camera culling plane. Description Get a camera culling plane. Additional resources: SetCameraCullingPlane .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d923f99f5155
unity_docs
rendering
What is `PlayerSettings.Android` in Unity? Explain its purpose and usage.
Android class in UnityEditor Description Android specific Player settings. Use these settings to configure how Unity builds and displays your final application for the Android platform. ```csharp using UnityEngine; using UnityEditor;public class AndroidPlayerSettingsSamples : MonoBehaviour { [MenuItem("Tools/S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d41bf101c49d
unity_docs
editor
Explain 'Automated testing' in Unity.
Tests are an important part of modern software development practice. Writing tests for your code helps you have confidence that your project works as expected as it scales in size and complexity. Unity provides the Unity Test Framework package to help you write and run tests for your C# code. The package integrates and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2c5a0c3b4adb
unity_docs
rendering
Explain 'ZWrite command in ShaderLab reference' in Unity.
Sets whether the depth buffer contents are updated during rendering. Normally, ZWrite is enabled for opaque objects and disabled for semi-transparent ones. Disabling ZWrite can lead to incorrect depth ordering. In this case, you need to sort geometry on the CPU. ## Render pipeline compatibility Feature name Universal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed6b43b1e7d8
unity_docs
xr
What is `Overlays.ITransientOverlay` in Unity? Explain its purpose and usage.
ITransientOverlay interface in UnityEditor.Overlays Description Transient Overlays are a type of Overlay that is not controlled by a user, and only drawn in the active Scene View when requested by the visible property. Implementing ITransientOverlay in an Overlay class designates it for this special behavi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5472031d7be5
unity_docs
scripting
What is `Experimental.GraphView.Scope.RemoveElementsWithoutNotification` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.RemoveElementsWithoutNotification Declaration public void RemoveElementsWithoutNotification (IEnumerable<GraphElement> elements ); Parameters Parameter Description elements The elements to remove. Description Remo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f8f114d55b8
unity_docs
xr
What is `PlayerSettings.Android.ARCoreEnabled` in Unity? Explain its purpose and usage.
PlayerSettings.Android.ARCoreEnabled public static bool ARCoreEnabled ; Description Enable support for Google ARCore on supported devices. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class ARCoreEnabledSample : MonoBehaviour { [MenuItem("Build/ARCoreEnabled Sample")] publi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0eef0adf65d4
unity_docs
editor
Show me a Unity C# example demonstrating `SettingsProvider.OnGUI`.
SettingsProvider.OnGUI Declaration public void OnGUI (string searchContext ); Parameters Parameter Description searchContext Search context for the Settings window. Used to show or hide relevant properties. Description Use this function to draw the UI based on IMGUI. This assumes you haven't added any chil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_924d7a6d4293
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView class in UnityEngine.UIElements / Inherits from: UIElements.BindableElement / Implemented in: UnityEngine.UIElementsModule Implements interfaces: ISerializationCallbackReceiver Description Base class for controls that display virtualized vertical content inside a scroll view. St...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb126a897cf4
unity_docs
xr
What is `XR.XRSettings.deviceEyeTextureDimension` in Unity? Explain its purpose and usage.
XRSettings.deviceEyeTextureDimension public static Rendering.TextureDimension deviceEyeTextureDimension ; Description Fetch the device eye texture dimension from the active stereo device. If XR is enabled, this returns a TextureDimension configured by the stereo device. The device eye texture dimension repres...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42e4e85dcbca
unity_docs
rendering
What is `Experimental.Rendering.GraphicsStateCollection.completedWarmupCount` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsStateCollection.completedWarmupCount public int completedWarmupCount ; Description The number of shader variant permutations that have been warmed up. When a shader variant is "warmed up", the associated GPU represen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_734e812f1eaf
unity_docs
rendering
What is `Rendering.CommandBuffer.DrawMeshInstanced` in Unity? Explain its purpose and usage.
CommandBuffer.DrawMeshInstanced Declaration public void DrawMeshInstanced ( Mesh mesh , int submeshIndex , Material material , int shaderPass , Matrix4x4[] matrices , int count , MaterialPropertyBlock properties ); Declaration public void DrawMeshInstanced ( Mesh mesh , int submeshIndex , Materia...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb76f98370ce
unity_docs
math
What is `Mathf.SmoothStep` in Unity? Explain its purpose and usage.
Mathf.SmoothStep Declaration public static float SmoothStep (float from , float to , float t ); Parameters Parameter Description from The start of the range. to The end of the range. t The interpolation value between the from and to range limits. Returns float The interpolated float result bet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa5e028a15c1
unity_docs
ui
What is `IMGUI.Controls.TreeView.extraSpaceBeforeIconAndLabel` in Unity? Explain its purpose and usage.
TreeView.extraSpaceBeforeIconAndLabel protected float extraSpaceBeforeIconAndLabel ; Description Value to control the spacing before the default icon and label. Can be used e.g for placing a toggle button to the left of the content. Use this value to make space for other GUI controls before the default icon and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f011bb730f50
unity_docs
rendering
What is `QualitySettings.SetTextureMipmapLimitSettings` in Unity? Explain its purpose and usage.
QualitySettings.SetTextureMipmapLimitSettings Declaration public static void SetTextureMipmapLimitSettings (string groupName , TextureMipmapLimitSettings textureMipmapLimitSettings ); Parameters Parameter Description groupName Name of the texture mipmap limit group to modify. textureMipmapLimitSettings ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_545efed11038
unity_docs
rendering
In Unity's 'Writing compute shaders for multiple platforms', what is 'Platform-specific differences' and how does it work?
Metal (for iOS and tvOS platforms) does not support atomic operations on Textures. Metal also does not support GetDimensions queries on buffers. Pass the buffer size info as constant to the shader if needed. OpenGL ES 3.1 (for (Android, iOS, tvOS platforms) only guarantees support for 4 compute buffers at a time. Actua...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_39f55cb4c314_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
An XR grab transformer that allows for the locking of specific rotation axes. When an object is grabbed and manipulated,this class ensures that rotations are only applied to the specified axes, preserving the initial rotation for the others. Signature: ```csharp public class RotationAxisLockGrabTransformer : XRBaseGra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45a1dc869d34
unity_docs
scripting
What are the parameters of `Rigidbody.MovePosition` in Unity?
Description Moves the kinematic Rigidbody towards position . Rigidbody.MovePosition moves a Rigidbody and complies with the interpolation settings. When Rigidbody interpolation is enabled, Rigidbody.MovePosition creates a smooth transition between frames. Unity moves a Rigidbody in each FixedUpdate call. The position o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6e2f7c987e6
unity_docs
rendering
What is `MaterialProperty.vectorValue` in Unity? Explain its purpose and usage.
MaterialProperty.vectorValue public Vector4 vectorValue ; Description Vector value of the property. Setting a new value will apply it to all material targets , and will automatically record an undo operation. Additional resources: type , MaterialEditor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f335e946e454
unity_docs
animation
In Unity's 'CPU Usage Profiler module introduction', what is 'Hierarchy views' and how does it work?
The Hierarchy views display profiling data one thread at a time, defaulting to the main thread. These views only display a sample’s duration, whereas the Timeline view shows at which times each sample occurred. The Hierarchy view lists all samples you have profiled and groups them together by their shared call stack an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_872b4185c99c
unity_docs
rendering
What is `Lightmapping.GetAdditionalBakeDelegate` in Unity? Explain its purpose and usage.
Lightmapping.GetAdditionalBakeDelegate Declaration public static Lightmapping.AdditionalBakeDelegate GetAdditionalBakeDelegate (); Returns AdditionalBakeDelegate Returns the currently set additional bake delegate. Description Get the currently set additional bake delegate.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93c892b050e5
unity_docs
scripting
What is `LocationServiceStatus` in Unity? Explain its purpose and usage.
LocationServiceStatus enumeration Description Describes the location service status for a device. Properties Property Description Stopped The location service is not running. Initializing The location service is initializing. Running The location service is running and the application can query for locations....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e31605ba3118
unity_docs
rendering
Explain 'Set the camera background with Clear Flags in the Built-In Render Pipeline' in Unity.
Each Camera stores color and depth information when it renders its view. The portions of the screen that are not drawn in are empty, and will display the skybox by default. When you are using multiple Cameras, each one stores its own color and depth information in buffers, accumulating more data as each Camera renders....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dd0c44894a2
unity_docs
ui
What is `UIElements.SliderDirection` in Unity? Explain its purpose and usage.
SliderDirection enumeration Description This is the direction of the Slider and SliderInt . Properties Property Description Horizontal An horizontal slider is made with a SliderDirection Horizontal. Vertical An vertical slider is made with a SliderDirection Vertical.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f71b07c18604
unity_docs
rendering
Give me an overview of the `SpriteTileMode` class in Unity.
SpriteTileMode enumeration Description Tiling mode for SpriteRenderer.tileMode . Properties Property Description Continuous Sprite Renderer tiles the sprite continuously when is set to SpriteRenderer.tileMode. Adaptive Sprite Renderer tiles the sprite once the Sprite Renderer size is above SpriteRenderer.adap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7be2b6a25dd
unity_docs
rendering
What is `RenderSettings.ambientMode` in Unity? Explain its purpose and usage.
RenderSettings.ambientMode public static Rendering.AmbientMode ambientMode ; Description Ambient lighting mode. Unity can provide ambient lighting in several modes, for example directional ambient with separate sky, equator and ground colors, or flat ambient with a single color. Additional resources: Ambient...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1ba7c764eb3
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Service` in Unity? Explain its purpose and usage.
Service class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <service> Android Manifest element. For more information about the element, see Android's documentation: Service element Properties Property Description Attribu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2729cde13bdd
unity_docs
scripting
What is `Build.Reporting.BuildType` in Unity? Explain its purpose and usage.
BuildType enumeration Description Build type. Additional resources: BuildSummary.buildType . Properties Property Description Player Indicates a Player build. AssetBundle Indicates an Asset Bundle build.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2cf9c80248de
unity_docs
scripting
What is `Progress.Start` in Unity? Explain its purpose and usage.
Progress.Start Declaration public static int Start (string name , string description , Progress.Options options , int parentId ); Parameters Parameter Description name The progress indicator's name. You can display the name as a title in the progress window. Use / (slash) as a separator to group child p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12e2997a9ab3
unity_docs
scripting
What is `Unity.Properties.PropertyPathPart.Equals` in Unity? Explain its purpose and usage.
PropertyPathPart.Equals Declaration public bool Equals ( Unity.Properties.PropertyPathPart other ); Parameters Parameter Description other The object to compare with the current instance. Returns bool true if obj and this instance are the same type and represent the same value; otherwise, false . De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30179f254a2e
unity_docs
scripting
What is `Experimental.GraphView.GraphView.elementsRemovedFromGroup` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.elementsRemovedFromGroup public Action<Group,IEnumerable<GraphElement>> elementsRemovedFromGroup ; Description Callback for when GraphElements are removed from the group.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b67cc014a2e7
unity_docs
audio
Show me a Unity C# example demonstrating `AudioImporter.forceToMono`.
AudioImporter.forceToMono public bool forceToMono ; Description Force audioclips to mono sound type, so all audio plays through a single channel. ```csharp using UnityEngine; using UnityEditor;public class Example : AssetPostprocessor { void OnPreprocessAudio() { AudioImporter audioImporter = assetImporter a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e61c4f47b26
unity_docs
rendering
What is `Camera.targetDisplay` in Unity? Explain its purpose and usage.
Camera.targetDisplay public int targetDisplay ; Description Set the target display for this Camera. This setting makes a Camera render into the specified display. Maximum number of displays (eg. monitors) supported is 8. This property has no effect on Android and iOS platforms, consider using Camera.SetTa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_30c65dc6e0b8
github
scripting
Write a Unity Editor script for B Inject Installer
```csharp using UnityEditor; using UnityEditor.Callbacks; using UnityEngine; namespace BehaviourInject.Internal { public class BInjectInstaller { [DidReloadScripts] private static void CreateAssetWhenReady() { if(EditorApplication.isCompiling || EditorApplication...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_e7a0f96c105f
unity_docs
editor
In Unity's 'Registering an Action Handler', what is 'Search actions' and how does it work?
The SearchAction class describes an action and provides a handler to execute the action on a specific SearchItem . ```csharp public class SearchAction { public SearchAction(string providerType, string name, Texture2D icon = null, string tooltip = null); public ActionHandler handler; public EnabledHandler isEnabled...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1a828dcec04
unity_docs
editor
What is `VersionControl.Provider.ChangeSetDescription` in Unity? Explain its purpose and usage.
Provider.ChangeSetDescription Declaration public static VersionControl.Task ChangeSetDescription ( VersionControl.ChangeSet changeset ); Parameters Parameter Description changeset Changeset to query description of. Description Given a changeset only containing the changeset ID, this will start a task fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_10593804c4f9
unity_docs
rendering
Explain 'Scene view Draw Modes and View Options overlays' in Unity.
Use the Draw Modes and View Options overlays to change how the Scene view displays your scene. These controls only affect the Scene view during development and have no effect on the built game. ## The Draw Modes overlay Change the way meshes render in the Scene view. Draw Mode Description Shading Mode Wireframe Draw ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ff448dc5b3e
unity_docs
editor
What is `Unity.Profiling.ProfilerRecorder` in Unity? Explain its purpose and usage.
ProfilerRecorder struct in Unity.Profiling / Implemented in: UnityEngine.CoreModule Description Records the Profiler metric data that a Profiler marker or counter produces. Use ProfilerRecorder to access performance metrics that the Profiler exposes. You can use it to read Profiler counter data such as memory o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b39cf31ae934
unity_docs
rendering
What is `ParticleSystem.LightsModule.sizeAffectsRange` in Unity? Explain its purpose and usage.
ParticleSystem.LightsModule.sizeAffectsRange public bool sizeAffectsRange ; Description Toggle whether the system multiplies the particle size by the light range to determine the final light range. This is useful for shrinking light influence at the same time as particles disappear, to avoid popping. ```cshar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18a56d0b8ca5
unity_docs
networking
What is `Android.AndroidOrientation.Portrait` in Unity? Explain its purpose and usage.
AndroidOrientation.Portrait Description Mirrors the Android property value ORIENTATION_PORTRAIT . For information about the property value, refer to the Android developer documentation on ORIENTATION_PORTRAIT .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1104beaeda0b
unity_docs
editor
What is `AI.NavMeshBuildDebugFlags.InputGeometry` in Unity? Explain its purpose and usage.
NavMeshBuildDebugFlags.InputGeometry Description The triangles of all the geometry that is used as a base for computing the new NavMesh. Additional resources: NavMeshBuilder.CollectSources , NavMeshBuildSource , NavMeshBuildSettings.debug , NavMeshEditorHelpers.DrawBuildDebug .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1fe5d1b5ac3a
unity_docs
scripting
What is `SystemInfo.processorManufacturer` in Unity? Explain its purpose and usage.
SystemInfo.processorManufacturer public static string processorManufacturer ; Description Specifies the manufacturer name of the processor in the user's device (Read Only). With SystemInfo.processorManufacturer and SystemInfo.processorModel values, you can categorize the devices running Unity applications t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fd9a6ac1cc2d
unity_docs
math
Show me a Unity code example for 'IL2CPP runtime code checks'.
CPP generates C++ that contains divide by zero checks for integer division and throws managed DivideByZeroException exceptions as necessary. If this option is disabled, IL2CPP doesn’t emit the divide by zero checks on integer division into the generated C++ code. These checks have an impact on performance at runtime. D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e31a1750cf4
unity_docs
animation
What is `Animations.AnimatorStateTransition.hasFixedDuration` in Unity? Explain its purpose and usage.
AnimatorStateTransition.hasFixedDuration public bool hasFixedDuration ; Description Determines whether the duration of the transition is reported in a fixed duration in seconds or as a normalized time. If hasFixedDuration is true, the transition duration is in seconds. If hasFixedDuration is false, the tra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27558492acac
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.SizeOverLifetimeModule.xMultiplier`.
ParticleSystem.SizeOverLifetimeModule.xMultiplier public float xMultiplier ; Description Size multiplier along the x-axis. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall size multiplier. ```csharp using UnityEngine; using System.Collections;[Re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_664c809c7134
unity_docs
editor
What is `SceneManagement.PrefabOverride.GetAssetObject` in Unity? Explain its purpose and usage.
PrefabOverride.GetAssetObject Declaration public Object GetAssetObject (); Returns Object The object inside the Prefab Asset affected by the override. Description Returns the asset object of the override in the outermost Prefab that the Prefab instance comes from.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_acca0a6997be
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.MetaData` in Unity? Explain its purpose and usage.
MetaData class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <meta-data> Android Manifest element. For more information about the element, see Android's documentation: MetaData element Properties Property Description Att...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea747ada6b44
unity_docs
scripting
What is `GraphicsBuffer.ctor` in Unity? Explain its purpose and usage.
GraphicsBuffer Constructor Declaration public GraphicsBuffer ( GraphicsBuffer.Target target , GraphicsBuffer.UsageFlags usageFlags , int count , int stride ); Parameters Parameter Description target Specify how this buffer can be used within the graphics pipeline. usageFlags Select what kind of updat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c041893a7a99
unity_docs
scripting
What is `UIElements.BackgroundPositionKeyword.Center` in Unity? Explain its purpose and usage.
BackgroundPositionKeyword.Center Description Vertical alignment is centered and/or Horizontal alignment is centered. This is the default value to make sure it's backward compatible with unity-background-scale-mode default value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1052bdeba8a0
github
scripting
Write a Unity C# XR/VR script for Anchor Creator
```csharp using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems; // // This script allows us to create anchors with // a prefab attached in order to visbly discern where the anchors are created. // Anchors are a particular point in space that you are...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_51b0f7e51c77
unity_docs
scripting
What are the parameters of `Sprite.GetScriptableObjects` in Unity?
Returns uint Returns the number of ScriptableObjects retrieved. Description Retrieves an array of ScriptableObject referenced by the sprite. If the size of the arrays passed in as parameters are less than the number of ScriptableObject referenced by the sprite, the arrays will not be resized and the results will be lim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb808ca56e0f
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.B8G8R8_UNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.B8G8R8_UNorm Description A three-component, 24-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1cfaedee428d
unity_docs
editor
Explain 'AssetBundle and Addressables determinism' in Unity.
AssetBundles and Addressables have related workflows for ensuring deterministic builds. ## AssetBundle determinism best practices When building AssetBundles, every referenced asset and dependency must remain identical. Avoid timestamps or build-date suffixes in AssetBundle names and use static identifiers or semantic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a059068539cc
unity_docs
rendering
Show me a Unity C# example demonstrating `Shader.IsKeywordEnabled`.
st in the keywordSpace , this function returns false . The version of this function that takes a string as a parameter is slower than the version that takes a GlobalKeyword . If you call this function more than once, it is best practice to create a GlobalKeyword struct, cache it, and use that. This example checks ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_579c34a4ff5e
unity_docs
input
Explain 'DoubleField' in Unity.
A DoubleField lets users input a numerical double value into an application. It accepts and displays text input. You can set placeholder text to provide hints or instructions to the user on what to enter. You can also add validation functions to ensure that the entered data meets certain requirements. Note : To align a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b55c9fda5e19
unity_docs
rendering
In Unity's 'Creating models for animation', what is 'Skinning' and how does it work?
The initial setup is typically automated. Skinning usually requires a fair amount of work and testing with animations in order to ensure satisfactory results for the skin deformation. Some general guidelines for this process include: Use an automated process initially to set up some of the skinning (see the skinning tu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5311402d7eaf
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetSortIndex` in Unity? Explain its purpose and usage.
Hierarchy.GetSortIndex Declaration public int GetSortIndex (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node. Returns int The sort index. Description Gets the sort index of a hierarchy node. Default is 0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf1f16ed4b17
unity_docs
scripting
What is `AssetBundle.UnloadAsync` in Unity? Explain its purpose and usage.
AssetBundle.UnloadAsync Declaration public AssetBundleUnloadOperation UnloadAsync (bool unloadAllLoadedObjects ); Returns AssetBundleUnloadOperation Asynchronous unload request for an AssetBundle. Description Unloads assets in the bundle. When unloadAllLoadedObjects is false, tracking data structures...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b186de2c2204
unity_docs
scripting
Give me an overview of the `ExecuteInEditMode` class in Unity.
ExecuteInEditMode class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Causes a MonoBehaviour-derived class to execute in Edit mode in addition to at runtime. By default, MonoBehaviour event functions only execute at runtime. Applying ExecuteInEditMode to a MonoBehaviour-derived class c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a45e97443194
github
scripting
Write a Unity C# XR/VR script for AR Light Estimation
```csharp using TMPro; using Unity.XR.CoreUtils; using UnityEngine; using UnityEngine.XR.ARFoundation; public class ARLightEstimation : MonoBehaviour { [Header("UI")] [SerializeField] private TextMeshProUGUI averageBrightnessText; [SerializeField] private TextMeshProUGUI colorTemperatureText; ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_119205983e5e
unity_docs
editor
What is `EditorGUIUtility.FindTexture` in Unity? Explain its purpose and usage.
EditorGUIUtility.FindTexture Declaration public static Texture2D FindTexture (string name ); Description Get a texture from its source filename. Checks the path of a texture. ```csharp // Simple editor window that lets you quick check a path of // a texture in the editor. // // If the path exists then it sh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8aecacec6757
unity_docs
animation
Explain 'Animation States' in Unity.
Animation States are the basic building blocks of an Animation State Machine . Each state contains an animation sequence (or blend tree ) that plays when the character is in that state. Select the state in the Animator Controller , to view the properties for the state in the Inspector window. Property: Description: Mot...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f22733a18ca
unity_docs
editor
What are the parameters of `AssetDatabase.GUIDFromAssetPath` in Unity?
Returns GUID The GUID of the asset. An all-zero GUID denotes an invalid asset path. Description Get the GUID for the asset at path . All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png". ```csharp using UnityEngine; using UnityEditor;public static class Example { [MenuItem("Asset...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1722b671e627
unity_docs
rendering
What is `Camera.ViewportToScreenPoint` in Unity? Explain its purpose and usage.
Camera.ViewportToScreenPoint Declaration public Vector3 ViewportToScreenPoint ( Vector3 position ); Description Transforms position from viewport space into screen space. Viewport space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1). The z positio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5f0d9bc538ad
unity_docs
animation
What is `Animations.TransformStreamHandle.GetLocalToParentMatrix` in Unity? Explain its purpose and usage.
TransformStreamHandle.GetLocalToParentMatrix Declaration public Matrix4x4 GetLocalToParentMatrix ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns Matrix4x4 Returns the local to parent matrix. Description Ge...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ff2e4b674765
unity_docs
ui
Explain 'Test conditional compilation' in Unity.
The following example shows how to test your conditionally compiled code. It also prints a message based on the platform selected for the target build. ## Sample code ```csharp using UnityEngine; using System.Collections; public class PlatformDefines : MonoBehaviour { void Start () { #if UNITY_EDITOR Debug.Log(...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_74fc56c7f25a_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Factor for distribution of choice of Prefabs to paint Signature: ```csharp public float m_PerlinScale = 0.5f; ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_dd9437305269
unity_docs
scripting
What is `ArticulationDrive.damping` in Unity? Explain its purpose and usage.
ArticulationDrive.damping public float damping ; Description The damping of the spring attached to this drive. Units of measurement - Ns/m (newton-seconds per meter) for linear and Nms/rad (newton-meter-seconds per radian) for angular motion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_844856e2115b
unity_docs
math
What is `Rendering.RayTracingInstanceTriangleCullingConfig.frontTriangleCounterClockwise` in Unity? Explain its purpose and usage.
RayTracingInstanceTriangleCullingConfig.frontTriangleCounterClockwise public bool frontTriangleCounterClockwise ; Description This property reverses front and back facings triangles, which is useful if for example, the application’s natural winding order differs from the default. By default, a triangle is front...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7bc39bb26885
unity_docs
xr
In Unity's 'AssetBundle compression formats', what is 'Uncompressed format' and how does it work?
You can build AssetBundles so that the data is completely uncompressed. This creates a larger file download size, but faster load times once downloaded because no decompression is required. Uncompressed AssetBundles are helpful if only a few objects are loaded out of a larger AssetBundle. Uncompressed AssetBundles are ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8af4edbf6bdc
unity_docs
scripting
Show me a Unity code example for 'Adding profiler markers to your code'.
Add profiler markers to your code to view the samples that ProfilerMarker.Begin , ProfilerMarker.End , or ProfilerMarker.Auto generates in the Timeline View and Hierarchy View of the CPU Usage module in the Profiler window : ## Marking up your code To use the ProfilerMarker API , place the code you want to profile be...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c08c4145131
unity_docs
rendering
What is `Video.VideoPlayer.waitForFirstFrame` in Unity? Explain its purpose and usage.
VideoPlayer.waitForFirstFrame public bool waitForFirstFrame ; Description Determines whether the VideoPlayer will wait for the first frame to be loaded into the texture before starting playback when VideoPlayer.playOnAwake is on. When set to true , drawing into the target will only start once the VideoPla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d841ba5729d
unity_docs
scripting
What is `Build.Reporting.BuildReport.GetLatestReport` in Unity? Explain its purpose and usage.
BuildReport.GetLatestReport Declaration public static Build.Reporting.BuildReport GetLatestReport (); Description Return the build report generated by the most recent Player or AssetBundle build A BuildReport is generated when a Player build runs, or when BuildPipeline.BuildAssetBundles is called. The Build...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5633860a35b2
unity_docs
rendering
What is `Shader.GetGlobalColor` in Unity? Explain its purpose and usage.
Shader.GetGlobalColor Declaration public static Color GetGlobalColor (string name ); Declaration public static Color GetGlobalColor (int nameID ); Parameters Parameter Description nameID The name ID of the property retrieved by Shader.PropertyToID . name The name of the property. Description G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0718af9b02e5
unity_docs
performance
In Unity's 'Parallel jobs', what is 'Schedule a ParallelFor job' and how does it work?
To schedule a ParallelFor job, you must specify the length of the NativeArray data source that you want to split. The job system doesn’t know which NativeArray you want to use as the data source if there are several in the struct. The length also tells the job system how many Execute methods to expect. In Unity’s nativ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.