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_d2e9ba00b7ec
unity_docs
animation
Show me a Unity C# example demonstrating `Time.captureDeltaTime`.
and the duration of a frame. This is useful if you want to capture a movie where you need a constant frame rate and want to leave enough time between frames to save screen images. Note: captureDeltaTime does not have any affect on Time.unscaledTime . Therefore, if parts of your application rely on it for animation...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c78864fb3aac_doc_2
github
scripting
What does `WaitBeforeDropping_Coroutine` do in this Unity script? Explain its purpose and signature.
Wait before falling. Signature: ```csharp private IEnumerator WaitBeforeDropping_Coroutine(float fadeDuration) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2edca56967b9
unity_docs
animation
What is `ModelImporter.animationRotationError` in Unity? Explain its purpose and usage.
ModelImporter.animationRotationError public float animationRotationError ; Description Allowed error of animation rotation compression. Allowed error is defined in angle (in degrees) between compressed and original quaternions on a curve. This settings used only when animation keyframe reduction is enabled. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e8f6ed12050e
unity_docs
math
What is `Search.QueryEngine_1.SetSearchWordMatcher` in Unity? Explain its purpose and usage.
QueryEngine<T0>.SetSearchWordMatcher Declaration public void SetSearchWordMatcher (Func<string,bool,stringComparison,string,bool> wordMatcher ); Parameters Parameter Description wordMatcher The search word matching function. The first parameter is the search word. The second parameter is a boolean for exact ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87f669a863e5
unity_docs
ui
What is `UIElements.VisualElement.Hierarchy` in Unity? Explain its purpose and usage.
Hierarchy struct in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Hierarchy is a struct allowing access to the hierarchy of visual elements Properties Property Description childCount Number of child elements in this object's contentContainer parent The physical pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4996bfcf4498
unity_docs
scripting
What is `Unity.Properties.PropertyVisitor` in Unity? Explain its purpose and usage.
PropertyVisitor class in Unity.Properties / Implemented in: UnityEngine.PropertiesModule Implements interfaces: ICollectionPropertyVisitor , IDictionaryPropertyBagVisitor , IDictionaryPropertyVisitor , IListPropertyBagVisitor , IListPropertyVisitor , IPropertyBagVisitor , IPropertyVisitor , ISetPropertyVis...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e57e86756a7f
unity_docs
rendering
Explain 'Error and loading shaders' in Unity.
Sometimes, Unity can’t render objects with regular shaders . When this happens, Unity renders the objects with special shaders: The default error shader The loading shader The Streaming Virtual Texturing error material The special shader that Unity uses depends on the reason that Unity can’t use the original shader. #...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_88d0d1da011f
unity_docs
animation
In Unity's 'Animation transitions', what is 'Interruption Source property' and how does it work?
The transitions in AnyState are always added first in the queue, then other transitions are queued depending on the value of Interruption Source : Value Function None Don’t add any more transitions. Current State Queue the transitions from the current state. Next State Queue the transitions from the next state. Current...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12e17ac3e042
unity_docs
math
What is `Rendering.MeshUpdateFlags.DontResetBoneBounds` in Unity? Explain its purpose and usage.
MeshUpdateFlags.DontResetBoneBounds Description Indicates that Unity should not reset skinned mesh bone bounds when you modify Mesh data using Mesh.SetVertexBufferData or Mesh.SetIndexBufferData . When you modify Skinned Mesh vertex position or index buffer data, Unity's default behaviour is to reset the interna...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe9f7e8d112a
unity_docs
rendering
What is `Canvas.renderOrder` in Unity? Explain its purpose and usage.
Canvas.renderOrder public int renderOrder ; Description The render order in which the canvas is being emitted to the Scene. (Read Only) Note: Currently only Screen Space - Overlay canvases are ordered correctly as Screen Space - Camera and World Space are emitted and sorted based upon distance from the c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_41c0fa59a103
unity_docs
editor
What is `EditorGUI.DisabledScope` in Unity? Explain its purpose and usage.
DisabledScope struct in UnityEditor Description Create a group of controls that can be disabled. If disabled is true, the controls inside the group will be disabled. If false, the enabled/disabled state will not be changed. The group cannot be used to enable controls that would otherwise be disabled to begin with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_87270456384e
unity_docs
audio
What is `AudioSource.UnPause` in Unity? Explain its purpose and usage.
AudioSource.UnPause Declaration public void UnPause (); Description Unpause the paused playback of this AudioSource. This function is similar to if you call Play() on a paused AudioSource, except that it will not create a new playback voice if it is not currently paused. This is also useful if you have paused ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db64afe648db
unity_docs
xr
What is `iOS.OnDemandResourcesRequest.GetResourcePath` in Unity? Explain its purpose and usage.
OnDemandResourcesRequest.GetResourcePath Declaration public string GetResourcePath (string resourceName ); Parameters Parameter Description resourceName Resource name. Description Gets file system's path to the resource available in On Demand Resources (ODR) request. Additional resources: OnDemandResourc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6a456aa792f
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.IsForeignAsset`.
e file. An asset created in Unity is a Native asset importers reference , for example a material or a prefab. Unity creates a serialized representation of foreign assets in the Project's Library folder during import. This happens when the asset is first added, when it's updated externally, or when you modify its impor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e4b637b350c
unity_docs
rendering
In Unity's 'Color emojis', what is 'Include emojis in text' and how does it work?
To include emojis in text, do any of the following: Include emojis in text through their Unicode value. For example, enter \U0001F601 to represent a smile. Use your operating system virtual keyboard. Copy the emojis from an external text editing tool and paste them in your text field.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34f2423ce36a
unity_docs
physics
What is `Rigidbody2D.MoveRotation` in Unity? Explain its purpose and usage.
Rigidbody2D.MoveRotation Declaration public void MoveRotation (float angle ); Parameters Parameter Description angle The new rotation angle for the Rigidbody object. Description Rotates the Rigidbody to angle (given in degrees). Rotates the Rigidbody to the specified angle by calculating the appropria...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b0d74fbcd83
unity_docs
physics
What is `ArticulationBody.GetAccumulatedTorque` in Unity? Explain its purpose and usage.
ArticulationBody.GetAccumulatedTorque Declaration public Vector3 GetAccumulatedTorque (float step = Time.fixedDeltaTime); Parameters Parameter Description step The timestep of the next physics simulation. Returns Vector3 Accumulated torque expressed in ForceMode.Force . Description Returns the t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_189ee2f970cb
unity_docs
rendering
In Unity's 'Build Profiles window reference', what is 'Asset Import Overrides' and how does it work?
To speed up the time it takes to import assets and change platforms, you can locally override all texture import settings. During development, asset overrides can be useful to speed up iteration time by using lower quality assets. Note : To set asset import overrides for initial project imports, use the Editor command ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb707dd0586b
unity_docs
animation
Give me an overview of the `ModelImporterAnimationCompression` class in Unity.
ModelImporterAnimationCompression enumeration Description Animation compression options for ModelImporter . Compressing animations saves space in the built game, but more compression introduces more artifacts in the animations. Additional resources: ModelImporter.animationCompression . Properties Property Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1d008f120dfe
unity_docs
scripting
What is `AndroidJNI.GetLongField` in Unity? Explain its purpose and usage.
AndroidJNI.GetLongField Declaration public static long GetLongField (IntPtr obj , IntPtr fieldID ); Description Returns the value of an instance (nonstatic) field of an object. Additional resources: Java Native Interface Specification (Oracle)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_77c49f5ac5fd
unity_docs
scripting
What is `Vector3.ProjectOnPlane` in Unity? Explain its purpose and usage.
Vector3.ProjectOnPlane Declaration public static Vector3 ProjectOnPlane ( Vector3 vector , Vector3 planeNormal ); Parameters Parameter Description vector The vector to project on the plane. planeNormal The normal which defines the plane to project on. Returns Vector3 The vector that results from ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_51b1c9cf1fbe
unity_docs
rendering
What is `MaterialEditor.IsInstancingEnabled` in Unity? Explain its purpose and usage.
MaterialEditor.IsInstancingEnabled Declaration public bool IsInstancingEnabled (); Returns bool Returns true if Enable Instancing checkbox is checked. Description Determines whether the Enable Instancing checkbox is checked. See also: EnableInstancingField .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b658bcd6e3c
unity_docs
scripting
What is `ActionOnDotNetUnhandledException` in Unity? Explain its purpose and usage.
ActionOnDotNetUnhandledException enumeration Description The behavior in case of unhandled .NET exception. Properties Property Description SilentExit Silent exit in case of unhandled .NET exception (no Crash Report generated). Crash Crash in case of unhandled .NET exception (Crash Report will be generated).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_155bcb54eab4
unity_docs
input
What are the parameters of `AndroidJavaClass.ctor` in Unity?
Description Construct an AndroidJavaClass from the class name. This essentially means locate the class type and allocate a java.lang.Class object of that particular type. It allows you to access static properties and methods of the Java/Kotlin classes without creating an instance or allocating additional memory. The fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cff743b76a40
unity_docs
ui
What is `UIElements.UQueryExtensions.Query` in Unity? Explain its purpose and usage.
UQueryExtensions.Query Declaration public static UQueryBuilder<VisualElement> Query ( UIElements.VisualElement e , string name , params string[] classes ); Parameters Parameter Description e Root VisualElement on which the selector will be applied. name If specified, will select elements with this name....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bccbfae303b8
unity_docs
scripting
What is `TextMesh.text` in Unity? Explain its purpose and usage.
TextMesh.text public string text ; Description The text that is displayed. Additional resources: text mesh component . ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { // Set the text of the attached Text mesh GetComponent<TextMesh>().text = "Hello World"; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3788a9f57847
unity_docs
physics
What is `AreaEffector2D.useGlobalAngle` in Unity? Explain its purpose and usage.
AreaEffector2D.useGlobalAngle public bool useGlobalAngle ; Description Should the forceAngle use global space? When true, the forceAngle is specified in global-space. When false, the forceAngle is specified in local-space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d268b122c88c
unity_docs
scripting
In Unity's 'Transforms', what is 'Editing Transforms' and how does it work?
In 2D space, you can manipulate Transforms on the x-axis or the y-axis only. In 3D space, you can manipulate Transforms on the x-axis, y-axis, and z-axis. In Unity, these axes are represented by the colors red, green, and blue respectively. There are three primary ways you can edit a Transform’s properties: In the Scen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_078e5d2ddde5
unity_docs
rendering
Show me a Unity C# example demonstrating `Experimental.Rendering.IScriptableBakedReflectionSystem`.
Experimental : this API is experimental and might be changed or removed in the future. IScriptableBakedReflectionSystem interface in UnityEditor.Experimental.Rendering Description Defines the required members for a ScriptableBakedReflectionSystem implementation. You can use the empty implementation as base class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_74c4eaf846b8
unity_docs
audio
What is `Windows.Speech.DictationCompletionCause` in Unity? Explain its purpose and usage.
DictationCompletionCause enumeration Description Represents the reason why dictation session has completed. Properties Property Description Complete Dictation session has completed successfully. AudioQualityFailure Dictation session completion was caused by bad audio quality. Canceled Dictation session was ei...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c169cb76f5f
unity_docs
rendering
What is `ReflectionProbe.texture` in Unity? Explain its purpose and usage.
ReflectionProbe.texture public Texture texture ; Description Texture which is passed to the shader of the objects in the vicinity of the reflection probe (Read Only). This texture is meant to represent reflection in a particular direction. Additional resources: RenderTexture , ReflectionProbe.defaultTextur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_da3037f15c08
github
scripting
Write a Unity C# UI script for Title Process
```csharp using System.Threading; using AntiMonoBehaviour.Views; using Cysharp.Threading.Tasks; using UnityEngine; using VContainer; namespace AntiMonoBehaviour.Processes { public interface ITitleProcessParams { GameObject TitleViewPrefab { get; } } public class TitleProcess : ProcessBase ...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_bd215de1fe30
unity_docs
physics
What is `SpringJoint.maxDistance` in Unity? Explain its purpose and usage.
SpringJoint.maxDistance public float maxDistance ; Description The maximum distance between the bodies relative to their initial distance. The distanced that will be maintained, will be kept between minDistance and maxDistance. Both values are relative to the distance between the center of masses when the Scen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e5f5cad97834
unity_docs
editor
Show me a Unity C# example demonstrating `EditorApplication.timeSinceStartup`.
timeSinceStartup public static double timeSinceStartup ; Description The time since the editor was started. (Read Only) This property contains the time since the editor was started, in seconds. Unlike Time.realtimeSinceStartup , this is not reset when starting play mode. Additional resources: Time.realtimeSin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2f1c3523d84
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.DefaultGUI.defaultHeight` in Unity? Explain its purpose and usage.
MultiColumnHeader.DefaultGUI.defaultHeight public static float defaultHeight ; Description Default height of the header. This height ensures there is room for the sorting arrow above the header text. If sorting is disabled with MultiColumnHeader.canSort = false, then minimumHeight can be used. Additional reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7848a77963e9
unity_docs
scripting
Give me an overview of the `PrefabOverridesOptions` class in Unity.
PrefabOverridesOptions enumeration Description Flags that can be used to control which overrides shoud be kept or cleared when using ReplacePrefabAssetOfPrefabInstance . Properties Property Description KeepAllPossibleOverrides Keep all possible overrides (default value). ClearNonDefaultPropertyOverrides Clear...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b30a2fdd2b05
unity_docs
editor
What are the parameters of `Search.SearchIndexer.AddProperty` in Unity?
Description Adds a property value to the index. A property is specified with a key and a string value. The value will be stored with multiple variations. ```csharp using System.Linq; using UnityEditor; using UnityEditor.Search; using UnityEngine; static class Example_SearchIndexer_AddProperty { [MenuItem("Examples...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ed3706848e50
unity_docs
math
What is `Matrix4x4.SetTRS` in Unity? Explain its purpose and usage.
Matrix4x4.SetTRS Declaration public void SetTRS ( Vector3 pos , Quaternion q , Vector3 s ); Description Sets this matrix to a translation, rotation and scaling matrix. The current matrix is modified so that it places objects at position pos , oriented in rotation q and scaled by s . ```csharp // Tr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_57d91faad92f
unity_docs
scripting
What is `ParticleSystem.Pause` in Unity? Explain its purpose and usage.
ParticleSystem.Pause Declaration public void Pause (); Declaration public void Pause (bool withChildren = true); Parameters Parameter Description withChildren Pause all child Particle Systems as well. Description Pauses the system so no new particles are emitted and the existing particles are not upd...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dbc317ed3402
unity_docs
rendering
What is `Experimental.GlobalIllumination.DirectionalLight.penumbraWidthRadian` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. DirectionalLight.penumbraWidthRadian public float penumbraWidthRadian ; Description The penumbra width for soft shadows in radians.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df4696742844
unity_docs
scripting
Show me a Unity C# example demonstrating `EditorTools.EditorTool.PopulateMenu`.
EditorTool.PopulateMenu Declaration public void PopulateMenu ( UIElements.DropdownMenu menu ); Parameters Parameter Description menu The Scene view context menu to add menu items to. Description Adds menu items to Scene view context menu. Refer to MenuUtility for utility functions that add menu items to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4db16211e7d
unity_docs
physics
Give me an overview of the `PointEffector2D` class in Unity.
PointEffector2D class in UnityEngine / Inherits from: Effector2D / Implemented in: UnityEngine.Physics2DModule Description Applies forces to attract/repulse against a point. When the source Collider2D is a trigger, the effector will apply forces whenever the target Collider2D overlaps the source. When the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_164bb505358d
unity_docs
rendering
Explain 'Model Import Settings reference' in Unity.
To open a model’s Import Settings, select the model from the Project window . The Inspector then displays the Import Settings for the selected model. Note: These settings are for importing models and animations created in most 3D modeling applications. However, models created in SketchUp and SpeedTree use specialized s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6ce6f01134d2
unity_docs
scripting
Show me a Unity code example for 'Callback from native code'.
# side must be static and marked with the MonoPInvokeCallback attribute. To use delegates: Pass the method as a delegate to the extern method. Implement the extern method in native code as a function that accepts a pointer to functions with the corresponding signature. The function pointer in the native code then point...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b206dd648e4
unity_docs
rendering
What is `Rendering.RayTracingGeometryInstanceConfig` in Unity? Explain its purpose and usage.
RayTracingGeometryInstanceConfig struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Parameters you can use to configure ray tracing triangle geometry instances that are part of a RayTracingAccelerationStructure . The triangle geometry is specified using GraphicsBuffers conta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0a3613b95392
unity_docs
ui
Explain 'Slider' in Unity.
A Slider lets users select a floating-point value from a range of values. You can use a Slider to adjust a value, such as the volume of a sound or the brightness of a light. To set the value, you drag a thumb along a track, or click the track itself. A slider can also include a text input field , where you can modify t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3202283b7ba
unity_docs
editor
Show me a Unity C# example demonstrating `Application.persistentDataPath`.
paths as relative to the project directory on Windows Editor and other non-mobile platforms, not relative to persistentDataPath . Therefore, screenshots or other files saved with a relative path end up in the project folder, not in AppData/LocalLow on Windows. To save files to the persistent data path, pass a full p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_981803b939a4
unity_docs
xr
What is `InsecureHttpOption` in Unity? Explain its purpose and usage.
InsecureHttpOption enumeration Description Options for allowing plain text HTTP connections for UnityWebRequest . Plain text HTTP connections are not secure, and can make your application vulnerable to security threats. By default, UnityWebRequest uses secure HTTPS connections instead. Use this enum to configur...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9866ae5644ac
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.UploadHandlerFile`.
UploadHandlerFile class in UnityEngine.Networking / Inherits from: Networking.UploadHandler / Implemented in: UnityEngine.UnityWebRequestModule Description A specialized UploadHandler that reads data from a given file and sends raw bytes to the server as the request body. You can use it to send a large amount...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_775bef8df06d
unity_docs
editor
Give me an overview of the `TypeCache` class in Unity.
TypeCache class in UnityEditor Description Provides methods for fast type extraction from assemblies loaded into the Unity Domain. Use TypeCache to access attributes and derived types information. This cache allows arbitrary Editor code to achieve better performance, compared to using System.Reflection, by leve...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3d13c89661d4
github
scripting
Write a Unity C# script called Ordered Dictionary
```csharp // Copyright (c) Rotorz Limited. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root. using System; using System.Collections.Generic; using UnityEngine; namespace Rotorz.Games.Collections { /// <summary> /// Base class for a serializable ordered dictionary a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b6d80db4bc7
unity_docs
math
Show me a Unity C# example demonstrating `Mathf.PerlinNoise1D`.
e value might be slightly higher or lower than this range. Description Generates a 1D pseudo-random pattern of float values across a 2D plane. Although the noise plane is two-dimensional, you can use a single one-dimensional line through the pattern to good effect, for example for animation effects. The result of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15eed58be003
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetOrCreatePropertyString` in Unity? Explain its purpose and usage.
Hierarchy.GetOrCreatePropertyString Declaration public Unity.Hierarchy.HierarchyPropertyString GetOrCreatePropertyString (string name ); Parameters Parameter Description name The property name. Returns HierarchyPropertyString The property accessor. Description Creates a string property with a spec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd852f5cde27
unity_docs
performance
Show me a Unity C# example demonstrating `Unity.Profiling.LowLevel.ProfilerMarkerDataType.String16`.
ProfilerMarkerDataType.String16 Description Indicates that ProfilerMarkerData.Ptr points to a char* . Use String16 to pass string data to the ProfilerUnsafeUtility.BeginSampleWithMetadata . Note: The size of the string must be set in bytes including the null terminator. ```csharp using System.Diagnostics; u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4203bd368f29
unity_docs
scripting
What is `Object.FindAnyObjectByType` in Unity? Explain its purpose and usage.
Object.FindAnyObjectByType Declaration public static T FindAnyObjectByType (); Declaration public static T FindAnyObjectByType ( FindObjectsInactive findObjectsInactive ); Declaration public static Object FindAnyObjectByType (Type type ); Declaration public static Object FindAnyObjectByType (Type ty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e9480f411f7c
unity_docs
scripting
In Unity's 'RectIntField', what is 'Create a RectIntField' and how does it work?
You can create a RectIntField with UI Builder, UXML, or C#. The following C# example creates a RectIntField with a RectInt value: ``` var rectIntField = new RectIntField(); rectIntField.value = new RectInt(0, 0, 100, 100); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06dfe365a4fc
unity_docs
rendering
What is `LightProbes.GetSharedLightProbesForScene` in Unity? Explain its purpose and usage.
LightProbes.GetSharedLightProbesForScene Declaration public static LightProbes GetSharedLightProbesForScene ( SceneManagement.Scene scene ); Parameters Parameter Description scene The scene to get the shared light probe data for. Returns LightProbes The shared light probe data for the scene. Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de4a71a31603
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystemRenderer.EnableVertexStreams`.
s deprecated. Use SetActiveVertexStreams instead. Declaration public void EnableVertexStreams ( ParticleSystemVertexStreams streams ); Parameters Parameter Description streams Streams to enable. Description Enable a set of vertex Shader streams on the Particle System renderer. Additional resources: Partic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f392bba7d912
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.remapY`.
ParticleSystem.NoiseModule.remapY public ParticleSystem.MinMaxCurve remapY ; Description Define how the noise values are remapped on the y-axis, when using the ParticleSystem.NoiseModule.separateAxes option. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[Requir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ae3058945892
unity_docs
rendering
Show me a Unity C# example demonstrating `LightTransport.BakeProgressState.Progress`.
progress value. Returns the current progress as a value between 0.0 and 1.0, where: 0.0 means no progress (operation just started). Values increase according to the rate of completion. 1.0 means the operation completed successfully. The progress is calculated based on the ratio of completed work steps to total wor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5552b80e6168
unity_docs
scripting
What is `SceneTemplate.SceneTemplatePipelineAdapter.IsValidTemplateForInstantiation` in Unity? Explain its purpose and usage.
SceneTemplatePipelineAdapter.IsValidTemplateForInstantiation Declaration public bool IsValidTemplateForInstantiation ( SceneTemplate.SceneTemplateAsset sceneTemplateAsset ); Parameters Parameter Description sceneTemplateAsset A Scene Template asset that is available in New Scene dialog. Returns bool Tru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_abfaae5b39af
unity_docs
scripting
What is `AndroidJavaObject.GetStatic` in Unity? Explain its purpose and usage.
AndroidJavaObject.GetStatic Declaration public FieldType GetStatic (string fieldName ); Parameters Parameter Description fieldName The name of the field (e.g. <i>int counter;</i> would have fieldName = "counter"). Description Get the value of a static field in an object type. The generic parameter determi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a07ac123f2bc
unity_docs
physics
In Unity's 'Measure performance with the built-in profiler', what is 'Detailed Unity Player statistics' and how does it work?
The player-detail section provides a detailed breakdown of what’s happening inside the engine: Property Function physx Time spent on physics. animation Time spent animating bones. culling Time spent culling objects outside the camera frustum. skinning Time spent applying animations to skinned meshes. batching Time spen...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e94263342c52
unity_docs
audio
Explain 'Introduction to the Unity web request APIs' in Unity.
UnityWebRequest is Unity’s HTTP/HTTPS networking API for communicating with web services, transferring files, and streaming data at runtime. Common uses for the Unity web request system include: Downloading content at runtime, such as: AssetBundles from remote servers, when using the regular AssetBundle or Addressables...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_68e095203601_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Provides several utility functions for smoothing and lerping. Signature: ```csharp public class Smoothing ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_d08e0bd85d73
unity_docs
scripting
What is `Experimental.GraphView.GraphView.CanPasteSerializedData` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphView.CanPasteSerializedData Declaration protected bool CanPasteSerializedData (string data ); Parameters Parameter Description data Serialized graph element. Returns bool True if it can be pasted. Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3f8db5bce273
unity_docs
physics
Give me an overview of the `CollisionDetectionMode` class in Unity.
CollisionDetectionMode enumeration Description The collision detection mode constants used for Rigidbody.collisionDetectionMode . ```csharp //This script allows you to switch collision detection mode at the press of the space key, and move your GameObject. It also outputs collisions that occur to the console. //A...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0800b2dc1cf4
unity_docs
scripting
Show me a Unity C# example demonstrating `Experimental.Rendering.GraphicsStateCollection`.
r variants and associated graphics states. Use graphics state collections to record shader variants and graphics states encountered at runtime and prewarm shader variants. Each shader variant in the collection may have one or more associated graphics states. Each permutation of a shader variant and a graphics state wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18ef55969b56
unity_docs
editor
Show me a Unity C# example demonstrating `Handles.BeginGUI`.
Handles.BeginGUI Declaration public static void BeginGUI (); Description Begin a 2D GUI block inside the 3D handle GUI. The start of a GUILayout sequence of function calls. As expected the EndGUI is used to close these. Additional resources: Handles.EndGUI . GUI in the Scene View. ```csharp // Change th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ba5d8991da6
unity_docs
rendering
What is `Rendering.GlobalKeyword.Create` in Unity? Explain its purpose and usage.
GlobalKeyword.Create Declaration public static Rendering.GlobalKeyword Create (string name ); Parameters Parameter Description name The name of the global shader keyword. Returns GlobalKeyword Returns a new instance of the GlobalKeyword class. Description Creates and returns a GlobalKeyword that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f48d18a7fa58
unity_docs
physics
What is `CollisionDetectionMode.Discrete` in Unity? Explain its purpose and usage.
CollisionDetectionMode.Discrete Description Continuous collision detection is off for this Rigidbody. This is the default collision detection mode, and it is the fastest mode. Collisions for this collider will only be checked at the content's Time.fixedDeltaTime . ```csharp //This script allows you to switch coll...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0fe955ff318b
unity_docs
math
What is `Animations.TransformSceneHandle.GetGlobalTR` in Unity? Explain its purpose and usage.
TransformSceneHandle.GetGlobalTR Declaration public void GetGlobalTR ( Animations.AnimationStream stream , out Vector3 position , out Quaternion rotation ); Parameters Parameter Description stream The AnimationStream that manages this handle. position The position of the transform in world space. r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_593dbec15649
unity_docs
physics
What are the parameters of `PhysicsShapeGroup2D.SetShapeVertex` in Unity?
Description Sets a single vertex of a shape. NOTE : When accessing multiple vertices, it is more efficient to do one of the following: Get all the shape vertices using GetShapeVertices Get all the shape group vertices using GetShapeData Create the PhysicsShapeGroup2D with explicit shapes and vertices lists using the sh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7fd902cfd2e0
unity_docs
scripting
What is `UIElements.ToolbarMenuElementExtensions.ShowMenu` in Unity? Explain its purpose and usage.
ToolbarMenuElementExtensions.ShowMenu Declaration public static void ShowMenu ( UIElements.IToolbarMenuElement tbe ); Parameters Parameter Description tbe The element that is part of the menu to be displayed. Description Display the menu for the element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20b5be186581
unity_docs
physics
What is `UIElements.TextElement.MarkDirtyText` in Unity? Explain its purpose and usage.
TextElement.MarkDirtyText Declaration public void MarkDirtyText (); Description Marks that the TextElement forces a layout and repaint. Call this method if you modify assets that influence text generation at runtime, such as a FontAsset .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_79fe6bea1de4
unity_docs
scripting
What is `Rendering.SplashScreen.StopBehavior.StopImmediate` in Unity? Explain its purpose and usage.
SplashScreen.StopBehavior.StopImmediate Description Immediately stop rendering the SplashScreen. ```csharp using System.Collections; using UnityEngine; using UnityEngine.Rendering;// This example shows how the Splash Screen can be canceled early via the user pressing any key. public class Example : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a6df86da05b6
unity_docs
scripting
Show me a Unity C# example demonstrating `TestTools.Coverage.ResetAll`.
Coverage.ResetAll Declaration public static void ResetAll (); Description Resets all coverage data. ```csharp using UnityEngine; using UnityEngine.TestTools;public class CoverageExample : MonoBehaviour { void Start() { // Reset all coverage data that has been captured up to this point. Coverage.ResetAll(); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cee4d5f4ca8c
unity_docs
scripting
What is `MonoBehaviour.destroyCancellationToken` in Unity? Explain its purpose and usage.
MonoBehaviour.destroyCancellationToken public CancellationToken destroyCancellationToken ; Description Cancellation token raised when the MonoBehaviour is destroyed (Read Only). Note: You must cache the destroyCancellationToken before you destroy the MonoBehaviour object.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbda9f7f1050
unity_docs
physics
What is `PackageManager.Client.Resolve` in Unity? Explain its purpose and usage.
Client.Resolve Declaration public static void Resolve (); Description Forces the Package Manager to resolve the project's packages, reinstalling any altered or missing package and removing extraneous packages. Forces the Package Manager to resolve the project's packages to ensure they are up-to-date and unchan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ac769e4e976
unity_docs
xr
What is `Networking.DownloadHandlerScript` in Unity? Explain its purpose and usage.
DownloadHandlerScript class in UnityEngine.Networking / Inherits from: Networking.DownloadHandler / Implemented in: UnityEngine.UnityWebRequestModule Description An abstract base class for custom, scriptable DownloadHandler implementations. Derive from DownloadHandlerScript and override some or all of its...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc4e9da871b1
unity_docs
editor
What is `SearchService.IObjectSelectorEngine` in Unity? Explain its purpose and usage.
IObjectSelectorEngine interface in UnityEditor.SearchService Implements interfaces: ISearchEngineBase , ISelectorEngine Description An interface that ObjectSelector engines implement. It inherits from ISelectorEngine . Additional resources: ObjectSelectorEngineAttribute .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc1d79d61d3b
unity_docs
ui
Show me a Unity code example for 'Toolbar'.
because they have a predefined style that matches the Toolbar style: ToolbarButton instead of Button . ToolbarToggle instead of Toggle . ToolbarSearchField ToolbarPopupSearchField ToolbarMenu instead of DropdownField . ToolbarSpacer ToolbarBreadcrumbs ## Create a Toolbar You can create a Toolbar with UI Builder, UXML...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4d5b7f020065
unity_docs
rendering
In Unity's 'Create a surface shader in the Built-In Render Pipeline', what is 'Example' and how does it work?
```csharp Shader "Example/Diffuse Simple" { SubShader { Tags { "RenderType" = "Opaque" } CGPROGRAM #pragma surface surf Lambert struct Input { float4 color : COLOR; }; void surf (Input IN, inout SurfaceOutput o) { o.Albedo = 1; } ENDCG } Fallback "Diffuse" } `
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c93dab7b6cf
unity_docs
scripting
What is `Experimental.GraphView.GraphViewToolWindow.OnGraphViewChanging` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphViewToolWindow.OnGraphViewChanging Declaration protected void OnGraphViewChanging (); Description Callback invoked when the GraphView is about to change.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_867d1f0dec84
unity_docs
editor
Show me a Unity C# example demonstrating `AssetModificationProcessor.OnWillCreateAsset`.
AssetModificationProcessor.OnWillCreateAsset(string) Description Unity calls this method when it is about to create an Asset you haven't imported (for example, .meta files). ```csharp using UnityEngine;public class CustomAssetModificationProcessor : UnityEditor.AssetModificationProcessor { static void OnWillCreat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_23ce64ea8a16
unity_docs
scripting
What is `Camera.main` in Unity? Explain its purpose and usage.
Camera.main public static Camera main ; Description The first enabled Camera component that is tagged "MainCamera" (Read Only). If there is no enabled Camera component with the "MainCamera" tag, this property is null. Internally, Unity caches all GameObjects with the "MainCamera" tag. When you access this pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31aa1346e066
unity_docs
scripting
What is `FrameTimingManager.IsFeatureEnabled` in Unity? Explain its purpose and usage.
FrameTimingManager.IsFeatureEnabled Declaration public static bool IsFeatureEnabled (); Returns bool Whether frame timing statistics are enabled. Description Check if frame timing statistics are enabled. When enabled, the Player collects CPU and GPU frame timing statistics that can be accessed using Capt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_195484c799a2
unity_docs
scripting
In Unity's 'Unity linker marking rules reference', what is 'Root marking rules' and how does it work?
The following table describes how the Unity linker identifies the top-level types in an assembly for different assembly types and managed stripping levels: Assembly type Root marking rules at managed stripping levels.NET Class & Platform SDK and UnityEngine Assemblies Minimal and Low : Precautionary preservations Minim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6c2bb9897105
unity_docs
rendering
Give me an overview of the `DepthTextureMode` class in Unity.
DepthTextureMode enumeration Description Depth texture generation mode for Camera . The flags can be combined, so you can set a Camera to generate any combination of: Depth, Depth+Normals, and MotionVector textures if needed. Additional resources: Using camera's depth textures , Camera.depthTextureMode . Prope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bbfbf467b065
unity_docs
editor
What is `Purchasing.PurchasingSettings` in Unity? Explain its purpose and usage.
PurchasingSettings class in UnityEditor.Purchasing Description Editor API for the Unity Services editor feature. Normally Purchasing is enabled from the Services window, but if writing your own editor extension, this API can be used. Static Properties Property Description enabled This Boolean field will cause ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_03be0e2f8d8f
unity_docs
editor
Give me an overview of the `UnwrapParam` class in Unity.
UnwrapParam struct in UnityEditor Description Unwrapping settings. Allows you control over the parameters of the automatic UV Unwrapping feature. Use this if you want to override the default unwrap settings. Properties Property Description angleError Maximum allowed angle distortion (0..1). areaError Maxim...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c024acd6aa7
unity_docs
math
What is `AndroidJNI.CallSByteMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallSByteMethodUnsafe Declaration public static sbyte CallSByteMethodUnsafe (IntPtr obj , IntPtr methodID , jvalue* args ); Description Calls a Java instance method defined by methodID , optionally passing an array of arguments ( args ) to the method. Additional resources: Java Native Interface ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3ad745576be3
unity_docs
rendering
What is `Graphics.DrawMeshInstanced` in Unity? Explain its purpose and usage.
Graphics.DrawMeshInstanced Declaration public static void DrawMeshInstanced ( Mesh mesh , int submeshIndex , Material material , Matrix4x4[] matrices , int count = matrices.Length, MaterialPropertyBlock properties = null, Rendering.ShadowCastingMode castShadows = ShadowCastingMode.On, bool receiveS...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b311a533e14c
unity_docs
animation
What is `AssetPostprocessor.OnPreprocessAnimation` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPreprocessAnimation() Description Add this function to a subclass to get a notification just before animation from a model (.fbx, .mb file etc.) is imported. This lets you control the import settings through code. ```csharp using UnityEngine; using UnityEditor;public class Example : AssetPostp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e503f984b9d
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.IsKnownExtension`.
PBXProject.IsKnownExtension Declaration public static bool IsKnownExtension (string ext ); Parameters Parameter Description ext The file extension. The leading . is not necessary but is accepted. Returns bool Returns true of the extension is known. Description Checks if files with the given extensi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34a0939bd38d
unity_docs
math
What is `AI.NavMeshBuilder.BuildNavMeshData` in Unity? Explain its purpose and usage.
NavMeshBuilder.BuildNavMeshData Declaration public static AI.NavMeshData BuildNavMeshData ( AI.NavMeshBuildSettings buildSettings , List<NavMeshBuildSource> sources , Bounds localBounds , Vector3 position , Quaternion rotation ); Parameters Parameter Description buildSettings Settings for the ba...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8204c777bfb0
unity_docs
scripting
Explain 'Declare permissions for an application' in Unity.
Android applications declare what permissions they require in their Android App Manifest . This page explains how to manage permissions for an Android application. For a list of the possible permissions, see Manifest.permission . You can use one of the following methods to modify the Android App Manifest file and manag...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_118171963bf5
unity_docs
math
What is `XR.XRDisplaySubsystem.XRRenderParameter` in Unity? Explain its purpose and usage.
XRRenderParameter struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description A single viewpoint that must be rendered by the render pipeline. Contains a target viewport and texture array slice within a corresponding renderTarget . Properties Property Description isPreviousViewValid Determin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bfb764d0315b
unity_docs
rendering
What is `ParticleSystem.ShapeModule.textureAlphaAffectsParticles` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.textureAlphaAffectsParticles public bool textureAlphaAffectsParticles ; Description When enabled, the system applies the alpha channel of the Texture to the particle alpha when the particle spawns. Additional resources: ParticleSystem.ShapeModule.texture .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6683f12fb49e
unity_docs
scripting
Explain 'Programming with the Asset Database' in Unity.
The AssetDatabase class has methods that allow you to access and perform operations on assets in the same way the Unity Editor does. You can create, import, delete, copy, move, load, and save assets, and search the asset database. This means you can create anything from simple adjustments to powerful tools and customiz...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.