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_fb0cf539a17d
unity_docs
rendering
Show me a Unity C# example demonstrating `EditorWindow.autoRepaintOnSceneChange`.
EditorWindow.autoRepaintOnSceneChange public bool autoRepaintOnSceneChange ; Description Enable this property to automatically repaint the window when the SceneView is modified. Editor Window that renders what the main camera is "seeing". ```csharp // Simple script that lets you render the main camera in an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1781ad986d1a
unity_docs
scripting
What is `AndroidJNI.GetStringLength` in Unity? Explain its purpose and usage.
AndroidJNI.GetStringLength Declaration public static int GetStringLength (IntPtr str ); Description Returns the length (the count of Unicode characters) of a Java string. 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_man_43af997b0322
unity_docs
ui
In Unity's 'Dispatch events', what is 'Dispatch behavior of event types' and how does it work?
Each event type has its own dispatch behavior. The behavior of each event type breaks down into two stages: Trickles down : Events sent to elements during the trickle-down phase. Bubbles up : Events sent to elements during the bubble-up phase. For a list of dispatch behavior for each event type, see the Event reference...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_687d1ff6ba4a
github
scripting
Write a Unity C# MonoBehaviour script called Node Result
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; namespace MBT { [RequireComponent(typeof(MonoBehaviourTree))] public abstract class Node : MonoBehaviour { public const float NODE_DEFAULT_WIDTH = 160f; public string title; [HideInInspector]...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_5fbbfdb690b8
unity_docs
scripting
What is `ObjectChangeEventStream.GetChangeGameObjectStructureHierarchyEvent` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.GetChangeGameObjectStructureHierarchyEvent Declaration public void GetChangeGameObjectStructureHierarchyEvent (int eventIdx , out ChangeGameObjectStructureHierarchyEventArgs data ); Parameters Parameter Description eventIdx The index of the event to get the data for. data The dat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bb578b37e02
unity_docs
physics
What is `ContactPoint2D.relativeVelocity` in Unity? Explain its purpose and usage.
ContactPoint2D.relativeVelocity public Vector2 relativeVelocity ; Description Gets the relative velocity of the two colliders at the contact point (Read Only). The relative velocity is the difference in velocity between two moving and rotating colliders colliding at the contact point. Additional resources: R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_15
github
scripting
What does `OnlyHasGraphicsDeviceType` do in this Unity script? Explain its purpose and signature.
Checks if the requested graphics device type for a given build target is the only one used Signature: ```csharp public static bool OnlyHasGraphicsDeviceType(BuildTarget buildTarget, GraphicsDeviceType graphicsDeviceType) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_22d41c367b87
unity_docs
xr
What is `Rendering.CommandBuffer.DrawOcclusionMesh` in Unity? Explain its purpose and usage.
CommandBuffer.DrawOcclusionMesh Declaration public void DrawOcclusionMesh ( RectInt normalizedCamViewport ); Parameters Parameter Description normalizedCamViewport The viewport of the camera currently being rendered. Description Adds a command onto the commandbuffer to draw the VR Device's occlusion mesh ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2579bcd8bf9
unity_docs
rendering
What is `LightTransport.PostProcessing.IProbePostProcessor.DeringSphericalHarmonicsL2` in Unity? Explain its purpose and usage.
IProbePostProcessor.DeringSphericalHarmonicsL2 Declaration public bool DeringSphericalHarmonicsL2 ( LightTransport.IDeviceContext context , BufferSlice<SphericalHarmonicsL2> shIn , BufferSlice<SphericalHarmonicsL2> shOut , int probeCount ); Parameters Parameter Description context Device context. shIn ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5567000ad7e9
unity_docs
scripting
What is `Search.PropertyDatabaseRecordKey.operator_lt` in Unity? Explain its purpose and usage.
PropertyDatabaseRecordKey.operator < public static bool operator < ( Search.PropertyDatabaseRecordKey lhs , Search.PropertyDatabaseRecordKey rhs ); Parameters Parameter Description lhs A record key. rhs A record key. Description The less than operator.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_cf41fd5ba932_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
A version of action-based continuous movement that automatically controls the frame of reference thatdetermines the forward direction of movement based on user preference for each hand.For example, can configure to use head relative movement for the left hand and controller relative movement for the right hand. Signat...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_68f24e9912b2
unity_docs
rendering
Show me a Unity C# example demonstrating `Material.IsKeywordEnabled`.
hat. Note: A LocalKeyword is specific to a single Shader or ComputeShader instance. You cannot use it with other Shader or ComputeShader instances, even if they declare keywords with the same name. This example iterates over the local shader keywords in the local keyword space for a material. It determines w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c29b55e1ecf
unity_docs
rendering
Show me a Unity C# example demonstrating `TextureMipmapLimitGroups.RemoveGroup`.
xture mipmap limit group named groupName . If Unity finds a matching group, Unity removes it from all quality levels. Unity does not modify textures bound to the removed group. These textures continue to point to the removed group as long as you do not update and re-import them yourself. If you do not adjust the relev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_13c8a0f58709
unity_docs
scripting
What is `Experimental.GraphView.Group.OnGroupRenamed` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Group.OnGroupRenamed Declaration protected void OnGroupRenamed (string oldName , string newName ); Parameters Parameter Description oldName The old name of the group. newName The new name of the group. Description Ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61951ab7da9d
unity_docs
rendering
What is `LightmapParameters.antiAliasingSamples` in Unity? Explain its purpose and usage.
LightmapParameters.antiAliasingSamples public int antiAliasingSamples ; Description The kernel width the lightmapper uses when sampling a lightmap texel. The kernel width the lightmapper uses when sampling a lightmap texel. This is the square root of AntiAliasingSamples . Additional resources: AntiAliasing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1c02c823057
unity_docs
scripting
What is `ObjectChangeEventStream.GetChangeGameObjectOrComponentPropertiesEvent` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.GetChangeGameObjectOrComponentPropertiesEvent Declaration public void GetChangeGameObjectOrComponentPropertiesEvent (int eventIdx , out ChangeGameObjectOrComponentPropertiesEventArgs data ); Parameters Parameter Description eventIdx The index of the event to get the data for. data...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3b76111b0f6
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh`.
shot of Mesh data that you can use with C# Jobs and Burst, and AllocateWritableMeshData with ApplyAndDisposeWritableMeshData to create Meshes from C# Jobs and Burst. Manipulating meshes from a script There are three common tasks that might want to use the Mesh API for: 1. Building a mesh from scratch : should alway...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39f48047551f
unity_docs
rendering
What is `ShaderKeywordFilter.RemoveIfAttribute` in Unity? Explain its purpose and usage.
RemoveIfAttribute class in UnityEditor.ShaderKeywordFilter / Inherits from: ShaderKeywordFilter.FilterAttribute Description Remove the specified shader keywords from the build if the data field matches the condition. If the data field under RemoveIf matches the value of condition , Unity removes keywordName...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09f7f915a307
unity_docs
physics
What are the parameters of `RaycastCommand.ctor` in Unity?
Description Create a RaycastCommand. The query is run in the default physics scene. Declaration public RaycastCommand ( PhysicsScene physicsScene , Vector3 from , Vector3 direction , QueryParameters queryParameters , float distance ); Parameters Parameter Description physicsScene The physics scene to run the raycast qu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f6ddb53fb7bd
unity_docs
rendering
Explain 'Frame Debugger Event Information reference' in Unity.
The Event Information Panel in the Frame Debugger window displays information about the event such as geometry details and the shader used for a draw call. Label Description A Render target selector : When rendering into multiple render targets (such as multiple RenderTextures or when also rendering to depth), this spe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aec53f7f13cb
unity_docs
scripting
What is `AssetDatabase.GetScriptableObjectsWithMissingScriptCount` in Unity? Explain its purpose and usage.
AssetDatabase.GetScriptableObjectsWithMissingScriptCount Declaration public static int GetScriptableObjectsWithMissingScriptCount (string assetPath ); Parameters Parameter Description assetPath The path to the asset file to check. Returns int The number of ScriptableObject instances in the file which are...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39ddc347d59e
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.SetVertexBufferData`.
buffers, vertex buffers and mesh subset data. You can use SetVertexBufferData to set vertex data directly, without using format conversions for each vertex attribute. The supplied data layout has to match the vertex data layout of the mesh (see SetVertexBufferParams , GetVertexAttributes ). Partial updates of the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06c3d1eeaeea
unity_docs
rendering
What is `LightTransport.RadeonRaysContext.CreateBuffer` in Unity? Explain its purpose and usage.
RadeonRaysContext.CreateBuffer Declaration public LightTransport.BufferID CreateBuffer (ulong count , ulong stride ); Parameters Parameter Description count Number of elements in the buffer. stride Stride of the buffer in bytes. Returns BufferID ID of the newly created buffer. Description Create...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_11cd971ca3b5
unity_docs
scripting
Show me a Unity code example for 'Per-frame updates'.
settings or by the Adaptive Performance package , Unity tries to run your game at the fastest frame rate possible. You can see more details of what occurs each frame in the Game Logic section of the execution order diagram . Consider the task of moving an object forward gradually, one frame at a time. It might seem at ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dbeb5613347d
github
scripting
Write a Unity C# script called Pop Up Info
```csharp using System; using Solid.Attributes; using Solid.Core; using Solid.Model; using UnityEngine; using UnityEngine.UI; /*Copyright (c) Created by Oleksii Volovich 2021*/ namespace Solid.UI { [ResourcePath("override path here")] public abstract class PopUp : Awaitable<PopUpInfo> { [Serialize...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_f90afe262abf
unity_docs
rendering
Give me an overview of the `UserAuthorization` class in Unity.
UserAuthorization enumeration Description Use this enum to request permission from the user’s device for access to system features. To request permission, pass this as a parameter to Application.RequestUserAuthorization . Note : The Microphone API is not available for the Web platform. ```csharp // This script ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_605453424c67
unity_docs
physics
Explain 'Optimize the physics system for CPU usage' in Unity.
You can optimize how the Unity physics system uses CPU resources in several ways. For example, you can adjust simulation frequency, carefully manage collider types, configure Rigidbody component behaviors, and more. Effective CPU optimization helps ensure your game maintains a high frame rate and responsive physics int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5ec626fdbb40
unity_docs
rendering
In Unity's 'Global illumination', what is 'Enlighten Realtime Global Illumination' and how does it work?
Unity stores some lighting data in your build, but uses the data to create lightmaps at runtime. As a result, you can adjust lights and see the effects on indirect lighting in real-time, in the Editor or at runtime. Enlighten Realtime Global Illumination doesn’t support global illumination from realtime shadows. For mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_faa997cd8416
github
scripting
Write a Unity C# script called Selection Tray
```csharp // Copyright 2020 The Tilt 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 an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_b930dbc68127
unity_docs
scripting
What are the parameters of `AudioSettings.Reset` in Unity?
Returns bool True if all settings could be successfully applied. Description Changes the device configuration and invokes the AudioSettings.OnAudioConfigurationChanged delegate with the argument deviceWasChanged=false . There's no guarantee that the exact settings specified are used, but Unity automatically uses the cl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e777a69a1bc
unity_docs
rendering
In Unity's 'Customize the Light Explorer', what is 'Extending the Light Explorer' and how does it work?
To extend the Light Explorer, you can either inherit from the: ILightingExplorerExtension interface and override the GetContentTabs method. DefaultLightingExplorerExtension class, which inherits from ILightingExplorerExtension . This class provides you with all of the content that is already in the window. Use this if ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7fd14bf0ba56
unity_docs
physics
Explain 'Define binding mode and update trigger' in Unity.
To define how changes are replicated between the data source and the UI, you can set the binding mode and update triggers for a binding object. You can set the binding mode and update triggers in UI Builder, UXML, or C#. ## Define binding modes Binding modes configure how changes are replicated between the data sourc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7bde3d5fbf5b
unity_docs
scripting
What is `Event.clickCount` in Unity? Explain its purpose and usage.
Event.clickCount public int clickCount ; Description How many consecutive mouse clicks have we received. Used in EventType.MouseDown event; use this to differentiate between a single and double clicks. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { Event e = Event.curren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_336dbcbcb3bc
unity_docs
physics
What is `CullingGroup.SetBoundingDistances` in Unity? Explain its purpose and usage.
CullingGroup.SetBoundingDistances Declaration public void SetBoundingDistances (float[] distances ); Parameters Parameter Description distances An array of bounding distances. The distances should be sorted in increasing order. Description Set bounding distances for 'distance bands' the group should comput...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7cb28cc2845c
unity_docs
scripting
In Unity's 'Debug production Web builds', what is 'Map stack traces more precisely to C# names' and how does it work?
If you need more precise mapping, Unity also generates a MethodMap.tsv file during the build process. This file can help map IL2CPP-generated method names back to the original C# method names, which is especially useful for overloaded methods. Unity doesn’t automatically copy MethodMap.tsv to the build output directory...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd23b7dea43e
unity_docs
physics
Give me an overview of the `OverlapSphereCommand` class in Unity.
OverlapSphereCommand struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description Struct used to setup an overlap sphere command to be performed asynchronously during a job. When you use this struct to schedule a batch of overlap sphere commands, the commands are performed asynchronously. The r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae675fe78a80
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchService.ShowWindow`.
defaultWidth Initial width of the window. defaultHeight Initial height of the window. dockable If true, creates a dockable search window (that is closed when an item is activated). If false, it creates a dropdown (borderless, undockable and unmovable) version of the search window. Returns ISearchView Returns t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d62982d762b
unity_docs
rendering
What is `SystemInfo.supportsMultisampleResolveStencil` in Unity? Explain its purpose and usage.
SystemInfo.supportsMultisampleResolveStencil public static bool supportsMultisampleResolveStencil ; Description Returns true if the platform supports multisample resolve of stencil textures. Otherwise, returns false.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_981e8f3a324a
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.SubmitIsValid`.
public static bool SubmitIsValid ( VersionControl.ChangeSet changeset , VersionControl.AssetList assets ); Parameters Parameter Description changeset The changeset to submit. assets The asset to submit. Description Returns true if submitting the assets is a valid operation. Do note that the task will ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b8dc065a52ea
unity_docs
scripting
What is `Experimental.GraphView.Capabilities.Snappable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Capabilities.Snappable Description When Graph Snapping is enabled in Preferences, other GraphElements align with this GraphElement when the user drags them.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_44729c477011
unity_docs
scripting
Show me a Unity code example for 'Social API'.
, and the callback could contain data from the server to be processed. The Social class resides in the UnityEngine namespace and so is always available but the other Social API classes are kept in their own namespace, UnityEngine.SocialPlatforms. Furthermore, implementations of the Social API are in a sub-namespace, li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a3f6f0a8c7a0
unity_docs
physics
Explain 'Choose a collision detection mode' in Unity.
Collision Detection defines which algorithm the physics body (Rigidbody or ArticulationBody) uses to detect collisions. Different algorithms offer different levels of accuracy, but more accurate algorithms require more computational resources. There are three algorithms available, represented by four collision detectio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cfa483267f47
unity_docs
scripting
What is `Experimental.GraphView.EdgeControl.toCapColor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeControl.toCapColor public Color toCapColor ; Description The color of the cap color at the "to" end of the edge.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62347370a745
unity_docs
rendering
What is `Rendering.BuiltinShaderDefine.UNITY_LIGHT_PROBE_PROXY_VOLUME` in Unity? Explain its purpose and usage.
BuiltinShaderDefine.UNITY_LIGHT_PROBE_PROXY_VOLUME Description UNITY_LIGHT_PROBE_PROXY_VOLUME is set when Light Probe Proxy Volume feature is supported by the current graphics API and is enabled in the Graphics Tier settings . You can only set a Graphics Tier in the Built-in Render Pipeline. Additional resources...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7683578e782c
unity_docs
physics
Give me an overview of the `SoftJointLimit` class in Unity.
SoftJointLimit struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description The limits defined by the CharacterJoint . Properties Property Description bounciness When the joint hits the limit, it can be made to bounce off it. contactDistance Determines how far ahead in space the solver can...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bd117024d489
unity_docs
rendering
In Unity's 'Tree Editor concepts', what is 'The tree root node' and how does it work?
The tree root node exposes properties that affect the entire tree. For example, all branch and leaf groups inherit the LOD Quality property from the tree root node, although each branch group can add a multiplier to this value. For more information about the tree root node, refer to Root node reference .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c28cb9b21be7
unity_docs
editor
Show me a Unity C# example demonstrating `Profiling.FrameDataView.GetUnityObjectNativeTypeInfo`.
public bool GetUnityObjectNativeTypeInfo (int nativeTypeIndex , out Profiling.FrameDataView.UnityObjectNativeTypeInfo info ); Parameters Parameter Description nativeTypeIndex Native type index. info Native type information output struct with name and other attributes. Returns bool Returns true if type...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d293657959f6
unity_docs
rendering
What is `FontTextureCase` in Unity? Explain its purpose and usage.
FontTextureCase enumeration Description Texture case constants for TrueTypeFontImporter. Properties Property Description Dynamic Render characters into font texture at runtime as needed. Unicode Import a set of Unicode characters common for latin scripts. ASCII Import basic ASCII character set. ASCIIUpperCas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a80bd9fdf92a
unity_docs
ui
What is `UIElements.Foldout.inputUssClassName` in Unity? Explain its purpose and usage.
Foldout.inputUssClassName public static string inputUssClassName ; Description The USS class name for the Label element in a Foldout. Unity adds this USS class to the VisualElement that contains the Toggle input elements. Any styling applied to this class affects every foldout container located beside,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6f0dd41557d
unity_docs
physics
Show me a Unity C# example demonstrating `RaycastHit2D.normal`.
scription The surface normal of the detected Collider2D . When the physics query detects an intersection of a Collider2D at a specific RaycastHit2D.point the normal is the surface normal of the Collider2D at that position. A surface normal is a vector perpendicular to the collider surface edge in a direction...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88e0d02ee165
unity_docs
scripting
What is `Experimental.GraphView.GraphViewBlackboardWindow.IsGraphViewSupported` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewBlackboardWindow.IsGraphViewSupported Declaration protected bool IsGraphViewSupported ( Experimental.GraphView.GraphView gv ); Parameters Parameter Description gv A GraphView. Returns bool Returns true if th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c10aa1d0fa9c
unity_docs
rendering
What is `Rendering.CommandBuffer.SetRandomWriteTarget` in Unity? Explain its purpose and usage.
CommandBuffer.SetRandomWriteTarget Declaration public void SetRandomWriteTarget (int index , Rendering.RenderTargetIdentifier rt ); Declaration public void SetRandomWriteTarget (int index , ComputeBuffer buffer , bool preserveCounterValue ); Declaration public void SetRandomWriteTarget (int index ,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cac8bc8fd72e
unity_docs
rendering
In Unity's 'ColorMask command in ShaderLab reference', what is 'Syntax' and how does it work?
This command makes a change to the render state. Use it in a Pass block to set the render state for that Pass, or use it in a SubShader block to set the render state for all Passes in that SubShader. Signature Example syntax Function ColorMask <channels> ColorMask RGB Write to the given channels of the default render t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d77668b4d95f
unity_docs
ui
What is `Experimental.GraphView.EdgeManipulator` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeManipulator class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.PointerManipulator Description Edge manipulator used to drag edges off ports and reconnect them elsewhere. Constructors Constructor De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47ddc35413e5
unity_docs
scripting
What is `PlayerPrefs.GetString` in Unity? Explain its purpose and usage.
PlayerPrefs.GetString Declaration public static string GetString (string key ); Parameters Parameter Description key The key used to retrieve the corresponding string in the player preferences. Returns string The string corresponding to the given key , string.Empty if no string is found for the given ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fbc42ce34e5e
unity_docs
scripting
What is `Renderer.material` in Unity? Explain its purpose and usage.
Renderer.material public Material material ; Description Returns the first instantiated Material assigned to the renderer. Modifying material will change the material for this object only. If the material is used by any other renderers, this will clone the shared material and start using it from now on. N...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7a1ff47c18e5
unity_docs
performance
In Unity's 'Frame timing manager introduction', what is 'FrameTimingManager data availability' and how does it work?
FrameTimingManager provides results with a set delay of four frames. This is for the following reasons: CPU timing results aren’t immediately available at the end of each frame. Unity reads GPU timing results with three frames delay. Note: The four frame delay doesn’t guarantee accurate timing results, because the GPU ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6151577b3b7e
unity_docs
scripting
What is `PenData.pressure` in Unity? Explain its purpose and usage.
PenData.pressure public float pressure ; Description How hard pen pressure is applied, normalized between 0 (no pressure) and 1 (maximum pressure). Pressure is always 1 on devices where pressure is not supported.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2aee9f17c878
unity_docs
rendering
What is `ParticleSystemRenderSpace` in Unity? Explain its purpose and usage.
ParticleSystemRenderSpace enumeration Description How particles are aligned when rendered. Properties Property Description View Particles face the camera plane. World Particles align with the world. Local Particles align with their local transform. Facing Particles face the eye position. Velocity Particles ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd3c410ed4d0
unity_docs
scripting
What is `IMGUI.Controls.TreeView.RowGUIArgs.GetCellRect` in Unity? Explain its purpose and usage.
TreeView.RowGUIArgs.GetCellRect Declaration public Rect GetCellRect (int visibleColumnIndex ); Parameters Parameter Description visibleColumnIndex Index into the list of visible columns of the multi column header. Returns Rect Cell rect defined by the intersection between the row rect and the rect of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6f2a5c4e10aa_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Handles syncing a bool variable with a Toggle component (Unity UI). Signature: ```csharp public class BoolVariableToggle : ToggleComponent ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_4e4e0f93c6aa
unity_docs
scripting
Show me a Unity C# example demonstrating `Scripting.PreserveAttribute`.
f a certain class. You can apply the [Preserve] attribute to classes, methods, fields and properties. In addition to using PreserveAttribute, you can also use the traditional method of a link.xml file to tell the linker to not remove things. PreserveAttribute and link.xml work for both the Mono and IL2CPP scripting bac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a76a55458ccb
unity_docs
rendering
Show me a Unity C# example demonstrating `GL.Begin`.
d. Between GL.Begin and GL.End it is valid to call GL.Vertex , GL.Color , GL.TexCoord and other immediate mode drawing functions. You should be careful about culling when drawing primitives yourself. The culling rules may be different depending on which graphics API the game is running. In most cases the safest w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5c8e5207f3b6
unity_docs
rendering
In Unity's 'Transparent Bumped Specular', what is 'Transparent Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is completely transparent while 255 (white) is completely opaque. If your main texture does not have an alp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c015b0b76e78
unity_docs
editor
What is `Editor.OnGetFrameBounds` in Unity? Explain its purpose and usage.
Editor.OnGetFrameBounds() Description Gets custom bounds for the target of this editor. Use this method to retrieve the Bounds for a custom window derived from the Editor class. This method is always used in conjunction with Editor.HasFrameBounds which either returns true or false, depending on the implementati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_065c2e0e100d
unity_docs
rendering
What is `Rendering.RasterState` in Unity? Explain its purpose and usage.
RasterState struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Values for the raster state. Use this with RenderStateBlock and ScriptableRenderContext.DrawRenderers to override the GPU's render state. Corresponds to the Conservative , Cull , ZClip , and Offset commands i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de6aff168719
unity_docs
physics
What is `ImportAssetOptions.ForceUpdate` in Unity? Explain its purpose and usage.
ImportAssetOptions.ForceUpdate Description User initiated asset import. This should be passed when asset import is caused by the user (e.g. by clicking Reimport). Non-user initiated import happens when the asset modification time changes. Additional resources: AssetDatabase.ImportAsset , AssetDatabase.Refresh .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3be626e098ba
unity_docs
editor
What is `StandaloneBuildSubtarget` in Unity? Explain its purpose and usage.
StandaloneBuildSubtarget enumeration Description Options for the desktop platform subtarget type. Additional resources: EditorUserBuildSettings.standaloneBuildSubtarget . Properties Property Description Player Uses the default desktop player build settings. Server Uses a player build optimized to run as a he...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ae83639c68d
unity_docs
rendering
What is `Search.ObjectIndexer.IndexProperty` in Unity? Explain its purpose and usage.
ObjectIndexer.IndexProperty Declaration public void IndexProperty (int documentIndex , string name , string value , bool saveKeyword , bool exact ); Parameters Parameter Description documentIndex Document where the indexed word was found. name Key used to retrieve the value. value Value to add to the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e252d9fd71f6
unity_docs
math
What is `Rendering.VisibleReflectionProbe.center` in Unity? Explain its purpose and usage.
VisibleReflectionProbe.center public Vector3 center ; Description The center of the probe's bounding box in which the probe can contribute to reflections. The center is relative to the position of the probe. Additional resources: CullingResults.visibleReflectionProbes , ReflectionProbe .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_24c7073cb306
unity_docs
scripting
Explain 'Managed stack traces on iOS' in Unity.
When an exception occurs in managed code, the stack trace for the exception can help you understand the cause of the exception. However, the managed stack trace might not appear as expected for some cases on iOS. The stack trace also varies depending on the Xcode build configuration. ## Debug builds When you use the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c6f17d382b8
unity_docs
rendering
What is `Rendering.TierSettings` in Unity? Explain its purpose and usage.
TierSettings struct in UnityEditor.Rendering Description A struct that represents graphics settings for a given build target and graphics tier . Note: Graphics tiers and tier settings are only supported in the Built-in Render Pipeline. You can configure these settings in the Unity Editor, in the Graphics Setti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c01d1b29fd2
unity_docs
rendering
What is `Texture2D` in Unity? Explain its purpose and usage.
Texture2D class in UnityEngine / Inherits from: Texture / Implemented in: UnityEngine.CoreModule Description Class that represents textures in C# code. Use this class to create textures, or to modify existing texture assets . The ImageConversion class provides extension methods to this class that handle im...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0a212619fc54_doc_8
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Releases all objects in the MonoBehaviour-based pool.The type of MonoBehaviour objects to release. Signature: ```csharp public static void ReleaseAllMono<T>() where T : MonoBehaviour, IPoolable => _poolService.ReleaseAllMono<T>(); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_36f5d8ad3bb5
unity_docs
scripting
Explain 'Unity programming best practices' in Unity.
There are some unique features of Unity’s programming environment that require extra consideration when writing code compared to standard C#/.NET projects. The following is a summary of key issues to be aware of when writing code for Unity applications, along with best practices to help you avoid common pitfalls. ## U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b9009625596
unity_docs
scripting
Show me a Unity C# example demonstrating `Event.functionKey`.
Event.functionKey public bool functionKey ; Description Is the current keypress a function key? (Read Only) Returns true if the current keypress is an arrow key, page up, page down, backspace, etc. key. If this key needs special processing in order to work in text editing, functionKey is on. ```csharp using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dd812dce52a
unity_docs
editor
What are the parameters of `AssetDatabase.GetTextMetaFilePathFromAssetPath` in Unity?
Returns string The path to the .meta text file or an empty string if the file does not exist. Description Gets the path to the text .meta file associated with an asset. ```csharp using UnityEngine; using UnityEditor;public class AssetDatabaseExamples { [MenuItem("AssetDatabase/Get Meta file path of Animations")] ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ac266d181db
unity_docs
scripting
Give me an overview of the `DetailScatterMode` class in Unity.
DetailScatterMode enumeration Description Provides options to specify how details are scattered on the terrain. Properties Property Description CoverageMode The detail map holds values that represent how much area to cover at each sample, based on the detail's density. InstanceCountMode The detail map holds va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dad09f09def
unity_docs
physics
What is `Collision2D.contactCount` in Unity? Explain its purpose and usage.
Collision2D.contactCount public int contactCount ; Description Gets the number of contacts for this collision. A collision can involve multiple contact points. This property allows you to determine how many are involved. You can use this value when retrieving contacts using GetContact or GetContacts .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f08349231ce5
unity_docs
scripting
What is `Experimental.GraphView.BlackboardSection` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. BlackboardSection class in UnityEditor.Experimental.GraphView / Inherits from: Experimental.GraphView.GraphElement Description GraphElement that represents a section of members in a Blackboard. Properties Property Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d8878fbf485e
unity_docs
rendering
In Unity's 'Scene view Draw Modes and View Options overlays', what is 'The Debug Mode options' and how does it work?
The Debug Draw Mode has several options that help you unerstand your graphics and lighting better. Debug Mode option Description Lighting Contributors / Receivers Show the lightmap contributors and receivers for the selected GameObject . Shadow Cascades Show directional light [shadow cascades](shadow-cascades. Realtime...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98da9803144e
unity_docs
rendering
Give me an overview of the `DetailRenderMode` class in Unity.
DetailRenderMode enumeration Description Render mode for detail prototypes. Properties Property Description GrassBillboard The detail prototype will be rendered as billboards that are always facing the camera. VertexLit Will show the prototype using diffuse shading. Grass The detail prototype will use the gra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ac932170895
unity_docs
performance
What is `AndroidJNI.GetDirectSByteBuffer` in Unity? Explain its purpose and usage.
AndroidJNI.GetDirectSByteBuffer Declaration public static NativeArray<sbyte> GetDirectSByteBuffer (IntPtr buffer ); Description Returns the NativeArray backed by the same memory region as the given direct java.nio.Buffer. Additional resources: AndroidJNI.GetDirectBufferAddress .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fcaf702a635e
unity_docs
math
What is `Search.SearchExpressionEvaluatorSignatureOverloadAttribute.ctor` in Unity? Explain its purpose and usage.
SearchExpressionEvaluatorSignatureOverloadAttribute Constructor Declaration public SearchExpressionEvaluatorSignatureOverloadAttribute (params SearchExpressionType[] signatureArgumentTypes ); Parameters Parameter Description signatureArgumentTypes Array of types describing what is an accepted signature for a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfe6a828ed7d
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.AllocateWritableMeshData`.
ray returned by Mesh.MeshData.GetIndexData to set the indices. Write to Mesh.MeshData.subMeshCount to set the number of sub meshes, and then use Mesh.MeshData.SetSubMesh to set sub mesh data. When you have populated the writeable MeshData struct with your data, use Mesh.ApplyAndDisposeWritableMeshData to appl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_93331aaeeb8c
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.SearchUtils.SelectMultipleItems`.
ectMultipleItems (IEnumerable<SearchItem> items , bool focusProjectBrowser , bool pingSelection ); Parameters Parameter Description items Search Items to select and ping. focusProjectBrowser If true, will focus the project browser before pinging the objects. pingSelection If true, will ping the selected o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a621bf522c9
unity_docs
xr
Show me a Unity C# example demonstrating `Screen.currentResolution`.
Screen.currentResolution public static Resolution currentResolution ; Description The current screen resolution (Read Only). Returns the current screen resolution (read only). If the player is running in windowed mode, this returns the current resolution of the desktop. If you are working with VR devices, use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fc2c1bf950c
unity_docs
rendering
Show me a Unity C# example demonstrating `Media.VP8EncoderAttributes`.
VP8EncoderAttributes struct in UnityEditor.Media Description Descriptor for VP8 encoder attributes. ```csharp using UnityEditor.Media; using UnityEngine; using Unity.Collections; using System.IO;public class Recorder { static public void RecordMovie() { VP8EncoderAttributes vp8Attr = new VP8EncoderAttributes ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ed7e2cadb0a4
unity_docs
animation
In Unity's '2D Blending', what is 'The 2D Blending Diagram' and how does it work?
The diagram at the top of the Inspector shows the positions of the child motions in the 2D blend space. The motions are shown as blue dots. Motions with no Animation Clip or Blend Tree assigned have no influence on the blend and are shown as gray dots. You can select a motion by clicking on its dot in the diagram. Once...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71577f87009a
unity_docs
scripting
What is `UIElements.Vector2IntField` in Unity? Explain its purpose and usage.
Vector2IntField class in UnityEngine.UIElements / Inherits from: UIElements.BaseCompositeField_3 / Implemented in: UnityEngine.UIElementsModule Description A Vector2Int field. For more information, refer to UXML element Vector2IntField . Static Properties Property Description inputUssClassName USS ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b2a1637bc35
unity_docs
physics
What is `ParticleSystem.CollisionModule.multiplyColliderForceByParticleSpeed` in Unity? Explain its purpose and usage.
ParticleSystem.CollisionModule.multiplyColliderForceByParticleSpeed public bool multiplyColliderForceByParticleSpeed ; Description Specifies whether the physics system considers particle speeds when it applies forces to Colliders. Additional resources: ParticleSystem.CollisionModule.colliderForce , ParticleS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e17217f97acd
unity_docs
scripting
What is `Light` in Unity? Explain its purpose and usage.
Light class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.CoreModule Description Script interface for light components . Use this to control all aspects of Unity's lights. The properties are an exact match for the values shown in the Inspector. For more information about shadow ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_faea0471e9ff
unity_docs
ui
What is `TextGenerationSettings` in Unity? Explain its purpose and usage.
TextGenerationSettings struct in UnityEngine / Implemented in: UnityEngine.TextRenderingModule Description A struct that stores the settings for TextGeneration. Properties Property Description alignByGeometry Use the extents of glyph geometry to perform horizontal alignment rather than glyph metrics. color ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5746277badce
unity_docs
performance
What is `Unity.Profiling.ProfilerRecorder.Start` in Unity? Explain its purpose and usage.
ProfilerRecorder.Start Declaration public void Start (); Description Start data collection. Newly constructed recorder is not collecting samples unless ProfilerRecorderOptions.StartImmediately option is specified. Use Start to attach ProfilerRecorder to the Profiler metric and start data collection. Note: St...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e83209ff3e2e
unity_docs
rendering
In Unity's 'Build AssetBundles in parallel processes', what is 'Build output' and how does it work?
The output from a multi-process build isn’t binary-identical to a non-multi-process build. This is due to differences in object naming or ordering. However, the output is functionally identical. If you change to multi-process building after shipping AssetBundle files, all AssetBundle files might change. This can trigge...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f701cb8f22f
unity_docs
math
What is `HandleUtility.GUIPointToWorldRay` in Unity? Explain its purpose and usage.
HandleUtility.GUIPointToWorldRay Declaration public static Ray GUIPointToWorldRay ( Vector2 position ); Description Convert 2D GUI position to a world space ray. Uses the current camera to calculate the ray. Additional resources: WorldToGUIPoint , RaySnap .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_66e0a39cb80b
unity_docs
physics
What is `QueryParameters.ctor` in Unity? Explain its purpose and usage.
QueryParameters Constructor Declaration public QueryParameters (int layerMask , bool hitMultipleFaces , QueryTriggerInteraction hitTriggers , bool hitBackfaces ); Parameters Parameter Description layerMask A LayerMask that is used to selectively ignore Colliders when casting a ray. hitMultipleFaces ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a3110531fd7
unity_docs
rendering
What is `Rendering.LocalKeywordSpace.keywordNames` in Unity? Explain its purpose and usage.
LocalKeywordSpace.keywordNames public string[] keywordNames ; Description An array containing the names of all local shader keywords in this local keyword space. (Read Only) Use this property to retrieve the names of all local shader keywords in this LocalKeywordSpace . Additional resources: Shader variants a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb027364bbe5
unity_docs
animation
Show me a Unity C# example demonstrating `ModelImporter.defaultClipAnimations`.
ModelImporter.defaultClipAnimations public ModelImporterClipAnimation[] defaultClipAnimations ; Description Generate a list of all default animation clip based on TakeInfo. Additional resources: ModelImporterClipAnimation . Additional resources: TakeInfo . ```csharp using UnityEngine; using UnityEditor; publ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f5d645c0fcb5
unity_docs
scripting
What is `TerrainTools.BrushGUIEditFlags` in Unity? Explain its purpose and usage.
BrushGUIEditFlags enumeration Description Flags that specify which brush controls the [IOnInspectorGUI.ShowBrushesGUI] method displays. Properties Property Description None Don't display any brush controls. Select Display the brush selection control. Inspect Display the brush inspector for the currently selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.