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_f12873859ac4
unity_docs
performance
What are the parameters of `Awaitable.NextFrameAsync` in Unity?
Description Resumes execution on the next frame. Note: This method can only be called from the main thread and always completes on main thread. ```csharp async Awaitable SampleSchedulingJobsForNextFrame() { // Wait until end of frame to avoid competing over resources with other Unity subsystems await Awaitable....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f58d00bc942f
unity_docs
math
What is `Experimental.GraphView.GraphElement.HitTest` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.HitTest Declaration public bool HitTest ( Vector2 localPoint ); Parameters Parameter Description localPoint The point. Returns bool Returns true if point is over the GraphElement. Returns false otherwise...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e16c4a1686fe
unity_docs
scripting
In Unity's 'Work with blend shapes', what is 'Create animations In Unity' and how does it work?
To create a blend animation: Open the Animation window (from the main Unity menu: Window > Animation > Animation ). Select the Animation Clip where you want to add the blend shape animation. You can select Create New Clip to create a new Animation Clip. Click Add Property and select [Your Character] > [Your Character B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33a77ad4283b
unity_docs
scripting
What are the parameters of `Rigidbody.MoveRotation` in Unity?
Description Rotates the rigidbody to rotation . Use Rigidbody.MoveRotation to rotate a Rigidbody , complying with the Rigidbody's interpolation setting. If Rigidbody interpolation is enabled on the Rigidbody , calling Rigidbody.MoveRotation will resulting in a smooth transition between the two rotations in any intermed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4789130b2e81
unity_docs
rendering
Explain 'HLSL semantics reference' in Unity.
Explore the semantics you can use to input mesh data into custom shaders in High-Level Shader Language (HLSL) in Unity. Semantic Description Type POSITION The vertex position. float3 or float4 NORMAL The vertex normal. float3 TEXCOORD0 The first UV coordinates. float2 , float3 , or float4 TEXCOORD1 The second UV coordi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b037c1a713a
unity_docs
rendering
What is `Material.GetFloatArray` in Unity? Explain its purpose and usage.
Material.GetFloatArray Declaration public float[] GetFloatArray (string name ); Declaration public float[] GetFloatArray (int nameID ); Parameters Parameter Description name The name of the property. nameID The name ID of the property retrieved by Shader.PropertyToID . Description Get a named floa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4a1e04725075_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Default Search Service for Inspectors.Using Signature: ```csharp public class SearchInspectorService ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7617747196ca
unity_docs
physics
Give me an overview of the `FrictionJoint2D` class in Unity.
FrictionJoint2D class in UnityEngine / Inherits from: AnchoredJoint2D / Implemented in: UnityEngine.Physics2DModule Description Applies both force and torque to reduce both the linear and angular velocities to zero. The joint constantly tries to reduce both the ::Rigidbody2D::velocity and ::Rigidbody2D::angul...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_225d11b1cdfe
unity_docs
ui
What is `SceneView.AddOverlayToActiveView` in Unity? Explain its purpose and usage.
SceneView.AddOverlayToActiveView Declaration public static void AddOverlayToActiveView (T overlay ); Parameters Parameter Description overlay The Overlay to add. Description Add an Overlay to be displayed in the last focused Scene View. Overlays added to this static list will be automatically moved to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_742621ed3a00
unity_docs
rendering
Show me a Unity C# example demonstrating `SkinnedMeshRenderer.vertexBufferTarget`.
rtexBufferTarget public GraphicsBuffer.Target vertexBufferTarget ; Description The intended target usage of the skinned mesh GPU vertex buffer. By default, skinned mesh renderer vertex buffers have GraphicsBuffer.Target.Vertex usage target. If you want to access the vertex buffer from a compute shader, add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4424400e841
unity_docs
math
What is `AI.NavMeshPath.corners` in Unity? Explain its purpose and usage.
NavMeshPath.corners public Vector3[] corners ; Description Corner points of the path. (Read Only) Also known as "waypoints", the corners define the places along a path where it changes direction (ie, the path consists of a number of straight-line moves between corners). ```csharp using UnityEngine; using Unity...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7462f10abb8f
unity_docs
editor
What is `SerializedProperty.GetFixedBufferElementAtIndex` in Unity? Explain its purpose and usage.
SerializedProperty.GetFixedBufferElementAtIndex Declaration public SerializedProperty GetFixedBufferElementAtIndex (int index ); Description Returns the element at the specified index in the fixed buffer. Additional resources: isFixedBuffer , fixedBufferSize . ```csharp using UnityEngine; using UnityEdito...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7df22c2895f
unity_docs
rendering
What is `Texture.isDataSRGB` in Unity? Explain its purpose and usage.
Texture.isDataSRGB public bool isDataSRGB ; Description Returns true if the texture pixel data is in sRGB color space (Read Only). This property describes whether the texture pixel data on disk, CPU memory, and GPU memory is in sRGB color space. Use GraphicsFormatUtility.IsSRGBFormat with Texture.graphicsF...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f3b70f927041
unity_docs
rendering
What is `U2D.SpriteAtlasExtensions.GetTextureSettings` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.GetTextureSettings Declaration public static U2D.SpriteAtlasTextureSettings GetTextureSettings ( U2D.SpriteAtlas spriteAtlas ); Description Current SpriteAtlasTextureSettings of the packed texture generated by this SpriteAtlas .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_95b911803a7d
unity_docs
animation
Explain 'Mecanim Animation system' in Unity.
The Mecanim Animation system is based on animation clips . An animation clip contains information about how a character or GameObject changes its position, rotation, or other properties over time. Think of each animation clip as a recording. An animation clip from an external source is created by an artist or animator ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7660d3a5c7e7
unity_docs
scripting
What is `RenderPickingType.RenderFromIgnoreSet` in Unity? Explain its purpose and usage.
RenderPickingType.RenderFromIgnoreSet Description The render picking callback is expected to render all GameObjects except for those contained in the ignore set. Additional resources: RenderPickingArgs.renderPickingType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee9b3a9d5579
unity_docs
ui
Give me an overview of the `GUILayout` class in Unity.
GUILayout class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description The GUILayout class is the interface for Unity gui with automatic layout. Additional resources: GUI Layout tutorial . Static Methods Method Description BeginArea Begin a GUILayout block of GUI controls in a fixed screen ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f084d5778222
unity_docs
rendering
What is `MaterialPropertyBlock.SetMatrix` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.SetMatrix Declaration public void SetMatrix (string name , Matrix4x4 value ); Declaration public void SetMatrix (int nameID , Matrix4x4 value ); Parameters Parameter Description name The name of the property. nameID The name ID of the property retrieved by Shader.PropertyT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_67015e8d0998
github
scripting
Write a Unity C# animation script for Bootloader
```csharp using Unity.Entities; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement; public class Bootloader : MonoBehaviour { protected EntityManager entitiymanager; protected Entity playerEntity; private void Start() { //Loading Player; Addre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8dfa58b9ddab
unity_docs
editor
What is `Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobWorkerMaximumCount` in Unity? Explain its purpose and usage.
JobsUtility.JobWorkerMaximumCount public static int JobWorkerMaximumCount ; Description Maximum number of worker threads available to the Unity JobQueue (Read Only). This property determines the maximum number of worker threads when you set the JobWorkerCount property. This value is read-only at runtime, but ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b513146d010
unity_docs
ui
What is `UIElements.NavigationCancelEvent` in Unity? Explain its purpose and usage.
NavigationCancelEvent class in UnityEngine.UIElements / Inherits from: UIElements.NavigationEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Event sent when the user presses the cancel button. Inherited Members Properties Property Description bubbles Returns whether this event typ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80821dc58e57
unity_docs
rendering
What are the parameters of `ImageConversion.EncodeNativeArrayToPNG` in Unity?
Description Encodes this native array into PNG format. This function returns a NativeArray<byte> which is the PNG data. You can store the encoded data as a file or send it over the network without further processing. This function does not work on any compressed format. The encoded PNG data will be ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74ad41941b08
unity_docs
math
Show me a Unity C# example demonstrating `Handles.DrawingScope`.
DrawingScope struct in UnityEditor Description Disposable helper struct for automatically setting and reverting Handles.color and/or Handles.matrix . This struct allows you to temporarily set the value of Handles.color and/or Handles.matrix inside of a block of code and automatically revert them to their p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a92e9d83b4a
unity_docs
scripting
What is `SettingsProvider.scope` in Unity? Explain its purpose and usage.
SettingsProvider.scope public SettingsScope scope ; Description Gets the Scope of the SettingsProvider. The Scope determines whether the SettingsProvider appears in the Preferences window ( SettingsScope.User ) or the Settings window ( SettingsScope.Project ).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8dee05c97670
unity_docs
scripting
What is `PlayerSettings.SplashScreen.background` in Unity? Explain its purpose and usage.
PlayerSettings.SplashScreen.background public static Sprite background ; Description The background Sprite that is shown in landscape mode. Also shown in portrait mode if backgroundPortrait is null.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bb53511f0e3
unity_docs
physics
What is `Ray2D` in Unity? Explain its purpose and usage.
Ray2D struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description A ray in 2D space. A ray is a line segment that extends from a point in space in a specified direction. Rays have a number of uses in Unity but the most common is probably raycasting . This technique involves tracing along the p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_963799be7c91
unity_docs
ui
Explain 'Pseudo-classes' in Unity.
A pseudo-class narrows a selector’s scope so it only matches elements when they enter a specific state. Append a pseudo-class to a simple selector to match specific elements when they’re in a specific state. For example, the following USS rule uses the :hover pseudo-class to change the color of Button elements when a u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad200239c2ff
unity_docs
math
What is `Tilemaps.Tilemap.GetTileFlags` in Unity? Explain its purpose and usage.
Tilemap.GetTileFlags Declaration public Tilemaps.TileFlags GetTileFlags ( Vector3Int position ); Parameters Parameter Description position Position of the Tile on the Tilemap . Returns TileFlags TileFlags from the Tile . Description Gets the TileFlags of the Tile at the given position.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a005c7925c3
unity_docs
scripting
Give me an overview of the `DurationUnit` class in Unity.
DurationUnit enumeration Description Describe the unit of a duration. Properties Property Description Fixed A fixed duration is a duration expressed in seconds. Normalized A normalized duration is a duration expressed in percentage.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_13c1b57256bc
unity_docs
audio
Explain 'Audio Normalize Effect' in Unity.
The Audio Normalize Effect applies a constant amount of gain to an audio stream to bring the average or peak amplitude to a target level. ## Properties Property: Function: Fade in time Fade in time of the effect in milliseconds (range 0 to 20000.0, default = 5000.0 milliseconds). Lowest volume (range 0.0 to 1.0, defa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fc7d77f68562
unity_docs
rendering
Explain 'Using the Universal Render Pipeline' in Unity.
The Universal Render Pipeline (URP) is a prebuilt Scriptable Render Pipeline , made by Unity. URP provides artist-friendly workflows that let you quickly and easily create optimized graphics across a range of platforms, from mobile to high-end consoles and PCs. Page Description Introduction to URP Learn about how URP c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf94495d2be7
unity_docs
scripting
Give me an overview of the `GUILayoutOption` class in Unity.
GUILayoutOption class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Class internally used to pass layout options into GUILayout functions. You don't use these directly, but construct them with the layouting functions in the GUILayout class. Additional resources: GUILayout.Width , GU...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3286e4aa3697
unity_docs
rendering
What is `Lightmapping.GIWorkflowMode` in Unity? Explain its purpose and usage.
GIWorkflowMode enumeration Description Workflow mode for lightmap baking. Default is Iterative. Properties Property Description Iterative This property is now obsolete. Use LightingSettings.autoGenerate. OnDemand This property is now obsolete. Use LightingSettings.autoGenerate. Legacy Deprecated 4.x lightmapp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd8e95543a57
unity_docs
scripting
What is `Camera.pixelHeight` in Unity? Explain its purpose and usage.
Camera.pixelHeight public int pixelHeight ; Description How tall is the camera in pixels (not accounting for dynamic resolution scaling) (Read Only). Use this to return the height of the Camera viewport is in pixels. This is read-only. ```csharp //Attach this script to an empty GameObject //Create a new Camer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b904a8c25f21
unity_docs
scripting
What is `Search.QueryEngineFilterAttribute.ctor` in Unity? Explain its purpose and usage.
QueryEngineFilterAttribute Constructor Declaration public QueryEngineFilterAttribute (string token , string[] supportedOperators ); Declaration public QueryEngineFilterAttribute (string token , stringComparison options , string[] supportedOperators ); Declaration public QueryEngineFilterAttribute (strin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e9a396048470
unity_docs
scripting
What are the parameters of `Search.PropertyDatabase.InvalidateMask` in Unity?
Description Invalidate all properties stored from multiple documents that match a document key mask. This operation is slower than the simpler PropertyDatabase.Invalidate since we cannot rely on a binary search to find all keys that match the mask. ``` // Store properties of multiple documents. for (ulong i = 0; i < 10...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6bfae7a6c67d
unity_docs
physics
In Unity's 'Character Controller component reference', what is 'Details' and how does it work?
The traditional Doom-style first person controls are not physically realistic. The character runs 90 miles per hour, comes to a halt immediately and turns on a dime. Because it is so unrealistic, use of Rigidbodies and physics to create this behavior is impractical and will feel wrong. The solution is the specialized C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1ff657f82d90
unity_docs
performance
What is `Profiling.HierarchyFrameDataView.GetItemCallstack` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.GetItemCallstack Declaration public void GetItemCallstack (int id , List<ulong> outCallstack ); Parameters Parameter Description id Hierarchy item identifier. outCallstack List filled with callstack pointers as a result of a method call. Description Gets the callstack associated w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_44d99b05bc77
unity_docs
scripting
What is `Android.AndroidProjectFilesModifierContext.AddFileToCopy` in Unity? Explain its purpose and usage.
AndroidProjectFilesModifierContext.AddFileToCopy Parameters Parameter Description source The path to a source file. This can be an absolute or relative path. If it's relative, the root of the path is the Unity project's root. destination The path to place the file copy. This is relative to the Gradle project ro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ac2f48042d7
unity_docs
scripting
Explain 'Move Light Probes at runtime' in Unity.
You might need to move Light Probes at runtime. For example, if you create a world by loading multiple scenes additively and then move each scene to a different position, you need to move the Light Probes with their related scene objects. You can use the LightProbes API to move Light Probes at runtime. You can’t move L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_02e8dd62f2b3_doc_8
github
scripting
What does `ResetActiveNewEntry` do in this Unity script? Explain its purpose and signature.
Resets state of the new entry input controls. Signature: ```csharp public static void ResetActiveNewEntry() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_bee95f13dfe8
unity_docs
input
What is `ProjectWindowCallback.EndNameEditAction.Action` in Unity? Explain its purpose and usage.
EndNameEditAction.Action Declaration public void Action (int instanceId , string pathName , string resourceFile ); Parameters Parameter Description instanceId The instance ID of the edited asset. pathName The path to the asset. resourceFile The resource file string argument passed to ProjectWindowUtil....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_dc36e5cc1fa9_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Gets the that has exactly one key/value entry.This property is exposed so that a list adaptor can be constructed todraw the 'Add Entry' controls. Signature: ```csharp public abstract OrderedDictionary Dictionary ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_29a1d84793ff
unity_docs
scripting
Show me a Unity code example for 'Create a custom asset pack'.
ack: src/main/assets . By default, the delivery mode is on-demand , which means that if you don’t change the delivery mode, you need to manually download the asset pack at runtime. For information on how to do this, refer to Manage asset packs at runtime . To use a different delivery mode, create a file called build.gr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a76e2936a12
unity_docs
rendering
What is `DefaultLightingExplorerExtension.Get2DLights` in Unity? Explain its purpose and usage.
DefaultLightingExplorerExtension.Get2DLights Declaration protected Object[] Get2DLights (); Returns Object[] Returns an array of 2D Lights. Description Gets an array of all 2D lights in the scene.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0ab7e3a97dfd
unity_docs
rendering
What is `TextureImporterPlatformSettings` in Unity? Explain its purpose and usage.
TextureImporterPlatformSettings class in UnityEditor Description Stores platform specifics settings of a TextureImporter . Additional resources: TextureImporter. Properties Property Description allowsAlphaSplitting Allows Alpha splitting on the imported texture when needed (for example ETC1 compression for t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90a76ea30978
unity_docs
editor
What is `EditorPrefs.HasKey` in Unity? Explain its purpose and usage.
EditorPrefs.HasKey Declaration public static bool HasKey (string key ); Parameters Parameter Description key Name of key to check for. Returns bool The existence or not of the key. Description Returns true if key exists in the preferences file. The preferences file is examined to identify whether ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8abe89a6aab
unity_docs
editor
What is `EditorGUILayout.EnumFlagsField` in Unity? Explain its purpose and usage.
EditorGUILayout.EnumFlagsField Declaration public static Enum EnumFlagsField (Enum enumValue , params GUILayoutOption[] options ); Declaration public static Enum EnumFlagsField (Enum enumValue , GUIStyle style , params GUILayoutOption[] options ); Declaration public static Enum EnumFlagsField (string ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_468f1aaf103b
unity_docs
ui
What is `UIElements.VisualElementFocusRing.ctor` in Unity? Explain its purpose and usage.
VisualElementFocusRing Constructor Declaration public VisualElementFocusRing ( UIElements.VisualElement root , UIElements.VisualElementFocusRing.DefaultFocusOrder dfo ); Parameters Parameter Description root The root of the element tree for which we want to build a focus ring. dfo Default ordering of t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5b904911b1d
unity_docs
rendering
What are the parameters of `VersionControl.IIconOverlayExtension.DrawOverlay` in Unity?
Description Draws icon overlay. Unity calls this method after drawing an asset icon. ```csharp using UnityEditor.VersionControl; using UnityEngine;[VersionControl("Custom")] public class CustomVersionControlObject : VersionControlObject, IIconOverlayExtension { static Texture2D s_Icon; static Texture2D GetIcon()...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_938b3b03e198_doc_1
github
scripting
What does `GetInstance` do in this Unity script? Explain its purpose and signature.
Returns existing singleton instance. If no singleton instances is register at the beginning of this method call then factory method is used to resolve proper instance. Thrown when factory method is unable to find or create singleton instance. Signature: ```csharp public static T GetInstance() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4279ea5dfb30
unity_docs
audio
Show me a Unity C# example demonstrating `Android.AndroidProjectFiles.SetManifestFile`.
ion path The file path to place the Manifest file at. This path is relative to the gradle project path. manifest The representation of Android Manifest file. Description Sets a new Android Manifest file. To use this method, you must also declare your new file in AndroidProjectFilesModifier.Setup using the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c42e9bcd12d
unity_docs
xr
What is `Font.GetCharacterInfo` in Unity? Explain its purpose and usage.
Font.GetCharacterInfo Declaration public bool GetCharacterInfo (char ch , out characterInfo info , int size = 0, FontStyle style = FontStyle.Normal); Parameters Parameter Description ch The character you need rendering information for. info Returns the CharacterInfo struct with the rendering informa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3cae3cf9df60
unity_docs
scripting
Give me an overview of the `FindObjectsSortMode` class in Unity.
FindObjectsSortMode enumeration Description Options to specify if and how to sort objects returned by a function. Properties Property Description None Don't sort the objects. InstanceID Sort the objects by InstanceID in ascending order.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cc0c1995daee
unity_docs
input
Explain 'Hash128Field' in Unity.
The Hash128Field lets users enter a Hash128 value in a UI. Note : To align an element with other fields in an Inspector window, simply apply the.unity-base-field__aligned USS class to it. For more information, refer to BaseField . ## Create a Hash128Field You can create a Hash128Field with UI Builder, UXML, or C#. Th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d3ed30fb9f8
unity_docs
physics
What are the parameters of `Compilation.CompilationPipeline.compilationFinished` in Unity?
Description An event that is invoked on the main thread when the compilation of assemblies finishes. CompilationPipeline.compilationFinished is called after the last CompilationPipeline.assemblyCompilationFinished event. You can use the context to match CompilationPipeline.compilationStarted and CompilationPipeline.com...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8a7d76f909f5
unity_docs
scripting
What is `Search.SearchColumnProviderAttribute` in Unity? Explain its purpose and usage.
SearchColumnProviderAttribute class in UnityEditor.Search Description The search column provider attribute is used to define new formats for a given column. Search column formats are equivalent to formats in a spreadsheet application. They define how the data in a column cell is manipulated and displayed. ```csh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95921682c177
unity_docs
math
What is `Experimental.GraphView.EdgeControl.ContainsPoint` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeControl.ContainsPoint Declaration public bool ContainsPoint ( Vector2 localPoint ); Parameters Parameter Description localPoint The point's position. Returns bool True if the point is on top of the edge. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c87711949c0
unity_docs
physics
In Unity's 'Physics 2D reference', what is 'General Settings tab' and how does it work?
The following are the properties available in the General Settings tab of the Physics 2D manager window. Property Function Gravity Set the amount of gravity applied to all Rigidbody 2D GameObjects. Usually you only set gravity for the negative direction of the y-axis. Default Material Set a reference to the Physics Mat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9d3eea752a66
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.RenderPipeline.BeginCameraRendering`.
Pipeline (HDRP), Unity calls this method automatically before performing rendering operations for an individual Camera. If you are writing a custom Scriptable Render Pipeline, you can call this method manually to use the RenderPipelineManager.beginCameraRendering delegate. The following code example demonstrates wher...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1be0e226117e
unity_docs
animation
What is `ModelImporterClipAnimation.curves` in Unity? Explain its purpose and usage.
ModelImporterClipAnimation.curves public ClipAnimationInfoCurve[] curves ; Description Additionnal curves that will be that will be added during the import process. They are automatically binded to the animator controller parameter that have the same name.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_aa32e63a03bf
unity_docs
ui
Explain 'Generate 2D visual content' in Unity.
You use the Mesh API or Vector API to generate 2D visual content onto a visual element. You can use the Mesh API to draws custom shapes. The Mesh API is a tool for advanced users. If you only want to generate simple geometry, use the Vector API instead. Inspired by HTML Canvas , the Vector API draws 2D vector graphics,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80249e802f6c
unity_docs
scripting
What are the parameters of `Handles.RotationHandle` in Unity?
Returns Quaternion The new rotation value modified by the user's interaction with the handle. If the user has not moved the handle, it will return the same value as you passed into the function. Description Make a Scene view rotation handle. This will behave like the built-in rotation tool in Unity. If you have assigne...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ada124cf7f3
unity_docs
animation
What is `Animations.AnimationClipPlayable.SetApplyFootIK` in Unity? Explain its purpose and usage.
AnimationClipPlayable.SetApplyFootIK Declaration public void SetApplyFootIK (bool value ); Parameters Parameter Description value The new value of the ApplyFootIK flag. Description Sets the value of the ApplyFootIK flag.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49e3c1682baf
unity_docs
math
What is `PlayerSettings.GetAdditionalCompilerArguments` in Unity? Explain its purpose and usage.
PlayerSettings.GetAdditionalCompilerArguments Declaration public static string[] GetAdditionalCompilerArguments ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description buildTarget The NamedBuildTarget to get the compiler arguments for. Returns string[] Returns an array with the compi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd92f09bb4a5
unity_docs
rendering
What is `U2D.SpriteAtlasExtensions.Add` in Unity? Explain its purpose and usage.
SpriteAtlasExtensions.Add Declaration public static void Add ( U2D.SpriteAtlas spriteAtlas , Object[] objects ); Parameters Parameter Description objects Array of Object to be packed into the atlas. Description Add an array of Assets to the packable objects list. At this moment, only Sprite , Texture2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d0e06be2c1d3
unity_docs
scripting
Show me a Unity code example for 'Introduction to instantiating prefabs'.
o instantiate a prefab at runtime, your code needs a reference to the prefab. To make this reference, you can create a public field of type GameObject in your code, then assign the prefab you want to use to this field in the Inspector . The following script example has a single public variable, myPrefab , which is a re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ad460649fe35_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Updates the SDK manifest file based on Signature: ```csharp public class UpdateManifestSetupStep : ISetupStep ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_7b68934b2268
unity_docs
ui
Show me a Unity C# example demonstrating `GUIUtility.GetControlID`.
GUIUtility.GetControlID Declaration public static int GetControlID ( FocusType focus ); Declaration public static int GetControlID ( FocusType focus , Rect position ); Description Get a unique ID for a control. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints a not used I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_65cfc1a68e21
unity_docs
scripting
What is `GameObject.transform` in Unity? Explain its purpose and usage.
GameObject.transform public Transform transform ; Description The Transform attached to the GameObject (Read Only). Every GameObject has a Transform component attached to it on creation, which cannot be removed. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { gameObjec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6cc1e20a4c29
unity_docs
editor
What is `Search.SearchDocument` in Unity? Explain its purpose and usage.
SearchDocument struct in UnityEditor.Search Description Represents a searchable document that has been indexed. Properties Property Description id Document unique ID in the search index. name Readable name of the document. score Document base relevance score. source Original source from which the document w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e1ec4565ca51
unity_docs
rendering
What is `Light.innerSpotAngle` in Unity? Explain its purpose and usage.
Light.innerSpotAngle public float innerSpotAngle ; Description The angle of the spot light's inner cone in degrees. This is only used for Spot lights. This only works with a Scriptable Render Pipeline.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_39fcff1d46e0
unity_docs
rendering
In Unity's 'Self-Illuminated Vertex-Lit', what is 'Vertex-Lit Properties' and how does it work?
Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader is Vertex-Lit , which is one of the simplest shaders. All lights shining on it are rendered in a single pass and calculated at vertices only. Because it is vertex-lit, it won’t display any pixel-based rendering effects, such as light c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cb615c5920cd
unity_docs
physics
In Unity's 'Set fixed timestep to optimize physics simulation frequency', what is 'Adjust fixed timestep' and how does it work?
Running multiple physics steps per frame can significantly affect performance. The fixed timestep value determines the interval at which the physics system updates its simulation. The default value of fixed timestep is 0.02 , which corresponds to 50 fixed updates per second (50 Hz). Game performance is negatively affec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2da2f72fade
unity_docs
physics
What is `Cloth.SetVirtualParticleWeights` in Unity? Explain its purpose and usage.
Cloth.SetVirtualParticleWeights Declaration public void SetVirtualParticleWeights (List<Vector3> weights ); Parameters Parameter Description weights List of weights to be used when setting virutal particles for cloth. Description Sets weights to be used when generating virtual particles for cloth. Virtua...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7a4f0ada0670
unity_docs
rendering
Explain 'Self-Illuminated Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Self-Illuminated Properties Note. Unity 5 introduced the Standard Shader which replaces this shader. This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the obje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d7ddcb51e8e
unity_docs
editor
What are the parameters of `Handles.Disc` in Unity?
Returns Quaternion The new rotation value modified by the user's interaction with the handle. If the user has not moved the handle, it will return the same value as you passed into the function. Description Make a 3D disc that can be dragged with the mouse. Note: Use HandleUtility.GetHandleSize where you might want to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb45703c06ca
unity_docs
rendering
What is `IHVImageFormatImporter.wrapModeW` in Unity? Explain its purpose and usage.
IHVImageFormatImporter.wrapModeW public TextureWrapMode wrapModeW ; Description Texture W coordinate wrapping mode for Texture3D . Controls wrapping mode along texture W (depth, only relevant for Texture3D ) axis. Additional resources: Texture.wrapModeW , wrapMode , texture assets .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_159d6f27ddca
unity_docs
scripting
What is `Debug.ExtractStackTraceNoAlloc` in Unity? Explain its purpose and usage.
Debug.ExtractStackTraceNoAlloc Declaration public static int ExtractStackTraceNoAlloc (byte* buffer , int bufferMax , string projectFolder ); Parameters Parameter Description buffer Target buffer to receive the callstack text bufferMax Max number of bytes to write projectFolder Project folder path, to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc044ff62a9e
unity_docs
rendering
Show me a Unity C# example demonstrating `ImageConversion.EncodeToEXR`.
-bit float EXR and can be controlled using the passed in flags. For the texture pass in, Texture.isReadable must be true . The encoded EXR data will only contain an alpha channel when the passed-in format has one. For single-channel red textures ( R8 , R16 , RFloat and RHalf ), the encoded data will be in gr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c54ada31bc5
unity_docs
rendering
What is `Graphics.DrawMeshInstancedIndirect` in Unity? Explain its purpose and usage.
Graphics.DrawMeshInstancedIndirect Declaration public static void DrawMeshInstancedIndirect ( Mesh mesh , int submeshIndex , Material material , Bounds bounds , ComputeBuffer bufferWithArgs , int argsOffset = 0, MaterialPropertyBlock properties = null, Rendering.ShadowCastingMode castShadows = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b35a3d4ca745
unity_docs
editor
What are the parameters of `EditorUtility.SaveFilePanelInProject` in Unity?
Returns string A string path to the saved file. If the dialog was canceled or the save failed, it returns an empty string. Description Displays the "save file" dialog in the Assets folder of the project and returns the selected path name. The returned string is always a project-relative path under the Assets folder. It...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_185072391f7b
unity_docs
rendering
Show me a Unity C# example demonstrating `Build.IPreprocessComputeShaders.OnProcessComputeShader`.
tion. Note that this callback only provides details of compute shaders. To see regular shaders that Unity is about to compile into the build, see IPreprocessShaders . This callback is invoked for both Player and AssetBundle builds. Additional resources: Shader variants and keywords , Declaring and using shader keyw...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9e5838ca8be
unity_docs
scripting
What is `Search.SearchMonitor.RaiseContentRefreshed` in Unity? Explain its purpose and usage.
SearchMonitor.RaiseContentRefreshed Declaration public static void RaiseContentRefreshed (string[] updated , string[] removed , string[] moved ); Parameters Parameter Description updated Assets that were updated. removed Assets that were removed. moved Assets that were moved. Description Mark content...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_685bb2f8a420
unity_docs
xr
What is `UnityEngine.UnityWebRequestAssetBundleModule` in Unity? Explain its purpose and usage.
UnityEngine.UnityWebRequestAssetBundleModule Description The UnityWebRequestAssetBundle module provides the DownloadHandlerAssetBundle class to use UnityWebRequest to download Asset Bundles. Classes Class Description DownloadHandlerAssetBundle A DownloadHandler subclass specialized for downloading AssetBundles. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdaceb9b4baa
unity_docs
editor
What is `Experimental.Licensing.EntitlementGroupInfo` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EntitlementGroupInfo class in UnityEditor.Experimental.Licensing Description Data structure for entitlement group information (often synonymous with a license file), accessed through EntitlementInfo .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_241298b3a6fb
unity_docs
editor
In Unity's 'Visualizing profiler counters', what is 'Add a custom module to the Profiler window' and how does it work?
Use the Profiler Module Editor to select built-in or newly added counters for the visualization. To open the Profiler Module Editor: Open the Profiler Window ( Window > Analysis > Profiler ). Select the Profiler Module dropdown in the top left of the window. Click the gear icon, and the Profiler Module Editor opens in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_095a2b080021
unity_docs
rendering
Explain 'Troubleshooting baked lightmaps' in Unity.
Solve common issues with baked lightmaps , such as hard edges or light bleeding. Page Description Smooth hard edges in lightmaps Use seam stitching to smooth unwanted hard edges in GameObjects . Fix light bleeding in lightmaps Add space between surfaces in lightmaps, to avoid issues such as aliasing and pixelation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_efe29faf6c6f
unity_docs
input
In Unity's 'Input', what is 'Additional resources and examples' and how does it work?
👥 Community : Join the conversation on Unity Discussions 📺 Video : Unity Input System in Unity 6 (1/7): Input Action Editor 📺 Video : Unity Input System in Unity 6 (2/7): Input System Scripting 📺 Video : Unity Input System in Unity 6 (3/7): Input System Mobile controls 📺 Video : Unity Input System in Unity 6 (4/7)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_182e56c2beb0
unity_docs
scripting
What is `UIElements.BaseListView.overMaxMultiEditLimitClassName` in Unity? Explain its purpose and usage.
BaseListView.overMaxMultiEditLimitClassName public static string overMaxMultiEditLimitClassName ; Description The USS class name for label displayed when ListView is trying to edit too many items. Unity adds this USS class to the label displayed if the ListView is trying to edit too many items at once.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d753d09f9298
unity_docs
scripting
Show me a Unity C# example demonstrating `Mesh.RecalculateBounds`.
lags.Default); Parameters Parameter Description flags Flags controlling the function behavior, see MeshUpdateFlags . Description Recalculate the bounding volume of the Mesh and all of its sub-meshes with the vertex data. After modifying vertices you should call this function to ensure the bounding volume is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca37f681d385
unity_docs
physics
What is `Rigidbody2D.sharedMaterial` in Unity? Explain its purpose and usage.
Rigidbody2D.sharedMaterial public PhysicsMaterial2D sharedMaterial ; Description The PhysicsMaterial2D that is applied to all Collider2D attached to this Rigidbody2D . The PhysicsMaterial2D specified here is applied to all attached Collider2D unless the Collider2D specify their own PhysicsMaterial...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_af43a9e8cbb0
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.RenameAsset`.
ewName ); Parameters Parameter Description pathName The path where the asset currently resides. newName The new name which should be given to the asset. Returns string An empty string, if the asset has been successfully renamed, otherwise an error message. Description Rename an asset file. All paths a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20657c0c353d
unity_docs
physics
Give me an overview of the `JointAngleLimits2D` class in Unity.
JointAngleLimits2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Angular limits on the rotation of a Rigidbody2D object around a HingeJoint2D. Additional resources: Rigidbody2D class, HingeJoint2D class. Properties Property Description max Upper angular limit of rotatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71097978ea66
unity_docs
performance
What is `ParticleSystemJobs.ParticleSystemJobData.randomSeeds` in Unity? Explain its purpose and usage.
ParticleSystemJobData.randomSeeds public NativeArray<uint> randomSeeds ; Description The random seed assigned to each particle. This value remains constant for each particle during the particle's lifetime.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6427cd3ee28
unity_docs
rendering
What is `Texture2D.GetPixelData` in Unity? Explain its purpose and usage.
Texture2D.GetPixelData Declaration public NativeArray<T> GetPixelData (int mipLevel ); Parameters Parameter Description mipLevel The mipmap level to read from. The range is 0 through the texture's Texture.mipmapCount . The default value is 0 . Returns NativeArray<T> A native array that points directl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c93599542da7
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchAction.closeWindowAfterExecution`.
SearchAction.closeWindowAfterExecution public bool closeWindowAfterExecution ; Description Indicates if the search view should be closed after the action execution. ``` new SearchAction("asset", "print_dependencies", new GUIContent("Print Dependencies", null, "Print all dependencies of an asset.")) { // If thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_535c4eb0cb4b
unity_docs
rendering
What is `LightTransport.PostProcessing.ReferenceProbePostProcessor.ConvolveRadianceToIrradiance` in Unity? Explain its purpose and usage.
ReferenceProbePostProcessor.ConvolveRadianceToIrradiance Declaration public bool ConvolveRadianceToIrradiance ( LightTransport.IDeviceContext context , BufferSlice<SphericalHarmonicsL2> radianceIn , BufferSlice<SphericalHarmonicsL2> irradianceOut , int probeCount ); Parameters Parameter Description contex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7a5a8905859
unity_docs
physics
What is `ClothSphereColliderPair.ctor` in Unity? Explain its purpose and usage.
ClothSphereColliderPair Constructor Declaration public ClothSphereColliderPair ( SphereCollider a ); Declaration public ClothSphereColliderPair ( SphereCollider a , SphereCollider b ); Parameters Parameter Description a The first SphereCollider of a ClothSphereColliderPair. b The second SphereCol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea4a41fec728
unity_docs
scripting
What is `Android.GetAssetPackStateAsyncOperation.states` in Unity? Explain its purpose and usage.
GetAssetPackStateAsyncOperation.states public AndroidAssetPackState[] states ; Description Gets the states of all Android asset packs that had their status checked by this operation. Until the operation is complete and GetAssetPackStateAsyncOperation.isDone returns true, this returns null. Read-only. Addition...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.