id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_7f4378722e43
unity_docs
rendering
In Unity's 'Check lightmap UVs', what is 'Check real-time lightmap UVs' and how does it work?
To see the UVs for the Realtime Global Illumination system: Select a GameObject with a Mesh Renderer component. In the Mesh Renderer component, under Lightmapping , open the Realtime Lightmap dropdown. Double-click a lightmap texture to open the Viewer window. In the Viewer window, open the dropdown and select UV Chart...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_8
github
scripting
What does `Load` do in this Unity script? Explain its purpose and signature.
Call this method to load the asset. This would be called automatically when you access the Value property. Signature: ```csharp public void Load() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_6d4bfb979e5c
unity_docs
rendering
Explain 'Lights module reference' in Unity.
Add real-time lights to a percentage of your particles 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 Light Assign a Light Prefab desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b47c47405ea4
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayout.TextArea`.
settings defined by the style .<br> Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns string The edited string. Description Make a multi-...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c268e122eabe
unity_docs
rendering
What is `U2D.ScriptablePacker.Pack` in Unity? Explain its purpose and usage.
ScriptablePacker.Pack Declaration public bool Pack ( U2D.SpriteAtlasPackingSettings config , U2D.SpriteAtlasTextureSettings setting , U2D.ScriptablePacker.PackerData input ); Parameters Parameter Description config The settings to use during the packing process for this Sprite Atlas. setting The tex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7affa016d85e
unity_docs
rendering
Explain 'Precalculating indirect light with Light Probes' in Unity.
Resources and techniques for using Light Probes to store the light at specific points in a scene , so that Unity can calculate indirect lighting for GameObjects more quickly. Page Description Introduction to Light Probes Learn about using Light Probes to store the light passing through specific points in a scene. Light...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c7b2ccbd5c6
unity_docs
editor
What is `AssetModificationProcessor.CanOpenForEdit` in Unity? Explain its purpose and usage.
AssetModificationProcessor.CanOpenForEdit(string[],List<string>,StatusQueryOptions) Parameters Parameter Description assetOrMetaFilePaths Paths to Assets or their .meta files, relative to the project folder. outNotEditablePaths Destination list of non-editable Asset paths. statusQueryOptions Specifies how Uni...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae901f1e41c9
unity_docs
rendering
What is `ParticleSystem.Particle.GetCurrentSize3D` in Unity? Explain its purpose and usage.
ParticleSystem.Particle.GetCurrentSize3D Declaration public Vector3 GetCurrentSize3D ( ParticleSystem system ); Parameters Parameter Description system The Particle System from which this particle was emitted. Returns Vector3 Current size. Description Calculate the current 3D size of the particle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb98e6622d05
unity_docs
xr
In Unity's 'Use private repositories with HTTPS Git URLs', what is 'Procedure for repositories that don’t use 2FA' and how does it work?
Follow these steps to access packages in private repositories that use HTTPS Git URLs without 2FA: Configure Git to use GCM by running the following command in a terminal: ``` git config --global credential.helper manager ``` Access the repository one time by using a terminal. For example, run the following command: ``...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df89da027509
unity_docs
math
What is `Rigidbody.Move` in Unity? Explain its purpose and usage.
Rigidbody.Move Declaration public void Move ( Vector3 position , Quaternion rotation ); Parameters Parameter Description position The new position for the Rigidbody. rotation The new rotation for the Rigidbody. Description Moves the Rigidbody to position and rotates the Rigidbody to rotation . U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_10c5073df9ea
unity_docs
editor
Explain 'Cross-platform features and considerations' in Unity.
The following features are relevant across multiple platforms and can be useful to consider while developing your application for multiple platforms. Topic Description Troubleshooting common cross-platform issues Understand and solve common cross-platform issues. Using Unity as a Library in other applications Includes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb0c50e655d6
unity_docs
math
What is `Mathf.DeltaAngle` in Unity? Explain its purpose and usage.
Mathf.DeltaAngle Declaration public static float DeltaAngle (float current , float target ); Parameters Parameter Description current The current angle in degrees. target The target angle in degrees. Returns float A value between -180 (exclusive) and 180 (inclusive) in degrees Description Calcula...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac232fba8a3b
unity_docs
editor
What is `TypeCache.GetMethodsWithAttribute` in Unity? Explain its purpose and usage.
TypeCache.GetMethodsWithAttribute Declaration public static TypeCache.MethodCollection GetMethodsWithAttribute (); Declaration public static TypeCache.MethodCollection GetMethodsWithAttribute (Type attrType ); Declaration public static TypeCache.MethodCollection GetMethodsWithAttribute (string assemb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_adb6822b0b7e
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.RotateArrow`.
MouseCursor.RotateArrow Description Arrow with the rotate symbol next to it for the sceneview. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This disp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69fd7e06cd6a
unity_docs
rendering
What is `MotionVectorGenerationMode` in Unity? Explain its purpose and usage.
MotionVectorGenerationMode enumeration Description The type of motion vectors that should be generated. Additional resources: DepthTextureMode.MotionVectors , SkinnedMeshRenderer.skinnedMotionVectors , PassType.MotionVectors , SystemInfo.supportsMotionVectors . Properties Property Description Camera Use on...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb1e2ebcd5ce
unity_docs
scripting
What is `Profiling.Recorder.CollectFromAllThreads` in Unity? Explain its purpose and usage.
Recorder.CollectFromAllThreads Declaration public void CollectFromAllThreads (); Description Configures the recorder to collect samples from all threads. A recorder collects sample data from all threads by default, but if you have configured it to collect from only a single thread using Recorder.FilterToCurren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2807db5da76b
unity_docs
scripting
What is `QualitySettings.anisotropicFiltering` in Unity? Explain its purpose and usage.
QualitySettings.anisotropicFiltering public static AnisotropicFiltering anisotropicFiltering ; Description Global anisotropic filtering mode. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Disable all anisotropic filtering QualitySettings.anisotropicFiltering = Aniso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f9c36e0c998
unity_docs
rendering
What is `RenderTextureDescriptor.depthBufferBits` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.depthBufferBits public int depthBufferBits ; Description The precision of the render texture's depth buffer in bits (0, 16, 24 and 32 are supported). The minimum number of bits used for depth in the Depth/Stencil buffer format. The actual format of the depth/stencil buffer that is select...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9bf710598a9f
unity_docs
editor
Show me a Unity C# example demonstrating `Unity.Profiling.Editor.ProfilerCounterDescriptor`.
ProfilerCounterDescriptor struct in Unity.Profiling.Editor Description Provides a descriptor for a Profiler counter. Used to describe a Profiler Counter or Profiler Counter Value , often within a ProfilerModule or ProfilerModuleViewController . ```csharp using System; using Unity.Profiling; using Unity.P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd048fd44e22
unity_docs
editor
What is `ShortcutManagement.IShortcutContext` in Unity? Explain its purpose and usage.
IShortcutContext interface in UnityEditor.ShortcutManagement Description Use IShortcutContext to create your own shortcut context by defining the conditions for when a shortcut becomes active or inactive. These conditions can be based on various factors or any other relevant contextual information. To register ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e7ef52f7834
unity_docs
scripting
What is `iOS.ActivityIndicatorStyle` in Unity? Explain its purpose and usage.
ActivityIndicatorStyle enumeration Description ActivityIndicator Style (iOS Specific). Properties Property Description DontShow Do not show ActivityIndicator. Medium The default style of indicator (UIActivityIndicatorViewStyleMedium). Large The large style of indicator (UIActivityIndicatorViewStyleLarge).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0c16d1c5831
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.flipRotation`.
ParticleSystem.MainModule.flipRotation public float flipRotation ; Description Makes some particles spin in the opposite direction. Set between 0 and 1. Higher values cause a higher proportion of particles to spin in the opposite direction. ```csharp using UnityEngine; using System.Collections;[RequireCompone...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc634e7ddb8c
unity_docs
editor
What is `Build.Content.WriteCommand` in Unity? Explain its purpose and usage.
WriteCommand class in UnityEditor.Build.Content Description Container for holding information about a serialized file to be written. Note: this class and its members exist to provide low-level support for the Scriptable Build Pipeline package. This is intended for internal use only; use the Scriptable Build Pi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35a8590b8d65
unity_docs
scripting
What is `UIElements.UQueryState_1.ForEach` in Unity? Explain its purpose and usage.
UQueryState<T0>.ForEach Declaration public void ForEach (Action<T> funcCall ); Parameters Parameter Description funcCall The action to be invoked with each matching element. Description Invokes function on all elements matching the query. Declaration public void ForEach (List<T2> result , Func<T,T2> ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_db89426179eb
unity_docs
scripting
In Unity's 'Transforms', what is 'Properties' and how does it work?
Property: Function: Position Position of the Transform in the x, y, and z coordinates. Rotation Rotation of the Transform around the x-axis, y-axis, and z-axis, measured in degrees. Scale Scale of the Transform along the x-axis, y-axis, and z-axis. The value “1” is the original size (the size at which you imported the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_92a4d8d57fab
unity_docs
scripting
In Unity's 'Code examples: Call Java/Kotlin code from C# scripts', what is 'Example 2: Retrieve the application’s cache directory' and how does it work?
The following code example retrieves the cache directory for the current application in C# using the AndroidApplication class. ```csharp using UnityEngine; using UnityEngine.Android; public class JavaExamples { public static string GetApplicationCacheDirectory() { using var javaFile = AndroidApplication.currentActi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdb29db6db9b
unity_docs
scripting
What is `UIElements.NavigationMoveEvent` in Unity? Explain its purpose and usage.
NavigationMoveEvent class in UnityEngine.UIElements / Inherits from: UIElements.NavigationEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event typically sent when the user presses the D-pad, moves a joystick or presses the arrow keys. Properties Property Description direction T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c23daac27bf0
unity_docs
rendering
What is `Unity.Profiling.ProfilerRecorder.WrappedAround` in Unity? Explain its purpose and usage.
ProfilerRecorder.WrappedAround public bool WrappedAround ; Description Indicates if ProfilerRecorder capacity has been exceeded. Returns true if ProfilerRecorder capacity has been exceeded and WrapAroundWhenCapacityReached had been specified. If ProfilerRecorder is created with ProfilerRecorderOptions.WrapArou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78826c8101fc
unity_docs
scripting
What is `UIElements.BaseListView.footerUssClassName` in Unity? Explain its purpose and usage.
BaseListView.footerUssClassName public static string footerUssClassName ; Description The USS class name for the footer of the ListView. Unity adds this USS class to the footer element in the ListView. Any styling applied to this class affects every ListView located beside, or below the stylesheet in the v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a3031b98314
unity_docs
scripting
What is `RectTransform.rect` in Unity? Explain its purpose and usage.
RectTransform.rect public Rect rect ; Description The calculated rectangle in the local space of the Transform . Unity automatically attaches these to UI elements. Manipulate aspects of the rectangle in the Inspector such as the position, dimensions, rotation, and scale. This is read-only in a script. ```cs...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c24f063bdcc
unity_docs
scripting
What is `Bounds.center` in Unity? Explain its purpose and usage.
Bounds.center public Vector3 center ; Description The center of the bounding box. ```csharp using UnityEngine;public class ColliderBounds : MonoBehaviour { Collider m_Collider; Vector3 m_Center; Vector3 m_Size, m_Min, m_Max; void Start() { //Fetch the Collider from the GameObject m_Collider = GetCompone...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0a3f88f0365
unity_docs
physics
What is `ConstantForce2D.relativeForce` in Unity? Explain its purpose and usage.
ConstantForce2D.relativeForce public Vector2 relativeForce ; Description The linear force, relative to the rigid-body coordinate system, applied each physics update. The force is specified in the local rigid-body coordinate frame i.e. dependent on the rigid-body rotation and is applied to the center-of-mass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_491b6f8b4a00
github
scripting
Write a Unity C# script called Follow Target Job
```csharp using Gilzoide.UpdateManager.Jobs; using Unity.Collections; using UnityEngine; using UnityEngine.Jobs; namespace Gilzoide.UpdateManager.Sample.FollowTarget { [DependsOn(typeof(TargetJob))] public struct FollowTargetJob : IBurstUpdateTransformJob<BurstUpdateTransformJob<FollowTargetJob>> { ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_c14f9b306cff
unity_docs
scripting
What is `Rendering.SphericalHarmonicsL2.operator_ne` in Unity? Explain its purpose and usage.
SphericalHarmonicsL2.operator != public static bool operator != ( Rendering.SphericalHarmonicsL2 lhs , Rendering.SphericalHarmonicsL2 rhs ); Description Returns true if the spherical harmonics are different.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a8da75f7f769
github
scripting
Write a Unity C# XR/VR script for AR Feathered Plane Mesh Visualizer
```csharp #if AR_FOUNDATION_PRESENT using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; namespace UnityEngine.XR.Interaction.Toolkit.Samples.ARStarterAssets { /// <summary> /// This plane visualizer demonstrates the use of a feathering effect /// at the edge of the detec...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_b85ecb8ccd60
unity_docs
scripting
In Unity's 'Enter Play mode with scene reload disabled', what is 'Effects of disabling scene reload when entering Play mode' and how does it work?
When you disable scene reload , the time it takes to start your application in the Editor is no longer representative of the startup time in the built version. If you want to debug or profile exactly what happens during your project’s startup, you should enable scene reloading to more accurately represent the true load...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ec7853da06b4
unity_docs
rendering
In Unity's 'Grass and other details', what is 'Add Detail Mesh' and how does it work?
Use the Detail Prefab field to select a Prefab from your Project. To create an authentic look, a random factor affects each mesh to determine the size and color. Unity uses the Perlin noise algorithm to generate such random factors. The Min Width , Max Width , Min Height , and Max Height values specify the upper and lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_236b851a8198
unity_docs
rendering
In Unity's 'Vulkan', what is 'Vulkan on Android' and how does it work?
When you create a new Android project, Vulkan is enabled as the default graphics API. For other platforms where Vulkan is not the default graphics API, you can enable it through Unity Editor’s Player settings . For more information, refer to Override default graphics APIs .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_7
github
scripting
What does `ClearControlledCamera` do in this Unity script? Explain its purpose and signature.
Releases any UnityEngine.Camera instance currently being controlled by the WRLD SDK. Signature: ```csharp public void ClearControlledCamera() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_f7911127faa5
unity_docs
rendering
What is `ShaderKeywordFilter.SelectIfAttribute.ctor` in Unity? Explain its purpose and usage.
SelectIfAttribute Constructor Declaration public SelectIfAttribute (object condition , bool overridePriority , string filePath , int lineNumber , params string[] keywordNames ); Parameters Parameter Description condition Unity compares the data field to this value. The outcome determines the filter behav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7141480a5184
unity_docs
animation
What are the parameters of `Animations.AnimationLayerMixerPlayable.SetLayerMaskFromAvatarMask` in Unity?
Description Sets the mask for the current layer. This function generates a layer mask from the specified AvatarMask, and applies it to the specified Layer index. If you change the AvatarMask, you need to call this function again to update the layer mask. ```csharp using System.Collections.Generic; using UnityEngine;usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7865b1d5676
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.GetAccumulatedForce`.
c Vector3 GetAccumulatedForce (float step = Time.fixedDeltaTime); Parameters Parameter Description step The timestep of the next physics simulation. Returns Vector3 Accumulated force expressed in ForceMode.Force . Description Returns the force that the Rigidbody has accumulated before the simulat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a49b36e9671
unity_docs
scripting
Show me a Unity C# example demonstrating `VersionControl.Provider.Add`.
l via script. If you have selected a version control integration in Unity's project settings panel, the default setting is for new files to be automatically added to version control . However, you can disable the "Automatic add" option to prevent this. This method is intended to be used to allow you to add files t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_239a0618576d
unity_docs
animation
What is `AnimationClip.EnsureQuaternionContinuity` in Unity? Explain its purpose and usage.
AnimationClip.EnsureQuaternionContinuity Declaration public void EnsureQuaternionContinuity (); Description Realigns quaternion keys to ensure shortest interpolation paths. This function is called in order to ensure better interpolation of quaternions. It should be called after animation curves are set.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_603cb01d554b
unity_docs
rendering
What is `Camera.allCamerasCount` in Unity? Explain its purpose and usage.
Camera.allCamerasCount public static int allCamerasCount ; Description The number of cameras in the current Scene. Returns the size of the array that Camera.allCameras returns and the amount of cameras that Camera.GetAllCameras will fill. ```csharp using UnityEngine;public class ExampleScript : MonoBehavi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9b058cb4f23f
unity_docs
ui
In Unity's 'Replace deprecated browser interaction code', what is 'Deprecated code quick reference' and how does it work?
The following code is deprecated and you need to replace it with the replacement code. Deprecated code Replacement code dynCall() makeDynCall() Pointer_stringify() UTF8ToString() unity.Instance() CreateUnityInstance() gameInstance unityInstance
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1bca1611382c
unity_docs
scripting
What is `Rendering.OnDemandRendering.effectiveRenderFrameRate` in Unity? Explain its purpose and usage.
OnDemandRendering.effectiveRenderFrameRate public static int effectiveRenderFrameRate ; Description The current estimated rate of rendering in frames per second rounded to the nearest integer. This is an estimate and may not be achieved depending upon the application. If QualitySettings.vSyncCount is great...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_886f66bdc78b
unity_docs
animation
What is `AnimatorControllerParameter.defaultBool` in Unity? Explain its purpose and usage.
AnimatorControllerParameter.defaultBool public bool defaultBool ; Description The default bool value for the parameter. Only valid for Parameters of type AnimatorControllerParameterType.Bool .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4680613c2f25
unity_docs
performance
In Unity's 'Burst compilation', what is 'Burst’s role in the compilation pipeline' and how does it work?
Burst is not a complete scripting back end because it only supports a subset of C#. It can’t replace Mono or IL2CPP in your project but is supplemental to either of them. When you include the Burst package in your project, the scripting back end compiles the code by default and Burst compiles whichever Burst-compatible...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_538078371abd
unity_docs
scripting
What is `Search.SearchField.alias` in Unity? Explain its purpose and usage.
SearchField.alias public string alias ; Description Display label of the field if displayed in the property table. In example, the alias will be used to set the search column title when this field is selected.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d113c8275ec
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.OnAnimatorIK`.
ent. Common uses include: Setting the position and rotation of IK goals, such as hands and feet, to interact with objects or reach targets in the environment. Blending between animation-driven and IK-driven motion by adjusting IK weights. Creating procedural animations, such as looking at a target or reaching for a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54e1bed3f465
unity_docs
rendering
What is `Camera.allowHDR` in Unity? Explain its purpose and usage.
Camera.allowHDR public bool allowHDR ; Description High dynamic range rendering. True if the camera is using HDR rendering and false if it is not. You can only enable HDR if it is also supported by the current GraphicsTier . You can only set a Graphics Tier in the Built-in Render Pipeline. Additional resource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5652d708a4cf
unity_docs
physics
What is `ArticulationBody.includeLayers` in Unity? Explain its purpose and usage.
ArticulationBody.includeLayers public LayerMask includeLayers ; Description The additional layers that all Collider s attached to this ArticulationBody should include when deciding if a the Collider can come into contact with another Collider . The Layer Collision Matrix defines which layers can contac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7abd23542d6d
unity_docs
animation
What is `IAnimationClipSource` in Unity? Explain its purpose and usage.
IAnimationClipSource interface in UnityEngine Description Use this interface to have a class provide its own list of Animation Clips to the Animation Window. The class must inherit from MonoBehaviour . This interface requires an Animator or Animation component to preview Animation Clips in the Scene. Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c17e8eabb3f
unity_docs
math
What is `Mesh.MeshData.SetIndexBufferParams` in Unity? Explain its purpose and usage.
Mesh.MeshData.SetIndexBufferParams Declaration public void SetIndexBufferParams (int indexCount , Rendering.IndexFormat format ); Parameters Parameter Description indexCount The size of the index buffer. format The format of the indices. Description Sets the index buffer size and format of the Mesh t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af25d6c23b2a
unity_docs
rendering
What is `Rendering.CommandBuffer.CopyCounterValue` in Unity? Explain its purpose and usage.
CommandBuffer.CopyCounterValue Declaration public void CopyCounterValue ( ComputeBuffer src , ComputeBuffer dst , uint dstOffsetBytes ); Declaration public void CopyCounterValue ( ComputeBuffer src , GraphicsBuffer dst , uint dstOffsetBytes ); Declaration public void CopyCounterValue ( GraphicsBu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dfeec70da259
unity_docs
scripting
What is `AudioSource` in Unity? Explain its purpose and usage.
AudioSource class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description A representation of audio sources in 3D. Attach an AudioSource to a GameObject to play back sounds in a 3D environment. To play 3D sounds you also need to have an AudioListener . Usually, you ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7cb61b03e8e9
unity_docs
scripting
What is `RectInt.yMin` in Unity? Explain its purpose and usage.
RectInt.yMin public int yMin ; Description Show the minimum Y value of the RectInt . Sets the minimum Y value of the RectInt . If you enter a minimum value that is greater than the current maximum value, then the entered value becomes the new maximum value and the previous maximum value becomes the new minimu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e2977abe743f
unity_docs
performance
What is `Rendering.ThreadedBatchContext` in Unity? Explain its purpose and usage.
ThreadedBatchContext struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Thread-safe and Burst-safe API for interacting with a BatchRendererGroup from Burst jobs. Properties Property Description batchRendererGroup An internal handle to the BatchRendererGroup object that cre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_204b9edfe4f5
unity_docs
rendering
What is `ImageConversion.EncodeNativeArrayToJPG` in Unity? Explain its purpose and usage.
ImageConversion.EncodeNativeArrayToJPG Declaration public static NativeArray<byte> EncodeNativeArrayToJPG (NativeArray<T> input , Experimental.Rendering.GraphicsFormat format , uint width , uint height , uint rowBytes , int quality ); Parameters Parameter Description input The native array to convert....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe64a4016814
unity_docs
editor
What are the parameters of `ProfilerWindow.GetFrameTimeViewSampleSelectionController` in Unity?
Returns IProfilerFrameTimeViewSampleSelectionController An IProfilerFrameTimeViewSampleSelectionController object with which you can use to control the selection of the specified Profiler module. Description Retrieves an IProfilerFrameTimeViewSampleSelectionController object that you can use to control the selection in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60916dbf0114
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.GetComponentCount`.
ption Retrieves the total number of components currently attached to the GameObject. You can use GetComponentCount to iterate through component indices, which is especially convenient if used together with GameObject.GetComponentAtIndex . For example, you can iterate through the indices to find the index of a part...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_833f3b20d20b
unity_docs
scripting
What is `AndroidJNI.GetStaticSByteField` in Unity? Explain its purpose and usage.
AndroidJNI.GetStaticSByteField Declaration public static sbyte GetStaticSByteField (IntPtr clazz , IntPtr fieldID ); Description Returns the value of a static field of an object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c59cb861b461
unity_docs
scripting
What is `UIElements.ProgressBar` in Unity? Explain its purpose and usage.
ProgressBar class in UnityEngine.UIElements / Inherits from: UIElements.AbstractProgressBar / Implemented in: UnityEngine.UIElementsModule Description A control that displays the progress between a lower and upper bound value. For more information, refer to UXML element ProgressBar . ```csharp public Prog...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_290323e09902
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.trackIndex` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.trackIndex public ushort trackIndex ; Description Index of the track in the object that created this provider. For providers created by the VideoPlayer , this is the index of the audio track in the movie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b955363fa8b5
unity_docs
editor
What is `Experimental.Rendering.ScriptableBakedReflectionSystemSettings.system` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ScriptableBakedReflectionSystemSettings.system public static Experimental.Rendering.IScriptableBakedReflectionSystem system ; Description The currently active ScriptableBakedReflectionSystem, see IScriptableBakedReflection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed3d3651fab8
unity_docs
physics
What is `Rendering.AsyncGPUReadbackRequest` in Unity? Explain its purpose and usage.
AsyncGPUReadbackRequest struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents an asynchronous request for a GPU resource. Use AsyncGPUReadback.Request to retrieve an asynchronous request for a GPU resource. Pending requests are automatically updated each frame. The re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9daa93ef75b
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.operator_multiply`.
Color.operator * public static Color operator * ( Color a , Color b ); Description Multiplies two colors together. Each component is multiplied separately. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Color grayColor = Color.gray * Color.white; } } ``` public sta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8869d814be4a
unity_docs
scripting
In Unity's 'Introducing native plug-ins for Android', what is 'Scripting backend compatibility' and how does it work?
The following table shows which scripting backends support the different types of native plug-ins. Scripting backend Shared library Static library C/C++ source files IL2CPP Yes Yes Yes Mono Yes No No Notes : IL2CPP scripting backend doesn’t support direct use of .NET dynamic linked libraries (.dll) at runtime. These li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f72a4c7880c2
unity_docs
scripting
What is `Search.IQueryNode.skipped` in Unity? Explain its purpose and usage.
IQueryNode.skipped public bool skipped ; Description True if this node is skipped during evaluation. A node can be skipped if the QueryEngine was configured to skip unsupported nodes instead of generating errors.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_95f5bf123bd9
unity_docs
editor
Explain 'Stack trace logging' in Unity.
Unity Console messages and log files can include detailed stack trace information. The console also links to the line of code that generated the message. This is useful when you want to identify the line, method, or sequence of function calls that caused the log entry to appear. Tip: Another way to inspect your code is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe057b76897e
unity_docs
rendering
Explain 'Use AssetBundles to load assets at runtime' in Unity.
Use AssetBundles to group together assets in your project in an archive file format. AssetBundles can speed up the build times of your project and enable delivery of content in patches and DLC. Topic Description Introduction to AssetBundles Overview of AssetBundles and their purpose in Unity projects. Creating AssetBun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_800f11eeb85c
unity_docs
xr
Give me an overview of the `Screen` class in Unity.
Screen class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provides access to display information. Use this class to get a list of supported screen resolutions, change the current resolution, or hide/show the system mouse pointer. When you launch your application, Unity immediately needs t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e38e6e3f12e
unity_docs
scripting
What is `RenderSettings.fog` in Unity? Explain its purpose and usage.
RenderSettings.fog public static bool fog ; Description Is fog enabled? ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { // Enable fog RenderSettings.fog = true; } } ``` Additional resources: RenderSettings.fogMode .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff8601095f68
unity_docs
xr
What is `GradientMode.Fixed` in Unity? Explain its purpose and usage.
GradientMode.Fixed Description Use a constant color between the keys. This mode returns the key color value where key time is greater than the requested evaluation time. The resulting gradient is then a sequence of colors, not blended together. Additional resources: Gradient.mode , Gradient.Evaluate .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fc3576b9148d
unity_docs
physics
Explain '2D feature set' in Unity.
The 2D feature set provides creators of 2D experiences in Unity with features covering foundations, world-building, animation, graphics, and physics. Use the 2D feature set to: Import images including multi-layered Photoshop and Aseprite files as Sprites and configure them for use in 2D games. Create freeform, tile-bas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbe8f8326a4f
unity_docs
performance
What is `Unity.Jobs.IJobParallelForExtensions.ScheduleByRef` in Unity? Explain its purpose and usage.
IJobParallelForExtensions.ScheduleByRef Declaration public static Unity.Jobs.JobHandle ScheduleByRef (ref T jobData , int arrayLength , int innerloopBatchCount , Unity.Jobs.JobHandle dependsOn ); Parameters Parameter Description jobData The job and data to schedule. arrayLength The number of iterati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_939757f6bc91
unity_docs
rendering
What is `Mesh.RecalculateUVDistributionMetric` in Unity? Explain its purpose and usage.
Mesh.RecalculateUVDistributionMetric Declaration public void RecalculateUVDistributionMetric (int uvSetIndex , float uvAreaThreshold ); Parameters Parameter Description uvSetIndex The UV set index to set the UV distibution metric for. Use 0 for first index. uvAreaThreshold The minimum UV area to consider...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2af603919046
unity_docs
math
Show me a Unity code example for 'Profiling low-level native plug-ins'.
the Profiler is capturing the data. IsAvailable Returns 1 for Editor or Development Players where the Profiler is available, and 0 for Release Players. RegisterThread Registers the current thread under the specified name. UnregisterThread Unregisters the current thread from Profiler. ## IUnityProfiler example The fol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bd97ee62cebc
unity_docs
math
Explain 'Mesh topology data' in Unity.
Topology describes the type of face that a mesh has. A mesh’s topology defines the structure of the index buffer, which in turn describes how the vertex positions combine into faces. Each type of topology uses a different number of elements in the index array to define a single face. Unity supports the following mesh t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d33eecd86c2d
unity_docs
scripting
Show me a Unity C# example demonstrating `LowLevel.PlayerLoop.GetCurrentPlayerLoop`.
layer loop system representing the current update order of all engine systems in Unity. The PlayerLoopSystem returned by this method can be modified to create a custom update order which you can set using SetPlayerLoop . If no custom loop has been set with SetPlayerLoop , then GetCurrentPlayerLoop returns the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06fc5aaf243e
unity_docs
editor
What is `PrefabUtility.ApplyAddedGameObjects` in Unity? Explain its purpose and usage.
PrefabUtility.ApplyAddedGameObjects Declaration public static void ApplyAddedGameObjects (GameObject[] gameObjects , string assetPath , InteractionMode action ); Parameters Parameter Description gameObjects The added GameObjects on the Prefab instance to apply. assetPath The path of the Prefab Asset to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_faf5a430090b
unity_docs
editor
What is `Rendering.EditorGraphicsSettings.GetSupportedRenderPipelineGraphicsSettingsTypesForPipeline` in Unity? Explain its purpose and usage.
EditorGraphicsSettings.GetSupportedRenderPipelineGraphicsSettingsTypesForPipeline Declaration public static IEnumerable<Type> GetSupportedRenderPipelineGraphicsSettingsTypesForPipeline (); Parameters Parameter Description renderPipelineAssetType A valid RenderPipelineAsset type. Returns IEnumerable<Type> ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1e31e684872d
unity_docs
input
In Unity's 'iOS input overview', what is 'iOS keyboard' and how does it work?
iOS devices include a touchscreen keyboard. When you select editable UI elements such as Input Fields , Unity automatically activates the iOS touchscreen keyboard and handles input from it. For information on how to manually activate and configure the iOS touchscreen keyboard, refer to Mobile Keyboard .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a5e560a2a3e8
unity_docs
rendering
Explain 'Sprite Asset properties reference' in Unity.
This page describes the sprite asset properties. Property Description Update Sprite Asset Sync the sprite asset with the latest changes in the Sprite Editor window. ## Atlas & Material Property Description Sprite Atlas Graphics:** A utility that packs several sprite textures tightly together within a single texture k...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b15836d04cb5
unity_docs
audio
What are the parameters of `AudioClip.PCMReaderCallback` in Unity?
Description Unity calls this delegate each time AudioClip reads data. The AudioClip stores this raw sample data in an array of floats that range from -1 to 1. For non-streamed clips, Unity calls this delegate when it creates the audio clip. If the clip is longer than the callback's maximum amount of samples, Unity cal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_88357b5117e5
github
scripting
Write a Unity C# MonoBehaviour script called Event Link
```csharp using Hudossay.AttributeEvents.Assets.Runtime.GameEvents; using System; using UnityEngine; namespace Hudossay.AttributeEvents.Assets.Runtime.EventLinks { /// <summary> /// Links one event from broadcaster GameObject to one method from listener GameObject's MoonoBehaviour. /// </summary> publi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8438c4a361dc
unity_docs
editor
What is `SceneManagement.RemovedComponent` in Unity? Explain its purpose and usage.
RemovedComponent class in UnityEditor.SceneManagement / Inherits from: SceneManagement.PrefabOverride Description Class with information about a component that has been removed from a Prefab instance. Properties Property Description assetComponent The components on the Prefab Asset which has been removed on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e2977f175ee
unity_docs
animation
What is `Tilemaps.Tilemap.GetTileAnimationFlags` in Unity? Explain its purpose and usage.
Tilemap.GetTileAnimationFlags Declaration public Tilemaps.TileAnimationFlags GetTileAnimationFlags ( Vector3Int position ); Parameters Parameter Description position The position of the Tile on the Tilemap . Returns TileAnimationFlags Returns the TileAnimationFlags of the Tile . Description Ge...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14c9ed86745d
unity_docs
rendering
What is `SceneView.GetBuiltinCameraMode` in Unity? Explain its purpose and usage.
SceneView.GetBuiltinCameraMode Declaration public static SceneView.CameraMode GetBuiltinCameraMode ( DrawCameraMode mode ); Parameters Parameter Description mode The DrawCameraMode to match. Returns CameraMode Returns a built-in CameraMode . Description Gets the built-in CameraMode that match...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_48d76472785f
unity_docs
scripting
Show me a Unity C# example demonstrating `SceneManagement.SceneManager.MoveGameObjectToScene`.
meObjects from one Scene to another. This means the GameObject to move must not be a child of any other GameObject in its Scene. This only works on GameObjects being moved to a Scene that is already loaded (additive). If you want to load single Scenes, make sure to use DontDestroyOnLoad on the GameObject you would like...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c107ac533b4
unity_docs
scripting
What is `MonoBehaviour.print` in Unity? Explain its purpose and usage.
MonoBehaviour.print Declaration public static void print (object message ); Description Logs message to the Unity Console (identical to Debug.Log ). Additional resources: Debug.Log , Debug.LogWarning , Debug.LogError .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_85e486dcddc2
unity_docs
scripting
In Unity's 'Custom serialization', what is 'Example 1: Unity’s default serialization causes performance issues' and how does it work?
Suppose you want to have a tree data structure. If you let Unity serialize the data structure directly, the “no support for null” limitation would cause your data stream to become very big, leading to performance degradations in many systems: ```csharp using UnityEngine; using System.Collections.Generic; using System; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5560b36531c1
unity_docs
scripting
What is `Playables.DirectorWrapMode` in Unity? Explain its purpose and usage.
DirectorWrapMode enumeration Description Wrap mode for Playable s. Properties Property Description Hold Hold the last frame when the playable time reaches it's duration. Loop Loop back to zero time and continue playing. None Do not keep playing when the time reaches the duration.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2dbc31dc618a
unity_docs
rendering
Explain 'Decals Surface Shader example in the Built-In Render Pipeline' in Unity.
Decals are commonly used to add details to Materials at run time (for example, bullet impacts). They are especially useful in deferred rendering, because they alter the GBuffer before it is lit, therefore saving on performance. In a typical scenario, Decals should be rendered after the opaque objects and should not be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d0273e1e06e
unity_docs
physics
What is `PointEffector2D.drag` in Unity? Explain its purpose and usage.
PointEffector2D.drag public float drag ; Description The linear drag to apply to rigid-bodies. The drag coefficient is applied in addition to the standard Rigidbody2D drag coefficient to provide additional drag in the effector area.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf61535e519c
unity_docs
animation
What is `Animator.feetPivotActive` in Unity? Explain its purpose and usage.
Animator.feetPivotActive public float feetPivotActive ; Description Blends pivot point between body center of mass and feet pivot. At 0%, the blending point is body center of mass. At 100%, the blending point is feet pivot.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e143f5770840
unity_docs
rendering
What is `ParticleSystemCustomData` in Unity? Explain its purpose and usage.
ParticleSystemCustomData enumeration Description Which stream of custom particle data to set. Additional resources: ParticleSystem.SetCustomParticleData , ParticleSystem.GetCustomParticleData . Properties Property Description Custom1 The first stream of custom per-particle data. Custom2 The second stream of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_114dba89d21c
unity_docs
physics
In Unity's 'Introduction to compound colliders', what is 'Construction of a compound collider' and how does it work?
A compound collider is made of the following elements: A parent GameObject that has a Rigidbody Empty child GameObjects that contain colliders A compound collider should only have one Rigidbody, which should be on the root GameObject. For more guidance on how to create a compound collider, see Create a compound collide...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9126d37d67b2
github
scripting
Write a Unity C# script called Instantiate_I Initializable_Tests
```csharp using NUnit.Framework; using UnityEngine; using static UnityEngine.Object; namespace Sisus.Init.Tests { public class Instantiate_IInitializable_Tests { private AnyInitializable original; [SetUp] public void SetUp() => original = new GameObject(GetType().Name).AddComponent<AnyInitializable>(); [T...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.