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_bf813c851e1d
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.GetHeadersBuildPhaseByTarget` in Unity?
Returns string Returns the GUID of the existing phase or null if it does not exist. Description Returns the GUID of the headers build phase for the given target. ```csharp using UnityEngine; using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_GetHeadersBuildP...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7083804e87e4
unity_docs
rendering
What are the parameters of `ComputeShader.DisableKeyword` in Unity?
Description Disables a local shader keyword for this compute shader. Shader keywords determine which shader variants Unity uses. For information on working with local shader keywords and global shader keywords and how they interact, see Using shader keywords with C# scripts . If you pass in a LocalKeyword and it does n...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1e1e85a76a92
unity_docs
rendering
What is `TextureImporterSettings.wrapModeV` in Unity? Explain its purpose and usage.
TextureImporterSettings.wrapModeV public TextureWrapMode wrapModeV ; Description Texture V coordinate wrapping mode. Controls wrapping mode along texture V (vertical) axis. Additional resources: Texture.wrapModeV , wrapMode , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66f3a6747416
unity_docs
scripting
Give me an overview of the `DeviceType` class in Unity.
DeviceType enumeration Description Enumeration for SystemInfo.deviceType , denotes a coarse grouping of kinds of devices. Universal Windows Platform : tablets are treated as desktop machines, thus DeviceType.Handheld will only be returned for Windows Phones and IoT family devices. ```csharp //Attach this scrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87befeb32eae
unity_docs
scripting
What is `IMGUI.Controls.TreeView.IsChildListForACollapsedParent` in Unity? Explain its purpose and usage.
TreeView.IsChildListForACollapsedParent Declaration protected static bool IsChildListForACollapsedParent (IList<TreeViewItem> childList ); Parameters Parameter Description childList Children list of a TreeViewItem. Description Utility method for checking if the childList is identical to the one returned ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bea8b0aa2342
unity_docs
scripting
What is `Compilation.CompilationPipeline.GetPrecompiledAssemblyPathFromAssemblyName` in Unity? Explain its purpose and usage.
CompilationPipeline.GetPrecompiledAssemblyPathFromAssemblyName Declaration public static string GetPrecompiledAssemblyPathFromAssemblyName (string assemblyName ); Parameters Parameter Description assemblyName Assembly name. Returns string File path of precompiled assembly. Description Returns the Ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_720fe5335dd1
unity_docs
scripting
Explain 'Install a UPM package from a registry' in Unity.
Note : When you install a UPM package using Package Manager, the Package Manager evaluates other packages and their dependencies to determine if there are version conflicts with the version you selected. If it detects any conflicts or restrictions, it installs the version that resolves these issues. For more informatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_60c63a9e21cc
unity_docs
scripting
What is `CharacterController.velocity` in Unity? Explain its purpose and usage.
CharacterController.velocity public Vector3 velocity ; Description The current relative velocity of the Character (see notes). This allows you to track how fast the character is actually walking, for example when it is stuck at a wall this value will be the zero vector. Note: The velocity returned is simply ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ec2cbdf1ded9
github
scripting
Write a Unity C# script called Coroutine Condition
```csharp using System; using System.Collections; using UnityEngine; namespace THEBADDEST.Coroutines { [System.Serializable] public class CoroutineCondition : CoroutineSequence { public CoroutineCondition(CoroutineMethod m_action, Func<bool> m_condition) { action = m_action; iterator = new WaitUnti...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_2e025412df1c
unity_docs
scripting
In Unity's 'AssetBundle caching', what is 'Cache clearing' and how does it work?
Unity performs cache clearing automatically on desktop systems. It checks the cache on startup, and clears any AssetBundles that haven’t been accessed in Cache.expirationDelay in the last 150 days. The platform providers for mobile devices maintain their caches. To explicitly clear the cache on mobile platforms use Cac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4a1e04725075_doc_3
github
scripting
What does `public` do in this Unity script? Explain its purpose and signature.
Get current search datawith & Signature: ```csharp public (string searchText, int flags) GetData() ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f27e017a83dd
unity_docs
ui
What is `UIElements.SliderInt.ctor` in Unity? Explain its purpose and usage.
SliderInt Constructor Declaration public SliderInt (); Description Constructors for the SliderInt . Declaration public SliderInt (int start , int end , UIElements.SliderDirection direction , float pageSize ); Parameters Parameter Description start This is the low value of the slider. end Thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3af8a7720837
unity_docs
scripting
What is `Categorization.ElementInfoAttribute` in Unity? Explain its purpose and usage.
ElementInfoAttribute class in UnityEngine.Categorization / Implemented in: UnityEngine.CoreModule Description Provide a information to order and categorize at element level (in a category). Element will be sorted in the category using first the Order property, and if equals, using then the Name. See also IRend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5f184366b077
unity_docs
editor
Show me a Unity code example for 'Install Unity Accelerator with the installer'.
ath to a PEM encoded certificate. --tls-custom-private-key Path to a PEM encoded private key. --action-on-existing-install-found Chooses how to handle existing configuration (allows: reconfigure, replace; default: reconfigure). --linux-service-user User account to run the accelerator service on Linux (default: root). T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b51594df5c01
unity_docs
rendering
What is `Rendering.TierSettings.standardShaderQuality` in Unity? Explain its purpose and usage.
TierSettings.standardShaderQuality public Rendering.ShaderQuality standardShaderQuality ; Description The Standard Shader Quality. It will set one of UNITY_PBS_USE_BRDF3, UNITY_PBS_USE_BRDF2, UNITY_PBS_USE_BRDF1 shader compiler defines (for Low, Medium, High quality respectively) and tweak UNITY_BRDF_PBS shad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_693595bd05b0
unity_docs
rendering
Show me a Unity C# example demonstrating `GUILayout.Window`.
e one you passed in. Description Make a popup window that layouts its contents automatically. Windows float above normal GUI controls, feature click-to-focus and can optionally be dragged around by the end user. Unlike other controls, you need to pass them a separate function for the GUI controls to put inside the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_02d0e9e4daa4
github
scripting
Write a Unity Editor script for Android Manifest Helper
```csharp // SPDX-FileCopyrightText: 2024 Michael Nisbet <me@mikesky.dev> // SPDX-License-Identifier: MIT using System.IO; using System.Xml; using UnityEditor; #if UNITY_ANDROID using UnityEngine.Android; #endif namespace OpenXR.Extensions { public class AndroidManifestHelper { public static void AddO...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_91478e6832a6
unity_docs
editor
What is `BuildPipeline` in Unity? Explain its purpose and usage.
BuildPipeline class in UnityEditor Description Lets you programmatically build players or AssetBundles which can be loaded from the web. Static Properties Property Description isBuildingPlayer Is a player currently being built? Static Methods Method Description BuildAssetBundles Builds the AssetBundles in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26e73c69766c
unity_docs
performance
What is `Unity.Collections.NativeArray_1.ReadOnly` in Unity? Explain its purpose and usage.
ReadOnly struct in Unity.Collections / Implemented in: UnityEngine.CoreModule Description Represents a NativeArray<T0> interface constrained to read-only operations. Properties Property Description IsCreated Indicates that a ReadOnly has an allocated memory buffer. Length Provides the number of elements i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e3ff826f1c4
unity_docs
scripting
What is `Animator.Rebind` in Unity? Explain its purpose and usage.
Animator.Rebind Declaration public void Rebind (); Description Rebind all the animated properties and mesh data with the Animator. This function can be used when you manually change your GameObject hierarchy by script, like combining meshes or swap a complete transform hierarchy.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_64b01e5404f7
unity_docs
editor
Explain 'Managing time and frame rate' in Unity.
It’s important to understand how Unity handles time to ensure your gameplay remains stable. Updates occur at regular time intervals to capture changes to character positions, health status, scores, and so on. If your code makes changes in the wrong update loop or doesn’t allow for variations in time, effects like movem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d12511291840
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.D24_UNorm_S8_UInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.D24_UNorm_S8_UInt Description A two-component, 32-bit packed format that has 8 unsigned integer bits in the stencil component, and 24 unsigned normalized bits in the depth component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcd9141db341
unity_docs
scripting
What is `Video.VideoPlayer.Prepare` in Unity? Explain its purpose and usage.
VideoPlayer.Prepare Declaration public void Prepare (); Description Prepares the playback engine so that it's ready for playback. To prepare, the playback engine reserves the resources vital for playback, and preloads some of the content to be played. If the preparation succeeds, this method emits the VideoPla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_696a3225b187
unity_docs
editor
In Unity's 'Install Unity from the command line', what is 'Install the Unity Editor' and how does it work?
To install the Editor to the /Applications/Unity folder on the specified target volume, use the following command as an example: ``` sudo installer [-dumplog] -package Unity.pkg -target / ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1748e73ad7ce
unity_docs
editor
What is `U2D.SpriteEditorExtension.SetSpriteID` in Unity? Explain its purpose and usage.
SpriteEditorExtension.SetSpriteID Declaration public static void SetSpriteID ( Sprite sprite , GUID guid ); Parameters Parameter Description sprite The Sprite to set. guid The GUID to set for the Sprite. Description Sets a Sprite 's Global Unique Identifier (GUID) for easy identification later. Durin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42476ea0df1c
unity_docs
animation
What is `PlayerSettings.SplashScreen.AnimationMode` in Unity? Explain its purpose and usage.
AnimationMode enumeration Description The type of animation applied during the Splash Screen. Properties Property Description Static No animation is applied to the Splash Screen logo or background. Dolly Animates the Splash Screen with a simulated dolly effect. Custom Animates the Splash Screen using custom ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_970e832be623
unity_docs
math
What is `ArrayUtility.ArrayReferenceEquals` in Unity? Explain its purpose and usage.
ArrayUtility.ArrayReferenceEquals Declaration public static bool ArrayReferenceEquals (T[] lhs , T[] rhs ); Returns bool True if both have the same number of elements and are the same instances. Description Compares two array references.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b000634d95c5
unity_docs
scripting
In Unity's 'How Unity uses serialization', what is 'Saving and loading' and how does it work?
Unity uses serialization to load and save scenes , Assets , and AssetBundles to and from your device’s memory. This includes data saved in your own scripting API objects such as MonoBehaviour components and ScriptableObjects . Many of the features in the Unity Editor are built on top of the core serialization system. T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_018d01f750ec
unity_docs
scripting
What are the parameters of `MonoBehaviour.OnApplicationPause` in Unity?
Description Sent to all GameObjects when the playing application pauses or resumes on losing or regaining focus. When Run In Background ( Edit > Project Settings > Player > Resolution and Presentation ) is disabled, a game running in the Editor's Play mode or in a standalone Player will pause any time the Editor or Pla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eee2ff38c135
unity_docs
scripting
Give me an overview of the `Selection` class in Unity.
Selection class in UnityEditor Description Access to the selection in the editor. Static Properties Property Description activeContext Returns the current context object, as was set via SetActiveObjectWithContext. activeGameObject Returns the active game object. (The one shown in the inspector). activeInstan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c074d73d867e
unity_docs
input
What is `DeviceSimulation.DeviceSimulator` in Unity? Explain its purpose and usage.
DeviceSimulator class in UnityEditor.DeviceSimulation Description Class for interacting with a Device Simulator window from a script. You can get an instance of this class by extending DeviceSimulatorPlugin . Events Event Description deviceChanged Calls the methods in its invocation list when the simulated d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d59a8b6335e9
unity_docs
physics
What is `Collider2D.usedByEffector` in Unity? Explain its purpose and usage.
Collider2D.usedByEffector public bool usedByEffector ; Description Whether the collider is used by an attached effector or not. When checked, the Collider2D continues to work as a collision or trigger area however it will also be used by any Effector2D on the same GameObject.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46d8deb4b1d2
unity_docs
math
What is `Camera.CalculateProjectionMatrixFromPhysicalProperties` in Unity? Explain its purpose and usage.
Camera.CalculateProjectionMatrixFromPhysicalProperties(Matrix4x4,float,Vector2,Vector2,GateFitParameters) Parameters Parameter Description output The calculated matrix. focalLength Focal length in millimeters. sensorSize Sensor dimensions in Millimeters. lensShift Lens offset relative to the sensor size. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_930e5e195bf8
unity_docs
physics
Show me a Unity code example for 'Distribution size and code stripping'.
es, you can force Unity to include the code for that class in the build, either by adding a reference to that class to your scripts or to your Scenes , or by adding a link.xml file to your project. Below is an example which makes sure that the Collider class and the Physics module gets preserved in a project. Add this ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_442a65bbc20d
unity_docs
scripting
Explain 'Unity linker marking rules reference' in Unity.
When the Unity linker performs its static analysis, it follows sets of rules to determine which parts of the CIL bytecode to mark as necessary for the build: Root marking rules determine how the Unity linker identifies and preserves top-level assemblies in the build. Dependency marking rules determine how the Unity lin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9e52e35fe37
unity_docs
scripting
Show me a Unity C# example demonstrating `Handles.DrawPolyLine`.
Handles.DrawPolyLine Declaration public static void DrawPolyLine (params Vector3[] points ); Description Draw a line going through the list of points . Note: Use HandleUtility.GetHandleSize where you might want to have constant screen-sized handles. PolyLine that connects all the objects in the Scene View...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_226d220fadd7
unity_docs
scripting
What is `UnityEngine.JSONSerializeModule` in Unity? Explain its purpose and usage.
UnityEngine.JSONSerializeModule Description The JSONSerialize module provides the JsonUtility class which lets you serialize Unity Objects to JSON format. Classes Class Description JsonUtility Provides functions for converting between objects and JSON data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bed07c00123b
unity_docs
editor
Show me a Unity C# example demonstrating `StaticEditorFlags.OffMeshLinkGeneration`.
been deprecated. You can now use NavMeshBuilder.CollectSources() and NavMeshBuildMarkup to nominate the objects that will generate Off-Mesh Links. Description Attempt to generate an Off-Mesh Link that starts from this GameObject when precomputing navigation data. For more information, see the documentation on [[wiki...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_540679ddff56
unity_docs
rendering
What are the parameters of `LightTransport.BakeProgressState.IncrementCompletedWorkSteps` in Unity?
Description Increments the amount of completed work steps for this progress state. Updates the progress by adding the specified number of completed work steps. This method is typically called by the implementation during operation execution to report incremental progress. The progress percentage is calculated as: compl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ede44307fe71
unity_docs
rendering
What is `LightingWindowTab` in Unity? Explain its purpose and usage.
LightingWindowTab class in UnityEditor Description Base class to add custom tabs to the Lighting window. See also LightingWindowEnvironmentSection . ```csharp using UnityEditor; using UnityEditor.Rendering; using UnityEngine; using UnityEngine.Rendering;class CustomLightingTab : LightingWindowTab { public over...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2abdbea910f4
unity_docs
scripting
In Unity's 'AppCallbacks class reference', what is 'Create an app thread' and how does it work?
Unity doesn’t run your app on the UI thread because the UI could become unresponsive when loading large apps. For more information on UI threads, refer to Microsoft documentation on Keeping the UI thread responsive . When you create the AppCallbacks class using m_AppCallbacks = ref new AppCallbacks(); , Unity creates a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06633196d6c0
unity_docs
performance
What is `Unity.Collections.NativeArray_1` in Unity? Explain its purpose and usage.
NativeArray<T0> struct in Unity.Collections / Implemented in: UnityEngine.CoreModule Description Provides a buffer of native memory to managed code, making it possible to share data between managed and native code without marshalling costs. A NativeArray instance provides systems that means you can use them saf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_599681770ae0
unity_docs
scripting
Show me a Unity C# example demonstrating `Animations.GameObjectRecorder.BindComponentsOfType`.
e , bool recursive ); Parameters Parameter Description target root or any of its children. recursive Binds also the target 's children transform properties when set to true . componentType Type of the component. Description Adds bindings for all the properties of the first component of type T found i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6004e2d21471
unity_docs
xr
Explain 'Overview' in Unity.
Unity supports XR development on multiple platforms and devices through its XR plug-in framework. Unity also provides a set of packages that add features and developer tools for building XR games and applications. This section provides an overview of the supported platforms and describes the software architecture behin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e06d2b2d6e1c
unity_docs
rendering
Explain 'Theme Style Sheet (TSS)' in Unity.
Theme Style Sheet (TSS) files are regular USS files. UI Toolkit treats TSS as a distinct asset type and uses it for management purposes. Regular USS syntax and format apply to TSS files, but usually, a theme file contains references to other USS files through the @import rule. Note : USS files also support the @import ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2e54a501e8cf
unity_docs
audio
In Unity's 'Audio Echo Filter', what is 'Details' and how does it work?
The Wet Mix value determines the amplitude of the filtered signal, where the Dry Mix determines the amplitude of the unfiltered sound output. Hard surfaces reflects the propagation of sound. For example a large canyon can be made more convincing with the Audio Echo Filter. Sound propagates slower than light - we all kn...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89fd6437aa38
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.EndVertical`.
EditorGUILayout.EndVertical Declaration public static void EndVertical (); Description Close a group started with BeginVertical. Additional resources: EditorGUILayout.BeginVertical Vertical Compound group. ```csharp // Create a Vertical Compound Button using UnityEngine; using UnityEditor;public class EndVer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9c76c4c3f97
unity_docs
editor
What is `Device.Screen.fullScreenMode` in Unity? Explain its purpose and usage.
Screen.fullScreenMode public static FullScreenMode fullScreenMode ; Description This has the same functionality as Screen.fullScreenMode 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_b0c6e7dd1160
unity_docs
scripting
What is `Experimental.GraphView.NodeCreationContext.index` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. NodeCreationContext.index public int index ; Description The index where the created node will be inserted.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_59f654d7955f_doc_0
github
scripting
What does `FallbackPositionAction` do in this Unity script? Explain its purpose and signature.
The fallback Input System action to use for Position Tracking for this GameObject when the default trackingstate action has no position data. Must be a Vector3Control Control. Signature: ```csharp public InputActionProperty FallbackPositionAction => fallbackPositionAction; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_45a9baca449a
unity_docs
scripting
What is `Animator.GetCurrentAnimatorClipInfo` in Unity? Explain its purpose and usage.
Animator.GetCurrentAnimatorClipInfo Declaration public AnimatorClipInfo[] GetCurrentAnimatorClipInfo (int layerIndex ); Parameters Parameter Description layerIndex The layer index. Returns AnimatorClipInfo[] An array of all the AnimatorClipInfo in the current state. Description Returns an array of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d07d327f61eb
unity_docs
rendering
What is `Rendering.ShadowDrawingSettings.useRenderingLayerMaskTest` in Unity? Explain its purpose and usage.
ShadowDrawingSettings.useRenderingLayerMaskTest public bool useRenderingLayerMaskTest ; Description Set this to true to make Unity filter Renderers during shadow rendering. Unity filters Renderers based on the Rendering Layer Mask of the Renderer itself, and the Rendering Layer Mask of each shadow casting ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13cec3db4a7e
unity_docs
physics
What is `Cloth.SetVirtualParticleIndices` in Unity? Explain its purpose and usage.
Cloth.SetVirtualParticleIndices Declaration public void SetVirtualParticleIndices (List<uint> indicesIn ); Parameters Parameter Description indices List of cloth particle indices to use when generating virtual particles. Description Set indices to use when generating virtual particles. Virtual particles ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_18126318f020
unity_docs
animation
In Unity's 'Animator Controller', what is 'Navigation' and how does it work?
Use the scroll wheel to zoom in and zoom out of the Animator Controller view. To focus on an item in the Animator Controller view, select one or multiple states (click or drag a selection box around the states you wish to select), then press the F key to zoom in on the selection. Press the A key to fit all of the anima...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_acebedc2a85b
unity_docs
scripting
What are the parameters of `Tilemaps.TileBase.StartUp` in Unity?
Returns bool Whether the call was successful. Description StartUp is called on the first frame of the running Scene. Use this to set values for the instantiated GameObject or run any logic at the beginning of the Scene. ```csharp using UnityEngine; using UnityEngine.Tilemaps;// Tile that instantiates a GameObject on St...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135dc4f2c4c0
unity_docs
math
What are the parameters of `Quaternion.LookRotation` in Unity?
Description Creates a rotation with the specified forward and upwards directions. Z axis will be aligned with forward , X axis aligned with cross product between forward and upwards , and Y axis aligned with cross product between Z and X. If the forward vector is zero, the method logs an error in the console and return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_910b9d05899f
unity_docs
physics
Explain 'Havok Physics for Unity' in Unity.
com.havok.physics ## Description Havok Physics for Unity is available to Pro, Enterprise, and Unity Industrial Collection users. Havok’s award winning physics engine, applied to Unitys Entity Component System (ECS) framework. Havok Physics for Unity augments the Unity Physics package, allowing physics scenes authored...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_524ee4c1d8cf
unity_docs
scripting
What is `SerializedObject.UpdateIfRequiredOrScript` in Unity? Explain its purpose and usage.
SerializedObject.UpdateIfRequiredOrScript Declaration public bool UpdateIfRequiredOrScript (); Description Update serialized object's representation, only if the object has been modified since the last call to Update or if it is a script. In which case it is not safe to assume that SetDirty has been called. Ret...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d529b2a50db8
unity_docs
rendering
What is `Windows.WebCam.CameraParameters.hologramOpacity` in Unity? Explain its purpose and usage.
CameraParameters.hologramOpacity public float hologramOpacity ; Description The opacity of captured holograms. This value must be within the range of 0.0 to 1.0. You must have also indicated that you wanted to capture holograms when you created your capture object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9bd10667ad0
unity_docs
rendering
What is `SpeedTreeImporter.useLightProbesByDefault` in Unity? Explain its purpose and usage.
SpeedTreeImporter.useLightProbesByDefault public bool useLightProbesByDefault ; Description Gets and sets a boolean to enable light probe lighting for the imported SpeedTree model. To change this setting for a specific LOD, see SpeedTreeImporter.useLightProbes and SpeedTreeImporter.enableSettingOverride .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7a90993ba359
unity_docs
audio
What is `Media.MediaEncoder.ctor` in Unity? Explain its purpose and usage.
MediaEncoder Constructor Declaration public MediaEncoder (string filePath , Media.VideoTrackAttributes videoAttrs , AudioTrackAttributes[] audioAttrs ); Declaration public MediaEncoder (string filePath , Media.VideoTrackEncoderAttributes videoAttrs , AudioTrackAttributes[] audioAttrs ); Declaration ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12e5a98cb1ed
unity_docs
physics
What is `UIElements.MouseEventBase_1.GetPooled` in Unity? Explain its purpose and usage.
MouseEventBase<T0>.GetPooled Declaration public static T GetPooled ( Event systemEvent ); Parameters Parameter Description systemEvent An IMGUI mouse event. Returns T An initialized event. Description Gets an event from the event pool and initializes it with the given values. Use this function inst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c35ad9334d79
unity_docs
editor
What is `EditorBuildSettings.AddConfigObject` in Unity? Explain its purpose and usage.
EditorBuildSettings.AddConfigObject Declaration public static void AddConfigObject (string name , Object obj , bool overwrite ); Parameters Parameter Description name The name of the object reference in string format. This string name must be unique within your project or the overwrite parameter must be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f44d18d8bb1
unity_docs
scripting
What is `Application.Quit` in Unity? Explain its purpose and usage.
Application.Quit Declaration public static void Quit (); Parameters Parameter Description exitCode An optional exit code to return when the player application terminates on Windows, Mac and Linux. Defaults to 0. Description Quits the player application. Shut down the running application. The Application.Qu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6910d9d9a9ea_doc_0
github
scripting
What does `OnAnimatorIKAsObservable` do in this Unity script? Explain its purpose and signature.
Callback for setting up animation IK (inverse kinematics). Signature: ```csharp public static IObservable<int> OnAnimatorIKAsObservable(this Component component) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_944c8d080515
unity_docs
animation
What is `Animations.AnimatorTransition` in Unity? Explain its purpose and usage.
AnimatorTransition class in UnityEditor.Animations / Inherits from: Animations.AnimatorTransitionBase Description Transitions define when and how the state machine switch from on state to another. AnimatorTransition always originate from a StateMachine or a StateMachine entry. They do not define timing parameter...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_673ae80c5fb4
unity_docs
scripting
What is `AndroidJavaObject.SetStatic` in Unity? Explain its purpose and usage.
AndroidJavaObject.SetStatic Declaration public void SetStatic (string fieldName , FieldType val ); Parameters Parameter Description fieldName The name of the field (e.g. int counter; would have fieldName = "counter"). val The value to assign to the field. It has to match the field type. Description Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8babb78f9e95
unity_docs
rendering
What is `Shader.GetDependency` in Unity? Explain its purpose and usage.
Shader.GetDependency Declaration public Shader GetDependency (string name ); Parameters Parameter Description name The name of the dependency to query. Description Returns the dependency shader. The shader source file lists dependency shaders in the "DependencyName" = "ShaderName" format.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94f1d1d1556c
unity_docs
rendering
What is `LightTransport.IntegrationContext.ctor` in Unity? Explain its purpose and usage.
IntegrationContext Constructor Declaration public IntegrationContext (); Declaration public IntegrationContext (IntPtr ptr ); Description Create a new Integration context. Constructs a new IntegrationContext object. The parameterless constructor creates a new context with default initialization, while the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb074ca67cee
unity_docs
ui
What are the parameters of `GUI.HorizontalSlider` in Unity?
Returns float The value that has been set by the user. Description A horizontal slider the user can drag to change a value between a min and a max. ```csharp // Draws a horizontal slider control that goes from 0 to 10.using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public flo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_394fa095017c
unity_docs
rendering
Show me a Unity C# example demonstrating `LineRenderer.colorGradient`.
LineRenderer.colorGradient public Gradient colorGradient ; Description Set the color gradient describing the color of the line at various points along its length. Additional resources: Gradient . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(LineRenderer))] public class Exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64bd879d3243
unity_docs
scripting
What is `Transform.SetSiblingIndex` in Unity? Explain its purpose and usage.
Transform.SetSiblingIndex Declaration public void SetSiblingIndex (int index ); Parameters Parameter Description index Index to set. Description Sets the sibling index. Use this to change the sibling index of the GameObject. If a GameObject shares a parent with other GameObjects and are on the same level...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac657b89586e
unity_docs
rendering
Show me a Unity C# example demonstrating `LightTransport.InputExtraction.ExtractFromScene`.
lighting. - Environment lighting and skybox settings. - Light probe groups ( LightProbeGroup ). Output Data: The resulting BakeInput contains preprocessed data ready for PopulateWorld. Objects not marked as static or not affecting GI are automatically excluded. Performance Note: This operation can be expensive for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a0f664d763a7
unity_docs
editor
Show me a Unity C# example demonstrating `Rendering.GraphicsSettings.currentRenderPipeline`.
a default value, or you can set override values for different quality levels. The default value is defined in GraphicsSettings.defaultRenderPipeline . The override value for the current quality level is defined in QualitySettings.renderPipeline . If an override value is defined for the current quality level, the acti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_747144171d3c
unity_docs
rendering
Explain 'Select colors and color gradients' in Unity.
The Inspector window displays color properties as swatches. The swatch: Shows the current color. Shows the transparency as a slider under the color. Acts as a button to open the Color window. ## Color window types The Unity Editor opens the type of Color window that matches the property you’re editing. The window can...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd4d82e7cf04
unity_docs
physics
What is `Texture.anisoLevel` in Unity? Explain its purpose and usage.
Texture.anisoLevel public int anisoLevel ; Description Defines the anisotropic filtering level of the Texture. Anisotropic filtering makes Textures look better when viewed at a shallow angle, but it can be slower to process on the GPU. Anisotropic filtering is commonly used to improve the appearance of floor, g...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fa9dc12c780
unity_docs
input
What is `KeyCode.KeypadEnter` in Unity? Explain its purpose and usage.
KeyCode.KeypadEnter Description Numeric keypad Enter . This is a key at the far right of a keyboard. Some laptops do not have a numeric keypad. The Enter key is documented as KeyCode.Return .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5027f680ee10
unity_docs
scripting
What is `AndroidJNI.GetStaticShortField` in Unity? Explain its purpose and usage.
AndroidJNI.GetStaticShortField Declaration public static short GetStaticShortField (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_77d92dc757bd
unity_docs
performance
What is `Unity.Collections.NativeArray_1.ctor` in Unity? Explain its purpose and usage.
NativeArray<T0> Constructor Declaration public NativeArray<T0> (T[] array , Unity.Collections.Allocator allocator ); Parameters Parameter Description array An array to copy the data from. allocator The Allocator to use for the data. Description Creates a NativeArray from an array of elements. Decla...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf64776aafcb
unity_docs
scripting
Give me an overview of the `UICharInfo` class in Unity.
UICharInfo struct in UnityEngine / Implemented in: UnityEngine.TextRenderingModule Description Class that specifies some information about a renderable character. Properties Property Description charWidth Character width. cursorPos Position of the character cursor in local (text generated) space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_66d1b59b4a2c
github
scripting
Write a Unity C# XR/VR script for Timer Ui
```csharp using System; using ExPresSXR.Misc.Timing; using TMPro; using UnityEngine; namespace ExPresSXR.UI { /// <summary> /// Visualizes an ExPresSXR Timer as a filling circle. /// </summary> public class TimerUi : MonoBehaviour { /// <summary> /// Reference to the timer to visu...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_8a7c83e7f38c
unity_docs
physics
Explain 'Troubleshooting custom control library compilation' in Unity.
This troubleshooting guide helps you resolve issues when compiling custom controls into DLLs. ## Symptoms When you compile custom controls into DLLs, you might encounter the following issues: Custom controls don’t appear in the UI Builder. Custom controls don’t serialize correctly when building libraries (DLLs). ## ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5912f88dcc69
unity_docs
scripting
Show me a Unity C# example demonstrating `Application.streamingAssetsPath`.
g class to print the path to the StreamingAssets folder to the Unity Console. You cannot use synchronous filesystem APIs, such as the C# System.IO.File class, to access the StreamingAssets folder on the WebGL and Android platforms. No file access is available on WebGL. Android uses a compressed .apk file. These...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de44ace73064
unity_docs
scripting
What are the parameters of `GUILayout.PasswordField` in Unity?
Returns string The edited password. Description Make a text field where the user can enter a password. Password field in the Game View. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { string passwordToEdit = "My Password"; void OnGUI() { // Make a password field that modifies...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42f7cf6eb691
unity_docs
rendering
What is `RenderingLayerMask` in Unity? Explain its purpose and usage.
RenderingLayerMask struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description The Render Pipeline allows you to use Rendering Layers, which are LayerMasks to make Lights or effects only affect specific Renderers. Rendering Layers are also supported on decal projectors, and can be sampled from th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94aff35329b0
unity_docs
scripting
What is `UIElements.SerializedPropertyChangeEvent` in Unity? Explain its purpose and usage.
SerializedPropertyChangeEvent class in UnityEditor.UIElements / Inherits from: UIElements.EventBase_1 Description An event sent when a value in a PropertyField changes. Properties Property Description changedProperty The SerializedProperty whose value changed. Constructors Constructor Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9243517b6ade
unity_docs
rendering
What is `RenderTextureDescriptor.bindMS` in Unity? Explain its purpose and usage.
RenderTextureDescriptor.bindMS public bool bindMS ; Description If true and msaaSamples is greater than 1, the render texture will not be resolved by default. Use this if the render texture needs to be bound as a multisampled texture in a shader.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f8a88a63274
unity_docs
scripting
Show me a Unity C# example demonstrating `GameObject.BroadcastMessage`.
ror should be raised if the method doesn't exist on the target object. Description Calls the specified method on every MonoBehaviour attached to the GameObject or any of its children. A parameter specified for a method that doesn't accept parameters is ignored. If options is set to SendMessageOptions.RequireRec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8c34637e65e4
github
scripting
Write a Unity C# ScriptableObject for Singleton Template
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Assertions; using UnityEngine.SceneManagement; /// <summary> /// This is an example of a Singleton. /// It's creation was impsidered by the talk by Richard Fine from Unity: https://www.youtube.com/watch?v=6vmRwL...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_49ea02142e0d
unity_docs
physics
Show me a Unity C# example demonstrating `JointLimits`.
JointLimits struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description JointLimits is used by the HingeJoint to limit the joints angle. Additional resources: HingeJoint . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Set the hinge limits for a doo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62e356da2e98
unity_docs
rendering
Give me an overview of the `TextureImporterAlphaSource` class in Unity.
TextureImporterAlphaSource enumeration Description Select how the alpha of the imported texture is generated. Properties Property Description None No Alpha will be used. FromInput Use Alpha from the input texture if one is provided. FromGrayScale Generate Alpha from image gray scale.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa9802d5736b
unity_docs
physics
What is `Physics2D.CircleCast` in Unity? Explain its purpose and usage.
Physics2D.CircleCast Declaration public static RaycastHit2D CircleCast ( Vector2 origin , float radius , Vector2 direction , float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity); Parameters Parameter Description...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56c2830ce2c7
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.StereoEndRender` in Unity? Explain its purpose and usage.
ScriptableRenderContext.StereoEndRender Declaration public void StereoEndRender ( Camera camera ); Declaration public void StereoEndRender ( Camera camera , int eye ); Declaration public void StereoEndRender ( Camera camera , int eye , bool isFinalPass ); Parameters Parameter Description camer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e82dd7210b9c
unity_docs
animation
What is `Animations.AnimationPlayableOutput.Create` in Unity? Explain its purpose and usage.
AnimationPlayableOutput.Create Declaration public static Animations.AnimationPlayableOutput Create ( Playables.PlayableGraph graph , string name , Animator target ); Parameters Parameter Description graph The PlayableGraph that will contain the AnimationPlayableOutput . name The name of the outpu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d44a187a54f
unity_docs
rendering
Give me an overview of the `RenderBuffer` class in Unity.
RenderBuffer struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Color or depth buffer part of a RenderTexture . A single RenderTexture object represents both color and depth buffers, but many complex rendering algorithms require using the same depth buffer with multiple color buffers ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2937fa03d5a7
unity_docs
rendering
Show me a Unity code example for 'Example of Particle System Surface Shader custom vertex streams in the Built-In Render Pipeline'.
le, where it is called appdata_particles . When surface Shaders are built, there is automatic handling of variables whose names begin with certain tokens. The most notable one is uv . To prevent the automatic handling from causing problems here, be sure to give your UV inputs different names (for example, “texcoord”). ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e6c641bfeb41
unity_docs
rendering
Show me a Unity code example for 'Adding a device'.
No See Device.SystemInfo.usesLoadStoreActions . ## Minimal device definition The following device definition contains every required property and no optional properties. This is the minimum device definition you can have. Note : This device definition doesn’t provide orientation data, so the simulator assumes the dev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3c0a15b6521
unity_docs
animation
What is `Animation.CrossFade` in Unity? Explain its purpose and usage.
Animation.CrossFade Declaration public void CrossFade (string animation , float fadeLength = 0.3F, PlayMode mode = PlayMode.StopSameLayer); Description Fades in the animation with the name animation over a period of time defined by fadeLength . If the mode is set to PlayMode.StopSameLayer , animatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ac5660d70bc0
unity_docs
networking
Explain 'Multiplayer' in Unity.
A multiplayer project can host many users in the same project, either locally or through a networked server. To build a multiplayer game, use a combination of Unity’s multiplayer packages and services. Refer to the Unity multiplayer overview for more information or refer to the additional resources on this page . If yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8bb12041e9b
unity_docs
rendering
Show me a Unity C# example demonstrating `ImageConversion.EncodeArrayToJPG`.
Description Encodes this array into JPG format. This function returns a byte array which is the JPG file data. You can store the encoded data as a file or send it over the network without further processing. This function does not work on any compressed format. The encoded JPG data will be either 8bit grayscale, R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.