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_aadffcad7459
unity_docs
scripting
What is `SystemInfo.supportsIndirectArgumentsBuffer` in Unity? Explain its purpose and usage.
SystemInfo.supportsIndirectArgumentsBuffer public static bool supportsIndirectArgumentsBuffer ; Description Returns true if the graphics system supports GPU draw calls with indirect argument buffers. (Read Only) The following methods use indirect argument buffers and do not have fallbacks for systems that do ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_de673ebea868
unity_docs
scripting
What is `PackageManager.Events.registeredPackages` in Unity? Explain its purpose and usage.
Events.registeredPackages Parameters Parameter Description value A PackageRegistrationEventArgs structure describing the modifications to the registered packages list. Description Event raised after applying changes to the registered packages list. Occurs after the asset database is done refreshing, which i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eebaf2f79668
unity_docs
editor
What is `Experimental.Rendering.ScriptableBakedReflectionSystemSettings` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ScriptableBakedReflectionSystemSettings class in UnityEditor.Experimental.Rendering Description Global settings for the scriptable baked reflection system. Static Properties Property Description system The currently active ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c13463c0845a
github
scripting
Write a Unity C# MonoBehaviour script called Singleton Mono Behaviour
```csharp //-------------------------------------- // Imports //-------------------------------------- using UnityEngine; //-------------------------------------- // Namespace //-------------------------------------- namespace RMC.Core.DesignPatterns.Singleton { public abstract class SingletonMonoBehaviour : Mono...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e852ae9f1d69
unity_docs
rendering
What is `SpeedTreeImporter.MaterialLocation.External` in Unity? Explain its purpose and usage.
SpeedTreeImporter.MaterialLocation.External Description Extract the materials and textures from the model. Unity extracts the materials to a folder named "<assetName> Materials", at the same level as the model file. For example, if the model is Assets/Model/MyModel.spm, then its materials are extracted to Assets/M...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30cc8ec3f584
unity_docs
scripting
What is `Animation` in Unity? Explain its purpose and usage.
Animation class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AnimationModule Description The animation component is used to play back animations. You can assign animation clips to the animation component and control playback from your script. The animation system in Unity is weight...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db97bd028269
unity_docs
physics
What is `TerrainTools.IOnSceneGUI` in Unity? Explain its purpose and usage.
IOnSceneGUI interface in UnityEditor.TerrainTools Description Interface that provides parameters and utility functions for the OnSceneGUI event of the terrain paint tools. Additional resources: TerrainPaintTool<T0>.OnSceneGUI . Properties Property Description brushSize Read only. Current brush size in terrai...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_14bd67d1845b_doc_1
github
scripting
What does `ReadInput` do in this Unity script? Explain its purpose and signature.
Reads the value of the move input (coming from Omnideck interface).Will drive the Charactercontroller via the ContinousMoveProviderBase class.Returns the input vector, for the Omnideck character. Signature: ```csharp protected override Vector2 ReadInput() ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_20a65cdf3553
unity_docs
scripting
What is `Unity.IntegerTime.DiscreteTime.operator_divide` in Unity? Explain its purpose and usage.
DiscreteTime.operator / public static Unity.IntegerTime.DiscreteTime operator / ( Unity.IntegerTime.DiscreteTime lhs , double s ); public static Unity.IntegerTime.DiscreteTime operator / ( Unity.IntegerTime.DiscreteTime lhs , long s ); Parameters Parameter Description lhs The left hand side. rh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef5179f2c3af
unity_docs
animation
What is `ModelImporterGenerateAnimations` in Unity? Explain its purpose and usage.
ModelImporterGenerateAnimations enumeration Description Animation generation options for ModelImporter . These options relate to the legacy Animation system, they should only be used when ModelImporter.animationType==ModelImporterAnimationType.Legacy. Additional resources: ModelImporter.generateAnimations . Pro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c936a127285b
unity_docs
scripting
Show me a Unity C# example demonstrating `HeaderAttribute`.
HeaderAttribute class in UnityEngine / Inherits from: PropertyAttribute / Implemented in: UnityEngine.CoreModule Description Use this PropertyAttribute to add a header above some fields in the Inspector. The header is done using a DecoratorDrawer . ```csharp using UnityEngine;public class Example : MonoBe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3bb11d7348d5
unity_docs
rendering
Show me a Unity code example for 'Global illumination Surface Shader example in the Built-In Render Pipeline'.
We’ll start with a Shader that mimics Unity’s built-in GI: ```csharp Shader "Example/CustomGI_ToneMapped" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } CGPROGRAM #pragma surface surf StandardDefaultGI #include "UnityPBSLighting.cginc" sampler2D _Ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4415e86013bc
unity_docs
editor
What is `PackageManager.PackageInfo` in Unity? Explain its purpose and usage.
PackageInfo class in UnityEditor.PackageManager Description Structure describing a Unity Package. Either a reference to a package in a registry, to a revision of a source repository, a resource on the net or to a package available on disk. Properties Property Description assetPath The asset path of the packa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7e2b647faa2
unity_docs
rendering
What is `ShaderKeywordFilter.ApplyRulesIfTagsNotEqualAttribute.ctor` in Unity? Explain its purpose and usage.
ApplyRulesIfTagsNotEqualAttribute Constructor Declaration public ApplyRulesIfTagsNotEqualAttribute (params string[] tags ); Parameters Parameter Description tags An array of strings with tag names and values. Use the first element in the array for the tag name, then the second element for the tag value, and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a3ce1616bc5
unity_docs
xr
What is `Texture2D.desiredMipmapLevel` in Unity? Explain its purpose and usage.
Texture2D.desiredMipmapLevel public int desiredMipmapLevel ; Description The mipmap level that the streaming system would load before memory budgets are applied. This includes requested and minimum mip level settings. Additional resources: calculatedMipmapLevel , requestedMipmapLevel , minimumMipmapLevel .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5e118c76231
unity_docs
scripting
What is `AvatarMask` in Unity? Explain its purpose and usage.
AvatarMask class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.AnimationModule Description AvatarMask is used to mask out humanoid body parts and transforms. They can be used when importing animation or in an animator controller layer. Properties Property Description transformCount...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_14a5a252ed50
unity_docs
editor
What is `MeshPreview.OnPreviewGUI` in Unity? Explain its purpose and usage.
MeshPreview.OnPreviewGUI Declaration public void OnPreviewGUI ( Rect rect , GUIStyle background ); Parameters Parameter Description rect Rectangle in which to draw the preview. background The background style. Description Call this from an Editor.OnPreviewGUI or ObjectPreview.OnPreviewGUI to draw...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0fa8bc12fb1e
unity_docs
rendering
What is `Material.SetFloat` in Unity? Explain its purpose and usage.
Material.SetFloat Declaration public void SetFloat (string name , float value ); Declaration public void SetFloat (int nameID , float value ); Parameters Parameter Description nameID Property name ID, use Shader.PropertyToID to get it. value Float value to set. name Property name, e.g. "_Glossi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7f787e11c88f
unity_docs
animation
What is `Animations.AnimatorControllerPlayable.SetLayerWeight` in Unity? Explain its purpose and usage.
AnimatorControllerPlayable.SetLayerWeight Declaration public void SetLayerWeight (int layerIndex , float weight ); Parameters Parameter Description layerIndex The layer index. weight The new layer weight. Description Sets the weight of the layer at the given index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_415419035731
unity_docs
math
What is `Rendering.CommandBuffer.SetRayTracingIntParams` in Unity? Explain its purpose and usage.
CommandBuffer.SetRayTracingIntParams Declaration public void SetRayTracingIntParams ( Rendering.RayTracingShader rayTracingShader , string name , params int[] values ); Declaration public void SetRayTracingIntParams ( Rendering.RayTracingShader rayTracingShader , int nameID , params int[] values ); Pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8f09e2792ba7
github
scripting
Write a Unity C# UI script for Vertex Zoom
```csharp using UnityEngine; using System.Linq; using System.Collections; using System.Collections.Generic; namespace TMPro.Examples { public class VertexZoom : MonoBehaviour { public float AngleMultiplier = 1.0f; public float SpeedMultiplier = 1.0f; public float CurveScale = 1.0f; ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f3bb01f2bdc
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLight.indirectColor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLight.indirectColor public Experimental.GlobalIllumination.LinearColor indirectColor ; Description The indirect light color.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b15478cdcec1
unity_docs
scripting
Show me a Unity code example for 'Pooling and reusing objects'.
corresponding actionOnRelease callback, deactivate the returned object, and reset any relevant properties such as its velocity and animation state. The following is the script component code for a projectile that’s pooled in an ObjectPool<T> . Note that the projectile has a public property to give it a reference to its...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6135d4cdcad0
unity_docs
xr
What is `Rendering.ObjectIdResult.idToObjectMapping` in Unity? Explain its purpose and usage.
ObjectIdResult.idToObjectMapping public Object[] idToObjectMapping ; Description An array of Objects that can be used to deterimine the object at each pixel in ObjectIdRequest._destination, first by decoding colors from ObjectIdRequest._destination to an index using ObjectIdResult.DecodeIdFromColor , and then ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_83dc4642f994
unity_docs
performance
What is `ParticleSystemJobs.ParticleSystemJobData.startColors` in Unity? Explain its purpose and usage.
ParticleSystemJobData.startColors public NativeArray<Color32> startColors ; Description The initial color of each particle. Unity multiplies these values by any settings in the SizeOverLifetimeModule and SizeBySpeedModule during rendering.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_06e399f87535
unity_docs
scripting
In Unity's 'Introduction to programming in Unity', what is 'The Unity scripting environment' and how does it work?
Unity supports scripting in the C# programming language. C# (pronounced C-sharp) is a managed, object-oriented programming language, which is part of the .NET platform and runs in the cross-platform .NET runtime. Other .NET languages can be used with Unity if they can compile a compatible DLL, refer to Managed plugins ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1f2c7d44ca8d
unity_docs
scripting
What is `IntegratedSubsystem.Destroy` in Unity? Explain its purpose and usage.
IntegratedSubsystem.Destroy Declaration public void Destroy (); Description Destroys this instance of a subsystem. Also unloads all resources acquired during initialization step. Should be called when this instance of a subsystem is no longer needed. Note: Once a Subsystem is Destroyed, script can still hold a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0c99a773870f
unity_docs
scripting
What is `Mesh.RecalculateBounds` in Unity? Explain its purpose and usage.
Mesh.RecalculateBounds Declaration public void RecalculateBounds ( Rendering.MeshUpdateFlags flags = MeshUpdateFlags.Default); Parameters Parameter Description flags Flags controlling the function behavior, see MeshUpdateFlags . Description Recalculate the bounding volume of the Mesh and all of its sub...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a8c5c5a582fe
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.IsResizable` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.IsResizable Declaration public bool IsResizable (); Returns bool Returns true if the GraphElement is resizable. Returns false otherwise. Description The GraphElement is resizable.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_715533cc9b7b
unity_docs
physics
What is `BuoyancyEffector2D.linearDrag` in Unity? Explain its purpose and usage.
BuoyancyEffector2D.linearDrag public float linearDrag ; Description A force applied to slow linear movement of any Collider2D in contact with the effector. Linear drag provides the ability to slow Collider2D in contact with the effector. Increasing the linear drag simulates an increasingly viscous fluid mak...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3075404e3c1c
unity_docs
rendering
What is `ReflectionProbe.RenderProbe` in Unity? Explain its purpose and usage.
ReflectionProbe.RenderProbe Declaration public int RenderProbe ( RenderTexture targetTexture = null); Parameters Parameter Description targetTexture Target RenderTexture in which rendering should be done. Specifying null will update the probe's default texture. Returns int An integer representing a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f31d30b688f6
unity_docs
scripting
What is `Light.intensity` in Unity? Explain its purpose and usage.
Light.intensity public float intensity ; Description The Intensity of a light is multiplied with the Light color. The value can be between 0 and 8. This allows you to create over bright lights. ```csharp using UnityEngine;public class example : MonoBehaviour { Light myLight; void Start() { myLight = GetCom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2465c28f2166
unity_docs
editor
What are the parameters of `EditorGUI.hyperLinkClicked` in Unity?
Description Event used to react on clicks on a text hyperlink part. On a rich text string, a hyperlink is defined with the <a> tag. ``` <a href="https://docs.unity3d.com">Documentation link</a> ``` The hyperlink parameters are returned in the HyperLinkClickedEventArgs . In the example above, the HyperLinkClickedEventAr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_403455d4d34d
unity_docs
scripting
Show me a Unity C# example demonstrating `Canvas.renderMode`.
Canvas.renderMode public RenderMode renderMode ; Description Is the Canvas in World or Overlay mode? ```csharp //Attach this script to your Canvas GameObjectusing UnityEngine;public class Example : MonoBehaviour { enum RenderModeStates { camera, overlay, world }; RenderModeStates m_RenderModeStates; Canva...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8caa49c2cc0f
unity_docs
scripting
What is `RuntimeInitializeLoadType.BeforeSplashScreen` in Unity? Explain its purpose and usage.
RuntimeInitializeLoadType.BeforeSplashScreen Description Callback invoked before the splash screen is shown. At this time the objects of the first scene have not been loaded yet. If the splash screen is turned off, functions using this load type are invoked when the splash screen would have been displayed. For more...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c4cc3f39b38
unity_docs
scripting
Show me a Unity C# example demonstrating `Rigidbody.MoveRotation`.
enabled on the Rigidbody , calling Rigidbody.MoveRotation will resulting in a smooth transition between the two rotations in any intermediate frames rendered. This should be used if you want to continuously rotate a rigidbody in each FixedUpdate . Set Rigidbody.rotation instead, if you want to teleport a rigidbod...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_242e6d9c9abb
unity_docs
scripting
Explain 'Sort the package list' in Unity.
You can always sort in ascending or descending order on the name of the feature set or package. Depending on the list context, you might also have one or more dates you can sort on. Context Menu options Description In Project Name Name. In Project Published date The date the creator published this feature set or packag...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b57a1e7b1d38
unity_docs
editor
In Unity's 'iOS environment setup', what is 'Set up an Apple ID or join the Apple Developer Program' and how does it work?
To test your build on an iOS device, you need a free Apple ID . However, to distribute your app on the App Store, and to use services such as Game Center or In-App Purchases, you need to register with the Apple Developer Program . For more information about the differences between an Apple ID and Apple Developer Progra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7cc0c08354c2
unity_docs
rendering
What is `ParticleSystem.ShapeModule.arcMode` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.arcMode public ParticleSystemShapeMultiModeValue arcMode ; Description The mode that Unity uses to generate particles around the arc. Additional resources: ParticleSystem.ShapeModule.shapeType .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_811088489bda
unity_docs
scripting
Show me a Unity C# example demonstrating `NetworkReachability.ReachableViaLocalAreaNetwork`.
NetworkReachability.ReachableViaLocalAreaNetwork Description Network is reachable via WiFi or cable. ```csharp //Attach this script to a GameObject //This script checks the device’s ability to reach the internet and outputs it to the console windowusing UnityEngine;public class Example : MonoBehaviour { string m_R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c645a559d291
unity_docs
physics
Show me a Unity C# example demonstrating `MonoBehaviour.OnTriggerExit2D`.
when another object leaves a trigger collider attached to this object (2D physics only). Further information about the other collider is reported in the Collider2D parameter passed during the call. Note: Trigger events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions. Ad...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2816efea368a
unity_docs
physics
What is `ContactFilter2D.maxDepth` in Unity? Explain its purpose and usage.
ContactFilter2D.maxDepth public float maxDepth ; Description Sets the contact filter to filter the results to only include Collider2D with a Z coordinate (depth) less than this value. This is only used if useDepth is true. If the maxDepth is set to - Mathf.Infinity or Mathf.Infinity then the highest po...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f48221084022
unity_docs
rendering
What is `Camera.ResetReplacementShader` in Unity? Explain its purpose and usage.
Camera.ResetReplacementShader Declaration public void ResetReplacementShader (); Description Remove shader replacement from camera. Call this to end the effect of setting SetReplacementShader .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1d15cdc4c77c
unity_docs
scripting
In Unity's 'Create a custom Inspector', what is 'Create a custom Inspector script' and how does it work?
To create a custom Inspector for any serialized object, you need to create a class deriving from the Editor base class and add the CustomEditor attribute to it. This attribute lets Unity know which class this custom Inspector represents. Note : The custom Inspector script must be in an Editor folder or an Editor-only a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_135926a237e2
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.rotation`.
se rotation to rotate a GameObject or provide the current rotation. Do not attempt to edit/modify rotation . Transform.rotation is less than 180 degrees. Transform.rotation has no gimbal lock. To rotate a Transform , use Transform.Rotate , which uses Euler Angles. If you want to match values you see in the Insp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3a2cd9a75ebb
unity_docs
rendering
Explain 'Material Validator window reference for the Built-In Render Pipeline' in Unity.
## Validate Albedo mode The PBR Validation Settings that appear in the Scene view when you set Material Validation to Validate Albedo. Property Description Check Pure Metals Enable this checkbox if you want the Material Validator to highlight in yellow any pixels it finds which Unity defines as metallic, but which hav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cd361d338c9d
unity_docs
networking
In Unity's 'Multiplayer Widgets', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.multiplayer.widgets@1.1 compatible 1.1.0-exp.1 com.unity.multiplayer.widgets@1.0 released 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4bbabc066c21
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.ReadStatus.Truncated` in Unity? Explain its purpose and usage.
ReadStatus.Truncated Description The asynchronous file request has completed but one or more of the read operations were truncated. A truncated read occurs when the ReadCommand describing the read operation specifies a Size and Offset that extends past the end of the target file. After the read operation is c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2356949c4a96
unity_docs
scripting
What is `Playables.PlayableOutputExtensions.SetUserData` in Unity? Explain its purpose and usage.
PlayableOutputExtensions.SetUserData Declaration public static void SetUserData (U output , Object value ); Parameters Parameter Description output The PlayableOutput used by this operation. value The new user data. Description Sets the opaque user data. This same data is passed as the last argument...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dbba24b94d75
unity_docs
scripting
Explain 'Focused Inspectors' in Unity.
By default, an Inspector window displays properties for the current selection, and its focus changes whenever the selection changes. To keep the focus on a single item or group of items, regardless of the current selection, do one of the following: Lock the Inspector window to the current selection. When you lock an In...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9bc40c46e9ff_doc_1
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
/ -------------------------------------------------------------------------------------------/ Events End/ ------------------------------------------------------------------------------------------- Signature: ```csharp protected T _GetBehaviour<T>() where T : CharacterBehaviour ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_193038c2569f
unity_docs
rendering
What is `LightEditor.Settings.DrawRange` in Unity? Explain its purpose and usage.
LightEditor.Settings.DrawRange Obsolete showAreaOptions argument for DrawRange(showAreaOptions) has been removed. Use DrawRange() instead. Declaration public void DrawRange (bool showAreaOptions ); Description Draws the default LightEditor range widget.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3253f1c5ff1a
unity_docs
editor
What is `EditorApplication.Exit` in Unity? Explain its purpose and usage.
EditorApplication.Exit Declaration public static void Exit (int returnValue ); Description Exit the Unity editor application. Calling this function will exit right away, without asking to save changes, so you may lose data! This function is mostly useful for exiting out of a commandline process with a specific...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9dae7dbb5d81
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.fieldOfView`.
will see a warning logged if you attempt to set the property and the value will be ignored. If you make changes to Camera.projectionMatrix , the Camera ignores fieldOfView . This lasts until you call Camera.ResetProjectionMatrix . In the Unity Editor, this corresponds to the Clipping Planes: Near property in the C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_29a7287fa768
unity_docs
scripting
What is `PluginImporter.GetImporters` in Unity? Explain its purpose and usage.
PluginImporter.GetImporters Declaration public static PluginImporter[] GetImporters ( BuildTarget platform ); Declaration public static PluginImporter[] GetImporters (string platformName ); Parameters Parameter Description platform Target platform. platformName Name of the target platform. Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_72ea0c0a5614
unity_docs
scripting
What is `IMGUI.Controls.TreeView.GetExpanded` in Unity? Explain its purpose and usage.
TreeView.GetExpanded Declaration public IList<int> GetExpanded (); Returns IList<int> TreeViewItem IDs. Description Returns a list of TreeViewItem IDs that are currently expanded in the TreeView. Additional resources: SetExpanded .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95e39990a30c
unity_docs
scripting
What is `UIElements.ScrollView.verticalHorizontalVariantUssClassName` in Unity? Explain its purpose and usage.
ScrollView.verticalHorizontalVariantUssClassName public static string verticalHorizontalVariantUssClassName ; Description USS class name that's added when the ScrollView is in both horizontal and vertical mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9ad6f5ca783c
unity_docs
rendering
In Unity's 'Self-Illuminated Normal mapped Diffuse', what is 'Creating Normal maps' and how does it work?
You can import normal maps created outside of Unity, or you can import a regular grayscale image and convert it to a Normal Map from within Unity. (This page refers to a legacy shader which has been superseded by the Standard Shader , but you can learn more about how to use Normal Maps in the Standard Shader )
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0bcbc263d019
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.InsertCopyFilesBuildPhase` in Unity?
Returns string Returns the GUID of the new phase. Description Creates a new copy files build phase for a given target. The build phase is inserted at the specified position. You can query all the defined build phases using GetAllBuildPhasesForTarget . ```csharp using UnityEditor; using System.IO; using UnityEditor.Call...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d62892637b01
unity_docs
rendering
In Unity's 'Terrain Layers', what is 'Creating Terrain Layers' and how does it work?
To create a Terrain Layer directly in the Terrain Inspector , click the paintbrush icon in the toolbar at the top of the Terrain Inspector, and select Paint Texture from the drop-down menu. At the bottom of the Terrain Layers section, click the Edit Terrain Layers button, and choose Create Layer . To edit terrain layer...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bf128234b86c
unity_docs
scripting
What is `Cursor.visible` in Unity? Explain its purpose and usage.
Cursor.visible public static bool visible ; Description Determines whether the hardware pointer is visible or not. Set this to true to reveal the cursor. Set it to false to hide the cursor. Note that in CursorLockMode.Locked mode, the cursor is invisible regardless of the value of this property. ```csharp us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a25834b3439f
unity_docs
xr
In Unity's 'Behavior', what is 'Compatible with Unity' and how does it work?
These package versions are available in Unity version 6000.0: Documentation location: State Versions available: com.unity.behavior@1.0 released 1.0.0-pre.1, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3a188ca2b5aa
unity_docs
rendering
What is `Device.SystemInfo.maxTextureArraySlices` in Unity? Explain its purpose and usage.
SystemInfo.maxTextureArraySlices public static int maxTextureArraySlices ; Description This has the same functionality as SystemInfo.maxTextureArraySlices 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_4d0d51f15dbd
unity_docs
scripting
Give me an overview of the `StreamingController` class in Unity.
StreamingController class in UnityEngine / Inherits from: Behaviour Description A StreamingController controls the streaming settings for an individual camera location. The StreamingController component is used to control texture streaming settings for a camera location. This component supports the preloading o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b18027208cc2
unity_docs
audio
Explain 'Develop an ambisonic audio decoder' in Unity.
An ambisonic decoder is an audio component that decodes the ambisonic audio format into a specific output format, such as stereo or surround sound. This format depends on your speaker configuration (menu: Edit > Project Settings > Audio > Default Speaker Mode ), unless your platform overrides this. Although Unity suppo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ff4a4958b145
unity_docs
physics
What is `WheelCollider.suspensionDistance` in Unity? Explain its purpose and usage.
WheelCollider.suspensionDistance public float suspensionDistance ; Description Maximum extension distance of wheel suspension, measured in local space. Suspension always extends downwards the local y-axis. Suspension travel will be scaled by the transform's scale. The value suspensionDistance is the distance...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f31349bac055
unity_docs
editor
Explain 'Deploy Unity across your enterprise' in Unity.
Unity offers solutions for large organizations that use its products in an enterprise infrastructure. These solutions help IT administrators and creators who use Unity in an enterprise environment. Topic Description Enable Unity Editor installation by standard users (Windows) Enable standard users to install Unity on W...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7e9c4bd7c0ae
unity_docs
rendering
What is `SceneView.CameraMode` in Unity? Explain its purpose and usage.
CameraMode struct in UnityEditor Description Describes a built-in Scene view mode. Properties Property Description drawMode The CameraDrawMode associated with the CameraMode. name The name of the CameraMode. section The section in the toolbar drop-down that this CameraMode belongs to. Public Methods Method...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_afd89d9d364a
unity_docs
rendering
In Unity's 'Asset import determinism', what is 'Non-deterministic asset types' and how does it work?
Some Unity Editor-generated assets are non-deterministic and can produce different binary outputs when regenerated, even with identical source data and settings. To maintain deterministic builds, avoid regenerating these assets unless the source content changes, and keep previously baked or generated data under version...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b1b9bb9e325
unity_docs
physics
What is `RaycastHit.triangleIndex` in Unity? Explain its purpose and usage.
RaycastHit.triangleIndex public int triangleIndex ; Description The index of the triangle that was hit. Triangle index is only valid if the collider that was hit is a MeshCollider . ```csharp // This script draws a debug line around mesh triangles // as you move the mouse over them. using UnityEngine; using S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c2ab42bea4a0
unity_docs
xr
What is `UnityEngine.AssetBundleModule` in Unity? Explain its purpose and usage.
UnityEngine.AssetBundleModule Description The AssetBundle module implements the AssetBundle class and related APIs to load data from AssetBundles. Classes Class Description AssetBundle API for accessing the content of AssetBundle files. AssetBundleCreateRequest Asynchronous load request for an AssetBundle. Ass...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f227f8228514
unity_docs
scripting
What is `Gizmos.DrawWireSphere` in Unity? Explain its purpose and usage.
Gizmos.DrawWireSphere Declaration public static void DrawWireSphere ( Vector3 center , float radius ); Description Draws a wireframe sphere with center and radius . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public float explosionRadius = 5.0f; void ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_663e7f08bb51
unity_docs
scripting
What are the parameters of `Undo.RegisterFullObjectHierarchyUndo` in Unity?
Description Copy the states of a hierarchy of objects onto the undo stack. This function works similarly to Undo.RegisterCompleteObjectUndo . The key difference is that instead of copying the states of a single object, this function stores the states of a hierarchy of objects. Depending on the type of objectToUndo , th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6be4f03bcd91
unity_docs
rendering
What is `ParticleSystem.ResetPreMappedBufferMemory` in Unity? Explain its purpose and usage.
ParticleSystem.ResetPreMappedBufferMemory Declaration public static void ResetPreMappedBufferMemory (); Description Reset the cache of reserved graphics memory used for efficient rendering of Particle Systems. In order to efficiently write its data into graphics memory, the Particle System uses a pool of pre-a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8155072aa49a
unity_docs
animation
What is `Animations.TransformStreamHandle.SetLocalPosition` in Unity? Explain its purpose and usage.
TransformStreamHandle.SetLocalPosition Declaration public void SetLocalPosition ( Animations.AnimationStream stream , Vector3 position ); Parameters Parameter Description stream The AnimationStream that holds the animated values. position The position of the transform relative to the parent. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_84088781d56f
unity_docs
scripting
In Unity's 'Achievements Building Block', what is 'Deploy the configuration file' and how does it work?
The test scene includes the Achievement.ach configuration file to define the achievements in the scene. Set up deployment in your project . Go to Services > Deployment . In the Deployment window, expand the Blocks.Achievements section. Select the Achievement.ach checkbox. Select Deploy Selected.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8faecd3d8ae0
unity_docs
rendering
In Unity's 'Generate lightmap UVs', what is 'How to automatically generate lightmap UVs' and how does it work?
You can tell Unity to automatically generate lightmap UVs for a Model, using the Model Import Settings . Select the Model in your Project view. Unity opens the Model Import Settings in the Inspector . In the Model Import Settings, navigate to the Model tab, and then the Geometry section. Tick the Generate Lightmap UVs ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_331678c7eda7
unity_docs
audio
What is `Profiling.ProfilerArea.Audio` in Unity? Explain its purpose and usage.
ProfilerArea.Audio Description Audio statistics. NOTE: Collecting audio samples adds a particularly high amount of profiling overhead. Consider turning this area off when you don't need it. See Profiler.SetAreaEnabled .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c4695ce74c0
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.remap`.
ParticleSystem.NoiseModule.remap public ParticleSystem.MinMaxCurve remap ; Description Define how the noise values are remapped. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b514fc1009f0
unity_docs
rendering
Show me a Unity C# example demonstrating `TextureImporter.ignoreMipmapLimit`.
as mipmap limits enabled, and uses the global mipmap limit. If you imported a Texture2DArray asset in Unity version 2023.1 or earlier, the asset will continue to ignore mipmap limits to ensure consistent behavior when upgrading. Note that imported textures have mipmap limits enabled by default. This code example demons...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7551c0e81413
unity_docs
scripting
What is `RuntimeInitializeOnLoadMethodAttribute.loadType` in Unity? Explain its purpose and usage.
RuntimeInitializeOnLoadMethodAttribute.loadType public RuntimeInitializeLoadType loadType ; Description Controling the callback invocation time. Additional resources: RuntimeInitializeOnLoadMethodAttribute .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4413c026b4f2
unity_docs
xr
What is `PackageManager.Requests.ListRequest` in Unity? Explain its purpose and usage.
ListRequest class in UnityEditor.PackageManager.Requests / Inherits from: PackageManager.Requests.Request_1 Description Represents an asynchronous request to list the packages in the project. The PackageManager Client class returns a ListRequest instance when you call the Client.List method to list the pac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab0e8c0c08dc
unity_docs
scripting
Show me a Unity C# example demonstrating `AnimationEvent`.
AnimationEvent class in UnityEngine / Implemented in: UnityEngine.AnimationModule Description AnimationEvent lets you call a script function similar to SendMessage as part of playing back an animation. Animation events support functions that take zero or one parameter. The parameter can be a float, an int, a st...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6753dbd64845
unity_docs
scripting
What is `Search.SearchViewState.GetProviderTypes` in Unity? Explain its purpose and usage.
SearchViewState.GetProviderTypes Declaration public IEnumerable<string> GetProviderTypes (); Returns IEnumerable<string> All search provider types. Description Returns all the search provider types in the current search context. See SearchProvider.type .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3b169c5867f8
unity_docs
scripting
Show me a Unity C# example demonstrating `Pool.IObjectPool_1.Get`.
IObjectPool<T0>.Get Declaration public T Get (); Returns T A pooled object or a new instance if the pool is empty. Description Get an instance from the pool. If the pool is empty then a new instance will be created. ```csharp using System.Text; using UnityEngine; using UnityEngine.Pool;// This component r...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e392a2831c5b
unity_docs
rendering
In Unity's 'Change particle color', what is 'Color by speed' and how does it work?
The Color by Speed module can change a particle’s color based on its speed in distance units per second. Burning or glowing particles (such as sparks) tend to burn more brightly when they move quickly through the air (for example, when sparks are exposed to more oxygen), but then dim slightly as they slow down. To simu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1c53eb426ed5
unity_docs
rendering
What is `Graphics.DrawProceduralNow` in Unity? Explain its purpose and usage.
Graphics.DrawProceduralNow Declaration public static void DrawProceduralNow ( MeshTopology topology , int vertexCount , int instanceCount ); Parameters Parameter Description topology Topology of the procedural geometry. vertexCount Vertex count to render. instanceCount Instance count to render. Descr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a492a017bf74
unity_docs
physics
What is `Collider.OnCollisionExit` in Unity? Explain its purpose and usage.
Collider.OnCollisionExit(Collision) Parameters Parameter Description other The Collision data associated with this collision event. Description OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. In contrast to OnTriggerExit, OnCollisionExit is passed the Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_974c8e788b48
unity_docs
scripting
What is `Experimental.GlobalIllumination.Cookie.Defaults` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Cookie.Defaults Declaration public static Experimental.GlobalIllumination.Cookie Defaults (); Description Returns a default initialized cookie helper struct.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ace1b76b21d9
unity_docs
rendering
What is `Rendering.RendererList` in Unity? Explain its purpose and usage.
RendererList struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Represents a set of visible GameObjects. To create a RendererList, use the ScriptableRenderContext.CreateRendererList , ScriptableRenderContext.CreateShadowRendererList or ScriptableRenderContext.CreateSkyboxRe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e27ff9c841e
unity_docs
physics
What is `JointAngleLimits2D` in Unity? Explain its purpose and usage.
JointAngleLimits2D struct in UnityEngine / Implemented in: UnityEngine.Physics2DModule Description Angular limits on the rotation of a Rigidbody2D object around a HingeJoint2D. Additional resources: Rigidbody2D class, HingeJoint2D class. Properties Property Description max Upper angular limit of rotatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f0c361aa9fc1
unity_docs
scripting
What is `ModelImporter.strictVertexDataChecks` in Unity? Explain its purpose and usage.
ModelImporter.strictVertexDataChecks public bool strictVertexDataChecks ; Description Enables strict checks on imported vertex data. When enabled, checks are performed on the imported vertex data. When invalid data is found, it is discarded and a warning message is logged in the console. This may result in miss...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e86ebf2b0978_doc_4
github
scripting
What does `IPoolable` do in this Unity script? Explain its purpose and signature.
Retrieves an object from the non-MonoBehaviour-based pool for the specified type.The type of the poolable object.The poolable object from the pool. Signature: ```csharp public T GetPure<T>() where T : class, IPoolable => GetPool<PurePool<T>, T>(_purePools).Get(); ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_bad970fa9f58
unity_docs
math
What are the parameters of `Quaternion.operator_multiply` in Unity?
Description Combines rotations lhs and rhs . Rotating by the product lhs * rhs is the same as applying the two rotations in sequence: lhs first and then rhs , relative to the reference frame resulting from lhs rotation. Note that this means rotations are not commutative, so lhs * rhs does not give the same rotation as ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ad6c3de14bb
unity_docs
ui
What is `UIElements.BaseListView.makeFooter` in Unity? Explain its purpose and usage.
BaseListView.makeFooter public Func<VisualElement> makeFooter ; Description This callback allows the user to make their own footer for this control. Setting this callback will override the showAddRemoveFooter property.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6161347b2068
unity_docs
audio
Show me a Unity C# example demonstrating `AudioSource.panStereo`.
value faded up and down according to the specified pan position. This means when pan = 0.0, the balance for the sound in each speaker is 100% left and 100% right. When pan = -1.0, only the left channel of the stereo sound is audible, when pan = 1.0, only the right channel of the stereo sound is audible. Values range fr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0a10e6e4f61f
unity_docs
rendering
What is `Rendering.CommandBuffer.MarkLateLatchMatrixShaderPropertyID` in Unity? Explain its purpose and usage.
CommandBuffer.MarkLateLatchMatrixShaderPropertyID Declaration public void MarkLateLatchMatrixShaderPropertyID ( Rendering.CameraLateLatchMatrixType matrixPropertyType , int shaderPropertyID ); Parameters Parameter Description matrixPropertyType Camera matrix property type to be late latched. shaderPropert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d40ad10c7238
unity_docs
scripting
What is `Rect.y` in Unity? Explain its purpose and usage.
Rect.y public float y ; Description The Y coordinate of the rectangle. This value is the same as yMin , but setting it will move the rectangle rather than resize it. ```csharp using UnityEngine;public class RectExample : MonoBehaviour { void Start() { Rect rect = new Rect(10, 10, 50, 30); // prints: y = ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c04cd57bf0cd
unity_docs
rendering
In Unity's 'Materials tab', what is 'Use Embedded Materials' and how does it work?
When you choose Use Embedded Materials for the Location option, the following import options appear: (A) Click the Extract Materials and Extract textures buttons to extract all materials and textures that are embedded in your imported asset. These are greyed out if there are no subassets to extract. Below these buttons...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_4b63d1ac2088
unity_docs
rendering
Explain 'Simple unlit shader example in the Built-In Render Pipeline' in Unity.
``` Shader "Unlit/SimpleUnlitTexturedShader" { Properties { // we have removed support for texture tiling/offset, // so make them not be displayed in material inspector [NoScaleOffset] _MainTex ("Texture", 2D) = "white" {} } SubShader { Pass { HLSLPROGRAM // use "vert" function as the vertex shader #pragma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.