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_848319284235
unity_docs
scripting
What is `Unity.Properties.PropertyPath.AppendIndex` in Unity? Explain its purpose and usage.
PropertyPath.AppendIndex Declaration public static Unity.Properties.PropertyPath AppendIndex (ref Unity.Properties.PropertyPath path , int index ); Parameters Parameter Description path The <see cref="PropertyPath" /> index The index to add. Returns PropertyPath A new PropertyPath Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99f486318496
unity_docs
physics
Show me a Unity C# example demonstrating `CharacterController.detectCollisions`.
e blocked by the controller's collider. For example, a box collider in the Scene will block the movement of the controller, but the box may still fall through the controller if detectCollisions is false. This property is useful to disable the character controller temporarily. For example, you might want to mount a char...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2963915ca2cc
unity_docs
scripting
Give me an overview of the `ExposedPropertyResolver` class in Unity.
ExposedPropertyResolver struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Object that is used to resolve references to an ExposedReference field. This object is used by ExposedReference fields to resolve their values at runtime. See also: • FrameData – You can find the ExposedPropert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8355a0c1af32
unity_docs
performance
What is `Profiling.RawFrameDataView.GetSampleMetadataAsInt` in Unity? Explain its purpose and usage.
RawFrameDataView.GetSampleMetadataAsInt Declaration public int GetSampleMetadataAsInt (int sampleIndex , int metadataIndex ); Parameters Parameter Description sampleIndex Index of the Profiler sample. metadataIndex Metadata index. Returns int Returns integer representation of sample metadata value. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14dfe33394e4
unity_docs
rendering
Give me an overview of the `Display` class in Unity.
Display class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provides access to a display or screen for rendering operations. Unity supports multi-display rendering on the following platforms: Desktop platforms (Windows, macOS, and Linux) Android (OpenGL ES and Vulkan) iOS Embedded Linu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79e221e720f3
unity_docs
scripting
What is `Experimental.GraphView.GraphView.graphViewChanged` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.graphViewChanged public Experimental.GraphView.GraphView.GraphViewChanged graphViewChanged ; Description Callback for when certain changes have occured in the graph. See GraphViewChange .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c48c2b52e063
unity_docs
scripting
What is `Search.SearchUtils.StartDrag` in Unity? Explain its purpose and usage.
SearchUtils.StartDrag Declaration public static void StartDrag (Object[] objects , string label ); Declaration public static void StartDrag (Object[] objects , string[] paths , string label ); Parameters Parameter Description label Drag label. objects Objects being dragged. paths Asset paths bein...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e7af8db8cab
unity_docs
input
What is `EditorAnalyticsSessionInfo.activeElapsedTime` in Unity? Explain its purpose and usage.
EditorAnalyticsSessionInfo.activeElapsedTime public static long activeElapsedTime ; Description The total time, in milliseconds, that the user interacted with the Editor since the beginning of the current session. Interaction includes mouse movement, mouse clicks, and keyboard input while the Unity Editor has f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8243931c7a9a
unity_docs
input
What is `UIElements.FieldMouseDragger_1.ctor` in Unity? Explain its purpose and usage.
FieldMouseDragger<T0> Constructor Declaration public FieldMouseDragger<T0> (IValueField<T> drivenField ); Parameters Parameter Description drivenField The field. Description FieldMouseDragger's constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87d9a151b7de
unity_docs
scripting
What is `Rendering.BatchDrawCommandIndirect.flags` in Unity? Explain its purpose and usage.
BatchDrawCommandIndirect.flags public Rendering.BatchDrawCommandFlags flags ; Description Specifies rendering options for the draw command. This includes rendering options like whether Unity should individually depth sort the instances in the draw command, or whether to render instances into per-object motion...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_455ce5486c4d
unity_docs
scripting
What is `Component.GetComponentsInChildren` in Unity? Explain its purpose and usage.
Component.GetComponentsInChildren Declaration public T[] GetComponentsInChildren (); Returns T[] An array containing all matching components of type T . Description Gets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject. The typica...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_805881f7e766
unity_docs
scripting
What is `AI.NavMeshAgent.ActivateCurrentOffMeshLink` in Unity? Explain its purpose and usage.
NavMeshAgent.ActivateCurrentOffMeshLink Declaration public void ActivateCurrentOffMeshLink (bool activated ); Parameters Parameter Description activated Is the link activated? Description Enables or disables the current off-mesh link. This function activates or deactivates the off-mesh link where the agen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ab2a9c293bd
unity_docs
rendering
What is `Rendering.RayTracingInstanceTriangleCullingConfig.optionalDoubleSidedShaderKeywords` in Unity? Explain its purpose and usage.
RayTracingInstanceTriangleCullingConfig.optionalDoubleSidedShaderKeywords public string[] optionalDoubleSidedShaderKeywords ; Description An array of Shader Keywords for defining double-sided geometries. If a Shader Keyword from the list is enabled at the time when RayTracingAccelerationStructure.CullInstances...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_297d422be6b4
unity_docs
scripting
Explain 'Create a randomized playlist with the Audio Random Container' in Unity.
To create a randomized playlist, you must create an Audio Random Container and then play it in the game. You can use a randomized playlist to randomize and play almost any sound, such as footsteps, impacts, and AI dialog. ## Create an Audio Random Container You can create an Audio Random Container from more than one ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f19b68368ef7
unity_docs
editor
What is `PrefabUtility.RevertPropertyOverride` in Unity? Explain its purpose and usage.
PrefabUtility.RevertPropertyOverride Declaration public static void RevertPropertyOverride ( SerializedProperty instanceProperty , InteractionMode action ); Parameters Parameter Description action The interaction mode for this action. instanceProperty The SerializedProperty representing the property to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_867b396929d4
unity_docs
math
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCpyReplicate` in Unity? Explain its purpose and usage.
UnsafeUtility.MemCpyReplicate Declaration public static void MemCpyReplicate (void* destination , void* source , int size , int count ); Parameters Parameter Description destination A pointer to the destination memory block. Ensure this block has enough space to hold the replicated data. source A pointe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18557ec552ec
unity_docs
physics
What are the parameters of `RaycastHit2D.operator_RaycastHit2D` in Unity?
Description Implicit operator used to return a true or false result indicating if the result is valid or not. When using any physics query that returns a RaycastHit2D, you should always first check to see if it contains a valid result which indicates a hit (intersection) was detected. You can do this by checking if the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b43d9ef57f2
unity_docs
scripting
Show me a Unity C# example demonstrating `TextMesh.richText`.
bold text</b> <i>italic text</i> <size=20>sized text</size> <material=1>render using custom material index</material> <quad material=1 size=20 x=0.1 y=0.1 width=0.5 height=0.5/>, to render a single quad using the given material and UVs, used for embedding images in text. These are only supported for fonts set to u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_faf5b81e1222
unity_docs
physics
What are the parameters of `Rigidbody2D.Cast` in Unity?
Returns int Returns the number of results placed in the results list. Description All the Collider2D shapes attached to the Rigidbody2D are cast into the Scene starting at each Collider position ignoring the Colliders attached to the same Rigidbody2D . This function will take all the Collider2D shapes attached to the R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc1a985d005e
unity_docs
rendering
What is `IHVImageFormatImporter.streamingMipmapsPriority` in Unity? Explain its purpose and usage.
IHVImageFormatImporter.streamingMipmapsPriority public int streamingMipmapsPriority ; Description Relative priority for this texture when reducing memory size in order to hit the memory budget. When mipmap streaming is enabled, Unity will automatically reduce the size of textures until they fit into the texture...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e0652f53259
unity_docs
editor
Give me an overview of the `SettingsService` class in Unity.
SettingsService class in UnityEditor Description This class provides global APIs to interact with the Settings window. Static Methods Method Description Exists Verify the existence of a settings path. NotifySettingsProviderChanged Use this function to notify the SettingsService that a SettingsProvider changed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36fb1a52692e
unity_docs
rendering
What are the parameters of `MaterialPropertyBlock.SetColor` in Unity?
Description Set a color property. Adds a property to the block. If a color property with the given name already exists, the old value is replaced. The color value is considered to be always set in sRGB space and is converted to linear if the active color space is linear. You need manual updating of the color value if y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8e7aa15b618b
unity_docs
rendering
Show me a Unity code example for 'Sample a 3D texture in a shader'.
the shader code with the example code. Right-click the shader in the Project window and select Create > Material to create a new material from the shader. Import or create a 3D texture. For example, use the example code from the Create a 3D texture in a script page. Drag the 3D texture asset from the Project window to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a97a48649ea
unity_docs
rendering
What is `MipmapLimitDescriptor.useMipmapLimit` in Unity? Explain its purpose and usage.
MipmapLimitDescriptor.useMipmapLimit public bool useMipmapLimit ; Description Enables or disables the texture using a mipmap limit. If you set this to true , the texture uses one of the following: The mipmap limit of MipmapLimitDescriptor.groupName . The global mipmap limit, if you don't provide a value for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d770446f353c
unity_docs
scripting
What is `ParticleSystem.ExternalForcesModule.RemoveInfluence` in Unity? Explain its purpose and usage.
ParticleSystem.ExternalForcesModule.RemoveInfluence Declaration public void RemoveInfluence (int index ); Declaration public void RemoveInfluence ( ParticleSystemForceField field ); Parameters Parameter Description index The index to remove the chosen Force Field from. field The Force Field to remov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_983cb9579222_doc_7
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The first instance reaching the lock on Awake sets it own id to this so it is set as current instance. Signature: ```csharp private static int _preferredInstanceId = -1; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_747df7379d39
unity_docs
physics
In Unity's 'Apply interpolation to a Rigidbody', what is 'Extrapolate' and how does it work?
Use the pose of the Rigidbody from the previous physics update, and predict the pose of the Rigidbody in the next physics update, to calculate and predict the pose in the current frame. Extrapolate makes the Rigidbody appear to move slightly ahead of where it should be. This is because extrapolation uses the Rigidbody’...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_373b90c97714
unity_docs
rendering
Explain 'Introduction to the CullingGroup API' in Unity.
CullingGroup offers a way to integrate your own systems into Unity’s culling and LOD pipeline. This can be used for many purposes; for example: Simulating a crowd of people, while only having full GameObjects for the characters that are actually visible right now Building a GPU particle system driven by Graphics.DrawPr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3add444a48f6
unity_docs
animation
What is `AnimatorRecorderMode` in Unity? Explain its purpose and usage.
AnimatorRecorderMode enumeration Description The mode of the Animator's recorder. The recorder can either be Offline, in Playback or in Record. Properties Property Description Offline The Animator recorder is offline. Playback The Animator recorder is in Playback. Record The Animator recorder is in Record.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0755fc4a7b10
unity_docs
editor
Show me a Unity C# example demonstrating `QualitySettings.IsPlatformIncluded`.
static bool IsPlatformIncluded (string buildTargetGroupName , int index ); Parameters Parameter Description buildTargetGroupName The platform name. index The index of the Quality Level, must be positive and lower than the count of Quality Levels. Returns bool If the platform is included. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_01550bee2095
github
scripting
Write a Unity C# XR/VR script for AR Image Tracking
```csharp using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.XR.ARFoundation; public class ARImageTracking : MonoBehaviour { private GameObject _pottery; private List<GameObject> pots; private List<GameObject> meshes; private List<Vector3> points;...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
gh_4537818d0785_doc_8
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Emitted when the scale of this interactable is reset. Signature: ```csharp public UnityEvent OnScaleReset; ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_241c8769b8ff
unity_docs
scripting
What is `AI.NavMeshBuildSettings.agentSlope` in Unity? Explain its purpose and usage.
NavMeshBuildSettings.agentSlope public float agentSlope ; Description The maximum slope angle which is walkable (angle in degrees). The valid range is 0–60 degrees. Steep slopes will be excluded from the resulting NavMesh. Please note that setting the slope higher than 45 can give artifacts due to the voxelizat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_98cffc783890
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUILayout.LinkButton`.
settings defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns bool true when the user clicks the link. Description Make a clickabl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e58213b6bc64
unity_docs
editor
Give me an overview of the `EditorPrefs` class in Unity.
EditorPrefs class in UnityEditor Description Stores and accesses Unity Editor preferences. On macOS, EditorPrefs are stored in ~/Library/Preferences/com.unity3d.UnityEditor5.x.plist . On Windows, EditorPrefs are stored in the registry under the HKCU\Software\Unity Technologies\Unity Editor 5.x key. On Linux, E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b385ff6978b4
unity_docs
editor
Explain 'Collect performance data in Play mode' in Unity.
Profile in Play mode to quickly test changes and monitor the performance of your application without having to rebuild your application every time. To profile in Play mode: Open the Profiler ( Window > Analysis > Profiler ) Select the Target Selection dropdown, next to Record Select Play Mode Unity Profiler minimizes t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cebbadf6564a
unity_docs
physics
In Unity's 'Create functional layers in Unity', what is 'Built-in layers' and how does it work?
When you open the layer menu, you can see that some layers are already named. Except for Default and Ignore Raycast, Unity no longer uses these built-in layers for many dedicated purposes; they exist mainly for backward compatibility: Layer number Layer name Description 0 Default The default layer for all scene element...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e17305a1c88d
unity_docs
editor
Show me a Unity C# example demonstrating `EditorPrefs.HasKey`.
n Returns true if key exists in the preferences file. The preferences file is examined to identify whether the specified key exists. True or false is returned. In the following example a key and value can be written into the preference file, or deleted. The existence of the key is checked with the HasKey funct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_7fc167d5d34d_doc_19
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Get created instances. Signature: ```csharp public static T[] GetInstances<T>() where T : GlobalBehaviour ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9937ba18ecf7
unity_docs
scripting
What is `CharacterController.isGrounded` in Unity? Explain its purpose and usage.
CharacterController.isGrounded public bool isGrounded ; Description Was the CharacterController touching the ground during the last move? Indicates whether the CharacterController was touching the ground during the most recent call to CharacterController.Move or CharacterController.SimpleMove. This property i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af885c2d7ae2
unity_docs
animation
What is `Animations.AimConstraint.SetSources` in Unity? Explain its purpose and usage.
AimConstraint.SetSources Declaration public void SetSources (List<ConstraintSource> sources ); Parameters Parameter Description sources The list of sources to set. Description Sets the list of sources on the component. Throws ArgumentNullException, if the list of sources is null.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ea13a07deca
unity_docs
rendering
What is `ParticleSystem.SubEmittersModule.GetSubEmitterEmitProbability` in Unity? Explain its purpose and usage.
ParticleSystem.SubEmittersModule.GetSubEmitterEmitProbability Declaration public float GetSubEmitterEmitProbability (int index ); Parameters Parameter Description index The index of the sub-emitter. Returns float The emission probability for the sub-emitter Description Gets the probability that the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bc1f6d2a9bd
unity_docs
scripting
What is `GradientAlphaKey.ctor` in Unity? Explain its purpose and usage.
GradientAlphaKey Constructor Declaration public GradientAlphaKey (float alpha , float time ); Parameters Parameter Description alpha Alpha of key (0 - 1). time Time of the key (0 - 1). Description Gradient alpha key.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8e8587b1b111
unity_docs
rendering
Explain 'Terrain tools' in Unity.
To access the Terrain painting tools, click on a Terrain object in the Hierarchy window and open an Inspector window. In the Inspector, click the Paint Terrain (paintbrush) icon to reveal the list of Terrain tools. You can also access Terrain painting tools from the Terrain Tools overlay in Sculpt Mode or Materials Mod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_19fa082c9939
unity_docs
rendering
Explain 'Simplifying distant meshes with level of detail (LOD)' in Unity.
Strategies and resources for applying level of detail (LOD) techniques to meshes, to reduce the number of GPU operations that Unity requires to render distant meshes. This section contains information on LOD techniques for meshes. For information on LOD techniques for shaders , see SubShader LOD value . Topic Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_53ff20fd7a9d
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody2D.Slide`.
body type simply requires careful configuration so that its inherent features don't cause conflicting and unexpected movement behaviour. The following code uses a simple left/right keyboard input to set the relative velocity left or right. The slide method will slide the Rigidbody2D using the configuration specified...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19f7dcd24397
unity_docs
performance
What are the parameters of `Mesh.SetColors` in Unity?
Description Set the per-vertex colors of the Mesh. Unity internally stores Mesh data in the format matching the data you supply. For example, if you pass a Color32 array Unity will store each color in 4 bytes (low precision, 0..1 range); whereas if you pass a Color array, Unity stores each color in 16 bytes (full 32 bi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e885df7bdb3
unity_docs
scripting
What is `ContactPairHeader.GetContactPair` in Unity? Explain its purpose and usage.
ContactPairHeader.GetContactPair Declaration public ref readonly ContactPair GetContactPair (int index ); Parameters Parameter Description index The ContactPair index. Returns ContactPair A reference or a copy of the ContactPair struct at index . Description Gets the ContactPair at index o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af62a58028e3
unity_docs
rendering
What is `Windows.WebCam.CameraParameters.frameRate` in Unity? Explain its purpose and usage.
CameraParameters.frameRate public float frameRate ; Description The framerate at which to capture video. This is only for use with VideoCapture. To get a list of supported frame rates based on your desired resolution, call VideoCapture.SupportedResolutions .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_2e6685a6fecf
github
scripting
Write a Unity C# script called Rect Transform Switcher
```csharp using System.Collections.Generic; using UnityEngine; namespace UIStateSwitcher { public class RectTransformSwitcher : SwitchableElement { [SerializeField] private RectTransform targetRect; [SerializeField] private List<SwitchableRectTransform> switchableRects; ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_016cdb682a2f
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingShaderTagConfig` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingShaderTagConfig struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description A Shader Tag configuration used by RayTracingAccelerationStructure.CullInstances to filter and classify Materials. Additional resources: RayTracingInstanceMaterialConfig , Material.G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a151587877b0
unity_docs
rendering
What is `Experimental.Lightmapping.Bake` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Lightmapping.Bake Declaration public static bool Bake ( SceneManagement.Scene targetScene ); Parameters Parameter Description targetScene The Scene to generate lighting data for. Returns bool Returns true if Unity su...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79587c407263
unity_docs
math
What is `Rendering.RayTracingAccelerationStructure.GetInstanceCount` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.GetInstanceCount Declaration public uint GetInstanceCount (); Description Returns the number of ray tracing instances in the RayTracingAccelerationStructure. Additional resources: RayTracingAccelerationStructure.AddInstance , RayTracingAccelerationStructure.RemoveInstance .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2ff298f2f217
unity_docs
editor
What is `Search.SearchIndexer.keywordCount` in Unity? Explain its purpose and usage.
SearchIndexer.keywordCount public int keywordCount ; Description Returns the number keywords in the index. ```csharp using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_SearchIndexer_keywordCount { [MenuItem("Examples/SearchIndexer/keywordCount")] public static void Run() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc4103d4868e
unity_docs
editor
Show me a Unity C# example demonstrating `EditorWindow.Update`.
EditorWindow.Update() Description Called multiple times per second on all visible windows. This callback is triggered from EditorApplication.update . ```csharp // The window appears in front of the Editor. // The window shows the type of a Unity object the cursor is over. using UnityEngine; using UnityEditor; us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_89c3fd8f73b1
unity_docs
scripting
What is `IMGUI.Controls.AdvancedDropdown.BuildRoot` in Unity? Explain its purpose and usage.
AdvancedDropdown.BuildRoot Declaration protected IMGUI.Controls.AdvancedDropdownItem BuildRoot (); Returns AdvancedDropdownItem Root of the list. Description Implement this method to generate the content of the drop-down. This method is called when the drop-down is being shown.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c01a389253e4
unity_docs
editor
What is `QualitySettings.GetActiveQualityLevelsForPlatform` in Unity? Explain its purpose and usage.
QualitySettings.GetActiveQualityLevelsForPlatform Declaration public static int[] GetActiveQualityLevelsForPlatform (string buildTargetGroupName ); Parameters Parameter Description buildTargetGroupName The platform target. Returns int[] The array with the Quality Level indexes that are selected for the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb9ac4dabaa8
unity_docs
rendering
What is `LightTransport.BufferSlice_1.Offset` in Unity? Explain its purpose and usage.
BufferSlice<T0>.Offset public ulong Offset ; Description The number of elements to offset, measured from the beginning of the buffer. The value must not exceed the end of the buffer allocation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95ecf5246d4d
unity_docs
editor
What is `PreferBinarySerialization` in Unity? Explain its purpose and usage.
PreferBinarySerialization class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Prefer ScriptableObject derived type to use binary serialization regardless of project's asset serialization mode. This is useful for custom asset types that contain large amounts of data. Always keeping them sto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_47729482ff8c
unity_docs
rendering
In Unity's 'Use built-in shader functions in the Built-In Render Pipeline', what is 'Transform positions' and how does it work?
Function: Description: float4 UnityObjectToClipPos(float3 pos) Transforms a point from object space to the camera ’s clip space in homogeneous coordinates. This is the equivalent of mul(UNITY_MATRIX_MVP, float4(pos, 1.0)) , and should be used in its place. float3 UnityObjectToViewPos(float3 pos) Transforms a point from...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a99f22c6e2b6
unity_docs
scripting
What is `EventType.ExecuteCommand` in Unity? Explain its purpose and usage.
EventType.ExecuteCommand Description Execute a special command (eg. copy & paste). "Copy", "Cut", "Paste", "Delete", "FrameSelected", "Duplicate", "SelectAll" and so on. Sent only in the editor. Example. Checking that that a frame has the focus: ```csharp using UnityEngine;public class Example : MonoBehaviour { v...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bcd97fba836
unity_docs
editor
What is `IMGUI.Controls.TreeViewState.expandedIDs` in Unity? Explain its purpose and usage.
TreeViewState.expandedIDs public List<int> expandedIDs ; Description This is the list of currently expanded TreeViewItem IDs. This state is maintained by the TreeView when the user interacts with the TreeView and when using the API. The TreeView assumes the list is sorted. So if setting this directly ensure to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1194412b4d20
unity_docs
input
What is `Input.penEventCount` in Unity? Explain its purpose and usage.
Input.penEventCount public static int penEventCount ; Description Returns the number of queued pen events that can be accessed by calling [[GetPenEvent()]]. Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9aa05fc79284
github
scripting
Write a Unity C# XR/VR script for Benchmark01_UGUI
```csharp using UnityEngine; using System.Collections; using UnityEngine.UI; namespace TMPro.Examples { public class Benchmark01_UGUI : MonoBehaviour { public int BenchmarkType = 0; public Canvas canvas; public TMP_FontAsset TMProFont; public Font TextMeshFont; ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_6092c2e9bcee
unity_docs
editor
What is `Search.SearchIndexer.AddDocument` in Unity? Explain its purpose and usage.
SearchIndexer.AddDocument Declaration public int AddDocument (string document , bool checkIfExists ); Declaration public int AddDocument (string document , string name , string source , bool checkIfExists , Search.SearchDocumentFlags flags ); Parameters Parameter Description document Unique docum...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_285cdafe575f
unity_docs
scripting
What is `UIElements.ColorField.ctor` in Unity? Explain its purpose and usage.
ColorField Constructor Declaration public ColorField (); Description Initializes and returns an instance of ColorField. Declaration public ColorField (string label ); Parameters Parameter Description label The text to use as a label. Description Initializes and returns an instance of ColorField.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_815368c92d7e
unity_docs
editor
In Unity's 'Enable Unity Editor installation by standard users (Windows)', what is 'Procedure' and how does it work?
To enable standard users to install the Unity Editor: Make sure the following path exists. Create any of its folders, if necessary: ``` C:\ProgramData\Unity\config ``` Make sure the following file exists. Create it, if necessary: ``` C:\ProgramData\Unity\config\services-config.json ``` If you need to create the file, m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6e1d7c442cd
unity_docs
scripting
What is `Animator.isInitialized` in Unity? Explain its purpose and usage.
Animator.isInitialized public bool isInitialized ; Description Returns whether the animator is initialized successfully. See Animator.Rebind to manually initialize the animator. ```csharp using UnityEngine;public class CheckAndRebind : MonoBehaviour { Animator animator; void Start() { animator = GetCompo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bebe4a6d935c
unity_docs
rendering
In Unity's 'Single-pass stereo rendering for Android', what is 'Post-Processing Shaders' and how does it work?
You must update post-processing shaders to deal with the eye textures being a 2D texture array. To help with this, Unity includes the UNITY_DECLARE_SCREENSPACE_TEXTURE() macro. To make textures work in both multi-pass and single-pass modes, wrap each textures in this macro. Also, when you sample the texture, use the UN...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2529a8786152
unity_docs
editor
What is `Rendering.RenderPipelineGraphicsSettingsEditorUtility.RemoveRenderPipelineGraphicsSettingsWithMissingScript` in Unity? Explain its purpose and usage.
RenderPipelineGraphicsSettingsEditorUtility.RemoveRenderPipelineGraphicsSettingsWithMissingScript Declaration public static void RemoveRenderPipelineGraphicsSettingsWithMissingScript (); Description Call this method to remove null settings from all RenderPipelineGlobalSettings that assigned in the GraphicsSet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_94c216cb2541_doc_8
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The type of feedback (what is displayed). Either ShowAnswers, Object, Text, Video or DifferingTypes (any of the first three). Signature: ```csharp public FeedbackMode feedbackMode = FeedbackMode.AlwaysCorrect; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_e9d0cc30a77e
unity_docs
scripting
What is `AnimationUtility` in Unity? Explain its purpose and usage.
AnimationUtility class in UnityEditor Description Editor utility functions for modifying animation clips. Static Properties Property Description onCurveWasModified Called when an animation curve, in an animation clip, is modified. Static Methods Method Description CalculateTransformPath Retrieves the path ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3a457fe6d4b2
unity_docs
rendering
In Unity's 'Parallax Bumped Specular', what is 'Parallax Normal mapped Properties' and how does it work?
Parallax Normal mapped is the same as regular Normal mapped , but with a better simulation of “depth”. The extra depth effect is achieved through the use of a Height Map . The Height Map is contained in the alpha channel of the Normal map . In the alpha, black is zero depth and white is full depth. This is most often u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8f672d315b0
unity_docs
editor
What is `MPE.ProcessService.GetProcessState` in Unity? Explain its purpose and usage.
ProcessService.GetProcessState Declaration public static MPE.ProcessState GetProcessState (int pid ); Parameters Parameter Description pid The process ID. Returns ProcessState The state of the queried process. Description Gets the ProcessState of a given instance of UnityEditor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d44f9f8bc902
unity_docs
editor
What is `Search.ParseResult_1` in Unity? Explain its purpose and usage.
ParseResult<T0> struct in UnityEditor.Search Description A ParseResult represents the result of a parsing operation. <T>: Type of the result of the parsing operation. ParseResults are used in the context of type parsers. See QueryEngine.AddTypeParser for more details. Static Properties Property Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c35e111d6d2
unity_docs
scripting
What is `UIElements.ToggleButtonGroup` in Unity? Explain its purpose and usage.
ToggleButtonGroup class in UnityEngine.UIElements / Inherits from: UIElements.BaseField_1 / Implemented in: UnityEngine.UIElementsModule Description A control that allows single or multiple selection out of a logical group of Button elements. The ToggleButtonGroup has a label and a group of interactable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_25d1bddba6b2
unity_docs
physics
In Unity's 'Moving objects with vectors', what is 'Direction and distance from one object to another' and how does it work?
If one point in space is subtracted from another, then the result is a vector that “points” from one object to the other: ``` // Gets a vector that points from the player's position to the target's. var heading = target.position - player.position; ``` As well as pointing in the direction of the target object, this vect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2533aa3abc6
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.UnityWebRequest.Put`.
ons which return status information regarding the uploaded data in the HTTP response body. This method stores the input upload data in an UploadHandlerRaw object and attaches it to the UnityWebRequest . UploadHandlerRaw copies the input data into a buffer. Therefore, changes to the bodyData array performed after...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e8ad47eb186
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Recorder.elapsedNanoseconds`.
Recorder.elapsedNanoseconds public long elapsedNanoseconds ; Description Accumulated time of Begin/End pairs for the previous frame in nanoseconds. (Read Only) Long-lasting operations (for example, on a preloading thread) might not end within a single frame. In this case, elapsedNanoseconds is calculated unti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8f1a7a39440
unity_docs
rendering
What is `Gizmos.DrawGUITexture` in Unity? Explain its purpose and usage.
Gizmos.DrawGUITexture Declaration public static void DrawGUITexture ( Rect screenRect , Texture texture , Material mat = null); Declaration public static void DrawGUITexture ( Rect screenRect , Texture texture , int leftBorder , int rightBorder , int topBorder , int bottomBorder , Material m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aface0e30550
unity_docs
physics
What are the parameters of `PhysicsScene2D.CapsuleCast` in Unity?
Returns RaycastHit2D The cast results returned. Description Casts a capsule against colliders in the PhysicsScene2D, returning the first intersection only. A CapsuleCast is conceptually like dragging a capsule shape through the Scene in a particular direction. Any Collider2D making contact with the capsule can be dete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e34be42a9d81
unity_docs
scripting
What is `FontStyle` in Unity? Explain its purpose and usage.
FontStyle enumeration Description Font Style applied to GUI Texts, Text Meshes or GUIStyles. Properties Property Description Normal No special style is applied. Bold Bold style applied to your texts. Italic Italic style applied to your texts. BoldAndItalic Bold and Italic styles applied to your texts.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba56159ba695
unity_docs
rendering
What is `Rendering.RayTracingInstanceCullingConfig` in Unity? Explain its purpose and usage.
RayTracingInstanceCullingConfig struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Parameters for culling and filtering ray tracing instances in RayTracingAccelerationStructure.CullInstances . Additional resources: RayTracingAccelerationStructure . Properties Property Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f8608134a24
unity_docs
editor
What is `LocalizationGroup` in Unity? Explain its purpose and usage.
LocalizationGroup class in UnityEditor Description This provides an auto dispose Localization system. This can be called recursively. Properties Property Description locGroupName A current group name for the localization. Constructors Constructor Description LocalizationGroup Default constructor. Public M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97d2614178ae
unity_docs
rendering
What is `ParticleSystem.ShapeModule.texture` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.texture public Texture2D texture ; Description Specifies a Texture to tint the particle's start colors. To tint the particles' start color, the Shape module reads pixels from this Texture on the CPU. This means you must enable the read/write option in the assigned Texture's Import ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_78457b662005
unity_docs
rendering
What is `Unity.Profiling.ProfilerRecorderOptions.WrapAroundWhenCapacityReached` in Unity? Explain its purpose and usage.
ProfilerRecorderOptions.WrapAroundWhenCapacityReached Description Use to allow sample value overwrite when ProfilerRecorder capacity is exceeded. If recorder is created with ProfilerRecorderOptions.WrapAroundWhenCapacityReached the ProfilerRecorder.Count property determines the index of the next sample to be co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ebddc352ee1
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.NumberOfCompletedRequests` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.NumberOfCompletedRequests public int NumberOfCompletedRequests ; Description The total number of completed requests in the metrics included in the summary calculation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1ccc7f3d31db_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Central application manager - handles initialization and lifecycle Signature: ```csharp public class AppManager : MonoBehaviour ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ed310059afb
unity_docs
scripting
What is `ShortcutManagement.IShortcutManager.shortcutBindingChanged` in Unity? Explain its purpose and usage.
IShortcutManager.shortcutBindingChanged Parameters Parameter Description value Shortcut binding changed event handler. Description Raised when shortcut overrides are changed on the active profile. This event is raised when the shortcut overrides are changed on the active profile, e.g. via RebindShortcut or ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09ed4e462595
unity_docs
rendering
What is `MaterialEditor.PropertiesChanged` in Unity? Explain its purpose and usage.
MaterialEditor.PropertiesChanged Declaration public void PropertiesChanged (); Description Whenever a material property is changed call this function. This will rebuild the inspector and validate the properties.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_719a40942dea
unity_docs
editor
What is `EditorSettings.cacheServerEnableTls` in Unity? Explain its purpose and usage.
EditorSettings.cacheServerEnableTls public static bool cacheServerEnableTls ; Description Toggle whether to enable TLS encryption to cache server. This toggles whether to use TLS encryption when accessing the cache server.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0ce9a1912829
unity_docs
rendering
In Unity's 'Texture type and shape settings reference', what is 'Texture Shape' and how does it work?
Use the Texture Shape property to select and define the shape and structure of the Texture. There are four shape types: 2D is the most common setting for all Textures; it defines the image file as a 2D Texture. These are used to map Textures to 3D Meshes and GUI elements, among other Project elements. Cube defines the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d961355600aa
unity_docs
rendering
What is `CustomRenderTexture.doubleBuffered` in Unity? Explain its purpose and usage.
CustomRenderTexture.doubleBuffered public bool doubleBuffered ; Description When this parameter is set to true, Unity double-buffers the Custom Render Texture so that you can access it during its own update.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a3845301f1c
unity_docs
scripting
Give me an overview of the `Time` class in Unity.
Time class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Provides an interface to get time information from Unity. For more information, see the following pages in the User Manual: Time and Framerate Management Order of execution for event functions . Static Properties Property Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d90d43351bce
unity_docs
ui
In Unity's 'Replace deprecated browser interaction code', what is 'Change dynCall to makeDynCall' and how does it work?
The dynCall function is deprecated. If you have any code that uses dynCall , replace it with makeDynCall . Make this change whether you have WebAssembly.Table enabled or not. For example, change: ``` dynCall('vii', callback, [1, 2]) ``` to: ``` {{{ makeDynCall('vii', 'callback') }}}(1, 2) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e65b199ae6f8
unity_docs
editor
What is `PlayerSettings.WSA.certificateIssuer` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.certificateIssuer public static string certificateIssuer ; Description The certificate issuer for the current Universal Windows Platform certificate. In the Editor, Unity displays this under Certificate in UWP Player Settings . Read-only.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dcef3334ca7
unity_docs
rendering
What is `ParticleSystemRenderer.normalDirection` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.normalDirection public float normalDirection ; Description Specifies how to calculate lighting for the billboard. A value of 0 means Unity calculates lighting as though the billboard was a sphere. This results in the billboard looking more like a sphere. A value of 1 means Unity calculate...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1569ba3f1035
unity_docs
ui
What is `UIElements.Painter2D` in Unity? Explain its purpose and usage.
Painter2D class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Object to draw 2D vector graphics. The example below demonstrates how to use the Painter2D class to draw content in a VisualElement with the VisualElement.generateVisualContent callback. You can al...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f73018847453
unity_docs
scripting
What is `Search.IPropertyDatabaseRecord.validRecord` in Unity? Explain its purpose and usage.
IPropertyDatabaseRecord.validRecord public bool validRecord ; Description Boolean indicating if the record is valid. A record is invalid when it has been invalidated with PropertyDatabase.Invalidate and PropertyDatabase.InvalidateMask .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4132679b79d0
unity_docs
physics
Give me an overview of the `Joint` class in Unity.
Joint class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.PhysicsModule Description Joint is the base class for all joints. Additional resources: CharacterJoint , HingeJoint , SpringJoint , FixedJoint , ConfigurableJoint . Properties Property Description anchor The Position ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.