id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_adfffebd803c
unity_docs
rendering
Explain 'Document your package' in Unity.
Most packages need some form of explanation to help users have the best experience and optimize its use. This page provides some tips for how to structure the information and format the documentation . ## Structure of the information After the title of the package, give a basic overview of the package and its content...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_608a6f2ac844
unity_docs
scripting
What is `Windows.WebCam.VideoCapture.OnVideoModeStartedCallback` in Unity? Explain its purpose and usage.
VideoCapture.OnVideoModeStartedCallback Declaration public delegate void OnVideoModeStartedCallback ( Windows.WebCam.VideoCapture.VideoCaptureResult result ); Parameters Parameter Description result Indicates whether or not video mode was successfully activated. Description Called when video mode has been...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_678d1637793c
unity_docs
editor
What is `SceneView.selectedOutlineColor` in Unity? Explain its purpose and usage.
SceneView.selectedOutlineColor public static Color selectedOutlineColor ; Description Gets the Color of selected outline. This color can only be set through the Editor. To change this in the Editor, go to Preferences > Colors > Selected Outline.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc70802d7088
unity_docs
editor
What is `AssetDatabase.GetAssetOrScenePath` in Unity? Explain its purpose and usage.
AssetDatabase.GetAssetOrScenePath Declaration public static string GetAssetOrScenePath ( Object assetObject ); Parameters Parameter Description assetObject The asset object to check. Description Returns the path name relative to the project folder where the asset or scene is stored. All paths are relativ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e5fcc3b8813
unity_docs
scripting
What is `WheelFrictionCurve.stiffness` in Unity? Explain its purpose and usage.
WheelFrictionCurve.stiffness public float stiffness ; Description Multiplier for the extremumValue and asymptoteValue values (default 1). Changes the stiffness of the friction. Setting this to zero will completely disable all friction from the wheel. Usually you modify stiffness to simulate various ground...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_852f9f8193bb
unity_docs
scripting
Show me a Unity C# example demonstrating `AssetBundle`.
ssetBundle and then call SceneManager.LoadScene or SceneManager.LoadSceneAsync with the Scene name. In the Editor it is not supported to load Scenes from AssetBundles so calls to EditorSceneManager.OpenScene will fail with an error that the Scene file is not found. Additional resources: Intro to AssetBundles , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0f13076e4c49
unity_docs
physics
In Unity's 'Delivering to Google Play', what is 'Application size' and how does it work?
Google Play limits the install size of applications. The following table describes the size limitations Google Play has for each application type: Application type Size limitation APK If you split the application binary or use a custom expansion file , the APK must be smaller than 100MB and the expansion file must be s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fa8247d55c2a
unity_docs
editor
Give me an overview of the `VideoImporterTargetSettings` class in Unity.
VideoImporterTargetSettings class in UnityEditor Description Importer settings that can have platform-specific values. Properties Property Description aspectRatio How the aspect ratio discrepancies, if any, will be handled if the chosen import resolution has a different ratio than the source. bitrateMode Bit ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fb052fdaeec5_doc_2
github
scripting
What does `new` do in this Unity script? Explain its purpose and signature.
Convert all table data. Signature: ```csharp public static IEnumerable<T> ConvertEnumerator<T>(string csvContent, char cellSeparator = CSVDataHelper.CommaCharacter, bool supportCellMultiline = true) where T : new() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_721d901cd556
unity_docs
physics
Explain 'Make a texture compatible with asynchronous texture loading' in Unity.
A texture is eligible for the asynchronous upload pipeline if the following conditions are met: The texture is not read/write enabled. The texture is not in the Resources folder. If the build target is Android, LZ4 compression is enabled in the Build Profiles window. Note that if you load a texture using LoadImage(byte...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5af1cf5021e6
unity_docs
scripting
Explain 'Filter the package list' in Unity.
To narrow down which packages appear in the list panel, select the Filters menu from the Package Manager window. Note: When you select In Project in the navigation panel , the filter controls are disabled, because In Project has a nested view to list packages that have updates. Using the My Assets list as an example, y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bfa9605c73a
unity_docs
performance
What is `AndroidJNI.GetDirectByteBuffer` in Unity? Explain its purpose and usage.
AndroidJNI.GetDirectByteBuffer Declaration public static NativeArray<byte> GetDirectByteBuffer (IntPtr buffer ); Description Returns the NativeArray backed by the same memory region as the given direct java.nio.Buffer. Additional resources: AndroidJNI.GetDirectBufferAddress .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40df2401158d
unity_docs
rendering
What is `LightmapParameters.bakedLightmapTag` in Unity? Explain its purpose and usage.
LightmapParameters.bakedLightmapTag public int bakedLightmapTag ; Description BakedLightmapTag is an integer that affects the assignment to baked lightmaps. Objects with different values for bakedLightmapTag are guaranteed to not be assigned to the same lightmap even if the other baking parameters are the same.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1134dfa85397
unity_docs
rendering
What are the parameters of `EditorGUI.DrawPreviewTexture` in Unity?
Description Draws the texture within a rectangle. If mat is null (the default), an appropriate material will be chosen for a RGBM or doubleLDR lightmap or a normal map and the fallback blit material will be chosen otherwise. Preview Texture in an Editor Window. ```csharp // Load a texture, display the texture, display ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe9ca506932a
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.RayTracingMeshInstanceConfig.renderingLayerMask`.
RayTracingMeshInstanceConfig.renderingLayerMask public uint renderingLayerMask ; Description A mask that you can access in HLSL with unity_RenderingLayer built-in shader uniform. ``` uniform float4 unity_RenderingLayer;// HLSL usage example: uint renderingLayerMask = asuint(unity_RenderingLayer.x); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb1b087cebae
unity_docs
scripting
What is `Handles.Slider` in Unity? Explain its purpose and usage.
Handles.Slider Declaration public static Vector3 Slider ( Vector3 position , Vector3 direction ); Declaration public static Vector3 Slider ( Vector3 position , Vector3 direction , float size , Handles.CapFunction capFunction , float snap ); Parameters Parameter Description position The ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_874fab574aec
unity_docs
editor
What is `PrefabAssetType` in Unity? Explain its purpose and usage.
PrefabAssetType enumeration Description Enum indicating the type of Prefab Asset, such as Regular, Model and Variant. For an object on a Prefab Asset, the asset itself is checked. For an object on a Prefab instance, its corresponding asset is checked. Properties Property Description NotAPrefab The object being...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18d5d31979a2
unity_docs
editor
What is `AssetDatabase.ImportPackage` in Unity? Explain its purpose and usage.
AssetDatabase.ImportPackage Declaration public static void ImportPackage (string packagePath , bool interactive ); Parameters Parameter Description packagePath The path to the package. interactive Set to true to open an import dialog box on import. Set to false to import all assets in the package into the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7602e3dd376
unity_docs
physics
What is `ArticulationBody.SetJointPositions` in Unity? Explain its purpose and usage.
ArticulationBody.SetJointPositions Declaration public void SetJointPositions (List<float> positions ); Parameters Parameter Description positions Supplied list of floats used to set the joint positions. Description Assigns articulation body joint positions for the entire hierarchy of bodies. This sets j...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62b9459d46ee
unity_docs
rendering
Show me a Unity C# example demonstrating `Search.SearchProvider.isEnabledForContextualSearch`.
SearchProvider.isEnabledForContextualSearch public Func<bool> isEnabledForContextualSearch ; Description Called when search is invoked in "contextual mode". Returns true if the search provider is enabled for this search context. ```csharp using System.Collections.Generic; using UnityEditor; using UnityEditor.Se...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_18dfa6f8c922
unity_docs
scripting
What is `Unity.Properties.GeneratePropertyBagsForAssemblyAttribute` in Unity? Explain its purpose and usage.
GeneratePropertyBagsForAssemblyAttribute class in Unity.Properties / Implemented in: UnityEngine.PropertiesModule Description Use this attribute to enable the source generator to run on this assembly.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0764e6a28f2
unity_docs
scripting
What is `Vector3.Reflect` in Unity? Explain its purpose and usage.
Vector3.Reflect Declaration public static Vector3 Reflect ( Vector3 inDirection , Vector3 inNormal ); Parameters Parameter Description inDirection The vector to be reflected in the plane. inNormal The normal vector that defines the plane of reflection. Description Reflects a vector off the plane de...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3a2aa078577
unity_docs
scripting
What is `MPE.EventService.Start` in Unity? Explain its purpose and usage.
EventService.Start Declaration public static void Start (); Description Starts the EventService so it listens to new messages. Normally, Start is called automatically when a member of the EventService is invoked. However, you may sometimes need to call it explicitly. For example, if you called EventService.Clo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1292d050f43d
unity_docs
rendering
What is `RenderTexture.DiscardContents` in Unity? Explain its purpose and usage.
RenderTexture.DiscardContents Declaration public void DiscardContents (); Declaration public void DiscardContents (bool discardColor , bool discardDepth ); Parameters Parameter Description discardColor Should the colour buffer be discarded? discardDepth Should the depth buffer be discarded? Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_adf942cbb7e8
unity_docs
physics
What is `CharacterController` in Unity? Explain its purpose and usage.
CharacterController class in UnityEngine / Inherits from: Collider / Implemented in: UnityEngine.PhysicsModule Description A CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody. A CharacterController is not affected by forces and will only mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2e8af6d281bd
unity_docs
animation
What is `Animations.AnimatorControllerPlayable.SetTrigger` in Unity? Explain its purpose and usage.
AnimatorControllerPlayable.SetTrigger Declaration public void SetTrigger (string name ); Declaration public void SetTrigger (int id ); Parameters Parameter Description name The parameter name. id The parameter ID. Description Sets the value of the given trigger parameter. This method allows you to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_379de659a928
unity_docs
editor
What is `AI.NavMeshBuildDebugFlags.RawContours` in Unity? Explain its purpose and usage.
NavMeshBuildDebugFlags.RawContours Description The contours that follow precisely the edges of each surface region. Additional resources: NavMeshBuildSettings.debug , NavMeshEditorHelpers.DrawBuildDebug .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_888a5e097385
unity_docs
rendering
What is `Rendering.BuiltinShaderMode.UseCustom` in Unity? Explain its purpose and usage.
BuiltinShaderMode.UseCustom Description Use custom shader instead of built-in one. This is useful for implementing custom functionality. For example, by default deferred shading does shading calculations that match the Standard shader lighting model. But if you'd want to use a different BRDF, or use a custom deferr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cda4893eb5b1
unity_docs
physics
Show me a Unity C# example demonstrating `Rigidbody.mass`.
mass ; Description The mass of the rigidbody. Different Rigidbodies with large differences in mass can make the physics simulation unstable. Higher mass objects push lower mass objects more when colliding. Think of a big truck, hitting a small car. A common mistake is to assume that heavy objects fall faster than ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c659e986cf0
unity_docs
scripting
Explain 'Debugging your tvOS application' in Unity.
To debug your application on a tvOS device, you need the following: A fourth-generation Apple TV device. Xcode 7.1 or later. Set up provisioning for this device in the same way as for iOS devices. Connect the device to your machine using USB or a wireless connection. For more information on connecting your tvOS device ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71c19deb6e55
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8G8B8_SNorm` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8G8B8_SNorm Description A three-component, 24-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b1c2c8a44c4e
unity_docs
scripting
What is `PlayerSettings.SetStackTraceLogType` in Unity? Explain its purpose and usage.
PlayerSettings.SetStackTraceLogType Declaration public static void SetStackTraceLogType ( LogType logType , StackTraceLogType stackTraceType ); Description Set stack trace logging options. Note: calling this function will implicitly call Application.SetStackTraceLogType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c9c927a7dd2a
unity_docs
scripting
What is `AI.NavMeshDataInstance` in Unity? Explain its purpose and usage.
NavMeshDataInstance struct in UnityEngine.AI / Implemented in: UnityEngine.AIModule Description The instance is returned when adding NavMesh data. A valid NavMesh data instance is available to the navigation system. This means you can calculate paths etc. using that instance. You also need the instance if you w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9032e326125
unity_docs
scripting
What is `EventType.ValidateCommand` in Unity? Explain its purpose and usage.
EventType.ValidateCommand Description Validates a special command (e.g. copy & paste). "Copy", "Cut", "Paste", "Delete", "FrameSelected", "Duplicate", "SelectAll" and so on. Sent only in the editor. Example: Make pasting work in current window or control: ```csharp using UnityEngine; using UnityEditor;public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6876ab89d743
unity_docs
editor
What is `Search.SearchIndexer.GetDocument` in Unity? Explain its purpose and usage.
SearchIndexer.GetDocument Declaration public Search.SearchDocument GetDocument (int index ); Parameters Parameter Description index Valid index of the document to access. Returns SearchDocument Indexed search document. Description Returns a search document by its index. ```csharp using UnityEditor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a20e622cf74b
unity_docs
rendering
What is `Rendering.SupportedRenderingFeatures.overridesFog` in Unity? Explain its purpose and usage.
SupportedRenderingFeatures.overridesFog public bool overridesFog ; Description Determines if the renderer will override the fog settings in the Lighting Panel and will no longer need the built-in UI for it.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0488c5fb0562
unity_docs
editor
What is `Unity.CodeEditor.CodeEditor.Register` in Unity? Explain its purpose and usage.
CodeEditor.Register Declaration public static void Register ( Unity.CodeEditor.IExternalCodeEditor externalCodeEditor ); Parameters Parameter Description externalCodeEditor The instance of IExternalCodeEditor to register and use to communicate with script Assets. Description Register an instance of IEx...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75e25639a9dd
unity_docs
scripting
What is `ContactFilter2D.ClearNormalAngle` in Unity? Explain its purpose and usage.
ContactFilter2D.ClearNormalAngle Declaration public void ClearNormalAngle (); Description Turns off normal angle filtering by setting useNormalAngle to false. The associated values of minNormalAngle and maxNormalAngle are not changed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1108074601d1
unity_docs
networking
What is `Networking.PlayerConnection.PlayerConnection.BlockUntilRecvMsg` in Unity? Explain its purpose and usage.
PlayerConnection.BlockUntilRecvMsg Declaration public bool BlockUntilRecvMsg (Guid messageId , int timeout ); Parameters Parameter Description messageId The type ID of the message that is sent to the Editor. timeout The time-out specified in milliseconds. Returns bool Returns true when the message is ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3541e5bb93f
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchSelection.MaxIndex`.
SearchSelection.MaxIndex Declaration public int MaxIndex (); Returns int Returns the highest selected index. Description Highest selected index of any item in the selection. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_AddSelection { static I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e152e281c72f
unity_docs
scripting
What is `Pool.LinkedPool_1.ctor` in Unity? Explain its purpose and usage.
LinkedPool<T0> Constructor Declaration public LinkedPool<T0> (Func<T> createFunc , Action<T> actionOnGet , Action<T> actionOnRelease , Action<T> actionOnDestroy , bool collectionCheck , int maxSize ); Parameters Parameter Description createFunc Used to create a new instance when the pool is empty. In mo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f882985879bb
unity_docs
audio
What is `AudioSpeakerMode.Mode5point1` in Unity? Explain its purpose and usage.
AudioSpeakerMode.Mode5point1 Description The Surround 5.1 speaker setup which contains six channels. Channel count is set to 6. The Surround 5.1 speaker mode contains six channels: Front left Front right Front center Low-Frequency Effects (LFE subwoofer) Rear left Rear right LFE is a specialized, band-limit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c58e8407f32
unity_docs
scripting
What is `Vector3.Scale` in Unity? Explain its purpose and usage.
Vector3.Scale Declaration public static Vector3 Scale ( Vector3 a , Vector3 b ); Description Multiplies two vectors component-wise. Every component in the result is a component of a multiplied by the same component of b . ```csharp // Calculate the two vectors generating a result. // This will comput...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b26f31618869
unity_docs
scripting
What is `SceneVisibilityManager.ToggleVisibility` in Unity? Explain its purpose and usage.
SceneVisibilityManager.ToggleVisibility Declaration public void ToggleVisibility ( GameObject gameObject , bool includeDescendants ); Parameters Parameter Description gameObject GameObject on which to toggle visibility. includeDescendants Whether to include descendants. Description Toggles the visible ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e9fa236d0a7d
unity_docs
rendering
In Unity's 'Leaf group reference', what is 'Using curves' and how does it work?
You can use curves to control some properties. For more information, refer to Editing curves . For many properties, the curve controls the details of the leaf’s shape along the length of the branch or trunk. The slider next to a curve is a multiplier on the curve values. Use the multiplier to add some variety when reus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e44408180801
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.ExternalForcesModule.RemoveAllInfluences`.
ParticleSystem.ExternalForcesModule.RemoveAllInfluences Declaration public void RemoveAllInfluences (); Description Removes every Force Field from the influencers list. When influenceFilter is set to ParticleSystemGameObjectFilter.List then only Force Fields in the influencers list affect the Particle Syst...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bc8f64caf54a
unity_docs
editor
What is `EditorWindow.OnProjectChange` in Unity? Explain its purpose and usage.
EditorWindow.OnProjectChange() Description Handler for message that is sent whenever the state of the project changes. Actions that trigger this message include creating, renaming, or reparenting assets, as well as moving or renaming folders in the project. Note that the message is not sent immediately in respons...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1a9aeaff480
unity_docs
rendering
What is `Renderer.shadowCastingMode` in Unity? Explain its purpose and usage.
Renderer.shadowCastingMode public Rendering.ShadowCastingMode shadowCastingMode ; Description Does this object cast shadows? ShadowCastingMode enum defines how and if shadows are cast from this object. Typically shadows are either cast or not, but it's also possible to make shadows two-sided (useful for othe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e378c132ac4c
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.ctor`.
Color Constructor Declaration public Color (float r , float g , float b , float a ); Parameters Parameter Description r Red component. g Green component. b Blue component. a Alpha component. Description Constructs a new Color with given r,g,b,a components. ```csharp using UnityEngine;public class...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52506223692d
unity_docs
math
What is `TerrainTools.DetailBrushBounds.GetBrushOffset` in Unity? Explain its purpose and usage.
DetailBrushBounds.GetBrushOffset Declaration public Vector2Int GetBrushOffset (int xPos , int yPos ); Parameters Parameter Description xPos The x position within brush bounds. yPos The y position within brush bounds. Returns Vector2Int Returns the brush offset. Description Gets the brush off...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28d7a9f52244
unity_docs
scripting
Give me an overview of the `WaitForFixedUpdate` class in Unity.
WaitForFixedUpdate class in UnityEngine / Inherits from: YieldInstruction / Implemented in: UnityEngine.CoreModule Description Suspends coroutine execution until the next fixed update. WaitForFixedUpdate can only be used with a yield statement in coroutines. Additional resources: AsyncOperation , WaitFor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19573eb3c5b5
unity_docs
animation
What are the parameters of `Animations.AnimatorController.CreateStateMachineBehaviour` in Unity?
Returns int Returns instance id of created object, returns 0 if something is not valid. Description This function will create a StateMachineBehaviour instance based on the class define in this script. This function will validate that the monoscript is a valid statemachine behaviour, the class must be a sub class of Sta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59738e29410d
unity_docs
scripting
What is `Experimental.GraphView.SearchTreeEntry.name` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SearchTreeEntry.name public string name ; Description The string used for string comparison against the user filter. This is equal the content's text property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3dc8279c844b
unity_docs
scripting
What is `MonoBehaviour.useGUILayout` in Unity? Explain its purpose and usage.
MonoBehaviour.useGUILayout public bool useGUILayout ; Description Disabling this lets you skip the GUI layout phase. It can only be used if you do not use GUI.Window and GUILayout inside of this OnGUI call. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { pu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_63294fad0e11
unity_docs
input
In Unity's 'TextField', what is 'Customize the input text selection' and how does it work?
Input text is selectable by default. You can customize the selection behaviors such as selectAllOnMouseUP and selectAllOnFocus . In C#, set them through textSelection : ``` myElement.textSelection.selectAllOnMouseUp = false; myElement.textSelection.selectAllOnFocus = false; ``` You can also style the selected text usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive an argument of type as part of its initialization process.-derived classes that implement this interface can be instantiated with their dependency using the function.-derived classes that implement this interface can be added to a with their dependency using the GameObject.AddCom...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_2ad94040e6b4
unity_docs
scripting
What is `RectOffset` in Unity? Explain its purpose and usage.
RectOffset class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Offsets for rectangles, borders, etc. Used all over the place by GUIStyle . Properties Property Description bottom Bottom edge size. horizontal Shortcut for left + right. (Read Only) left Left edge size. right Right edg...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b34b007ef1a
unity_docs
physics
Show me a Unity C# example demonstrating `RaycastHit.point`.
RaycastHit.point public Vector3 point ; Description The impact point in world space where the ray hit the collider. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Apply a force to a rigidbody in the Scene at the point // where it is clicked. // The force with which the target is "poke...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_893936a030bd
unity_docs
scripting
In Unity's 'Parent Constraint component', what is 'Properties' and how does it work?
Property Description Activate After you move and rotate the constrained GameObject and its source GameObjects, click Activate to save this information. Activate saves the current offset from the source GameObjects in Rotation At Rest , Position At Rest , Position Offset , and Rotation Offset , then enables Is Active an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8dbdfbe7d605
unity_docs
scripting
What are the parameters of `Editor.CreateEditor` in Unity?
Description Make a custom editor for targetObject or targetObjects . By default, an appropriate editor with a matching CustomEditor attribute is created. If an editorType is specified, an editor of that type is created instead. Use this if you have created multiple custom editors...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a11c6fb8ce9a
unity_docs
editor
In Unity's 'Build an iOS application', what is 'Run an Xcode project from the command line' and how does it work?
After Unity generates the Xcode project, you can build and run the Xcode project from the command line. To do this, use the following steps: Open a Terminal window. Navigate to the Xcode project directory. Find the device ID of the device you want to run the application on. You can find this in Xcode under Window > Dev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a6f7a8823052
unity_docs
editor
In Unity's 'Native memory allocators reference', what is 'Gfx Allocator' and how does it work?
The allocator Unity uses for CPU allocations related to the Gfx system. It has the following settings: Setting Description Command line argument Default value Main Thread Block Size Block size of the dedicated main thread Gfx allocator. memorysetup-gfx-main-allocator-block-size 16777216 bytes Shared Thread Block Size B...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e4702604315
unity_docs
rendering
What are the parameters of `RenderTexture.DiscardContents` in Unity?
Description Hint the GPU driver that the contents of the RenderTexture will not be used. On some platforms, it can be good for performance if you indicate when the current contents of a RenderTexture aren't needed any more. This can save copying it from one kind of memory to another when the texture is reused. Many mob...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d4ad1e298e34
unity_docs
rendering
What is `Shader.FindPassTagValue` in Unity? Explain its purpose and usage.
Shader.FindPassTagValue Declaration public Rendering.ShaderTagId FindPassTagValue (int passIndex , Rendering.ShaderTagId tagName ); Parameters Parameter Description passIndex The index of the pass. tagName The name of the tag. Description Searches for the tag specified by tagName on the shader's ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3dc4413a9a70
unity_docs
rendering
In Unity's 'Tree level of detail (LOD)', what is 'Tree Editor' and how does it work?
Tree Editor trees don’t have an LODGroup component. Unity’s LOD system uses a 2D to 3D transition zone to blend 2D billboards with 3D tree models. This prevents a sudden popping of 2D and 3D trees, which is important for realism in VR . Note : Billboard trees don’t receive local lighting such as Point Lights and Spot L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_27e7ed116e1e
unity_docs
audio
Explain 'Validate and upload assets to your package' in Unity.
You can add assets to any package draft on the Publisher Portal or from the Unity Editor. To upload assets, use the Asset Store Publishing Tools package. Note : To organize your package’s assets in an effective way, move all the assets to a top-level folder that has the same name as your package. ## Install the Asset ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b13acda0b9a
unity_docs
scripting
What is `Unity.IO.LowLevel.Unsafe.FileInfoResult` in Unity? Explain its purpose and usage.
FileInfoResult struct in Unity.IO.LowLevel.Unsafe / Implemented in: UnityEngine.CoreModule Description The results of an asynchronous AsyncReadManager.GetFileInfo call. This structure reports whether the file to be queried was found, and if so, its size in bytes. Properties Property Description FileSize I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40174052528e
unity_docs
rendering
What is `DynamicGI.SetEnvironmentData` in Unity? Explain its purpose and usage.
DynamicGI.SetEnvironmentData Declaration public static void SetEnvironmentData (float[] input ); Parameters Parameter Description input Array of float values to be used for Enlighten Realtime Global Illumination environment lighting. Description Allows overriding the distant environment lighting for Enligh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_80cb9ea1b8d2
unity_docs
rendering
What is `Experimental.GraphView.Placemat.SetCollapsedElements` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Placemat.SetCollapsedElements Declaration protected void SetCollapsedElements (IEnumerable<GraphElement> collapsedElements ); Parameters Parameter Description collapsedElements The list of elements to mark as collapsed. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_404ea3809f42_doc_7
github
scripting
What does `LinkedEntityId` do in this Unity script? Explain its purpose and signature.
The property returns an identifier of the linked entity Signature: ```csharp public EntityId LinkedEntityId => mLinkedEntityId; ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_ddc8d5c9411e
unity_docs
rendering
In Unity's 'Build AssetBundles in parallel processes', what is 'Enable building AssetBundles in parallel processes' and how does it work?
To enable Multi-Process AssetBundle Building , perform the following steps: Go to Edit > Project Settings to open the Project Settings window. Select the Editor category. Under Build Pipeline , enable Multi-Process AssetBundle Building . You can use EditorBuildSettings.UseParallelAssetBundleBuilding to control this set...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a22a79249c8c
unity_docs
rendering
What is `WebCamTexture.Pause` in Unity? Explain its purpose and usage.
WebCamTexture.Pause Declaration public void Pause (); Description Pauses the camera. Call Application.RequestUserAuthorization before creating a WebCamTexture. ```csharp // Starts a camera and assigns the texture to the current renderer. // Pauses the camera when the "Pause" button is clicked and released. u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35baf3d97724
unity_docs
scripting
Show me a Unity C# example demonstrating `Keyframe.outWeight`.
Keyframe.outWeight public float outWeight ; Description Sets the outgoing weight for this key. The outgoing weight affects the slope of the curve from this key to the next key. The weight is a value between 0 and 1. Set weightedMode to WeightedMode.Out or WeightedMode.Both to include weight when calculati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4468b32bc7cc
unity_docs
scripting
What is `ObjectPreview.OnInteractivePreviewGUI` in Unity? Explain its purpose and usage.
ObjectPreview.OnInteractivePreviewGUI Declaration public void OnInteractivePreviewGUI ( Rect r , GUIStyle background ); Parameters Parameter Description r Rectangle in which to draw the preview. background Background image. Description Implement to create your own interactive custom preview. Interact...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ddf2948e1b08
unity_docs
physics
Give me an overview of the `Ray2D` class in Unity.
Ray2D struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description A ray in 2D space. A ray is a line segment that extends from a point in space in a specified direction. Rays have a number of uses in Unity but the most common is probably raycasting . This technique involves tracing along the p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9565f8e5c054
unity_docs
scripting
Explain 'Remove a layer from a layerMask' in Unity.
To remove a layer from a layermask, use the logical AND operator on the original layermask and the bitwise complement of the layer to remove it. ``` originalLayerMask &= ~(1 << layerToRemove); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b99eb163ed9
unity_docs
scripting
Explain 'Creating, loading, and saving scenes' in Unity.
This page explains how to create , load , and save scenes . ## Creating a new scene There are several ways to create a new scene: Use the New Scene dialog to create a new scene from a specific scene template. Use the menu or the Project window to create new scenes from your Project’s Basic scene template without open...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4e461bdd7a2b
unity_docs
rendering
Explain 'Metallic and specular workflows' in Unity.
Prebuilt Unity shaders have two different ways of calculating reflections, known as workflows: Metallic workflow. Set a value for how metallic the material is, where 0 is non-metallic and 1 is fully metallic. Unity calculates the strength and color of reflections, and tints them with the base color. Specular workflow. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d58d98490fc9
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.ContainsFileByProjectPath` in Unity?
Returns bool Returns true if the project contains the file. Description Checks if the project contains a file with the given project path. ```csharp using UnityEngine; using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_ContainsFileByProjectPath { [Post...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_94c06bb4ee44
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.IsRenamable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.IsRenamable Declaration public bool IsRenamable (); Returns bool Returns true if the GraphElement is renamable. Returns false otherwise. Description The GraphElement is renamable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_52d0658cba67_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Defines if the singleton should create itself in the active scene when its instance is first called. Signature: ```csharp public static bool AutomaticCreation ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_f80e8478a9c3
unity_docs
editor
What is `Device.SystemInfo.supportsMotionVectors` in Unity? Explain its purpose and usage.
SystemInfo.supportsMotionVectors public static bool supportsMotionVectors ; Description This has the same functionality as SystemInfo.supportsMotionVectors and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_860d407d1d23
unity_docs
xr
What are the parameters of `Resources.LoadAsync` in Unity?
Description Asynchronously loads an asset stored at path in a Resources folder. Returns a ResourceRequest, from which the asset can be retrieved once the loading operation is completed. Only objects of type will be returned if this parameter is supplied. The path is relative to any Resources folder insi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7acddfe1b34f
unity_docs
math
What is `MaterialPropertyBlock.SetFloatArray` in Unity? Explain its purpose and usage.
MaterialPropertyBlock.SetFloatArray Declaration public void SetFloatArray (string name , float[] values ); Declaration public void SetFloatArray (int nameID , float[] values ); Declaration public void SetFloatArray (string name , List<float> values ); Declaration public void SetFloatArray (int nam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf10585683f5
unity_docs
scripting
Show me a Unity C# example demonstrating `Android.AndroidApplication.InvokeOnUIThread`.
AndroidApplication.InvokeOnUIThread Declaration public static void InvokeOnUIThread ( Unity.Android.Gradle.Manifest.Action action ); Description Invokes delegate on Android application's UI thread. Note: Certain Android Java functions, such as those related to the user interface can only be called on the UI ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b55f9985a3c4
unity_docs
scripting
What is `Playables.PlayableExtensions.Pause` in Unity? Explain its purpose and usage.
PlayableExtensions.Pause Declaration public static void Pause (U playable ); Parameters Parameter Description playable The Playable used by this operation. Description Tells to pause the Playable . When paused, the local time of this Playable will not be updated during the evaluation of the Playable...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d41f857f8f12
unity_docs
rendering
What is `SystemInfo.maxComputeBufferInputsGeometry` in Unity? Explain its purpose and usage.
SystemInfo.maxComputeBufferInputsGeometry public static int maxComputeBufferInputsGeometry ; Description Determines how many compute buffers Unity supports simultaneously in a geometry shader for reading. (Read Only)
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d786f954f1d3
unity_docs
scripting
Give me an overview of the `BuildTargetGroup` class in Unity.
BuildTargetGroup enumeration Description Build target group. Additional resources: BuildPipeline.BuildPlayer , BuildTarget . Properties Property Description Unknown Unknown target. Standalone PC (Windows, Mac, Linux) target. iOS Apple iOS target. Android Android target. WebGL WebGL. WSA Windows Store Ap...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_819a6b8e9a08
unity_docs
physics
What is `IMGUI.Controls.AdvancedDropdown.Show` in Unity? Explain its purpose and usage.
AdvancedDropdown.Show Declaration public void Show ( Rect rect ); Parameters Parameter Description rect Position of the button that triggered the drop-down. Description Call this method to show the drop-down at the given position.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a558d467ffd7
unity_docs
input
What is `UIElements.MouseCaptureController.IsMouseCaptured` in Unity? Explain its purpose and usage.
MouseCaptureController.IsMouseCaptured Declaration public static bool IsMouseCaptured (); Returns bool True if a handler is capturing the mouse, false otherwise. Description Checks if there is a handler capturing the mouse.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5757fcfa92a5
unity_docs
scripting
What is `UIElements.PointerCaptureHelper.ReleasePointer` in Unity? Explain its purpose and usage.
PointerCaptureHelper.ReleasePointer Declaration public static void ReleasePointer ( UIElements.IEventHandler handler , int pointerId ); Parameters Parameter Description handler The element which potentially captured the pointer. pointerId The captured pointer. Description Tests whether an element capt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8042bbb4ce37
unity_docs
rendering
Explain 'Decal' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this shader . ## Decal Properties This shader is a variation of the VertexLit shader. All lights that shine on it will be rendered as vertex lights by this shader. In addition to the main texture, this shader makes use of a second texture for additional deta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cdbd2eafbfd0
unity_docs
rendering
Explain 'Using Streaming Virtual Texturing in Shader Graph' in Unity.
You can use Streaming Virtual Texturing (SVT) with shaders you create in Shader Graph . Before you begin, you must enable Virtual Texturing in your project . The built-in High Definition Render Pipeline shaders (such as Lit and Unlit) don’t support SVT. To use SVT to stream a texture, you must add the texture to a Virt...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_91020f49d60d
unity_docs
editor
What are the parameters of `Handles.DrawSolidArc` in Unity?
Description Draw a circular sector (pie piece) in 3D space. Solid Arc in the Scene View. ```csharp using UnityEditor; using UnityEngine;static class ArcExample { static Vector3 m_Angle = new Vector3(1.5f, .66f, 0f); // Create an arc at 0, 0, 0 in the Scene view and a slider that changes thes angle of the arc. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3903872317d0
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.contentHash`.
the property path leads to an array or complex type, the hash will correspond to the entire content. -If the property is a field with [SerializeReference] attribute, or a compound type that contains such a field, then the content hashing doesn't include the content of the referenced object, instead it only hashes the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f93bb833babb
unity_docs
rendering
What is `ShaderData.Subshader.GetPass` in Unity? Explain its purpose and usage.
ShaderData.Subshader.GetPass Declaration public ShaderData.Pass GetPass (int passIndex ); Parameters Parameter Description passIndex The index of the pass. Returns Pass The specified pass or null, if none exists. Description Get a pass of a subshader.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_86a806969c87
github
scripting
Write a Unity C# script called Animation Blend Tree
```csharp using System; using UnityEngine.Animations; namespace UnityEngine.Playables { public interface IBlendTreeElement { public float GetLength(); public Playable GetPlayable(); public Playable CreatePlayable(); } abstract class AnimationBlendTree<TPosition> : IBlendTreeEle...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_e6af7c082da3
unity_docs
scripting
What is `Build.Reporting.BuildReport` in Unity? Explain its purpose and usage.
BuildReport class in UnityEditor.Build.Reporting / Inherits from: Object Description The BuildReport API gives you information about the Unity build process. A BuildReport object is returned by BuildPipeline.BuildPlayer and can be used to discover information about the files output, the build steps taken, and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_568a335b45bb
unity_docs
audio
What is `Input.deviceOrientation` in Unity? Explain its purpose and usage.
Input.deviceOrientation public static DeviceOrientation deviceOrientation ; Description Device physical orientation as reported by OS. (Read Only) Note : This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d9a38ea0decd
unity_docs
scripting
What is `UIElements.VisualElement.resolvedStyle` in Unity? Explain its purpose and usage.
VisualElement.resolvedStyle public UIElements.IResolvedStyle resolvedStyle ; Description The final rendered style values of a visual element, as it's rendered in the current frame.(Read Only) Use resolvedStyle to find the actual rendered styling of a VisualElement in the current frame, such as style ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.