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_e7f75ea6fc34
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.multiplyDragByParticleSize`.
ParticleSystem.LimitVelocityOverLifetimeModule.multiplyDragByParticleSize public bool multiplyDragByParticleSize ; Description Adjust the amount of drag this module applies to particles, based on their sizes. Additional resources: ParticleSystem.LimitVelocityOverLifetimeModule.drag , ParticleSystem.LimitVelo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f96e388c5cbd
unity_docs
animation
What is `ModelImporterClipAnimation.maskType` in Unity? Explain its purpose and usage.
ModelImporterClipAnimation.maskType public ClipAnimationMaskType maskType ; Description Define mask type. A mask can be used to discard transform when importing a clip to reduce memory footprint for this clip.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fc9996a4a44a
unity_docs
rendering
Explain 'Light Modes' in Unity.
There are three Light Modes available in the Light Inspector : Baked: The direct and indirect lighting from these lights is baked into lightmaps , which can be a time-consuming process. There is no runtime cost to process these lights, however applying the resulting lightmaps to the scene does have a minor cost. Realti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_503c0f470ab7
unity_docs
rendering
What is `AssetImporters.AssetImportContext.GetReferenceToAssetMainObject` in Unity? Explain its purpose and usage.
AssetImportContext.GetReferenceToAssetMainObject Declaration public Object GetReferenceToAssetMainObject (string path ); Parameters Parameter Description path The location of the asset to get the reference from. Returns Object Returns the main asset instance if it exists and is already imported, returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29983fe85357
unity_docs
ui
What is `GUILayout.HorizontalScrollbar` in Unity? Explain its purpose and usage.
GUILayout.HorizontalScrollbar Declaration public static float HorizontalScrollbar (float value , float size , float leftValue , float rightValue , params GUILayoutOption[] options ); Declaration public static float HorizontalScrollbar (float value , float size , float leftValue , float rightValue , GUI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a1749b2e6f6
unity_docs
rendering
What is `Experimental.GlobalIllumination.LightDataGI.falloff` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LightDataGI.falloff public Experimental.GlobalIllumination.FalloffType falloff ; Description The falloff model to use for baking point and spot lights. Additional resources: FalloffType . NOTE: This only applies to the Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cdc4b01e8e55
unity_docs
rendering
What is `Experimental.ArtifactID` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ArtifactID struct in UnityEditor.Experimental Description Uniquely identifies a produced artifact such as an imported asset (e.g. result of importing a texture). Properties Property Description isValid True if this Artifact...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_491d0ebd8601
unity_docs
scripting
What is `Unity.Properties.IPropertyBag_1.CreateInstance` in Unity? Explain its purpose and usage.
IPropertyBag<T0>.CreateInstance Declaration public TContainer CreateInstance (); Returns TContainer A new instance of TContainer. Description Creates and returns a new instance of TContainer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b6b26ec41eea
unity_docs
rendering
Explain 'Access material properties in a script' in Unity.
Material properties are represented in C# code by the MaterialProperty class. To access variables defined in your HLSL code, you can call Material.GetFloat , Material.SetFloat . There are other, similar methods; see the Material API documentation for a full list. When you access HLSL variables using these APIs, it does...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_438b36b9a569
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.SetVertexBufferParams`.
you must ensure that the index buffer does not contain out-of-bounds indices, and that the SubMesh index range and bounds are updated via SetSubMesh . For information about the difference between the simpler and more advanced methods of assigning data to a Mesh from script, see the notes on the Mesh page. For detail...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35925afc3565
unity_docs
ui
What are the parameters of `SceneView.AddOverlayToActiveView` in Unity?
Description Add an Overlay to be displayed in the last focused Scene View. Overlays added to this static list will be automatically moved to the last active Scene View, and are displayed until removed. See also SceneView.RemoveOverlayFromActiveView . ```csharp using System; using System.Linq; using UnityEditor; using U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6017d77f75ba
unity_docs
editor
What is `EditorUserBuildSettings.buildAppBundle` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.buildAppBundle public static bool buildAppBundle ; Description Set to true to build an Android App Bundle (aab file) instead of an apk. The default value is false. This property is only applicable to builds for Google Play. You can also set this property in the Unity Editor using the Bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6024682597db
unity_docs
scripting
Show me a Unity C# example demonstrating `GL.LINES`.
n each pair of vertices passed. If you pass four vertices, A, B, C and D, two lines are drawn: one between A and B, and one between C and D. To set up the screen for drawing in 2D, use GL.LoadOrtho or GL.LoadPixelMatrix . To set up the screen for drawing in 3D, use GL.LoadIdentity followed by GL.MultMatrix with ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9faf5f145f9a
unity_docs
rendering
What is `TextureImporter.streamingMipmaps` in Unity? Explain its purpose and usage.
TextureImporter.streamingMipmaps public bool streamingMipmaps ; Description Enable mipmap streaming for this texture. When mipmap streaming is enabled, Unity will automatically load only the mipmap levels needed to render the Scene based on the current camera positions. Mipmap streaming must be enabled in ord...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b12658393cbf
unity_docs
editor
What is `VersionControl.Provider.AddIsValid` in Unity? Explain its purpose and usage.
Provider.AddIsValid Declaration public static bool AddIsValid ( VersionControl.AssetList assets ); Parameters Parameter Description assets List of assets to test. Description Given a list of assets this function returns true if Provider.Add is a valid task to perform on at least one of the assets in the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3f60a6e382e1_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
class SystemManagerObserverUtilsThe static class contains helper methods that are used wih SystemManagerObserver Signature: ```csharp public static class SystemManagerObserverUtils ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_a1a85a9ddfb5
unity_docs
editor
What is `Search.SearchContextAttribute.providerIds` in Unity? Explain its purpose and usage.
SearchContextAttribute.providerIds public string[] providerIds ; Description A list of Search Provider IDs that will be used to create the search context. ```csharp const string assetProviders = "adb;asset";[SearchContext("t:prefab", "expression;asset;scene", SearchViewFlags.GridView)] public GameObject prefab;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_716925eb74e8
unity_docs
rendering
What is `PlayerSettings.GetShaderChunkSizeInMBForPlatform` in Unity? Explain its purpose and usage.
PlayerSettings.GetShaderChunkSizeInMBForPlatform Declaration public static int GetShaderChunkSizeInMBForPlatform ( BuildTarget buildTarget ); Parameters Parameter Description buildTarget The build target to get the shader chunk size for. Description Gets the default size for compressed shader variant chu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ec46c51e7b9
unity_docs
editor
What is `PackageManager.PackOperationResult` in Unity? Explain its purpose and usage.
PackOperationResult class in UnityEditor.PackageManager Description Structure describing the result of a Client.Pack operation. Properties Property Description tarballPath The path to the file created by the Client.Pack operation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74fc57c4157b
unity_docs
editor
What are the parameters of `TypeCache.GetTypesWithAttribute` in Unity?
Returns TypeCollection Returns an unordered collection of types. If assemblyName is specified, returns only types defined in this assembly. Description Retrieves an unordered collection of types marked with the T attribute. This method provides fast access to all classes loaded from a given assembly or all Unity domain...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f95e56006af
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime.operator_` in Unity? Explain its purpose and usage.
DiscreteTime.Unknown operator public static Unity.IntegerTime.DiscreteTime Unknown operator ( Unity.IntegerTime.DiscreteTime lhs , Unity.IntegerTime.DiscreteTime rhs ); Description Returns the modulus of two time values.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_39d5a1cd8de9
unity_docs
math
What is `Matrix4x4.MultiplyPoint` in Unity? Explain its purpose and usage.
Matrix4x4.MultiplyPoint Declaration public Vector3 MultiplyPoint ( Vector3 point ); Description Transforms a position by this matrix (generic). Returns a position v transformed by the current fully arbitrary matrix. If the matrix is a regular 3D transformation matrix, it is much faster to use MultiplyPoi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2533c7d572a
unity_docs
performance
What is `Profiling.FrameDataView.GetMarkerName` in Unity? Explain its purpose and usage.
FrameDataView.GetMarkerName Declaration public string GetMarkerName (int markerId ); Parameters Parameter Description markerId Marker identifier. Returns string Returns marker name. Returns null if identifier is unknown. Description Gets Profiler marker name for the specific marker identifier. The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb3545895a36
unity_docs
physics
What is `Rendering.RayTracingInstanceTriangleCullingConfig.forceDoubleSided` in Unity? Explain its purpose and usage.
RayTracingInstanceTriangleCullingConfig.forceDoubleSided public bool forceDoubleSided ; Description Disables triangle culling when rays encounter geometries during acceleration structure traversal on the GPU. All other options that affect triangle culling are ignored. Additional resources: RayTracingAccelerati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12e0709de0f6
unity_docs
rendering
What is `Rendering.GraphicsSettings.GetShaderMode` in Unity? Explain its purpose and usage.
GraphicsSettings.GetShaderMode Declaration public static Rendering.BuiltinShaderMode GetShaderMode ( Rendering.BuiltinShaderType type ); Parameters Parameter Description type Built-in shader type to query. Returns BuiltinShaderMode Mode used for built-in shader. Description Get built-in shader mod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3947cf738bbc
unity_docs
rendering
What is `Graphics.DrawProceduralIndirect` in Unity? Explain its purpose and usage.
Graphics.DrawProceduralIndirect Declaration public static void DrawProceduralIndirect ( Material material , Bounds bounds , MeshTopology topology , GraphicsBuffer bufferWithArgs , int argsOffset , Camera camera , MaterialPropertyBlock properties , Rendering.ShadowCastingMode castShadows , bool ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f54bdc2d9102
unity_docs
scripting
What is `Search.Dispatcher.Enqueue` in Unity? Explain its purpose and usage.
Dispatcher.Enqueue Declaration public static void Enqueue ( Unity.Android.Gradle.Manifest.Action action ); Declaration public static void Enqueue ( Unity.Android.Gradle.Manifest.Action action , double delayInSeconds ); Parameters Parameter Description action Action to be executed in the main thread l...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab9cd4fab80a
unity_docs
scripting
What are the parameters of `Application.RequestAdvertisingIdentifierAsync` in Unity?
Returns bool Returns true if successful, and false for platforms which do not support Advertising Identifiers. In this case, the delegate method is not invoked. Description Request an advertising ID for iOS and UWP. ```csharp using System; using UnityEngine;public class SampleBehaviour : MonoBehaviour { public void...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8024e3d0075f
unity_docs
performance
What is `Profiling.Profiler.GetCategoriesCount` in Unity? Explain its purpose and usage.
Profiler.GetCategoriesCount Declaration public static uint GetCategoriesCount (); Returns uint Returns number of ProfilerCategory registered in Profiler. Description Returns number of ProfilerCategory registered in Profiler. Returns a total number of ProfilerCategory registered in the Profiler. Can ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68c5564eadb9
unity_docs
editor
What is `MPE.ProcessService.Terminate` in Unity? Explain its purpose and usage.
ProcessService.Terminate Declaration public static void Terminate (int pid ); Parameters Parameter Description pid The process ID of the process to terminate. Description Terminates an editor process.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_637b7d32b01f
unity_docs
editor
What are the parameters of `EditorUserBuildSettings.SwitchActiveBuildTargetAsync` in Unity?
Returns bool True if the build target was successfully switched, false otherwise (for example, if license checks fail, files are missing, or if the user has cancelled the operation via the UI). Description Select a new build target to be active during the next Editor update. Changes the active build target to the speci...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c800e4710860
github
scripting
Write a Unity C# MonoBehaviour script called Demo Manager
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; namespace PlainSaveLoad { public class DemoManager : MonoBehaviour { public List<GameObject> brawlers; public GlobalPersistentDataManager gdm; public List<GameObject> GetListOfE...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_fa29becc3364
unity_docs
scripting
What is `ObjectChangeEventStream.Builder.Dispose` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.Builder.Dispose Declaration public void Dispose (); Description Releases the memory associated with this instance. Note: This does not affect any ObjectChangeEventStream instances that were constructed with this builder.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb1092d2af27
unity_docs
scripting
What is `Experimental.GraphView.StackNode.DragEnter` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. StackNode.DragEnter Declaration public bool DragEnter ( UIElements.DragEnterEvent evt , IEnumerable<ISelectable> selection , Experimental.GraphView.IDropTarget enteredTarget , Experimental.GraphView.ISelection dragSource...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd6076833d3b
unity_docs
scripting
What is `Unity.Hierarchy.HierarchyPropertyDescriptor` in Unity? Explain its purpose and usage.
HierarchyPropertyDescriptor struct in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Description Describes the type and size of a Hierarchy Property. Properties Property Description Size The size of the property in bytes. Type The storage type of the property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b379ffbae82b
unity_docs
scripting
What is `ILogger.LogException` in Unity? Explain its purpose and usage.
ILogger.LogException Declaration public void LogException (Exception exception ); Description A variant of ILogger.Log that logs an exception message. Additional resources: Logger.LogException .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e2172a4e688a
unity_docs
physics
Show me a Unity code example for 'Configure a particle trigger'.
formation, such as which Collider each particle triggered. The Collider Query Mode property controls what information is available through this parameter. For more information on the API and how to use it, see the below example . ## Interaction with a collider The example below causes particles to turn red as they en...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a2b5dec0f9fc
unity_docs
editor
What are the parameters of `Search.SearchIndexer.AddExactWord` in Unity?
Description Adds a new word coming from a document to the index. The word is added with multiple variations allowing partial search. ```csharp using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_SearchIndexer_AddExactWord { [MenuItem("Examples/SearchIndexer/AddEx...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca0a0e9f8770
unity_docs
scripting
Show me a Unity C# example demonstrating `ContextMenu.ctor`.
g of the menu items (defaults to 1000000). The lower the number the earlier in the menu it will appear. Description Adds the function to the context menu of the component. In the inspector of the attached script. When the user selects the context menu, the function will be executed. This is most useful for automatic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_516b6c40a1d0
unity_docs
performance
Explain 'Introduction to NativeContainer' in Unity.
NativeContainer is a thread-safe C# wrapper for native memory. NativeContainer objects also allow a job to access data shared with the main thread rather than working with a copy. ## Types of NativeContainers The Unity.Collections namespace contains the following built-in NativeContainer objects: NativeArray : An unm...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56e94755d522
unity_docs
scripting
What is `Rendering.ColorWriteMask` in Unity? Explain its purpose and usage.
ColorWriteMask enumeration Description Specifies which color components will get written into the target framebuffer. Properties Property Description Alpha Write alpha component. Blue Write blue component. Green Write green component. Red Write red component. All Write all components (R, G, B and Alpha).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_57ca9c0e1db2
unity_docs
ui
In Unity's 'Create a custom binding to bind USS selectors', what is 'Create a custom binding type' and how does it work?
Create a custom binding type that assigns USS classes based on the sibling index. The binding updates only when the sibling index changes. Create a project in Unity with any template. In the Assets folder of your project, create a C# script named AddMenuUSSClass.cs with the following content: ```csharp using UnityEngin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92b80ed26992
unity_docs
math
Show me a Unity C# example demonstrating `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCpyReplicate`.
es memory from a source to a destination and replicates it multiple times. The MemCpyReplicate method copies a specified block of memory from a source location and replicates that block multiple times into a destination location. This is useful for quickly initializing a large buffer with repeated values, such as se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d2546b6bd9a
unity_docs
scripting
What are the parameters of `HandleUtility.AddControl` in Unity?
Description Record a distance measurement from a handle. All handles call this with their controlID during layout, then use nearestControl to check if they got the mouseDown. ```csharp using UnityEngine; using UnityEditor; public class ExampleScript : MonoBehaviour { public float value = 1.0f; } // A tiny custom ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f5d7da71b6d
unity_docs
rendering
What is `Rendering.GraphicsSettings.logWhenShaderIsCompiled` in Unity? Explain its purpose and usage.
GraphicsSettings.logWhenShaderIsCompiled public static bool logWhenShaderIsCompiled ; Description If this is true, a log entry is made each time a shader is compiled at application runtime. Setting this property allows the application to turn shader compilation logging on or off at application runtime. Each log...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1dadcec39239
unity_docs
xr
What is `UnityEngine.UnityWebRequestWWWModule` in Unity? Explain its purpose and usage.
UnityEngine.UnityWebRequestWWWModule Description The UnityWebRequestWWW module implements the legacy WWW lets you communicate with http services. It is recommended to use UnityWebRequest directly for new code.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cbd1f5a293aa
unity_docs
editor
What is `CustomPropertyDrawer` in Unity? Explain its purpose and usage.
CustomPropertyDrawer class in UnityEditor Description Tells a custom PropertyDrawer or DecoratorDrawer which run-time Serializable class or PropertyAttribute it's a drawer for. When you make a custom PropertyDrawer or DecoratorDrawer , you need put this attribute on the drawer class. If the drawer is for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9324251abb77
unity_docs
scripting
What is `UIElements.CollectionVirtualizationMethod.FixedHeight` in Unity? Explain its purpose and usage.
CollectionVirtualizationMethod.FixedHeight Description Collection view won't wait for the layout to update items, as the all have the same height. fixedItemHeight Needs to be set. More performant but less flexible.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_492ca47d5361
unity_docs
scripting
Show me a Unity C# example demonstrating `Input.GetButtonUp`.
ts. For new projects, use the Input System package. To learn more about input, refer to Input . Call this function from the Update function, since the state gets reset each frame. It will not return true until the user has pressed the button and released it again. Use this only when implementing action like events I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad9b5ffac3c2
unity_docs
ui
Show me a Unity C# example demonstrating `EnumButtonsAttribute`.
EnumButtonsAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Attribute to enable editing an enum with a ToggleButtonGroup . ```csharp using System; using System.Collections.Generic; using UnityEngine; public enum Position { First, Second...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b25e3b788bb2
unity_docs
xr
What is `ShaderUtil.RestoreAsyncCompilation` in Unity? Explain its purpose and usage.
ShaderUtil.RestoreAsyncCompilation Declaration public static void RestoreAsyncCompilation ( Rendering.CommandBuffer cmd ); Parameters Parameter Description cmd Target CommandBuffer. Description Restores the previous Shader compilation mode in this CommandBuffer scope. The Editor compiles Shader Variants ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ba57091635e3
unity_docs
scripting
Show me a Unity C# example demonstrating `Handles.CircleHandleCap`.
iption Draw a circle handle. Pass this into handle functions. On EventType.Layout event, calculates handle distance to mouse and calls HandleUtility.AddControl accordingly. On EventType.Repaint event, draws the handle shape. Circle Handle Cap in the Scene View. Add the following script to your Assets folder as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e88aa342a4c2
github
scripting
Write a Unity C# script called Voice System Manager
```csharp // // /*=============================================================================== // // Copyright (C) 2024 PhantomsXR Ltd. All Rights Reserved. // // // // This file is part of the Assembly-CSharp. // // // // The Nin1 cannot be copied, distributed, or made available to // // third-parties for commercia...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0d82250b13ac
unity_docs
scripting
What is `Advertisements.AdvertisementSettings.GetPlatformGameId` in Unity? Explain its purpose and usage.
AdvertisementSettings.GetPlatformGameId Declaration public static string GetPlatformGameId (string platformName ); Returns string The platform specific game identifier. Description Gets the game identifier specified for a runtime platform.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2ade3349f4cd
unity_docs
scripting
In Unity's 'Deploy a Web application', what is 'Compression Format' and how does it work?
Choose the compression type from the Web Player Settings window (menu: Edit > Project Settings > Player , then select Web and expand the Publishing Settings section): Compression method Description gzip This is the default option. Gzip files are bigger than Brotli files, but faster to build, and natively supported by a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b904cb597128
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayoutUtility.GetRect`.
dditional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns Rect A rectangle that is large enough to contain content when rendered in style. Description Reserve la...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_103347a59c12_doc_13
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores the behavior that will be used to configure locomotion control schemes and configuration preferences. Signature: ```csharp public LocomotionSchemeManager manager ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_7380f00b76fc
unity_docs
math
Show me a Unity C# example demonstrating `AnimationCurve.ctor`.
public AnimationCurve (params Keyframe[] keys ); Parameters Parameter Description keys An array of Keyframes used to define the curve. Description Creates an animation curve from an arbitrary number of keyframes. This creates a curve from variable number of Keyframe parameters. If you want to create curve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_493d23abf067
unity_docs
audio
In Unity's 'Introduction to the Unity web request APIs', what is 'Architecture' and how does it work?
The Unity web request system consists of two layers: A High-Level API (HLAPI) wraps the low-level API and provides a convenient interface for common operations. A Low-Level API (LLAPI) provides maximum flexibility for more advanced oeprations. The system breaks down an HTTP transaction into the following operations: Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b918a7404fd5
unity_docs
editor
What is `Presets.Preset.excludedProperties` in Unity? Explain its purpose and usage.
Preset.excludedProperties public string[] excludedProperties ; Description List of properties to ignore when applying the Preset to an object. Sets the list of properties or parent properties to ignore when applying the Preset to an object. ```csharp using UnityEngine; using UnityEditor.Presets;static class Pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7f5a76e2bb45
unity_docs
editor
In Unity's 'Load UXML and USS C# scripts', what is 'Use serialization references' and how does it work?
Unity automatically detect fields from your C# scripts which are of type VisualTreeAsset or StyleSheet . You can use the Inspector to set references to specific UXML or USS files imported in your project. Such references remain valid even when the location of your assets change in your project. There are three ways to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f9cc4cb05bf
unity_docs
ui
What is `UIElements.VisualElement.Sort` in Unity? Explain its purpose and usage.
VisualElement.Sort Declaration public void Sort (Comparison<VisualElement> comp ); Parameters Parameter Description comp The sorting criteria. Description Reorders child elements from this VisualElement contentContainer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62606d05acbe
unity_docs
editor
What is `EditorUtility.SaveFolderPanel` in Unity? Explain its purpose and usage.
EditorUtility.SaveFolderPanel Declaration public static string SaveFolderPanel (string title , string folder , string defaultName ); Description Displays the "save folder" dialog and returns the selected path name. Additional resources: SaveFilePanel , OpenFilePanel functions. Save Folder Panel. ```csha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36c35a75d41b
unity_docs
scripting
What is `ParticleSystem.MinMaxGradient` in Unity? Explain its purpose and usage.
MinMaxGradient struct in UnityEngine / Implemented in: UnityEngine.ParticleSystemModule Description Script interface for a Min-Max Gradient. This contains two Gradient s, and returns a Color based on ParticleSystem.MinMaxGradient.mode . Depending on the mode, this may return the value randomized. Gradients...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2491351e401f
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.ExternalForcesModule.SetInfluence`.
nce (int index , ParticleSystemForceField field ); Parameters Parameter Description index Index to assign the Force Field. field Force Field that to assign. Description Assigns the Force Field at the given index in the influencers list. When influenceFilter is set to ParticleSystemGameObjectFilter.Li...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c05be6591c57
unity_docs
xr
In Unity's 'Scripting API for packages', what is 'Embedding a package in the project' and how does it work?
This example demonstrates how to use the Client class to embed one of the packages already installed in your project. The main method is the Client.Embed method, which makes a copy of the package and stores it under the Packages folder of your project. The Client.Embed method returns an EmbedRequest instance. Use the E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_472054bb08d6
unity_docs
rendering
In Unity's 'Lightmapping settings in the Lighting Settings Asset reference', what is 'Statistics' and how does it work?
The panel below the Generate Lighting button shows statistics about the lightmapping, including: The number of lightmaps that Unity has created Memory Usage: The amount of memory required for the current lightmapping. Occupied Texels : The number of texels that are occupied in lightmap UV space. Converged : All calcula...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34d80a57affb
unity_docs
math
Show me a Unity C# example demonstrating `Search.IQueryEngineFilter.AddTypeParser`.
This contains the success flag, and the actual converted value if it succeeded. Returns IQueryEngineFilter The current filter. Description Add a type parser specific to the filter. Add a type parser specific to the filter that parses a string and returns a custom type. Used by custom operator handlers. This ty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aa5cfd962a18
unity_docs
input
What is `AI.NavMeshBuildSource.sourceObject` in Unity? Explain its purpose and usage.
NavMeshBuildSource.sourceObject public Object sourceObject ; Description Describes the object referenced for Mesh and Terrain types of input sources. Used only for the types: Mesh and TerrainData .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59bee1a2291f
unity_docs
scripting
What is `VideoClipImporter.SetTargetSettings` in Unity? Explain its purpose and usage.
VideoClipImporter.SetTargetSettings Declaration public void SetTargetSettings (string platform , VideoImporterTargetSettings settings ); Parameters Parameter Description platform Platform name. settings The new platform-specific import settings. Throws an exception if the platform is unknown. Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_882e7f0ca388
unity_docs
scripting
What is `SceneVisibilityManager.IsPickingDisabledOnAnyDescendant` in Unity? Explain its purpose and usage.
SceneVisibilityManager.IsPickingDisabledOnAnyDescendant Declaration public bool IsPickingDisabledOnAnyDescendant ( SceneManagement.Scene scene ); Parameters Parameter Description scene Scene to check. Returns bool Returns true when at least one descendant with picking disabled is found. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e18636625fba
unity_docs
scripting
What are the parameters of `Animator.SetIKPosition` in Unity?
Description Sets the position of an IK goal. An IK goal is a target position and rotation for a specific body part. Unity can calculate how to move the part toward the target from the starting point (ie, the current position and rotation obtained from the animation). This function sets the position of the ultimate goal...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_69081eebe69d
github
scripting
Write a Unity C# MonoBehaviour script called Component Test5
```csharp using UnityEngine; public class ComponentTest5 : MonoBehaviourExtended, ITest { [ReferencePoint] public GameObject go; [ReferencePoint] public GameObject go2; [ReferencePoint] public GameObject go3; [Component] private Inventory inventory; private void Start() { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9b2e8692b6b8
unity_docs
rendering
In Unity's 'Global cache', what is 'Structure' and how does it work?
The Package Manager global cache uses subsidiary caches, each serving a different purpose. The Package Manager stores these subsidiary caches in subfolders under the folder of the global cache: Subfolder Description db Registry data cache used for storing package content and metadata. git-lfs Contains downloaded Git La...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7c629ae9211
unity_docs
scripting
What is `PlayerSettings.GetCaptureStartupLogs` in Unity? Explain its purpose and usage.
PlayerSettings.GetCaptureStartupLogs Declaration public static bool GetCaptureStartupLogs ( Build.NamedBuildTarget buildTarget ); Parameters Parameter Description namedBuildTarget Named build target Returns bool A boolean indicating whether the supplied NamedBuildTarget should capture startup logs D...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e770e4ea46ee
github
scripting
Write a Unity Editor script for Set Sdk Folder Setup Step
```csharp #region using System; using System.IO; using System.Linq; using MagicLeap.SetupTool.Editor.Interfaces; using MagicLeap.SetupTool.Editor.Utilities; using UnityEditor; using UnityEngine; #endregion namespace MagicLeap.SetupTool.Editor.Setup { /// <summary> /// Sets the Magic Leap 2 SDK folder in the...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_a3dbbce5ebb6
unity_docs
rendering
Explain 'Light Probes reference' in Unity.
## Light Probe component Inspector window reference Property Function Remove Ringing When this property is enabled, Unity automatically removes Light Probe ringing from the Scene . For more information, refer to Ringing . ## Edit Light Probe Group tool reference Property Function Show Wireframe When this property is...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_793a686b40e7
unity_docs
rendering
In Unity's 'Upgrade to Unity 2023.1', what is 'Gaussian Filter Radius properties from LightingSettings are now floating point values' and how does it work?
The Progressive Lightmapper includes a Gaussian option among its Advanced filtering options ( Lighting Window > Lightmapping Settings > Filtering > Direct Filter > Gaussian ). The Radius control for Gaussian filtering now supports decimal increments, such as 0.5. Previously, this control only supported integer steps (1...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f35f044abae7
unity_docs
rendering
What is `LineRenderer.generateLightingData` in Unity? Explain its purpose and usage.
LineRenderer.generateLightingData public bool generateLightingData ; Description Configures a line to generate Normals and Tangents. With this data, Scene lighting can affect the line via Normal Maps and the Unity Standard Shader, or your own custom-built Shaders. ```csharp using UnityEngine; using System.Coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e8a2352b784c
unity_docs
scripting
Explain 'Configure mesh LOD' in Unity.
To configure LOD , you must have a GameObject with a LOD Group component. The LOD Group component provides controls to define how LOD behaves on this GameObject, and references the GameObjects that Unity shows or hides for each LOD level. See LOD Group for details on the properties in this component. You can set up LOD...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_1724f442d80c_doc_6
github
scripting
What does `ExportAllCanvases` do in this Unity script? Explain its purpose and signature.
Filters and returns geometry in a convenient format for export. Signature: ```csharp public static List<ExportCanvas> ExportAllCanvases() ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_d267edb4597e
unity_docs
ui
What is `UIElements.VisualElement.Index_operator` in Unity? Explain its purpose and usage.
VisualElement.this[int] public UIElements.VisualElement this[int] ; Parameters Parameter Description key The index of the element. Description Retrieves the child element at a specific index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_91274674e1ed
unity_docs
math
Explain 'BoundsIntField' in Unity.
The BoundsIntField lets users enter a BoundsInt 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 BoundsIntField You can create a BoundsIntField with UI Builder, UXML, o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d16e58f41b8
unity_docs
editor
Give me an overview of the `GizmoUtility` class in Unity.
GizmoUtility class in UnityEditor Description A static class for interacting with the Scene View icons and gizmos for types. ```csharp using System; using UnityEditor; using UnityEngine; // An Editor Window that lets you edit the gizmo and icon properties for each selected component. public class GizmoUtilityExa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fbd54fb9ddfe
github
scripting
Write a Unity C# XR/VR script for Text Measure Script
```csharp // Copyright 2020 The Tilt Brush Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_31d72bc4baff
unity_docs
scripting
What is `SceneManagement.EditorSceneManager.NewSceneCreatedCallback` in Unity? Explain its purpose and usage.
EditorSceneManager.NewSceneCreatedCallback Declaration public delegate void NewSceneCreatedCallback ( SceneManagement.Scene scene , SceneManagement.NewSceneSetup setup , SceneManagement.NewSceneMode mode ); Parameters Parameter Description scene The Scene that was created. setup The setup mode used ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f6ec9ebe107
unity_docs
scripting
What is `HashUnsafeUtilities` in Unity? Explain its purpose and usage.
HashUnsafeUtilities class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Utilities to compute hashes with unsafe code. Static Methods Method Description ComputeHash128 Compute a 128 bit hash based on a data.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0fea73368be6
unity_docs
rendering
What is `Rendering.BuiltinRenderTextureType.GBuffer0` in Unity? Explain its purpose and usage.
BuiltinRenderTextureType.GBuffer0 Description Deferred shading G-buffer #0 (typically diffuse color). Built-in deferred shaders put diffuse albedo color into RGB channels of this texture. But your own custom shaders could be outputting anything there of course. Additional resources: CommandBuffer .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00113207e536
unity_docs
scripting
What is `UIElements.DropdownMenu.PrepareForDisplay` in Unity? Explain its purpose and usage.
DropdownMenu.PrepareForDisplay Declaration public void PrepareForDisplay ( UIElements.EventBase e ); Parameters Parameter Description e The source event. Description Gets the status of all items by calling their status callback and removes the excess separators. Called before the menu is displayed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b9ec53e3a9e
unity_docs
rendering
What is `Application.RequestUserAuthorization` in Unity? Explain its purpose and usage.
Application.RequestUserAuthorization Declaration public static AsyncOperation RequestUserAuthorization ( UserAuthorization mode ); Description Request authorization to use the webcam or microphone on iOS, and the webcam only on WebGL. Application.RequestUserAuthorization is called to request permission for...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6555b2e5c7b7
unity_docs
scripting
What is `Pool.DictionaryPool_2` in Unity? Explain its purpose and usage.
DictionaryPool<T0,T1> class in UnityEngine.Pool / Inherits from: Pool.CollectionPool_2 / Implemented in: UnityEngine.CoreModule Description A version of CollectionPool<T0,T1> for Dictionaries. ```csharp using UnityEngine.Pool;public class Example { void GetPooled() { // Get a pooled instance var instanc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e12b45bf3c5c
unity_docs
rendering
What is `ParticleSystem.totalTime` in Unity? Explain its purpose and usage.
ParticleSystem.totalTime public float totalTime ; Description Total playback time in seconds, including the Start Delay setting. Use this to read the current playback time. For looping systems, the returned value is not wrapped within the duration, unlike ParticleSystem.time . Additional resources: ParticleS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9ba75ddfbd4e
unity_docs
scripting
What is `UIElements.DataBinding.uiToSourceConverters` in Unity? Explain its purpose and usage.
DataBinding.uiToSourceConverters public UIElements.ConverterGroup uiToSourceConverters ; Description Returns the ConverterGroup used when trying to convert data from a UI property back to the data source.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4980e2ccaaf5
unity_docs
physics
What is `CircleCollider2D.center` in Unity? Explain its purpose and usage.
Removed CircleCollider2D.center Obsolete CircleCollider2D.center has been deprecated. Use CircleCollider2D.offset instead. Upgrade to offset public Vector2 center ; Description The center point of the collider in local space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72ec80c6f6c2
unity_docs
scripting
What is `ParticleSystem.MainModule.ringBufferMode` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.ringBufferMode public ParticleSystemRingBufferMode ringBufferMode ; Description Configure the Particle System to not kill its particles when their lifetimes are exceeded. Rather than using the particle lifetimes to kill particles, the system replaces particles with new ones when the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e261824cf840
unity_docs
physics
What is `Handheld.Vibrate` in Unity? Explain its purpose and usage.
Handheld.Vibrate Declaration public static void Vibrate (); Description Triggers device vibration. Note: Duration of vibration is determined by the operating system of the target platform. To configure advanced vibration settings, use platform specific libraries. ```csharp using UnityEngine; using System.Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_941f8e16cdfa
unity_docs
rendering
Explain 'iOS authorizations in Unity' in Unity.
Apple’s operating system requires applications to request authorization before accessing sensitive information or device features. If your application requires access to features such as the device’s camera , microphone, or location, the device user must grant access to your application. For more information on request...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2fbdac73ebcd
unity_docs
math
Show me a Unity C# example demonstrating `Rect.center`.
Rect.center public Vector2 center ; Description The position of the center of the rectangle. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { Rect rect = new Rect(0, 0, 100, 100); print(rect.center); rect.center = new Vector2(10, 10); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7c6e834873b7
unity_docs
xr
In Unity's 'Scoped registry authentication', what is 'Examples of .npmrc files' and how does it work?
This is an example of an.npmrc file containing an _authToken attribute: ``` registry=https://example.com:1234/mylocation/ //example.com:1234/mylocation/:_authToken=<AUTH TOKEN> ``` This is an example of an.npmrc file containing an _auth attribute: ``` registry=https://example.com:1234/mylocation _auth=<AUTH TOKEN> emai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22dce74f06a1
unity_docs
editor
What is `HandleUtility.DistancePointBezier` in Unity? Explain its purpose and usage.
HandleUtility.DistancePointBezier Declaration public static float DistancePointBezier ( Vector3 point , Vector3 startPosition , Vector3 endPosition , Vector3 startTangent , Vector3 endTangent ); Description Calculate distance between a point and a Bezier curve. Additional resources: Handles.DrawB...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.