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_6c1b38fb92ac
unity_docs
rendering
Show me a Unity C# example demonstrating `TrailRenderer.Clear`.
TrailRenderer.Clear Declaration public void Clear (); Description Removes all points from the TrailRenderer. Useful for restarting a trail from a new position. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(TrailRenderer))] public class ExampleClass : MonoBehaviour { private Tr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c3d31cb0af9
unity_docs
editor
What is `iOS.Xcode.PBXProject.GetBuildPropertyForConfig` in Unity? Explain its purpose and usage.
PBXProject.GetBuildPropertyForConfig Declaration public string GetBuildPropertyForConfig (string configGuid , string name ); Parameters Parameter Description configGuid The GUID of the build configuration as returned by BuildConfigByName . name The name of the build property. Returns string The speci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_acc1f7deb95d
unity_docs
math
Show me a Unity C# example demonstrating `Tilemaps.TileBase.GetTileData`.
ata tileData ); Parameters Parameter Description position Position of the Tile on the Tilemap . tilemap The Tilemap the tile is present on. tileData Data to render the tile. Returns void Whether the call was successful. Description Retrieves any tile rendering data from the scripted tile. Imple...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aaa8384c5fac
unity_docs
rendering
In Unity's 'Sparse Textures', what is 'Example' and how does it work?
The following example loads only the texture for the tile directly under the camera. The example only works if your hardware and platform support sparse textures. To use the example: Create a scene with a large plane GameObject . For more information, refer to Primitive and placeholder objects . Attach the script to th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10437e0763b6
unity_docs
editor
What is `TextAsset.ctor` in Unity? Explain its purpose and usage.
TextAsset Constructor Declaration public TextAsset (string text ); Parameters Parameter Description text The text contents for the TextAsset . Description Creates a new TextAsset with specified text contents. This constructor creates a TextAsset , not a plain text file. To save a TextAsset to disk ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db31b136019f
unity_docs
rendering
What is `Rendering.GraphicsTextureDescriptor.arrayLength` in Unity? Explain its purpose and usage.
GraphicsTextureDescriptor.arrayLength public int arrayLength ; Description The number of textures in the GraphicsTexture array. For graphics texture arrays (see dimension ), this variable determines the number of elements in the array. Must be 0 for non-array textures.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_02d9938ef7bf
unity_docs
xr
What is `XR.XRSettings.gameViewRenderMode` in Unity? Explain its purpose and usage.
XRSettings.gameViewRenderMode public static XR.GameViewRenderMode gameViewRenderMode ; Description Sets the render mode for the XR device. The render mode controls how the view of the XR device renders in the Game view and in the main window on a host PC. See GameViewRenderMode for a description of each ava...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eef4b43e3561
unity_docs
xr
What is `XR.CommonUsages.userPresence` in Unity? Explain its purpose and usage.
CommonUsages.userPresence public static InputFeatureUsage<bool> userPresence ; Description Use this property to test whether the user is currently wearing and/or interacting with the XR device. The exact behavior of this property varies with each type of device: some devices have a sensor specifically to detect ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff4a5a6e07ef
unity_docs
rendering
What is `RenderTextureFormat.R16` in Unity? Explain its purpose and usage.
RenderTextureFormat.R16 Description Single channel (R) render texture format, 16 bit integer. Note that not all graphics cards support integer render textures. Use SystemInfo.SupportsRenderTextureFormat to check for support. Additional resources: RenderTexture class, SystemInfo.SupportsRenderTextureFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59806b49032d
unity_docs
xr
What is `Unity.Hierarchy.Hierarchy.Update` in Unity? Explain its purpose and usage.
Hierarchy.Update Declaration public void Update (); Description Updates the hierarchy and requests that every registered hierarchy node type handler integrates their changes into the hierarchy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5cea50596f4
unity_docs
networking
What is `Unity.Android.Gradle.Manifest.LockTaskMode` in Unity? Explain its purpose and usage.
LockTaskMode enumeration Description Mirrors the LockTaskMode enum. For more information about the attribute, see Android's documentation: LockTaskMode attribute Properties Property Description Null Attribute is not set and will not appear in the element. Normal Mirrors android:lockTaskMode="normal". Ne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e99df92684df
unity_docs
editor
Show me a Unity C# example demonstrating `AssetModificationProcessor.IsOpenForEdit`.
ns void Returns true if all files are editable. Description This is called by Unity when inspecting assets to determine if an editor should be disabled. Although this is called by Unity's own systems, you can also call it if you are implementing your own Editor tools such as a custom version control integrati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90b85ee9dbc8
unity_docs
input
Show me a Unity C# example demonstrating `Android.AndroidApplication.onConfigurationChanged`.
cation.onConfigurationChanged Description A callback to detect the device configuration changes when the application is running. Unity invokes this callback for the configuration changes related to the following aspects. Orientation Keyboard visibility Dark theme Screen layout Screen size For more information...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f41ef93a0b1
unity_docs
rendering
What is `Rendering.RenderTargetFlags.ReadOnlyDepthStencil` in Unity? Explain its purpose and usage.
RenderTargetFlags.ReadOnlyDepthStencil Description Both depth and stencil buffers bound for rendering may be bound as samplable textures to the graphics pipeline: some platforms require the depth and stencil buffers to be set to read-only mode in such cases (D3D11, Vulkan). This flag can be used for both packed dept...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3706c9477ed8
unity_docs
xr
What is `FrameTiming.cpuRenderThreadFrameTime` in Unity? Explain its purpose and usage.
FrameTiming.cpuRenderThreadFrameTime public double cpuRenderThreadFrameTime ; Description The frame time between start of the work on the render thread and when Present was called, in ms. Use to get the total amount of time between the first work request submitted to the render thread and the time when the Pres...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e81222c6d57f
unity_docs
physics
Explain 'Distribution size and code stripping' in Unity.
When publishing for Web, it is important to keep your build size low so users get reasonable download times before the content starts. For generic tips on reducing asset sizes, see documentation on Reducing the file size of the build . ## Hints and tips specific to Web Specify the Crunch texture compression format fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cd855683c2c
unity_docs
scripting
What is `SceneTemplate.SceneTemplatePipelineAdapter.AfterTemplateInstantiation` in Unity? Explain its purpose and usage.
SceneTemplatePipelineAdapter.AfterTemplateInstantiation Declaration public void AfterTemplateInstantiation ( SceneTemplate.SceneTemplateAsset sceneTemplateAsset , SceneManagement.Scene scene , bool isAdditive , string sceneName ); Parameters Parameter Description sceneTemplateAsset The Scene template A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_63fc37372b1b
unity_docs
physics
In Unity's 'Physics Profiler module', what is 'Legacy Physics Profiler module' and how does it work?
You can switch to the Legacy mode to see the older version of the Physics Profiler module, which was the default module in older versions of Unity. To do this, select Legacy from the dropdown menu in the top right of the Physics Profiler module’s details pane. In this mode, you can load and inspect Profiler data that w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46e7f4481cc4
unity_docs
rendering
What is `LightTransport.PostProcessing.ReferenceProbePostProcessor.WindowSphericalHarmonicsL2` in Unity? Explain its purpose and usage.
ReferenceProbePostProcessor.WindowSphericalHarmonicsL2 Declaration public bool WindowSphericalHarmonicsL2 ( LightTransport.IDeviceContext context , BufferSlice<SphericalHarmonicsL2> shIn , BufferSlice<SphericalHarmonicsL2> shOut , int probeCount ); Parameters Parameter Description context Device context....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_32c69d277908
unity_docs
xr
What is `Networking.UnityWebRequest.uploadHandler` in Unity? Explain its purpose and usage.
UnityWebRequest.uploadHandler public Networking.UploadHandler uploadHandler ; Description Holds a reference to the UploadHandler object which manages body data to be uploaded to the remote server. Setting this property to null indicates that this UnityWebRequest has no body data to upload. See the refer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5ebb08a8b78
unity_docs
editor
What are the parameters of `AssetDatabase.GetAssetPathsFromAssetBundle` in Unity?
Description Returns an array containing the paths of all assets marked with the specified AssetBundle name. All paths returned are relative to the project folder, for example: "Assets/MyTextures/hello.png" will be returned if "hello.png" has been added to an Asset Bundle. ```csharp using System.Collections.Generic; usi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dc02d7e5e938
github
scripting
Write a Unity C# script called Order Model
```csharp using UnityEngine; using System; using System.Collections.Generic; namespace TapLive.Orders { /// <summary> /// Data model for orders /// Serializable for JSON parsing /// </summary> [Serializable] public class OrderModel { public string orderId; public string cust...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_2bcc1ae8b4c5
unity_docs
scripting
What is `Windows.Speech.PhraseRecognitionSystem.ErrorDelegate` in Unity? Explain its purpose and usage.
PhraseRecognitionSystem.ErrorDelegate Declaration public delegate void ErrorDelegate ( Windows.Speech.SpeechError errorCode ); Parameters Parameter Description errorCode Error code for the error that occurred. Description Delegate for OnError event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6bedc578e0c
unity_docs
editor
What is `Rendering.RenderPipelineEditorUtility` in Unity? Explain its purpose and usage.
RenderPipelineEditorUtility class in UnityEditor.Rendering Description Helper class that contains a utility function on ScriptableRenderPipeline for Editor. Static Methods Method Description GetDerivedTypesSupportedOnCurrentPipeline Returns the types that're children of T and have a SupportedOnRenderPipelineAt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ab6f03b67e1
unity_docs
rendering
Show me a Unity C# example demonstrating `GUILayout.Button`.
t.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns bool true when the users clicks the button. Description Make a single press button. Create a Button that can be pressed and released as a normal button. When this Button is released the Button returns the expected true value. If t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae0f0d37856b
unity_docs
rendering
What is `Device.SystemInfo.SupportsTextureFormat` in Unity? Explain its purpose and usage.
SystemInfo.SupportsTextureFormat Declaration public static bool SupportsTextureFormat ( TextureFormat format ); Description This has the same functionality as SystemInfo.SupportsTextureFormat and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_654252a51b31
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.FindFileGuidByProjectPath`.
PBXProject.FindFileGuidByProjectPath Declaration public string FindFileGuidByProjectPath (string path ); Parameters Parameter Description path The project path of the file. Returns string The GUID of the file if the search succeeded. Returns null if not successful. Description Finds a file with the g...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19102dcad886
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.VersionControlManager.activeVersionControlObject`.
VersionControlManager.activeVersionControlObject public static VersionControl.VersionControlObject activeVersionControlObject ; Description The VersionControlObject representing active VCS. If there is no currently active VersionControlObject , this property returns null . ```csharp using UnityEditor; us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e6e0a19ab1d
unity_docs
scripting
What is `Experimental.GraphView.Scope.AddElements` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.AddElements Declaration public void AddElements (IEnumerable<GraphElement> elements ); Parameters Parameter Description element The elements to add. Description Adds GraphElements to the Scope.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a2b1764b1253
github
scripting
Write a Unity Editor script for I Extension Field Drawer
```csharp using UnityEditor; using UnityEngine; namespace Baxter.ClusterScriptExtensions.Editor.Inspector { public interface IExtensionFieldDrawer { /// <summary> /// この値が大きいほど、優先的に<see cref="CanDraw"/>や<see cref="Draw"/>が呼ばれる。 /// 特殊な条件のプロパティ描画を行いたいI/F実装では大きめの値を返し、 /// フォールバック的...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_04958c73cc8d
unity_docs
scripting
Show me a Unity C# example demonstrating `TextMesh.lineSpacing`.
TextMesh.lineSpacing public float lineSpacing ; Description How much space will be in-between lines of text. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { GetComponent<TextMesh>().lineSpacing = 10; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_439e13121d1a
unity_docs
scripting
What is `PlayerSettings.SplashScreen.backgroundColor` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.backgroundColor public static Color backgroundColor ; Description Sets the background color of the splash screen when no background image is used. The default background color is dark blue RGB(34.44,54). On Android, use this property to set the background color for the static spla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e4f06332dec
unity_docs
scripting
What is `UIElements.BaseTreeViewController.GetTreeItemsCount` in Unity? Explain its purpose and usage.
BaseTreeViewController.GetTreeItemsCount Declaration public int GetTreeItemsCount (); Returns int The number of items in the tree. Description Get the number of items in the whole tree. This is different from CollectionViewController.GetItemsCount , which will return the number of items in the source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1be7b4c48981
unity_docs
rendering
In Unity's 'Version control integrations', what is 'Setting up version control in Unity' and how does it work?
Open a Unity Project, go to Edit > Project Settings , and then select the Version Control category. Property Description Mode Select the version control mode. Hidden meta files Hide the .meta files in your operating system’s file explorer. Unity does not show .meta files in the Project view, no matter which mode you ch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7e790fff67c3_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
/ -------------------------------------------------------------------------------------------/ Functions/ ------------------------------------------------------------------------------------------- Signature: ```csharp protected T _GetBehaviour<T>() where T : PlayerBehaviour ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_b4e4cfdbd893
github
scripting
Write a Unity C# script called Transform Forward Vector Value Provider
```csharp using System; using UnityEngine; namespace Examples { public interface IVectorValueProvider { Vector2 GetValue(); } [Serializable] public class TransformForwardVectorValueProvider : IVectorValueProvider { [SerializeField] Transform transform; [S...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_be8a8967919e
unity_docs
scripting
What is `PlayerSettings.SplashScreen.blurBackgroundImage` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.blurBackgroundImage public static bool blurBackgroundImage ; Description Determines whether Unity applies a blur effect to the background Sprite on the Splash Screen.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5da3aef5e27c
unity_docs
physics
Give me an overview of the `ArticulationJointType` class in Unity.
ArticulationJointType enumeration Description The type of the joint that restricts movement of the two connected articulation bodies. Properties Property Description FixedJoint Fixed joint doesn't allow any relative movement of the connected bodies. PrismaticJoint Prismatic joint only allows relative translati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c46ff1cd1de3
unity_docs
physics
Show me a Unity C# example demonstrating `CollisionDetectionMode.Continuous`.
us collision detection is on for colliding with static mesh geometry. Collisions will be detected for any static mesh geometry in the path of this Rigidbody, even if the collision occurs between two FixedUpdate steps. Static mesh geometry is any MeshCollider which does not have a Rigidbody attached. This also prevent ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_05024dc3f90b
unity_docs
scripting
In Unity's 'Assign tags to GameObjects', what is 'Create new Tags' and how does it work?
The Inspector displays the Tag and Layer dropdown menus below the name of a GameObject. To create a new tag, select Add Tag… . This opens the Tag and Layer Manager in the Inspector. Once you name a tag, it can’t be renamed later. Layers are similar to tags, but are used to define how Unity renders GameObjects in the Sc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5404a7c2d13c
unity_docs
animation
What is `Experimental.Animations.AnimationPlayableOutputExtensions.SetSortingOrder` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AnimationPlayableOutputExtensions.SetSortingOrder(AnimationPlayableOutput,int) Parameters Parameter Description output The AnimationPlayableOutput instance that calls this method. sortingOrder The sorting order to apply to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba8d5b63b2f8
unity_docs
editor
What is `EditorApplication.OpenProject` in Unity? Explain its purpose and usage.
EditorApplication.OpenProject Declaration public static void OpenProject (string projectPath , params string[] args ); Parameters Parameter Description projectPath The path of a project to open. args Arguments to pass to command line. Description Open another project. Note that this function will not e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_cf41fd5ba932_doc_2
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Directs the XR Origin's movement when using the head-relative mode. If not set, will automatically find and use the XR Origin Camera. Signature: ```csharp public Transform headTransform ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f2860cb9c912
unity_docs
scripting
What is `Assertions.Assert.AreEqual` in Unity? Explain its purpose and usage.
Assert.AreEqual Declaration public static void AreEqual ( Object expected , Object actual , string message ); Declaration public static void AreEqual (sbyte expected , sbyte actual , string message ); Declaration public static void AreEqual (byte expected , byte actual , string message ); Decl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_29038c0ce46b
unity_docs
rendering
Explain 'Add ambient light from the environment' in Unity.
Ambient light, also known as diffuse environmental light, is light that is present all around the Scene and doesn’t come from any specific source object. It can be an important contributor to the overall look and brightness of a scene. Ambient light can be useful in a number of cases, depending upon your chosen art sty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2448d137f08f
unity_docs
rendering
Explain 'Asset metadata' in Unity.
As part of the importing process , Unity creates metadata about any assets you import into your project. The metadata contains information such as the asset’s import settings , and where your project uses the asset. When you import an asset, Unity does the following: Assigns the asset a unique ID . Creates a.meta file ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e25cf850dc59
unity_docs
physics
What is `Unity.Profiling.Memory.MemoryProfiler.TakeTempSnapshot` in Unity? Explain its purpose and usage.
MemoryProfiler.TakeTempSnapshot Declaration public static void TakeTempSnapshot (Action<string,bool> finishCallback , Unity.Profiling.Memory.CaptureFlags captureFlags ); Parameters Parameter Description finishCallback Event that is fired once the memory snapshot has finished the process of capturing data....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ea9ba5d9bf90
unity_docs
rendering
In Unity's 'Replace shaders at runtime in the Built-In Render Pipeline', what is 'Shader replacement tags in built-in shaders' and how does it work?
All built-in shaders have a “ RenderType ” tag set that can be used when rendering with replaced shaders. Tag values are the following: Opaque : most of the shaders ( Normal , Self Illuminated , Reflective , terrain shaders). Transparent : most semitransparent shaders ( Transparent , Particle, Font, terrain additive pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5340e447ede1
unity_docs
rendering
What is `HandleUtility.DistanceToCircle` in Unity? Explain its purpose and usage.
HandleUtility.DistanceToCircle Declaration public static float DistanceToCircle ( Vector3 position , float radius ); Description Returns the distance in pixels from the mouse pointer to a camera facing circle. Calculates the screen space distance from the mouse pointer to the circle at given world space pos...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa4db0bfb1ab
unity_docs
math
What is `Light.color` in Unity? Explain its purpose and usage.
Light.color public Color color ; Description Specifies the color emitted by the light. To modify the light intensity you change the light's color luminance. Lights always add illumination, so a light with a black color is the same as no light at all. For more information, refer to Light component . ```csha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d6febc69b3d1
unity_docs
physics
Show me a Unity C# example demonstrating `Joint2D.attachedRigidbody`.
Joint2D.attachedRigidbody public Rigidbody2D attachedRigidbody ; Description The Rigidbody2D attached to the Joint2D . Joint2D are automatically attached to a Rigidbody2D on the same GameObject as the Joint2D . Additional resources: Rigidbody2D . ```csharp using UnityEngine; using System.Collection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_497d47b49662
unity_docs
rendering
What is `Device.SystemInfo.maxTexture3DSize` in Unity? Explain its purpose and usage.
SystemInfo.maxTexture3DSize public static int maxTexture3DSize ; Description This has the same functionality as SystemInfo.maxTexture3DSize and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d2b3005ff6a
unity_docs
rendering
Show me a Unity C# example demonstrating `Apple.ReplayKit.ReplayKit`.
the microphone and user video through the camera. Start a recording with the StartRecording() function, and stop it with StopRecording(). You can preview the recording with the Preview() function, which launches a separate video viewer. In addition to local recordings, you can broadcast your recordings via StartBroa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_69c248abc148
unity_docs
scripting
Show me a Unity C# example demonstrating `PrimitiveType.Cylinder`.
PrimitiveType.Cylinder Description A cylinder primitive. Additional resources: GameObject.CreatePrimitive . ```csharp using UnityEngine; using System.Collections;// Creates a cylinder primitivepublic class ExampleClass : MonoBehaviour { void Start() { GameObject cylinder = GameObject.CreatePrimitive(PrimitiveT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_750a79403f26
unity_docs
scripting
What is `UIElements.RadioButtonGroup` in Unity? Explain its purpose and usage.
RadioButtonGroup class in UnityEngine.UIElements / Inherits from: UIElements.BaseField_1 / Implemented in: UnityEngine.UIElementsModule Description A control that allows single selection out of a logical group of RadioButton elements. Selecting one will deselect the others. For more information, refer to U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e30b159c467
unity_docs
scripting
What is `XR.Hand.TryGetFingerBones` in Unity? Explain its purpose and usage.
Hand.TryGetFingerBones Declaration public bool TryGetFingerBones ( XR.HandFinger finger , List<Bone> bonesOut ); Parameters Parameter Description finger HandFinger enum value for this finger. bonesOut A list of bones that will be filled out for this finger. Returns bool true if hand can be queried fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5aba159b9a11
unity_docs
rendering
What is `Renderer.realtimeLightmapIndex` in Unity? Explain its purpose and usage.
Renderer.realtimeLightmapIndex public int realtimeLightmapIndex ; Description The index of the real-time lightmap applied to this renderer. A value of -1 (0xFFFF) means no lightmap has been assigned, which is the default. A value of 0xFFFE is internally used for objects that have their scale in lightmap set to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5663c65adb6a
unity_docs
math
Show me a Unity C# example demonstrating `Matrix4x4.zero`.
Matrix4x4.zero public static Matrix4x4 zero ; Description Returns a matrix with all elements set to zero (Read Only). ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { void Start() { // will print: // 0.00000 0.00000 0.00000 0.00000 // 0.00000 0.00000 0.00000 0.00000 // 0.00000 0....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ebf230ffa3d7
unity_docs
scripting
Explain 'Supported dependency versions' in Unity.
Learn which versions of the Android SDK, NDK, and JDK each version of Unity supports. Refer to the following tables to understand the Android dependency versions supported by Unity. Each version of Unity requires a specific version of the Android NDK and Android JDK, but there are no exact version requirements for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4dc2e18c36e6
unity_docs
scripting
What is `Assertions.Assert.IsNull` in Unity? Explain its purpose and usage.
Assert.IsNull Declaration public static void IsNull ( Object value , string message ); Declaration public static void IsNull (T value ); Declaration public static void IsNull (T value , string message ); Parameters Parameter Description value The Object or type being checked for. message T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f57ee6218436
unity_docs
rendering
What is `AnimationCullingType.BasedOnRenderers` in Unity? Explain its purpose and usage.
AnimationCullingType.BasedOnRenderers Description Animation is disabled when renderers are not visible. This culling method is more suitable when you have renderers attached after import - it will take renderers (like mesh renderers, particle renderers and so on) attached to this gameObject or children of this game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e0851a0db40
unity_docs
input
What is `XR.InputDevice.TryGetHapticCapabilities` in Unity? Explain its purpose and usage.
InputDevice.TryGetHapticCapabilities Declaration public bool TryGetHapticCapabilities (out XR.HapticCapabilities capabilities ); Parameters Parameter Description capabilities A HapticCapabilities struct to receive the capabilities of this device. Returns bool Returns true if the device supports any for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_24c5ca04f8cb
unity_docs
rendering
What is `GUIStyle.active` in Unity? Explain its purpose and usage.
GUIStyle.active public GUIStyleState active ; Description Rendering settings for when the control is pressed down. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Assigns a texture to button for when the control // is pressed down Texture2D aTexture; void OnGUI() { if (!aTexture) {...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2fc978b4274
unity_docs
math
What is `Vector3.ToString` in Unity? Explain its purpose and usage.
Vector3.ToString Declaration public string ToString (); Declaration public string ToString (string format ); Declaration public string ToString (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6777c04a4d8
unity_docs
physics
What are the parameters of `Physics.OverlapSphereNonAlloc` in Unity?
Returns int Returns the amount of colliders stored into the results buffer. Description Computes and stores colliders touching or inside the sphere into the provided buffer. Does not attempt to grow the buffer if it runs out of space. The length of the buffer is returned when the buffer is full. Like Physics.OverlapSph...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa1fe18ca812
unity_docs
editor
What is `StaticOcclusionCullingVisualization` in Unity? Explain its purpose and usage.
StaticOcclusionCullingVisualization class in UnityEditor Description Used to visualize static occlusion culling at development time in Scene view. Static Properties Property Description showGeometryCulling If set to true, culling of geometry is enabled. showOcclusionCulling If set to true, visualization of ta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a488517e651
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.DownloadHandlerFile`.
Networking.DownloadHandler / Implemented in: UnityEngine.UnityWebRequestModule Description Download handler for saving the downloaded data to file. This specialized download handler writes all downloaded bytes directly to file. This can help avoid high memory usage. You can't retrieve data from this download hand...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a71f70205b3
unity_docs
input
Show me a Unity C# example demonstrating `GUILayout.Label`.
, GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Description Make an auto-layout label. Labels have no user interaction, do not catch mouse clicks and are always rendered in normal style. If you want to make a control that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66af3dd95b95
unity_docs
rendering
What is `AssetImporters.AssetImportContext.GetArtifactFilePath` in Unity? Explain its purpose and usage.
AssetImportContext.GetArtifactFilePath Declaration public string GetArtifactFilePath (GUID guid , string fileName ); Declaration public string GetArtifactFilePath ( Experimental.ArtifactKey key , string fileName ); Parameters Parameter Description guid The guid of the Artifact File dependency. key ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5536d281272
unity_docs
scripting
In Unity's 'Migrating from MovieTexture to VideoPlayer', what is 'MovieTexture' and how does it work?
```csharp using UnityEngine; public class DownloadMovieMT : MonoBehaviour { void Start() { StartCoroutine(GetMovieTexture()); } IEnumerator GetMovieTexture() { using (var uwr = UnityWebRequestMultimedia.GetMovieTexture("https://myserver.com/mymovie.ogv")) { yield return uwr.SendWebRequest(); if (uwr.isNetwo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_59f069a40582
unity_docs
rendering
In Unity's 'Build Profiles window reference', what is 'Build options' and how does it work?
To build your application, select one of the following options: Property Description Build Build the Player without launching it. The default build is incremental, except for the first build, which is always a full non-incremental clean build. This option runs a build without the StrictMode option enabled. Clean build ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f05ac8e4b75
unity_docs
rendering
What is `Camera.depthTextureMode` in Unity? Explain its purpose and usage.
Camera.depthTextureMode public DepthTextureMode depthTextureMode ; Description How and if camera generates a depth texture. A camera can build a screen-space depth texture. This is mostly useful for image post-processing effects. Note that generating the texture incurs a performance cost. Additional resource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_acbb43c5b32b
unity_docs
ui
In Unity's 'Control textures of the dynamic atlas', what is 'Use custom filters' and how does it work?
You can assign a custom filter to PanelSettings.dynamicAtlasSettings.customFilter to add or relax constraints on a global or per-texture basis. The following custom filter example bypasses a large texture from the Size filter while keeping the Size filter active for other textures: ```csharp using UnityEngine; using Un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_35f8fb3212ea_doc_5
github
scripting
What does `OnPointerDown` do in this Unity script? Explain its purpose and signature.
Handle pointer/touch down: play sound, start press animation, and invoke OnPress event.This is the first half of the toggle interaction. Signature: ```csharp public override void OnPointerDown(PointerEventData eventData) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_9a27d127d9b7
unity_docs
scripting
What is `Progress.Item.progress` in Unity? Explain its purpose and usage.
Progress.Item.progress public float progress ; Description Returns the progress value of a progress indicator's associated task. While the associated event is in progress, this value is usually between 0 and 1. If it is -1, progress is indefinite. If it is -2, progress has not been reported yet. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4cf422a3fd3
unity_docs
scripting
What is `Microphone.End` in Unity? Explain its purpose and usage.
Microphone.End Declaration public static void End (string deviceName ); Parameters Parameter Description deviceName The name of the device. Description Stops recording. If you pass a null or empty string for the device name then the default microphone will be used. You can get a list of available microph...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f00d0342f218
unity_docs
scripting
What is `Experimental.GraphView.GraphView.elementsAddedToGroup` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.elementsAddedToGroup public Action<Group,IEnumerable<GraphElement>> elementsAddedToGroup ; Description Callback for when GraphElements are added to the group.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8cc3ad0d6fae
unity_docs
animation
What is `UIElements.Experimental.ValueAnimation_1.durationMs` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ValueAnimation<T0>.durationMs public int durationMs ; Description Duration of the animation in milliseconds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55f908c55971
unity_docs
scripting
Show me a Unity C# example demonstrating `ObjectChangeKind`.
ObjectChangeKind enumeration Description This enumeration describes the different kind of changes that can be tracked in an ObjectChangeEventStream . Each event has a corresponding type in ObjectChangeEvents . ```csharp using UnityEditor; using UnityEngine;[InitializeOnLoad] public class ObjectChangeEventsExampl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d1f4584c2c0
unity_docs
scripting
What is `ObjectPreview.HasPreviewGUI` in Unity? Explain its purpose and usage.
ObjectPreview.HasPreviewGUI Declaration public bool HasPreviewGUI (); Returns bool True if this component can be Previewed in its current state. Description Can this component be Previewed in its current state? Additional resources: Objectpreview.HasPreviewGUI.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6791071ba067
unity_docs
scripting
Explain 'Create custom Editors with IMGUI' in Unity.
Note : It’s strongly recommended to use the UI Toolkit to extend the Unity Editor , as it provides a more modern, flexible, and scalable solution than IMGUI. To speed up application development, create custom editors for components you commonly use. This page shows you how to create a simple script to make GameObjects ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_451c5a4de9c7
unity_docs
scripting
What are the parameters of `Component.GetComponentsInParent` in Unity?
Returns T[] An array containing all matching components of type T . Description Gets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject. The typical usage for this method is to call it from a MonoBehaviour script (which itself is a type of componen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_37466d329062
unity_docs
scripting
What is `Application.OpenURL` in Unity? Explain its purpose and usage.
Application.OpenURL Declaration public static void OpenURL (string url ); Parameters Parameter Description url The URL to open. Description Opens the URL specified, subject to the permissions and limitations of your app’s current platform and environment. This is handled in different ways depending on th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f462dae13727
github
scripting
Write a Unity C# MonoBehaviour script called Monster
```csharp using System.Collections.Generic; using SmartReference.Runtime; using UnityEngine; namespace SmartReference.Samples { public class Monster: MonoBehaviour { public int id; public string monsterName; public SmartReference<GameObject> prefab; public SmartReference<Sprite> ic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a592dedc9f2
unity_docs
scripting
What is `UIElements.MultiColumnTreeView.sortingMode` in Unity? Explain its purpose and usage.
MultiColumnTreeView.sortingMode public UIElements.ColumnSortingMode sortingMode ; Description Indicates how to sort columns. To enable sorting, set it to ColumnSortingMode.Default or ColumnSortingMode.Custom . The Default mode uses the sorting algorithm provided by MultiColumnController , acting on ind...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_58e17b921cae
unity_docs
input
Show me a Unity C# example demonstrating `EventType`.
s to tell which type of event has taken place in the GUI. Types of Events include mouse clicking, mouse dragging, button pressing, the mouse entering or exiting the window, and the scroll wheel as well as others mentioned below. Events can be used to prevent other GUI elements from responding to that event. Refer to E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_068df5cd23be
unity_docs
rendering
Explain 'Create a panel' in Unity.
The panel serves as the root element where UI hierarchies attach, and renders the UI in the Scene at runtime. How you configure the Panel Settings asset determines how the UI is rendered. It also determines how the UI reacts to input. For example, the panel that’s visually in the front intercepts clicks from the user b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_419b8513a6da
unity_docs
editor
Show me a Unity code example for 'Create a 2D texture array in a script'.
To create a 2D texture array in a script, use the Texture2DArray API. For example: ``` // Set the 2D texture array parameters int width = 32; int height = 32; int slices = 8; TextureFormat format = TextureFormat.RGBA32; bool mipChain = false; // Create a 2D texture array with a width and height of 32 pixels, and 8 sli...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_104075eb4d47
unity_docs
scripting
What is `Tilemaps.TileData` in Unity? Explain its purpose and usage.
TileData struct in UnityEngine.Tilemaps / Implemented in: UnityEngine.TilemapModule Description A Struct for the required data for rendering a Tile . Properties Property Description color Color of the Tile. flags TileFlags of the Tile. gameObject GameObject of the Tile. sprite Sprite to be render...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c8b304ac3f2
unity_docs
math
What is `AI.NavMeshTriangulation.indices` in Unity? Explain its purpose and usage.
NavMeshTriangulation.indices public int[] indices ; Description Triangle indices for the navmesh triangulation. Contains 3 integers for each triangle. These integers refer to the vertices array.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_08794b93d87a
unity_docs
rendering
What is `ShaderKeywordFilter.SelectOrRemoveAttribute` in Unity? Explain its purpose and usage.
SelectOrRemoveAttribute class in UnityEditor.ShaderKeywordFilter / Inherits from: ShaderKeywordFilter.FilterAttribute Description Either include or remove the specified shader keywords in the build, depending on the data field underneath. Unity does the following in all multi_compile keyword sets: Includes o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d8553bb7c22f
unity_docs
physics
What is `Renderer.forceRenderingOff` in Unity? Explain its purpose and usage.
Renderer.forceRenderingOff public bool forceRenderingOff ; Description Allows turning off rendering for a specific component. This is useful for manually controlling the rendering of a component. Such as in a case of custom visibility culling. Note that the enabled state of the render component does not change...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_510ab023b562
unity_docs
physics
What is `AssetImporters.TextureGenerationSettings.enablePostProcessor` in Unity? Explain its purpose and usage.
TextureGenerationSettings.enablePostProcessor public bool enablePostProcessor ; Description When set to true, the AssetPostprocessor hooks will be called during texture generation. The following will hold for any AssetPostprocessors triggered through TextureGenerator.GenerateTexture - When the postprocessor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_01659a2f68d3
unity_docs
scripting
What is `Search.IQueryEngineFilter.usesResolver` in Unity? Explain its purpose and usage.
IQueryEngineFilter.usesResolver public bool usesResolver ; Description Indicates if the filter uses a resolver function. This flag is set to true when a filter is created with a resolver function. See AddFilter .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40fa1aa9fcab
unity_docs
animation
What is `AnimationMode.SamplePlayableGraph` in Unity? Explain its purpose and usage.
AnimationMode.SamplePlayableGraph(GameObject,PlayableGraph,int,float) Parameters Parameter Description graph The PlayableGraph to sample. index The output index to sample in the Playable Graph. time The time at which to sample. Description Samples the specified output index of a PlayableGraph and also r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e086da80b31e
unity_docs
scripting
Give me an overview of the `BuildPlayerWindow` class in Unity.
BuildPlayerWindow class in UnityEditor / Inherits from: EditorWindow Description The default build settings window. Static Methods Method Description RegisterBuildPlayerHandler Register a delegate to intercept or override the build process executed with the "Build" and "Build and Run" buttons. Registering a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b85e47b42dc0
unity_docs
physics
What are the parameters of `Physics.OverlapBox` in Unity?
Returns Collider[] Colliders that overlap with the given box. Description Find all colliders touching or inside of the given box. Creates an invisible box you define that tests collisions by outputting any colliders that come into contact with the box. ```csharp //Attach this script to your GameObject. This GameObject ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d0222435052
unity_docs
rendering
What is `Rendering.CullingResults` in Unity? Explain its purpose and usage.
CullingResults struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description A struct containing the results of a culling operation. In the Scriptable Render Pipeline, when Unity performs a culling operation, it stores the results in a CullingResults struct. This data includes informati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dbe13ecf48c
unity_docs
physics
What is `UIElements.DropdownMenuAction` in Unity? Explain its purpose and usage.
DropdownMenuAction class in UnityEngine.UIElements / Inherits from: UIElements.DropdownMenuItem / Implemented in: UnityEngine.UIElementsModule Description Represents a menu action item. Properties Property Description eventInfo Provides information about the event that triggered the dropdown menu. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_abe59e8bf18b
unity_docs
editor
What are the parameters of `EditorGUI.BoundsField` in Unity?
Returns Bounds The value entered by the user. Description Makes Center and Extents field for entering a Bounds . Bounds field in an Editor Window. See also Extending the editor . ```csharp using UnityEngine; using UnityEditor; // Simple script that shows radius of bounds of selected MeshFilterclass EditorGUILayoutBound...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.