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_man_8ab13629a5c9
unity_docs
rendering
Show me a Unity code example for 'Check how many shader variants you have'.
ics . Under Shader Loading , you can see how many shaders and shader variants you have next to Currently tracked: . Select Save to asset… to create a shader variant collection asset . ## Get a list of shader variants Unity creates at build time After you build your project, open the Editor.log log file and search for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2afac7d4a34
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8G8B8_SInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8G8B8_SInt Description A three-component, 24-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d0a8bc36f95
unity_docs
xr
What is `MPE.ChannelClient.NewRequestId` in Unity? Explain its purpose and usage.
ChannelClient.NewRequestId Declaration public int NewRequestId (); Declaration public static int NewRequestId (int clientId ); Parameters Parameter Description clientId The ChannelClient ID to generate the request from. Returns int The request ID. Description Creates a unique request ID for this ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_48c6b38cd2b3
unity_docs
editor
Explain 'Package states and lifecycle' in Unity.
Starting from Unity Editor version 2021.1, a package can travel through the following states during its lifecycle: The Package Manager window displays a label that corresponds to some of these states. Note : These package states only apply to packages that Unity develops internally. Contact third-party package develope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d65da81c7c42
unity_docs
scripting
What are the parameters of `Camera.ViewportPointToRay` in Unity?
Description Returns a ray going from camera through a viewport point. Resulting ray is in world space, starting on the near plane of the camera and going through position's (x,y) coordinates on the viewport (position.z is ignored). Viewport coordinates are normalized and relative to the camera. The bottom-left of the c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e933d1c9ca2f_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
This is a very basic version of an ID system for GameObjects.Manually setting IDs like this is not desirable. For the demo, it is sufficient. Signature: ```csharp public class Identification : MonoBehaviour ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_0c4d8a6c0388
unity_docs
math
Show me a Unity C# example demonstrating `Ray2D.ToString`.
tring (string format , IFormatProvider formatProvider ); Parameters Parameter Description format A numeric format string. formatProvider An object that specifies culture-specific formatting. Description Returns a formatted string for this 2D ray. Defaults to two digits displayed (format="F2"). For more in...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f1ea2a0b904
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.LateUpdate`.
MonoBehaviour.LateUpdate() Description LateUpdate is called every frame, if the Behaviour is enabled. LateUpdate is called after all Update functions have been called. This is useful to order script execution. For example a follow camera should always be implemented in LateUpdate because it tracks objects that m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_621f1b30057d
unity_docs
scripting
What is `AI.NavMeshBuildSourceShape` in Unity? Explain its purpose and usage.
NavMeshBuildSourceShape enumeration Description Used with NavMeshBuildSource to define the shape for building NavMesh. Properties Property Description Mesh Describes a Mesh source for use with NavMeshBuildSource. Mesh sources must be positioned within 100,000 units of the world origin and must not exceed 100,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45fd73d34851
unity_docs
animation
What is `Animator.StartRecording` in Unity? Explain its purpose and usage.
Animator.StartRecording Declaration public void StartRecording (int frameCount ); Parameters Parameter Description frameCount The number of frames (updates) that will be recorded. If frameCount is 0, the recording will continue until the user calls StopRecording . The maximum value for frameCount is 10000....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_089f40fa49dd
unity_docs
scripting
What is `Transform` in Unity? Explain its purpose and usage.
Transform class in UnityEngine / Inherits from: Component / Implemented in: UnityEngine.CoreModule Description Position, rotation and scale of an object. Every object in a Scene has a Transform. It's used to store and manipulate the position, rotation and scale of the object. Every Transform can have a paren...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_00fcaa144ff9
unity_docs
rendering
Explain 'Sparse Textures' in Unity.
Sparse textures (also known as “tiled textures” or “mega-textures”) are textures that are too large to fit in graphic memory in their entirety. To handle them, Unity breaks the main texture down into smaller rectangular sections known as “tiles”. Individual tiles can then be loaded as necessary. For example, if the cam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c12ca05e95f
unity_docs
editor
What is `Search.SearchViewState` in Unity? Explain its purpose and usage.
SearchViewState class in UnityEditor.Search Implements interfaces: ISerializationCallbackReceiver Description Search view state is used to create new Search windows. See SearchService.ShowWindow . ```csharp using UnityEditor; using UnityEditor.Search; using UnityEngine.Search;static class SearchWindows { [Menu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_901c2aa07407
unity_docs
rendering
Give me an overview of the `StandaloneRenderResize` class in Unity.
StandaloneRenderResize enumeration Description Enum used to determine if a Canvas should be resized when a manual Camera.Render call is performed. Properties Property Description Enabled Resize the Canvas when a manual Camera.Render call is performed. Disabled Do not resize the Canvas when a manual Camera.Rend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ece2a6c44100
unity_docs
editor
What is `Compilation.Assembly` in Unity? Explain its purpose and usage.
Assembly class in UnityEditor.Compilation Description Class that represents an assembly compiled by Unity. Properties Property Description allReferences Returns Assembly.assemblyReferences and Assembly.compiledAssemblyReferences combined.This returns all assemblies that are passed to the compiler when building...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_75649bd857af
unity_docs
scripting
Explain 'Integrating third-party code libraries (plug-ins)' in Unity.
In Unity, you normally use scripts to create functionality, but you can also include code created outside Unity in the form of a plug-in . You can use two different kinds of plug-in in Unity: Managed plug-ins : managed .NET assemblies you can create with tools like Visual Studio. They only contain .NET code, which mean...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39509b5d816d
unity_docs
scripting
What is `UIElements.TabView.ReorderTab` in Unity? Explain its purpose and usage.
TabView.ReorderTab Declaration public void ReorderTab (int from , int to ); Parameters Parameter Description from The current index of the tab to move. to The target index to move the tab to. Description Moves the tab from the specified index to a new index. If the TabView contains a view-data-key,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1edde0acfda
unity_docs
scripting
What is `Experimental.GraphView.GraphView.scaleStep` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.scaleStep public float scaleStep ; Description Zoom step. See ContentZoomer.scaleStep for details.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f84be1dadcad
unity_docs
scripting
In Unity's 'Work with blend shapes', what is 'Prepare the artwork' and how does it work?
Once you have set up blend shapes in your 3D modeling application, do the following: In your 3D modeling application, enable these export settings: Enable exporting animation. Enable exporting blend shapes for deformed models. Export your selection to an .fbx file. Import your FBX file into Unity. Select the newly impo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b23c3abe221
unity_docs
rendering
What is `Device.SystemInfo.supports3DRenderTextures` in Unity? Explain its purpose and usage.
SystemInfo.supports3DRenderTextures public static bool supports3DRenderTextures ; Description This has the same functionality as SystemInfo.supports3DRenderTextures and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b230b25b0bc
unity_docs
rendering
What is `Windows.WebCam.PhotoCaptureFrame.UploadImageDataToTexture` in Unity? Explain its purpose and usage.
PhotoCaptureFrame.UploadImageDataToTexture Declaration public void UploadImageDataToTexture ( Texture2D targetTexture ); Parameters Parameter Description targetTexture The target texture that the captured image data will be copied to. Description This method will copy the captured image data into a user s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dda45d594703
unity_docs
physics
What is `ArticulationBody.jointVelocity` in Unity? Explain its purpose and usage.
ArticulationBody.jointVelocity public ArticulationReducedSpace jointVelocity ; Description The joint velocity in reduced coordinates. Units of measurement - m/s (meters per second) for linear and rad/s (radians per second) for angular motion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6d8c172ffaea
unity_docs
scripting
Show me a Unity C# example demonstrating `SystemLanguage.Slovenian`.
SystemLanguage.Slovenian Description Slovenian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Slovenian language if (Application.systemLanguage == SystemLanguage.Slovenian) { //Outputs into console that the system ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a679905cf66d
unity_docs
rendering
What is `Rendering.GraphicsTextureDescriptorFlags` in Unity? Explain its purpose and usage.
GraphicsTextureDescriptorFlags enumeration Description The rendering and read/write access mode of a GraphicsTexture . Additional resources: GraphicsTextureDescriptor , GraphicsTexture.descriptor . Properties Property Description None Default mode, allows this GraphicsTexture to be sampled from. RenderTarg...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d29d982385d4
unity_docs
scripting
What is `AssetPostprocessor.OnPostprocessPrefab` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPostprocessPrefab(GameObject root) Description Gets a notification when a Prefab completes importing. To use this function, add it to a subclass. It lets you modify the imported GameObject. GameObjects only exist during the import and Unity destroys them immediately after import. This function ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b4741e0c5f5
unity_docs
rendering
Show me a Unity C# example demonstrating `Mesh.subMeshCount`.
bMeshCount public int subMeshCount ; Description The number of sub-meshes inside the Mesh object. Each sub-mesh corresponds to a Material in a Renderer , such as MeshRenderer or SkinnedMeshRenderer . A sub-mesh consists of a list of triangles, which refer to a set of vertices. Vertices can be shared betw...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_46d2f100c4b2
unity_docs
scripting
In Unity's 'Aim Constraint component', what is 'Constraint settings' and how does it work?
Contains additional settings for the Aim Constraint. Property Description Lock Enable this setting to let the Constraint rotate the GameObject. Disable this property to edit the rotation of this GameObject. You can also edit the Rotation At Rest and Rotation Offset properties. If Is Active is enabled, the Constraint up...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_316edd80814c
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightBoxShape.shadow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightBoxShape.shadow public bool shadow ; Description Specifies whether the light casts shadows or not. This is true if the light does cast shadows and false otherwise.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ee320c1dfdf1
unity_docs
scripting
Explain 'Video and cutscenes' in Unity.
Use Unity’s video system to integrate video into your application. Video footage can add realism to your game, reduce rendering complexity, or help you integrate content available externally. Unity’s video features include the Hardware-accelerated and software-based decoding of video sources, Transparency support , mul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_79cbdc610ae2
unity_docs
math
In Unity's 'Create a property visitor with low-level APIs', what is 'Create the visitor' and how does it work?
Create the low-level visitor class as follows: Create a LowLevelVisitor class that implements the IPropertyVisitor and IPropertyBagVisitor interfaces. Add a StringBuilder field to the class. This can be used to build a string that represents the current state of an object. Add a Reset method that clears the StringBuild...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_235713a60041
unity_docs
rendering
What is `ParticleSystem.RotationBySpeedModule.y` in Unity? Explain its purpose and usage.
ParticleSystem.RotationBySpeedModule.y public ParticleSystem.MinMaxCurve y ; Description Rotation by speed curve for the y-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83ad8971ab45
unity_docs
editor
What is `Build.Profile.BuildProfile.SetActiveBuildProfile` in Unity? Explain its purpose and usage.
BuildProfile.SetActiveBuildProfile Declaration public static void SetActiveBuildProfile ( Build.Profile.BuildProfile buildProfile ); Parameters Parameter Description buildProfile The build profile to be set as the active build profile. When the value is null, Unity sets the platform profile as active. Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3bf3d02c7837
unity_docs
scripting
What is `SerializationUtility.HasManagedReferencesWithMissingTypes` in Unity? Explain its purpose and usage.
SerializationUtility.HasManagedReferencesWithMissingTypes Declaration public static bool HasManagedReferencesWithMissingTypes ( Object obj ); Description This API returns true if one or more managed references is missing its type. Managed references are objects that are referenced from a MonoBehaviour , Scr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c06aa070b58b
unity_docs
xr
In Unity's 'Details panel reference', what is 'Labels' and how does it work?
Some packages display labels next to the package name or version number. These labels offer information about the source or state of the package: Source label types indicate where the package originates from (for example, whether it comes from a local folder or if you downloaded it from a package registry). State label...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cb63f01353d
unity_docs
editor
What is `iOS.Xcode.PBXProject.SetTeamId` in Unity? Explain its purpose and usage.
PBXProject.SetTeamId Declaration public void SetTeamId (string targetGuid , string teamId ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . teamId The code signing team ID to be used for this target. Description Sets the Team ID of an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c209790d9ffc
unity_docs
xr
What is `NVIDIA.DLSSTextureTable` in Unity? Explain its purpose and usage.
DLSSTextureTable struct in UnityEngine.NVIDIA / Implemented in: UnityEngine.NVIDIAModule Description The set of texture slots available for the DLSSContext . SA GraphicsDevice.ExecuteDLSS Properties Property Description biasColorMask A mask, same size as colorInput, preferably of format R8_UNORM that infor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_006d2937f64e
unity_docs
scripting
What is `LightTransport.RadeonRaysContext.Wait` in Unity? Explain its purpose and usage.
RadeonRaysContext.Wait Declaration public bool Wait ( LightTransport.EventID id ); Parameters Parameter Description id ID of the event. Returns bool Returns true of the event completed successfully. Description Wait for an asynchronous event. This is a blocking method which stalls the current CPU t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b54f20e063aa
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.UnityWebRequestAssetBundle.GetAssetBundle`.
cts happens. With CachedAssetBundle struct, you can use CachedAssetBundle.name to customized the cache path to avoid the cache conflicts. You can also utilize this to organize the cache data structure. Note , that while you can use this API to load Asset Bundle from local storage (using file:// URI or jar:file// on A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_480d04cced44
unity_docs
scripting
What is `Unity.Properties.PropertyPathPartKind` in Unity? Explain its purpose and usage.
PropertyPathPartKind enumeration Description A PropertyPathPartKind specifies a type for a PropertyPathPart . Properties Property Description Name Represents a named part of the path. Index Represents an indexed part of the path. Key Represents a keyed part of the path.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5df84c851899
unity_docs
math
In Unity's 'Build a structure with prefabs', what is 'Attach the script to an empty GameObject' and how does it work?
Create an empty GameObject . Right-click on the Hierarchy and select Create Empty . Attach the Wall script to the empty GameObject. Drag the Block prefab asset into the Block field, Enter Play mode and Unity generates a wall with the Block prefab. You can also use code to place prefabs in a grid or other configurations...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebf70ca71608
unity_docs
math
What is `CompositeCollider2D.GetPath` in Unity? Explain its purpose and usage.
CompositeCollider2D.GetPath Declaration public int GetPath (int index , Vector2[] points ); Parameters Parameter Description index The index of the path from 0 to pathCount minus 1. points An ordered array of the vertices (points) in the selected path. Returns int Returns the number of points placed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3cf82466cf5
unity_docs
performance
What is `Rendering.CommandBuffer.ctor` in Unity? Explain its purpose and usage.
CommandBuffer Constructor Declaration public CommandBuffer (); Description Create a new empty command buffer. You might want to set name for the buffer, so it is easier to see its activity in Profiler or Frame Debugger.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f270ededac4b
unity_docs
physics
Show me a Unity C# example demonstrating `FrameTimingManager`.
lts aren't immediately available at the end of each frame on most platforms, so FrameTimingManager waits to get synchronized CPU and GPU data for the frame. However the delay doesn't guarantee GPU data available for all frames, because the GPU might not have any available resources to return the results, or might fai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb4434632424
unity_docs
animation
What is `Animations.AnimatorStateMachine.RemoveStateMachine` in Unity? Explain its purpose and usage.
AnimatorStateMachine.RemoveStateMachine Declaration public void RemoveStateMachine ( Animations.AnimatorStateMachine stateMachine ); Parameters Parameter Description stateMachine The state machine to remove. Description Utility function to remove a state machine from its parent state machine. If the stat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3eb6f2034618
unity_docs
ui
What are the parameters of `Audio.AudioMixer.SetFloat` in Unity?
Returns bool Returns false if the exposed parameter was not found or snapshots are currently being edited. Description AudioMixer.SetFloat sets the value of the exposed parameter specified. Once you call this function, mixer snapshots will no longer control the exposed parameter, and you can only modify the parameter u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65305cdde04d
unity_docs
editor
What is `EditorWindow.BeginWindows` in Unity? Explain its purpose and usage.
EditorWindow.BeginWindows Declaration public void BeginWindows (); Description Mark the beginning area of all popup windows. GUI.Window behaves somewhat differently in the editor than inside your games. In games, GUI.Window pops up a window on your screen. In the editor, GUI.Window shows a subwindow inside...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_030e878d02dd
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormatUtility.IsIEEE754Format` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsIEEE754Format Declaration public static bool IsIEEE754Format ( Experimental.Rendering.GraphicsFormat format ); Description Returns true if the format is a floating point format. Returns false otherwi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c2852abd5b91_doc_6
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The that controls passthrough via AR Foundation. Signature: ```csharp public ARCameraManager CameraManager ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_d44237f9a7ac
unity_docs
scripting
What is `UIElements.BaseBoolField` in Unity? Explain its purpose and usage.
BaseBoolField class in UnityEngine.UIElements / Inherits from: UIElements.BaseField_1 / Implemented in: UnityEngine.UIElementsModule Description A BaseBoolField is a clickable element that represents a boolean value. Properties Property Description text Optional text that appears after the BaseBoolFie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_285fb7295cba
unity_docs
physics
What is `UIElements.BaseVerticalCollectionView.itemsChosen` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.itemsChosen Description Callback triggered when the user acts on a selection of one or more items, for example by double-clicking or pressing Enter. This callback receives an enumerable that contains the item or items chosen. Note : A single-click only changes the selection. Use a d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_82337f6364a0
github
scripting
Write a Unity C# script called Twirl
```csharp using System; using UnityEngine; namespace UnityStandardAssets.ImageEffects { [ExecuteInEditMode] [AddComponentMenu("Image Effects/Displacement/Twirl")] public class Twirl : ImageEffectBase { public Vector2 radius = new Vector2(0.3F,0.3F); [Range(0.0f,360.0f)] ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_d38858d0f469
unity_docs
scripting
What is `UIElements.UxmlFloatAttributeDescription` in Unity? Explain its purpose and usage.
UxmlFloatAttributeDescription class in UnityEngine.UIElements / Inherits from: UIElements.TypedUxmlAttributeDescription_1 / Implemented in: UnityEngine.UIElementsModule Description Describes a UXML float attribute. Properties Property Description defaultValueAsString The default value for the attrib...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_adc2026ac808
unity_docs
scripting
What is `Awaitable.Cancel` in Unity? Explain its purpose and usage.
Awaitable.Cancel Declaration public void Cancel (); Description Cancels the awaitable. If the awaitable is being awaited, the awaiter receives a System.OperationCanceledException. Note: some methods returning an Awaitable also accept a CancellationToken. Both cancelation models are equivalent.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5bba30ffa3a5
unity_docs
input
What is `TouchScreenKeyboard.area` in Unity? Explain its purpose and usage.
TouchScreenKeyboard.area public static Rect area ; Description Indicates the portion of the screen that is currently covered by the on-screen keyboard. On Android, this property returns zero-Rect, that is Rect(0,0,0,0). For more information, refer to Rect .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5d3879f48ef3
unity_docs
scripting
Explain 'Debug production Web builds' in Unity.
Use external symbols, JavaScript error handlers, and stack trace mapping to debug deployed Web builds. Unity Web builds don’t support full source-level debugging. However, you can preserve some debugging information and use browser error reporting to investigate runtime failures in deployed builds. ## Use external sym...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e4630e1cc0d7
unity_docs
rendering
Explain 'Select GameObjects' in Unity.
You can select a single GameObject in the Scene view or from the Hierarchy window . You can also select more than one GameObject at a time. The Editor highlights selected GameObjects and their children in the Scene view. By default, the selection outline color is orange, and the child outline color is blue. You can als...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cae61963b06a
unity_docs
scripting
Show me a Unity C# example demonstrating `Rigidbody.linearDamping`.
the Rigidbody linear velocity. linearDamping can be used to slow down an object. Zero indicates that no damping should be used whereas higher values increase the damping, effectively slowing down the linear motion faster. Note: The following formula is how the linear damping is applied: linearVelocity *= ( 1 ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d871c1d6e25
unity_docs
scripting
What is `PenStatus` in Unity? Explain its purpose and usage.
PenStatus enumeration Description Options for specifying the state of the pen. For example, whether the pen is in contact with the screen or tablet, whether the pen is inverted, and whether buttons are pressed. You can combine states using bitwise OR operators. Before you process an event as a pen event, you shoul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bae396b2453f
unity_docs
editor
What are the parameters of `EditorGUI.TagField` in Unity?
Returns string The tag selected by the user. Description Makes a tag selection field. Tag field in an Editor window. ```csharp using UnityEngine; using UnityEditor; // Change the Tag and/or the layer of the selected GameObjects.class EditorGUITagLayerField : EditorWindow { string selectedTag = ""; int selectedL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3a2d58220ed
unity_docs
scripting
What are the parameters of `Caching.GetCacheAt` in Unity?
Returns Cache A reference to the Cache at the index specified. Description Returns the Cache at the given position in the cache list. ```csharp using System.IO; using UnityEngine;public class Example : MonoBehaviour { void GetCacheAtExample() { Directory.CreateDirectory("Cache1"); Directory.Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_10fbd6dad691
unity_docs
xr
In Unity's 'XR architecture', what is 'XR provider plug-in framework' and how does it work?
An XR provider plug-in is a Unity plug-in that supports one or more XR device platforms. For example, the ARCore plugin supports the Android AR platform on hand-held Android devices, while the OpenXR plug-in supports several XR devices on multiple operating systems. An XR provider plug-in implements interfaces called s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_44863acade36_doc_4
github
scripting
What does `TryGetECEFLocation` do in this Unity script? Explain its purpose and signature.
Try to get the resultant transformed position of this Positioner as an ECEF coordinate.The method returns false if the resultant transformed position is not currently defined - in whichcase IsTransformedPointDefined would also return false.If the return value is true, the resultant transformed position ofthis Positione...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_99f46875522d
unity_docs
editor
In Unity's 'Create a simple transition with UI Builder and C# scripts', what is 'Create the transition with UI Builder' and how does it work?
In UI Builder, use the StyleSheets window to create a hover style for the label, which triggers the transition. Set the transition on the label rather than the hover. If you set the transition on the hover, the transition doesn’t work if the cursor leaves the label. Open TransitionExample.uxml in the UI Builder. In the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c373de714fb8_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Relative path to custom global gitignore file Signature: ```csharp protected const string GlobalGitignorePath = "FieldSearch/gitignore.global"; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_77b6a15a5273
unity_docs
scripting
What are the parameters of `Animator.Play` in Unity?
Description Plays a state. When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a Bounce state in the Base Layer , the name is Base Layer.Bounce . The normalizedTime parameter varies between 0 and 1. If this parameter is left at ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a6b73dd4d5e
unity_docs
animation
Show me a Unity C# example demonstrating `Playables.PlayableBehaviour`.
ned behaviour to a PlayableGraph . A PlayableBehaviour must be part of a branch of a PlayableGraph that is connected to an output to be active. In the following example, two AnimationClip are controlled by two AnimationClipPlayable , which are blended by a AnimationMixerPlayable . A custom BlenderPlayableBehavio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_561324a35056
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.UsesConfiguration` in Unity? Explain its purpose and usage.
UsesConfiguration class in Unity.Android.Gradle.Manifest / Inherits from: Unity.Android.Gradle.Manifest.BaseElement Description The C# definition of the <uses-configuration> Android Manifest element. For more information about the element, see Android's documentation: UsesConfiguration element Properties ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6e6bf56cbe18
unity_docs
physics
In Unity's 'Reference other files from UXML', what is 'Thepathattribute' and how does it work?
The path attribute uses the Unity Resources mechanisms, but doesn’t offer error reporting at import time and doesn’t allow relative paths. This is a legacy way to reference other files and is not recommended. Use it only if you need to reference files that can only be loaded from the Resources folder. The path attribut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e1c489b0759
unity_docs
rendering
In Unity's 'Upgrade to Unity 2023.1', what is 'Page outline' and how does it work?
Render pipelines Gaussian Filter Radius properties from LightingSettings are now floating point values Improvements to light probe energy conservation Enlighten Baked Global Illumination is no longer available Android: Java class UnityPlayer needs to be renamed to UnityPlayerForActivityOrService Android: UnityPlayer ja...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_071b0b89517e
unity_docs
editor
What is `TerrainTools.TerrainPaintToolWithOverlaysBase.OnInspectorGUI` in Unity? Explain its purpose and usage.
TerrainPaintToolWithOverlaysBase.OnInspectorGUI Declaration public void OnInspectorGUI ( Terrain terrain , TerrainTools.IOnInspectorGUI editContext ); Parameters Parameter Description terrain Active Terrain object. editContext Interface used to communicate between Editor and Paint tools. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9fd186423cad
unity_docs
rendering
What is `ShaderVariantCollection.WarmUpProgressively` in Unity? Explain its purpose and usage.
ShaderVariantCollection.WarmUpProgressively Declaration public bool WarmUpProgressively (int variantCount ); Parameters Parameter Description variantCount The maximum number of variants to warm up. Returns bool True if all variants in this shader variant collection have been warmed up, false otherwise. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c82e33fb3f6b
unity_docs
scripting
What is `Video.VideoTimeReference` in Unity? Explain its purpose and usage.
VideoTimeReference enumeration Description The clock that the VideoPlayer observes to detect and correct drift. Use these settings to control how the playback time of the video is synchronized with time sources. ```csharp // This script changes the video playback speed based on a custom timer. // Attach this s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_55b6a7017507
unity_docs
audio
What is `Experimental.Audio.AudioSampleProvider.ConsumeSampleFramesNativeFunction` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. AudioSampleProvider.ConsumeSampleFramesNativeFunction Declaration public delegate uint ConsumeSampleFramesNativeFunction (uint providerId , IntPtr interleavedSampleFrames , uint sampleFrameCount ); Parameters Parameter De...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6bf5d401eaa
unity_docs
rendering
What is `Tilemaps.TilemapRenderer.SortOrder.BottomLeft` in Unity? Explain its purpose and usage.
TilemapRenderer.SortOrder.BottomLeft Description Sorts tiles for rendering starting from the tile with the lowest X and the lowest Y cell positions. The TilemapRenderer will iterate through tiles by the next higher X value first before tiles with a higher Y value.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d906c9acc0b1
unity_docs
rendering
What is `Rendering.CommandBuffer.SetGlobalVector` in Unity? Explain its purpose and usage.
CommandBuffer.SetGlobalVector Declaration public void SetGlobalVector (string name , Vector4 value ); Declaration public void SetGlobalVector (int nameID , Vector4 value ); Description Add a "set global shader vector property" command. When the command buffer will be executed, a global shader vector...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c239b04ac52d
unity_docs
scripting
Show me a Unity C# example demonstrating `RigidbodyConstraints.FreezeRotationX`.
RigidbodyConstraints.FreezeRotationX Description Freeze rotation along the X-axis. ```csharp //This example shows how RigidbodyConstraints is used to freeze the position and rotation of a Rigidbody in the x axis at start-up. //It also shows what happens when these constraints are removed, when you press the space k...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6547780d6e98
unity_docs
animation
What is `Tilemaps.Tilemap.loopEndedForTileAnimation` in Unity? Explain its purpose and usage.
Tilemap.loopEndedForTileAnimation Parameters Parameter Description value A callback set by a user to notify them when Tiles have reached the end of their loop for their Tile Animation. Description Callback when Tiles on a Tilemap have reached the end of their loop for their Tile Animation. This returns the lis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23f838ee6783
unity_docs
rendering
What is `Rendering.CommandBuffer.SetGlobalInteger` in Unity? Explain its purpose and usage.
CommandBuffer.SetGlobalInteger Declaration public void SetGlobalInteger (int nameID , int value ); Declaration public void SetGlobalInteger (string name , int value ); Description Adds a command to set the value of a given property for all Shaders, where the property is an integer. When Unity executes t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c9338d5d8621
unity_docs
rendering
In Unity's 'Introduction to normal maps (bump mapping)', what is 'How normal mapping works' and how does it work?
Normal mapping takes this modification of surface normals one step further, by using a texture to store information about how to modify the surface normals across the model. A normal map is an image texture mapped to the surface of a model, similar to regular colour textures, however each pixel in the texture of the no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34dc18ef107a
unity_docs
math
What is `HandleUtility.DistancePointLine` in Unity? Explain its purpose and usage.
HandleUtility.DistancePointLine Declaration public static float DistancePointLine ( Vector3 point , Vector3 lineStart , Vector3 lineEnd ); Description Calculate distance between a point and a line. Additional resources: ProjectPointLine .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5fc764ec6c60
unity_docs
xr
What is `Rendering.BatchRendererGroup.OnPerformCulling` in Unity? Explain its purpose and usage.
BatchRendererGroup.OnPerformCulling Declaration public delegate Unity.Jobs.JobHandle OnPerformCulling ( Rendering.BatchRendererGroup rendererGroup , Rendering.BatchCullingContext cullingContext , Rendering.BatchCullingOutput cullingOutput , IntPtr userContext ); Parameters Parameter Description rend...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c581405a12f
unity_docs
rendering
In Unity's '2D renderer sorting', what is 'Transparent Queue Sorting Order by Priority' and how does it work?
2D Renderers within the Transparent Queue generally follow the priority order below: Sorting Layer and Order in Layer Specify Render Queue Distance to Camera Perspective Orthographic Custom Axis sort mode Sprite Sort Point Sorting Group Material/Shader Tiebreaker There are other factors which can cause the sorting orde...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_090157566738
unity_docs
physics
What is `Collider.isTrigger` in Unity? Explain its purpose and usage.
Collider.isTrigger public bool isTrigger ; Description Specify if this collider is configured as a trigger. A trigger doesn't register a collision with an incoming Rigidbody . Instead, it sends OnTriggerEnter , OnTriggerExit and OnTriggerStay message when a rigidbody enters or exits the trigger volume. `...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2303fd5e39ff
unity_docs
editor
Show me a Unity code example for 'Gradle project structure'.
is a library that you can integrate into any other Gradle project. Use it to embed Unity into existing Android applications. Launcher module: Contains the application’s name and all its icons. This is a simple Android application module that launches Unity, which you can replace with your own application if required. R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92529fe06094
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.pitch`.
he pitch property is clamped to the range [-3..3]. When resource is an AudioRandomContainer, the pitch property is ignored, and if it is not in the range [0.0001..3.0], a warning appears in the console. This is due to AudioRandomContainer not supporting reverse/pause playback from the pitch. Any values outside this r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2f9ac8db2be6
unity_docs
scripting
What is `TrueTypeFontImporter.includeFontData` in Unity? Explain its purpose and usage.
TrueTypeFontImporter.includeFontData public bool includeFontData ; Description If this is enabled, the actual font will be embedded into the asset for Dynamic fonts. When you disable this, the user must have the font installed in their system to use it.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_519228cc93d1
unity_docs
editor
What is `Experimental.GraphView.RectUtils` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. RectUtils class in UnityEditor.Experimental.GraphView Description Utilities for rectangle selections. Constructors Constructor Description RectUtils RectUtils' constructor. Static Methods Method Description Encompass Cr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7d24bd495969
unity_docs
editor
In Unity's 'Access package assets using scripts', what is 'Referring to package paths' and how does it work?
To refer to assets that are defined inside a package, use this path scheme: ``` "Packages/<package-name>/..." ``` The path of the asset inside a package begins with Packages/ and the package name (not the display name ). By contrast, you access project assets using this scheme: ``` "Assets/..." ``` For example, the pat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2aab2e2e6f57
unity_docs
physics
What is `ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata` in Unity? Explain its purpose and usage.
ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata Description Specifies that AssetDatabase.ForceReserializeAssets should load, upgrade, and save both the assets at the paths passed to the function, and also their accompanying .meta files.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_45ce33fca1f6
unity_docs
scripting
What is `Camera.onPostRender` in Unity? Explain its purpose and usage.
Camera.onPostRender public static Camera.CameraCallback onPostRender ; Description Delegate that you can use to execute custom code after a Camera renders the scene. In the Built-in Render Pipeline, Unity calls onPostRender after any Camera finishes rendering. To execute custom code at this point, create...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_72f9e47471a2
unity_docs
rendering
Explain 'TabView' in Unity.
You can group multiple Tab elements within a TabView element to create a tab-based navigation system. ## Create a TabView You can create a TabView with UI Builder, UXML, or C#. To create a TabView with C#, create a new instance of the TabView object and then add Tab elements to it. For example: ``` var tabView = new ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_590ef935896a
unity_docs
rendering
What is `LightingDataAsset.SetDefaultReflectionCubemap` in Unity? Explain its purpose and usage.
LightingDataAsset.SetDefaultReflectionCubemap Declaration public void SetDefaultReflectionCubemap ( Texture cubemap ); Parameters Parameter Description cubemap The cubemap to set. Description Sets the default reflection cubemap stored in a LightingDataAsset.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0047ce87fcf5
unity_docs
physics
What are the parameters of `AI.NavMesh.Raycast` in Unity?
Returns bool True if the ray is terminated before reaching target position. Otherwise returns false. Description Trace a line between two points on the NavMesh. The source and destination points are first mapped on the NavMesh, then a ray is traced from the source point towards the target. If the ray hits a NavMesh bou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c760d81b5bd4
unity_docs
editor
What are the parameters of `AssetDatabase.ClearImporterOverride` in Unity?
Description Clears the importer override for the asset. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.AssetImporters; using UnityEngine.Assertions;public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Example Importer Actions")] static void AllImporterActions() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7dd932745d9a
unity_docs
scripting
What is `UIElements.BaseCompositeField_3.multilineVariantUssClassName` in Unity? Explain its purpose and usage.
BaseCompositeField<T0,T1,T2>.multilineVariantUssClassName public static string multilineVariantUssClassName ; Description USS class name of elements of this type when the fields are displayed on multiple lines.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9ac1cc74caf
unity_docs
rendering
What is `RenderTexture.depthBuffer` in Unity? Explain its purpose and usage.
RenderTexture.depthBuffer public RenderBuffer depthBuffer ; Description Depth/stencil buffer of the render texture (Read Only). Additional resources: RenderBuffer , colorBuffer , Graphics.SetRenderTarget , Graphics.Blit .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f0c360be00a
unity_docs
editor
What is `Unity.Profiling.Editor.ProfilerCounterDescriptor.ctor` in Unity? Explain its purpose and usage.
ProfilerCounterDescriptor Constructor Declaration public ProfilerCounterDescriptor (string name , Unity.Profiling.ProfilerCategory category ); Parameters Parameter Description name The name of the Profiler counter to describe. A string. category The category of the Profiler counter to describe. A Profi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f94df062ba0
unity_docs
math
Show me a Unity C# example demonstrating `Hash128.Compute`.
Hash128 The 128-bit hash. Description Compute a hash of input data. The value must be an "unmanaged" C# type. Primitive types like int , float , bool , enums, pointers, or structs containing primitive types are all unmanaged types. See Unmanaged types in C# language reference. The int and float overload...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_072c7f030d99
unity_docs
editor
What are the parameters of `EditorGUILayout.ToggleLeft` in Unity?
Description Make a toggle field where the toggle is to the left and the label immediately to the right of it. EditorGUILayout.ToggleLeft is similar to GUILayout.Toggle but respects the EditorGUI.showMixedValue property and handles keyboard focus consistent with other Editor controls. Edi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db4922a63d03
unity_docs
editor
What is `PlayerSettings.WSA.applicationDescription` in Unity? Explain its purpose and usage.
PlayerSettings.WSA.applicationDescription public static string applicationDescription ; Description The description text that the Microsoft Store displays with your application. In the Editor, Unity displays this text under Application UI in UWP Player Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.