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_c3fb9632fcf9
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.Cull` in Unity? Explain its purpose and usage.
ScriptableRenderContext.Cull Declaration public Rendering.CullingResults Cull (ref Rendering.ScriptableCullingParameters parameters ); Parameters Parameter Description parameters Parameters for culling. Returns CullingResults Culling results. Description Performs culling based on the ScriptableCu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e8e7a7158c17
unity_docs
rendering
In Unity's 'Profiler Preferences reference', what is 'Profiler settings' and how does it work?
Adjust the settings to customize how the Profiler collects and displays data. Setting Description Frame count Set the maximum number of frames for the Profiler to capture. You can set this number between 300 and 2,000. Show stats for ‘current frame’ Set whether to display annotations on the frame line when you select t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_048204835afe
unity_docs
scripting
Show me a Unity C# example demonstrating `Actions.ContextMenuUtility.AddMenuItemsForType`.
g submenu ); Parameters Parameter Description menu The context menu to add all MenuItem for a specific type to. targets The target objects for the menu items. type The object type to search for when collecting context menu items. submenu Optional name of the submenu category to filter results by. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4f6458fcde63
unity_docs
ui
In Unity's 'Type selectors', what is 'Syntax' and how does it work?
The following is the syntax for a type selector: ``` TypeName { ... } ``` When you write type selectors, specify only the concrete object type. Don’t include the namespace in the type name. For example, this selector is valid: ``` Button { ... } ``` This selector is invalid: ``` UnityEngine.UIElements.Button { ... } ``...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f3f9c14ee98
unity_docs
scripting
What is `Windows.Speech.PhraseRecognitionSystem` in Unity? Explain its purpose and usage.
PhraseRecognitionSystem class in UnityEngine.Windows.Speech / Implemented in: UnityEngine.CoreModule Description Phrase recognition system is responsible for managing phrase recognizers and dispatching recognition events to them. In order for any phrase recognizers to recognize a phrase, PhraseRecognitionSystem...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_43b262c8394d
github
scripting
Write a Unity C# ScriptableObject for Singleton Editor
```csharp using System; using System.Linq; using UnityEditor; using UnityEngine; using yaSingleton.Utility; namespace yaSingleton.Editor { /// <summary> /// Fallback Singleton Inspector - validates the singleton location. Extend this class if you want the validation in your singletons. /// Note: The edito...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a36570ac7944
unity_docs
scripting
What is `RenderPickingType` in Unity? Explain its purpose and usage.
RenderPickingType enumeration Description Specifies the type of a render picking callback. Additional resources: RenderPickingArgs.renderPickingType . Properties Property Description RenderFromIgnoreSet The render picking callback is expected to render all GameObjects except for those contained in the ignore ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16aa08168eef
unity_docs
scripting
Give me an overview of the `OcclusionPortal` class in Unity.
OcclusionPortal class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.CoreModule Description The portal for dynamically changing occlusion at runtime. Properties Property Description open Gets / sets the portal's open state. Inherited Members Properties Property Description game...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d52eae5c116
unity_docs
scripting
What is `UIElements.UxmlEnumAttributeDescription_1.TryGetValueFromBag` in Unity? Explain its purpose and usage.
UxmlEnumAttributeDescription<T0>.TryGetValueFromBag Declaration public bool TryGetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc , ref T value ); Parameters Parameter Description bag The bag of attributes. cc The context in which the values are retrieved. value The val...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7162cf34027d
unity_docs
rendering
What is `Terrain.SetKeepUnusedCameraRenderingResources` in Unity? Explain its purpose and usage.
Terrain.SetKeepUnusedCameraRenderingResources Declaration public void SetKeepUnusedCameraRenderingResources (int cameraInstanceID , bool keepUnused ); Parameters Parameter Description cameraInstanceID The InstanceID of the camera for which freeUnusedRenderingResources is being set. See Object.GetInstanceID...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b37e276e4c5
unity_docs
scripting
What is `LOD.fadeTransitionWidth` in Unity? Explain its purpose and usage.
LOD.fadeTransitionWidth public float fadeTransitionWidth ; Description Width of the cross-fade transition zone (proportion to the current LOD's whole length) [0-1]. Only used if it's not animated.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_830af1147adc_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A base class for MonoBehaviours that can beinstantiatedor addedto a with nine arguments passed to the function of the created instance.Instances of classes inheriting from receive the arguments via the method where they can be assigned to member fields or properties. Type of the first argument received in the funct...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_adb126803eb9
unity_docs
editor
Show me a Unity C# example demonstrating `EditorWindow.GetWindowWithRect`.
mal window. title If GetWindow creates a new window, it will get this title. If this value is null, use the class name as title. Description Returns the first EditorWindow of type t which is currently on the screen. If there is none, creates and shows new window at the position rect and returns the instance of...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d674aea7c08
unity_docs
rendering
What is `ParticleSystemRenderer.sortingFudge` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.sortingFudge public float sortingFudge ; Description Biases Particle System sorting amongst other transparencies. Use lower (negative) numbers to prioritize the Particle System to draw closer to the front, and use higher numbers to prioritize other transparent objects.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe7f71e720bf
unity_docs
scripting
What is `AndroidJavaProxy.equals` in Unity? Explain its purpose and usage.
AndroidJavaProxy.equals Declaration public bool equals ( AndroidJavaObject obj ); Returns bool Returns true when the objects are equal and false if otherwise. Description The equivalent of the java.lang.Object equals() method.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_daa3f40f36ff
unity_docs
ui
Show me a Unity C# example demonstrating `GUILayout.HorizontalSlider`.
humb style from the current GUISkin is used. options An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the style . Returns float The value that has been set by the user. Description A horizontal slider the user can drag ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3620bb297749
unity_docs
editor
What is `IMGUI.Controls.ArcHandle.angleHandleSizeFunction` in Unity? Explain its purpose and usage.
ArcHandle.angleHandleSizeFunction public Handles.SizeFunction angleHandleSizeFunction ; Description The SizeFunction to specify how large the angle control handle should be. Defaults to DefaultAngleHandleSizeFunction for new instances of ArcHandle . The angle handle will be drawn with a size of 0 if a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d8307cd1d83
unity_docs
physics
What is `MonoBehaviour.OnMouseUpAsButton` in Unity? Explain its purpose and usage.
MonoBehaviour.OnMouseUpAsButton() Description OnMouseUpAsButton is only called when the mouse is released over the same Collider as it was pressed. This event is sent to all scripts attached to the Collider . This function is not called on objects that belong to Ignore Raycast layer. This function is called on ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94a21279a004
unity_docs
editor
Show me a Unity C# example demonstrating `EditorApplication.contextualPropertyMenu`.
EditorApplication.contextualPropertyMenu public static EditorApplication.SerializedPropertyCallbackFunction contextualPropertyMenu ; Description Callback raised whenever the user context-clicks on a property in an Inspector. This callback is useful to add custom contextual menu items which can perform operati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7dee184265e
unity_docs
input
What is `XR.TrackingOriginModeFlags` in Unity? Explain its purpose and usage.
TrackingOriginModeFlags enumeration Description This enum provides context to where the 0,0,0 point of tracking for InputDevice s is. Each XRInputSubsystem has a single origin for all reported InputDevice s. The origin can be relative to either real-world objects, such as a physical tracking device, or virtual...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4dcc2790b7a
unity_docs
scripting
What is `UIElements.UxmlAttributeDescription.GetValueFromBag` in Unity? Explain its purpose and usage.
UxmlAttributeDescription.GetValueFromBag Declaration protected T GetValueFromBag ( UIElements.IUxmlAttributes bag , UIElements.CreationContext cc , Func<string,T,T> converterFunc , T defaultValue ); Parameters Parameter Description bag A bag containing attributes and their values as strings. cc The c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18a54180579b
unity_docs
scripting
Show me a Unity C# example demonstrating `Windows.WebCam.VideoCapture`.
and Universal Windows Platform) and in the Windows Editor. The final video recording will be stored on the local file system in the MP4 format. VideoCapture is implemented using the WinRT interface: Windows.Media.Capture.IMediaCapture. For more information, see Microsoft documentation on Windows MediaCapture . Note: ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3945c9b7bfce
unity_docs
scripting
What is `ILogger.LogFormat` in Unity? Explain its purpose and usage.
ILogger.LogFormat Declaration public void LogFormat ( LogType logType , string format , params object[] args ); Description Logs a formatted message. Additional resources: Logger.LogFormat .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf4143c63e49
unity_docs
scripting
What is `Rendering.SinglePassStereoMode` in Unity? Explain its purpose and usage.
SinglePassStereoMode enumeration Description Enum type defines the different stereo rendering modes available. Properties Property Description None Render stereo using multiple passes. SideBySide Render stereo to the left and right halves of a single, double-width render target. Instancing Render stereo using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94c216cb2541_doc_15
github
scripting
What does `GetEmptyCsvExportValues` do in this Unity script? Explain its purpose and signature.
Returns an empty CSV string matching the column count of NUM_CSV_EXPORT_COLUMNS.Separator character (Default: DataGatherer.DEFAULT_COLUMN_SEPARATOR).A string containing NUM_CSV_EXPORT_COLUMNS empty csv-columns. Signature: ```csharp public static string GetEmptyCsvExportValues(char sep = CsvUtility.DEFAULT_COLUMN_SEPAR...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
gh_7375de3ea7fc_doc_4
github
scripting
What does `GetPackageInfo` do in this Unity script? Explain its purpose and signature.
Checks if packages exists in the current project Signature: ```csharp public static void GetPackageInfo(string packageName, Action<UnityEditor.PackageManager.PackageInfo> info) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_71207c05c6b9
unity_docs
xr
What is `Networking.DownloadHandler.Dispose` in Unity? Explain its purpose and usage.
DownloadHandler.Dispose Declaration public void Dispose (); Description Signals that this DownloadHandler is no longer being used, and should clean up any resources it is using. This method must be called once you have finished using a [DownloadHandler] object. For convenience, UnityWebRequest exposes the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1be9c3972b4
unity_docs
physics
What is `Sprite.GetPhysicsShape` in Unity? Explain its purpose and usage.
Sprite.GetPhysicsShape Declaration public int GetPhysicsShape (int shapeIdx , List<Vector2> physicsShape ); Parameters Parameter Description shapeIdx The index of the physics shape to retrieve. physicsShape An ordered list of the points in the selected physics shape to store points in. Returns int Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dba0b4b02f12
unity_docs
scripting
What is `Experimental.GraphView.IconBadge.CreateComment` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IconBadge.CreateComment Declaration public static Experimental.GraphView.IconBadge CreateComment (string message ); Parameters Parameter Description message Displayed comment message. Returns IconBadge The created b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a3b3e476ddd
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.Particle.startLifetime`.
ParticleSystem.Particle.startLifetime public float startLifetime ; Description The starting lifetime of the particle. This is the total lifetime of this particle in seconds. The Particle System sets this value when it first spawns the particle. ```csharp using UnityEngine;public class Example : MonoBehaviour ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91187c87008b
unity_docs
scripting
Give me an overview of the `SortingLayer` class in Unity.
SortingLayer struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description SortingLayer allows you to set the render order of multiple sprites easily. There is always a default SortingLayer named "Default" which all sprites are added to initially. Added more SortingLayers to easily control the order...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e4250b0bc71
unity_docs
xr
What is `Rendering.AsyncGPUReadback.WaitAllRequests` in Unity? Explain its purpose and usage.
AsyncGPUReadback.WaitAllRequests Declaration public static void WaitAllRequests (); Description Waits until the completion of every request. If you call AsyncGPUReadbackRequest.done on any request after this call, it always returns true whether the request completed successfully or not. You can use Async...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c6431e1765e
unity_docs
scripting
What is `IMGUI.Controls.TreeView.SetExpandedRecursive` in Unity? Explain its purpose and usage.
TreeView.SetExpandedRecursive Declaration public void SetExpandedRecursive (int id , bool expanded ); Parameters Parameter Description id TreeViewItem ID. expanded Expanded state: true expands, false collapses. Description Expand or collapse all items under item with id. This is also used internally wh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a8fd0d15c7d
unity_docs
editor
What is `EditorGUIUtility.standardVerticalSpacing` in Unity? Explain its purpose and usage.
EditorGUIUtility.standardVerticalSpacing public static float standardVerticalSpacing ; Description Get the height used by default for vertical spacing between controls. When creating GUI without GUILayout, such as is for instance required by PropertyDrawer s, and you need to place several controls under each o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4d3639fd2c2f
unity_docs
scripting
What is `Transform.eulerAngles` in Unity? Explain its purpose and usage.
Transform.eulerAngles public Vector3 eulerAngles ; Description The rotation as Euler angles in degrees. Transform.eulerAngles represents rotation in world space. When viewing the rotation of a GameObject in the Inspector, you may see different angle values from those stored in this property. This is because...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10826d5ee81a
unity_docs
scripting
Show me a Unity C# example demonstrating `Animator.SetFloat`.
Animator to affect transitions. Use SetFloat in a script to send float values to the Animator in order to activate transitions. In the Animator, define what values affect how certain animations transition. This is useful in various situations, especially in animation cycles such as movement animations where you might ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5b1aadb9d254
unity_docs
scripting
Show me a Unity code example for 'Vector4Field'.
or4Field lets users enter a Vector4 value. Note : To align a Vector4Field with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a Vector4Field You can create a Vector4Field with UI Builder, UXML, and C#. The following...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2970347ecadf
unity_docs
rendering
What is `TerrainTools.TerrainCategory` in Unity? Explain its purpose and usage.
TerrainCategory enumeration Description A category with which to define tools that inherit from the ITerrainPaintToolWithOverlays interface. The categories include: TerrainCategory.CustomBrushes, TerrainCategory.Foliage, TerrainCategory.Materials, TerrainCategory.NeighborTerrains, and TerrainCategory.Sculpt. Prop...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c0f94d97b925
unity_docs
scripting
In Unity's 'Apple’s privacy manifest policy requirements', what is 'Prepare your Unity applications for Apple’s privacy manifest policy' and how does it work?
You must review your native code, C# code, and data collection and tracking practices to understand if Apple’s privacy manifest policy applies to you. Follow these guidelines to decide if you need to include a privacy manifest file in your product: If your application includes multiple third-party SDKs, packages, and p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1655153689c3
github
scripting
Write a Unity C# UI script for Hud View
```csharp using PacEngine; using UnityEngine; using UnityEngine.UI; public class HudView : MonoBehaviour { [SerializeField] private Image lifeIconRef; [SerializeField] private Transform lifeCountContainer; [SerializeField] private Text gameOverLabel; void Awake() { gameOverLabel.gameObjec...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_719241a46a8e
unity_docs
scripting
What is `Compilation.AssemblyDefinitionReferenceType` in Unity? Explain its purpose and usage.
AssemblyDefinitionReferenceType enumeration Description Assembly definition file reference type. Properties Property Description Name Assembly definition file assembly name reference. Guid Assembly definition file GUID reference.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8e014956b9a0
unity_docs
rendering
What are the parameters of `GUILayout.BeginArea` in Unity?
Description Begin a GUILayout block of GUI controls in a fixed screen area. By default, any GUI controls made using GUILayout are placed in the top-left corner of the screen. If you want to place a series of automatically laid out controls in an arbitrary area, use GUILayout.BeginArea to define a new area for the autom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae219d6867a7
unity_docs
rendering
What is `TerrainTools.PaintContext.Gather` in Unity? Explain its purpose and usage.
PaintContext.Gather Declaration public void Gather (Func<ITerrainInfo,Texture> terrainSource , Color defaultColor , Material blitMaterial , int blitPass , Action<ITerrainInfo> beforeBlit , Action<ITerrainInfo> afterBlit ); Parameters Parameter Description terrainSource A function that returns the Te...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8d0cb3356c38_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Serialize object to JSON string Signature: ```csharp public static string ToJson<T>(T obj, bool prettyPrint = false) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_411ef280cb22
unity_docs
ui
In Unity's 'Download and import an asset package', what is 'Importing a complete project from the Asset Store' and how does it work?
A complete project has assets and project settings . The process for importing a complete project is similar to other asset packages, except there’s an additional step for project settings. The project settings in the complete project might conflict with settings in your project, so when you import a complete project f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_85f211fd16fd
unity_docs
rendering
What is `MaterialPropertyBlock.HasColor` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.HasColor Declaration public bool HasColor (string name ); Declaration public bool HasColor (int nameID ); Parameters Parameter Description name The name of the property. nameID The name ID of the property. Use Shader.PropertyToID to get this ID. Returns bool Returns true if...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_063afdb6e60e
unity_docs
ui
What is `Toolbars.EditorToolbarDropdownToggle.ShowDropDown` in Unity? Explain its purpose and usage.
EditorToolbarDropdownToggle.ShowDropDown Declaration public void ShowDropDown (bool show ); Parameters Parameter Description show True if the dropdown is visible, false otherwise. Description Allow to set the visibility of the drop down button.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91d57e0f45d1
unity_docs
input
What is `IMGUI.Controls.SearchField` in Unity? Explain its purpose and usage.
SearchField class in UnityEditor.IMGUI.Controls Description The SearchField control creates a text field for a user to input text that can be used for searching. It comes in two UI styles: one for normal usage and one for toolbars. Properties Property Description autoSetFocusOnFindCommand Changes the keyboard...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83d46fe2584b
unity_docs
scripting
What are the parameters of `Caching.ClearOtherCachedVersions` in Unity?
Returns bool Returns true when cache clearing succeeded. Description Removes all the cached versions of the AssetBundle from the cache, except for the specified version. Returns false if any cached bundle is in use. ```csharp using UnityEngine;public class Example : MonoBehaviour { void ClearOtherCachedVersionsExam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6d91def36e5
unity_docs
editor
What are the parameters of `Presets.Preset.SetDefaultPresetsForType` in Unity?
Returns bool Returns true if the list was set as default. Returns false otherwise. Description Sets a default list of Presets with a filter for a specific PresetType . Default Presets are stored in the PresetManager. Access Presets with a script, using this method and Preset.GetDefaultListForType, or from the Preset Ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d9fc1896964
unity_docs
rendering
What is `Rendering.RendererUtils.RendererListDesc` in Unity? Explain its purpose and usage.
RendererListDesc struct in UnityEngine.Rendering.RendererUtils / Implemented in: UnityEngine.CoreModule Description Represents the set of GameObjects that a RendererList contains. Properties Property Description batchLayerMask The batch layer mask to use for filtering this RendererList. excludeObjectMotionV...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6445d695aabf
unity_docs
scripting
What is `ChangeGameObjectStructureHierarchyEventArgs` in Unity? Explain its purpose and usage.
ChangeGameObjectStructureHierarchyEventArgs struct in UnityEditor Description A change of this type indicates that the structure of a GameObject has changed and any GameObject in the hierarchy below it might have changed. This happens for example when Undo.RegisterFullObjectHierarchyUndo is used. An event o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03274cc2599d
unity_docs
rendering
What is `Rendering.ScriptableRenderContext.CullShadowCasters` in Unity? Explain its purpose and usage.
ScriptableRenderContext.CullShadowCasters Declaration public void CullShadowCasters ( Rendering.CullingResults cullingResults , Rendering.ShadowCastersCullingInfos infos ); Parameters Parameter Description cullingResults Culling results to use. infos Shadow casters culling information. Description Pe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1831447ea9f3
unity_docs
editor
Show me a Unity C# example demonstrating `PreferBinarySerialization`.
tDabase.CreateAsset and AssetDatabase.AddObjectToAsset to ensure that the main asset is the object with this attribute set. Scene files always follow the asset serialization mode configured in the project, thus PreferBinarySerialization is always ignored for assets embedded in Scenes. The attribute can only be applie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_029facfbbf80
unity_docs
networking
Explain 'Netcode for Entities' in Unity.
com.unity.netcode ## Description Unity’s Data Oriented Technology Stack (DOTS) multiplayer netcode layer - a high level netcode system built on entities. This package provides a foundation for creating networked multiplayer applications within DOTS. ## Released for Unity Package version 1.11.0 is released for Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5a7a6eabf844
unity_docs
rendering
In Unity's 'Material Validator window reference for the Built-In Render Pipeline', what is 'Validate Albedo mode' and how does it work?
The PBR Validation Settings that appear in the Scene view when you set Material Validation to Validate Albedo. Property Description Check Pure Metals Enable this checkbox if you want the Material Validator to highlight in yellow any pixels it finds which Unity defines as metallic, but which have a non-zero albedo value...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_69b0a3b9cb09
unity_docs
rendering
Show me a Unity code example for 'BlendOp command in ShaderLab reference'.
operation: HSLColor (2) HSLLuminosity Advanced OpenGL blending operation: HSLLuminosity (2) Notes: Logical operations require DX 11.1+ or Vulkan. Advanced OpenGL blending operations require GLES3.1 AEP+ , GL_KHR_blend_equation_advanced , or GL_NV_blend_equation_advanced . They can only be used with standard RGBA blendi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5974f724d0c
unity_docs
editor
What is `PrefabUtility.GetCorrespondingObjectFromSource` in Unity? Explain its purpose and usage.
PrefabUtility.GetCorrespondingObjectFromSource Declaration public static TObject GetCorrespondingObjectFromSource (TObject componentOrGameObject ); Parameters Parameter Description componentOrGameObject The object to find the corresponding object from. Returns TObject The corresponding object or null. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d486ab0fd98c
unity_docs
input
What is `Rect.Contains` in Unity? Explain its purpose and usage.
Rect.Contains Declaration public bool Contains ( Vector2 point ); Declaration public bool Contains ( Vector3 point ); Declaration public bool Contains ( Vector3 point , bool allowInverse ); Parameters Parameter Description point Point to test. allowInverse Does the test allow the Rect's width...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcca06843ce3
unity_docs
physics
What is `HumanDescription.lowerArmTwist` in Unity? Explain its purpose and usage.
HumanDescription.lowerArmTwist public float lowerArmTwist ; Description Defines how the lower arm's roll/twisting is distributed between the elbow and wrist joints. When the lower arm needs to twist or roll based on IK, lowerArmTwist (a weighted range of 0..1) determines how much rotation is applied to the wr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d432f1b4d31e
unity_docs
math
What is `UIElements.StartDragArgs` in Unity? Explain its purpose and usage.
StartDragArgs struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Provides entry points to initialize the new drag-and-drop operation. Properties Property Description title The title displayed near the pointer to identify what is being dragged. Should be set duri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d5a342673c0
unity_docs
editor
What is `PlayerSettings.Android.androidTVCompatibility` in Unity? Explain its purpose and usage.
PlayerSettings.Android.androidTVCompatibility public static bool androidTVCompatibility ; Description Provide a build that is Android TV compatible. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class AndroidTVCompatibilitySample : MonoBehaviour { [MenuItem("Build/AndroidTV Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f45244dfb7b4
unity_docs
editor
What is `PrefabUtility.ApplyPropertyOverride` in Unity? Explain its purpose and usage.
PrefabUtility.ApplyPropertyOverride Declaration public static void ApplyPropertyOverride ( SerializedProperty instanceProperty , string assetPath , InteractionMode action ); Parameters Parameter Description instanceProperty The SerializedProperty representing the property to apply. assetPath The path ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e4534cd59b62
unity_docs
ui
In Unity's 'Dispatch events', what is 'Event propagation' and how does it work?
After the event dispatcher selects the event target, it computes the propagation path of the event. The propagation path is an ordered list of visual elements that receive the event. The propagation path occurs in the following order: The path starts at the root of the visual element tree and descends towards the targe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_46df87ba5a95
unity_docs
rendering
What are the parameters of `TerrainData.GetAlphamaps` in Unity?
Returns float[,,] A 3D array of floats, where the 3rd dimension represents the mixing weight of each splatmap at each x,y coordinate. Description Returns the alpha map at a position x, y given a width and height. The returned array is three-dimensional - the first two dimensions represent y and x coordinates on the map...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_11a86a86f950
unity_docs
xr
In Unity's 'VR and MR development in Unity', what is 'Considerations for VR and MR development' and how does it work?
VR and MR development shares common workflows and design considerations with any real-time 3D development in Unity. However, distinguishing factors include: Richer user input : in addition to traditional button and joystick controllers, VR devices provide spatial head, controller, and hand and finger tracking (on suppo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_011b5f82c617
unity_docs
math
In Unity's 'Export an Android project', what is 'Exporting' and how does it work?
To export a Unity project for Android Studio: Open the Build Profiles window. (menu: File > Build Profiles ). From the list of platforms in the Platforms panel, select Android or create a build profile for the Android platform. Note : If Android is grayed out, set up your project for Android development . Enable Export...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54c5b766961c
unity_docs
scripting
What is `Rigidbody.GetRelativePointVelocity` in Unity? Explain its purpose and usage.
Rigidbody.GetRelativePointVelocity Declaration public Vector3 GetRelativePointVelocity ( Vector3 relativePoint ); Description The velocity relative to the rigidbody at the point relativePoint . GetRelativePointVelocity will take the angularVelocity of the rigidbody into account when calculating the veloci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40f98d89036c
unity_docs
ui
What is `PropertyAttribute.applyToCollection` in Unity? Explain its purpose and usage.
PropertyAttribute.applyToCollection public bool applyToCollection ; Description Makes attribute affect collections instead of their items. ```csharp using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements;public class Collection : MonoBehaviour { public int before; [Gr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_058bd21bacec
unity_docs
scripting
Explain 'TwoPaneSplitView' in Unity.
The TwoPaneSplitView element is a container that arranges its children in two panes, either horizontally or vertically. The user can resize the panes by dragging the divider between them. A TwoPaneSplitView must have exactly two children. ## Create a TwoPaneSplitView You can create a TwoPaneSplitView with UXML and C#...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c318c9950aa3
unity_docs
scripting
What is `Android.DownloadAssetPackAsyncOperation.progress` in Unity? Explain its purpose and usage.
DownloadAssetPackAsyncOperation.progress public float progress ; Description Gets the progress of the operation. The range is 0 to 1. Read-only. Additional resources: DownloadAssetPackAsyncOperation.isDone , DownloadAssetPackAsyncOperation.progress , DownloadAssetPackAsyncOperation.downloadedAssetPacks .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_099564704ac3
unity_docs
editor
What is `Device.SystemInfo.maxCubemapSize` in Unity? Explain its purpose and usage.
SystemInfo.maxCubemapSize public static int maxCubemapSize ; Description This has the same functionality as SystemInfo.maxCubemapSize 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_55999eb8a024
unity_docs
scripting
Show me a Unity C# example demonstrating `Renderer.material`.
any other renderers, this will clone the shared material and start using it from now on. Note: This function automatically instantiates the materials and makes them unique to this renderer. It is your responsibility to destroy the materials when the game object is being destroyed. Resources.UnloadUnusedAssets also d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f427098ccd41
unity_docs
scripting
What is `ObjectMatchMode` in Unity? Explain its purpose and usage.
ObjectMatchMode enumeration Description Enum for controlling how e.g. GameObjects and Components are matched. Additional resources: PrefabUtility.ConvertToPrefabInstance , PrefabUtility.ReplacePrefabAssetOfPrefabInstance . Properties Property Description NoMatchingPerformed Disable matching of objects. ByNa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cce57ea9a1a1
unity_docs
scripting
What are the parameters of `QualitySettings.DecreaseLevel` in Unity?
Description Decrease the current quality level. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { QualitySettings.DecreaseLevel(false); } } ``` IncreaseLevel and DecreaseLevel functions only apply anti-aliasing if applyExpensiveChanges is true. Additional resources: I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c50156d0e87
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.scrollSpeed`.
ParticleSystem.NoiseModule.scrollSpeed public ParticleSystem.MinMaxCurve scrollSpeed ; Description Scroll the noise map over the Particle System. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8524e430f8aa
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R16G16B16A16_SInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R16G16B16A16_SInt Description A four-component, 64-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A compo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3e51b05314c
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetImporterTypes`.
importer type for each asset in the array. Description Returns the types of importers associated with the specified array of assets, without loading those assets. This method is a batch version of AssetDatabase.GetImporterType . Use this method if you need to check a large number of asset importers at once. Not...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4952a8b51778
unity_docs
ui
What is `GUIStyle.focused` in Unity? Explain its purpose and usage.
GUIStyle.focused public GUIStyleState focused ; Description Rendering settings for when the element has keyboard focus. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { GUI.skin.button.focused.textColor = Color.blue; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96f23117bd4b
unity_docs
math
What is `Mesh.GetVertices` in Unity? Explain its purpose and usage.
Mesh.GetVertices Declaration public void GetVertices (List<Vector3> vertices ); Parameters Parameter Description vertices A list of vertex positions to populate. Description Gets the vertex positions of the Mesh. Use this method instead of vertices if you control the life cycle of the list passed in an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c055a752635
unity_docs
editor
What is `EditorUserSettings.overwriteFailedCheckoutAssets` in Unity? Explain its purpose and usage.
EditorUserSettings.overwriteFailedCheckoutAssets public static bool overwriteFailedCheckoutAssets ; Description Automatically overwrite assets that failed to checkout from version control when saving or importing.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb7a50793e6e
unity_docs
scripting
Show me a Unity C# example demonstrating `Quaternion.identity`.
ntity sets the object's local rotation to match the parent's orientation (no local rotation relative to the parent). * Multiplying by Quaternion.identity has no effect. Common use cases: * Instantiate objects with neutral rotation: Instantiate(prefab, position, Quaternion.identity) . * Reset object rotation to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a94b2b923439
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingConfig.materialTest` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingConfig.materialTest public Rendering.RayTracingInstanceCullingMaterialTest materialTest ; Description A Material-based test used in RayTracingAccelerationStructure.CullInstances . This test can be used to ignore Materials that don't support ray tracing. If the test fails, the Rendere...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2329a7941cc1_doc_10
github
scripting
What does `Attach` do in this Unity script? Explain its purpose and signature.
When passed a gameObject, this function will scrape the game object for all valid components that we willinteract with by enabling/disabling as the state changesThe game object to scrape the various components from Signature: ```csharp public void Attach(GameObject gameObject) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_0d2ed8ce1336
unity_docs
editor
Show me a Unity C# example demonstrating `Android.AndroidSharedLibraryType`.
AndroidSharedLibraryType enumeration Description Options for the type of content that a shared library contains. ```csharp using UnityEditor; using UnityEditor.Android; using UnityEngine;public class AndroidSharedLibraryTypeExample { [MenuItem("Tools/Configure Libraries")] static void ConfigureLibraries() { //...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_26ba02a18ca0
unity_docs
scripting
What is `PackageManager.ErrorCode` in Unity? Explain its purpose and usage.
ErrorCode enumeration Description Package operation Error. Properties Property Description Unknown Operation resulted in an unknown error. NotFound A package required to fulfill the operation was not found. Forbidden Operation was not allowed. InvalidParameter Operation had invalid parameters. Conflict Con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f98b5d124128
unity_docs
animation
What is `Animations.PositionConstraint.translationAxis` in Unity? Explain its purpose and usage.
PositionConstraint.translationAxis public Animations.Axis translationAxis ; Description The axes affected by the PositionConstraint. Use this property to restrict the effect of the constraint on a particular axis. ```csharp using UnityEngine.Animations;public class ConstraintAxis { public void ConstrainOnly...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_631922c40522_doc_13
github
scripting
What does `Release` do in this Unity script? Explain its purpose and signature.
Release the loaded asset.Safe to call multiple times.If called during loading, attempts to cancel the loading. Signature: ```csharp public void Release() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9c15875a9f1b
unity_docs
audio
In Unity's 'Audio Pitch Shifter Effect', what is 'Properties' and how does it work?
Property: Function: Pitch The pitch multiplier (range 0.5 x to 2.0 x, default 1.0 x). FFT Size The size of the FFT window used to analyze the audio signal during pitch shifting (range 256.0 to 4096.0, default = 1024.0). Higher values reduce smearing but require more processing power. Overlap How much each successive FF...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d19e4f0fb265
unity_docs
editor
What is `SpeedTree.Importer.SpeedTree9Importer.OnAssetPostProcess` in Unity? Explain its purpose and usage.
SpeedTree9Importer.OnAssetPostProcess(GameObject mainObject) Parameters Parameter Description mainObject The main object used by the importer, containing the data. Description Called after a SpeedTree asset has been processed during import. Handles post-processing tasks specific to SpeedTree assets.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed5beb7d70e5
unity_docs
scripting
What is `UnityEngine.UnityWebRequestModule` in Unity? Explain its purpose and usage.
UnityEngine.UnityWebRequestModule Description The UnityWebRequest module lets you communicate with http services. Classes Class Description CertificateHandler Responsible for rejecting or accepting certificates received on https requests. DownloadHandler Manage and process HTTP response body data received from ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3137fcf19aea
unity_docs
animation
Give me an overview of the `AnimationState` class in Unity.
AnimationState class in UnityEngine / Implemented in: UnityEngine.AnimationModule Description The AnimationState gives full control over animation blending. In most cases the Animation interface is sufficient and easier to use. Use the AnimationState if you need full control over the animation blending any pl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d2028d369e4a
unity_docs
rendering
Explain 'Xcode frame debugger Unity integration' in Unity.
The Xcode frame debugger tool lets you capture a frame of your application to see the commands that the GPU performed during that frame, examine data in GPU memory, and identify bottlenecks in your shaders . This lets you analyze GPU performance in fine detail. Unity integrates with the Xcode frame debugger in the foll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea76e618d9ea
unity_docs
math
What is `CharacterController.enableOverlapRecovery` in Unity? Explain its purpose and usage.
CharacterController.enableOverlapRecovery public bool enableOverlapRecovery ; Description Enables or disables overlap recovery. Enables or disables overlap recovery. Used to depenetrate character controllers from static objects when an overlap is detected. Overlap recovery can be used to depenetrate character...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b5c42328c81c
github
scripting
Write a Unity C# script called Open List Picker Popup Button
```csharp // Copyright 2024 The Open Brush Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
gh_983cb9579222_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Mutes the onDestroy Warning. Signature: ```csharp protected static bool MuteOnDestroyWarning = false; ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_77cd036955fe
unity_docs
scripting
What is `Sprite.texture` in Unity? Explain its purpose and usage.
Sprite.texture public Texture2D texture ; Description Get the reference to the used Texture. If packed this will point to the atlas, if not packed will point to the source Sprite. This only returns the Texture the Sprite is currently using. You cannot change the Texture using this. ```csharp //Attach this s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7b70a59727c2
github
scripting
Write a Unity C# ScriptableObject for A Prefab Pool Asset
```csharp using System; using System.Collections.Generic; using UnityEngine; using Object = UnityEngine.Object; namespace Gilzoide.PrefabPool.Internal { public abstract class APrefabPoolAsset<T, TPool> : ScriptableObject, IPrefabPool<T>, IDisposable where T : Object where TPool : APrefabPool<T>, ne...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_15b041db5ab7
github
scripting
Write a Unity C# MonoBehaviour script called Lifecycle
```csharp using UnityEngine; using UnityPlayerLooper; namespace UnityPlayerLooperSamples { public class Lifecycle : MonoBehaviour { [SerializeField] LoopCountPresenter _loopCountPresenter; LoopCounterA _loopCounterA; LoopCounterB _loopCounterB; void Awake() { ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_b9bb557e6a43
unity_docs
xr
In Unity's 'Code sign your application', what is 'Create entitlements' and how does it work?
Entitlements are permissions or restrictions your code signature includes that control the actions your application can take. To set entitlements for your application, use the following steps: In the same directory as your built application, create a file with the same name as your application with the.entitlements fil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.