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_a4dded2e3a30
unity_docs
editor
Explain 'ML Agents' in Unity.
com.unity.ml-agents ## Description Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.). ## Released for Unity Package version 4.0.2 is released for Unity Editor version 6000.0. ## Compatible with Unity These package versions are av...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_41936f6dce57
unity_docs
rendering
Explain 'Size over Lifetime module reference' in Unity.
Many effects involve a particle changing size according to a curve, which can be set in this module. ## Properties For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time . Property Function Separ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_41889527814d
unity_docs
rendering
What is `BuildOptions.ShaderLivelinkSupport` in Unity? Explain its purpose and usage.
Method group is Obsolete BuildOptions.ShaderLivelinkSupport Obsolete Shader LiveLink is no longer supported. Description Enable Shader Livelink support. When this option is enabled, a Development build of the Player connects to the Editor on startup and obtains missing shader variants. This option has no effect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f2c511b4a346
unity_docs
math
What is `Rendering.RayTracingShader.SetVectorArray` in Unity? Explain its purpose and usage.
RayTracingShader.SetVectorArray Declaration public void SetVectorArray (int nameID , Vector4[] values ); Declaration public void SetVectorArray (string name , Vector4[] values ); Parameters Parameter Description name The name of the property being set. nameID The ID of the property as given by Shade...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe03298358ca
unity_docs
ui
What is `GUISkin.scrollView` in Unity? Explain its purpose and usage.
GUISkin.scrollView public GUIStyle scrollView ; Description Style used by default for the background of ScrollView controls (see GUI.BeginScrollView ). ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the background of the ScrollView controls // of the current GUISkin. V...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ac89e6cc64e
unity_docs
rendering
Show me a Unity C# example demonstrating `Accessibility.VisionUtility.GetColorBlindSafePalette`.
u need. The return value indicates how many unambiguous colors exist in the palette. If this value is less than the size of the palette, then the palette repeats colors in order. A window to preview swatches that should be distinguishable for most vision conditions. Add the following script to Assets/Editor as ColorSw...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_499919ae2762
unity_docs
editor
Show me a Unity C# example demonstrating `Search.ISearchView.results`.
ISearchView.results public Search.ISearchList results ; Description Returns the list of all search results. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_results { static ISearchList s_Results; static ISearchView s_View; [MenuItem("Examples/ISe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0ab1fc1c39cc
github
scripting
Write a Unity C# script called Addressable Prefab Pool Asset
```csharp #if HAVE_ADDRESSABLES using Gilzoide.PrefabPool.Internal; using UnityEngine; namespace Gilzoide.PrefabPool { public class AddressablePrefabPoolAsset<T> : APrefabPoolAsset<T, AddressablePrefabPool<T>> where T : Object { } [CreateAssetMenu(menuName = "Prefab Pool/Addressable Prefab Poo...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_63b98ea391f2
unity_docs
scripting
What is `SearchService.AdvancedObjectSelectorParameters.selectorClosedHandler` in Unity? Explain its purpose and usage.
AdvancedObjectSelectorParameters.selectorClosedHandler public Action<Object,bool> selectorClosedHandler ; Description Function to call when the advanced Object Selector is closed. Only available during AdvancedObjectSelectorEventType.OpenAndSearch . This function takes two parameters: the object that was selec...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3d4c7c27816
unity_docs
audio
What is `AudioCurveRendering.DrawMinMaxFilledCurve` in Unity? Explain its purpose and usage.
AudioCurveRendering.DrawMinMaxFilledCurve Declaration public static void DrawMinMaxFilledCurve ( Rect r , AudioCurveRendering.AudioMinMaxCurveAndColorEvaluator eval ); Parameters Parameter Description r Rectangle determining the size of the graph. eval Normalized x-position in the range [0; 1] at which...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7ef732016d75
unity_docs
scripting
Show me a Unity code example for 'Verify the Unity Accelerator version'.
rver machine. ## Verify on a client machine From the client, access the API agent health end point by visiting the following page from a browser: http://[AcceleratorIP]:[AcceleratorPort]/api/agent-health Alternatively, examine the unity-accelerator.log file in the log folder of the Accelerators configuration director...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0e50c3b52051
unity_docs
math
What is `SerializedProperty.GetEnumerator` in Unity? Explain its purpose and usage.
SerializedProperty.GetEnumerator Declaration public IEnumerator GetEnumerator (); Description Retrieves an iterator for enumerating over the visible child properties of the current property. If the property is an array it will enumerate over the array elements. Additional resources: NextVisible , GetEndPrope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_267711f682a7
unity_docs
rendering
What is `Rendering.RenderTargetBlendState.alphaBlendOperation` in Unity? Explain its purpose and usage.
RenderTargetBlendState.alphaBlendOperation public Rendering.BlendOp alphaBlendOperation ; Description Operation used for blending the alpha (A) channel. Additional resources: ShaderLab: Blending .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a4b0454d0f9e
unity_docs
scripting
Show me a Unity C# example demonstrating `Physics.IgnoreCollision`.
llider1 and collider2 . This is useful, say, for preventing projectiles from colliding with the object that fires them. Note that IgnoreCollision is not persistent. This means ignore collision state will not be stored in the editor when saving a scene. If ignore is false, collisions can occur. Set ignore to tr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b53c964016a
unity_docs
ui
What is `UIElements.MultiColumnController.UnbindItem` in Unity? Explain its purpose and usage.
MultiColumnController.UnbindItem Declaration public void UnbindItem ( UIElements.VisualElement element , int index ); Parameters Parameter Description element The element from that row, created by MakeItem(). index The item index. Description Unbinds the row at the item index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d5f16cfdffaf
github
scripting
Write a Unity C# XR/VR script for Process Id Component
```csharp // // /*=============================================================================== // // Copyright (C) 2023 PhantomsXR Ltd. All Rights Reserved. // // // // This file is part of the com.Phantoms.PackageTools.Runtime. // // // // The XRMOD-SDK cannot be copied, distributed, or made available to // // thir...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_5c0de0a1518a
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddRemotePackageReferenceAtBranch` in Unity?
Returns string Returns the GUID of the remote package reference. Description Adds a reference to the remote package at the given branch. ```csharp using UnityEditor; using System.IO; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_AddRemotePackageReferenceAtBranch { [PostProcessBuild]...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_980d047ff62c
unity_docs
rendering
What is `ParticleSystem.ShapeModule.skinnedMeshRenderer` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.skinnedMeshRenderer public SkinnedMeshRenderer skinnedMeshRenderer ; Description SkinnedMeshRenderer to emit particles from. 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_222928a45527
unity_docs
rendering
What is `Rendering.RayTracingShader.SetTextureFromGlobal` in Unity? Explain its purpose and usage.
RayTracingShader.SetTextureFromGlobal Declaration public void SetTextureFromGlobal (int nameID , int globalTextureNameID ); Declaration public void SetTextureFromGlobal (string name , string globalTextureName ); Parameters Parameter Description nameID The ID of the texture as given by Shader.PropertyT...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e6ec81b8b1ac
unity_docs
editor
What is `AssetDatabase.ExtractAsset` in Unity? Explain its purpose and usage.
AssetDatabase.ExtractAsset Declaration public static string ExtractAsset ( Object asset , string newPath ); Parameters Parameter Description asset The sub-asset to extract. newPath The file path of the new Asset. Returns string An empty string if Unity has successfully extracted the Asset, or an erro...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c1b38ddafbce
unity_docs
physics
What is `Rigidbody.OnCollisionExit` in Unity? Explain its purpose and usage.
Rigidbody.OnCollisionExit(Collision) Description OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. In contrast to OnTriggerExit, OnCollisionExit is passed the Collision class and not a Collider. The Collision class contains information about contact points,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5e7e9c9a1bc6
unity_docs
animation
What is `Playables.AnimationPlayableUtilities.PlayAnimatorController` in Unity? Explain its purpose and usage.
AnimationPlayableUtilities.PlayAnimatorController Declaration public static Animations.AnimatorControllerPlayable PlayAnimatorController ( Animator animator , RuntimeAnimatorController controller , out Playables.PlayableGraph graph ); Parameters Parameter Description animator Target Animator. contr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b1eedb548e0
unity_docs
math
What is `Vector4.sqrMagnitude` in Unity? Explain its purpose and usage.
Vector4.sqrMagnitude public float sqrMagnitude ; Description Returns the squared length of this vector (Read Only). Calculating the squared magnitude instead of the magnitude is much faster. Additional resources: magnitude .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b4cf309d65a3
unity_docs
ui
What are the parameters of `EditorGUI.IntSlider` in Unity?
Returns int The value that has been set by the user. Description Makes a slider the user can drag to change an integer value between a min and a max. Int Slider in an Editor Window. ```csharp using UnityEditor; using UnityEngine; using System.Collections;// Simple editor script that lets you clone your object in a grid...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e0667b060d4
unity_docs
editor
Show me a Unity C# example demonstrating `AssetDatabase.GetCacheServerAddress`.
Settings. Returns empty string if IP address is not set in Editor settings. Description Gets the IP address of the Cache Server in Editor Settings. Note: If you set a new value for the IP address, your new settings are not applied until you call AssetDatabase.RefreshSettings(). However, this method will return the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d585d54188c4_doc_6
github
scripting
What does `GetPackageThumbnails` do in this Unity script? Explain its purpose and signature.
Retrieve the thumbnail textures for all packages within the provided json structure and perform a given action after each retrievalA json file retrieved from Return cached thumbnails if they are foundAction to perform upon a successful thumbnail retrieval - Package Id - Associated ThumbnailAction to perform upon a fa...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_823fcb32263a
unity_docs
math
What is `Experimental.GraphView.PlacematContainer.GetPortCenterOverride` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. PlacematContainer.GetPortCenterOverride Declaration public bool GetPortCenterOverride ( Experimental.GraphView.Port port , out Vector2 overriddenPosition ); Parameters Parameter Description port The specific port. ov...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d40d7ee4a45f
unity_docs
scripting
What is `GUISkin.toggle` in Unity? Explain its purpose and usage.
GUISkin.toggle public GUIStyle toggle ; Description Style used by default for GUI.Toggle controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the toggle style of the current GUISkin GUIStyle style; public bool val = false; void OnGUI() { GUI.skin.toggle = style;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e75ed61b869c
unity_docs
editor
What is `IMGUI.Controls.MultiColumnHeader.DefaultGUI` in Unity? Explain its purpose and usage.
DefaultGUI class in UnityEditor.IMGUI.Controls Description Default GUI methods and properties for the MultiColumnHeader class. Static Properties Property Description columnContentMargin Margin that can be used by clients of the MultiColumnHeader to control spacing between content in multiple columns. defaultH...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ad8487c7c723
unity_docs
rendering
What is `LightTransport.ReferenceContext.WriteBuffer` in Unity? Explain its purpose and usage.
ReferenceContext.WriteBuffer Declaration public void WriteBuffer (BufferSlice<T> dst , NativeArray<T> src ); Declaration public void WriteBuffer (BufferSlice<T> dst , NativeArray<T> src , LightTransport.EventID id ); Parameters Parameter Description dst The buffer slice to write to. src The array...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e78a56a2cf8c
unity_docs
math
What is `AndroidJNI.GetDoubleArrayElement` in Unity? Explain its purpose and usage.
AndroidJNI.GetDoubleArrayElement Declaration public static double GetDoubleArrayElement (IntPtr array , int index ); Description Returns the value of one element of a primitive array. This function is a special case of GetDoubleArrayRegion(), called with region size set to 1. Additional resources: Java Nativ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d02b78a7572
unity_docs
rendering
What are the parameters of `Rendering.FilteringSettings.ctor` in Unity?
Description Creates a FilteringSettings struct for use with Rendering.ScriptableRenderContext.DrawRenderers. Note: If you call new FilteringSettings() without any parameters, Unity creates an empty FilteringSettings struct. An empty struct contains no data and all internal values default to 0; for example, it has a lay...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8abe2238a004
unity_docs
ui
In Unity's 'Keyboard events', what is 'Event List' and how does it work?
The following list provides the name, description, and target of each event in the event family. By default, a visual element doesn’t receive keyboard events. Only elements that are focusable and currently in focus are targeted for keyboard events. This is because keyboard events trickle down and bubble up, allowing pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d1efe272e865
unity_docs
rendering
What is `SkinnedMeshRenderer.GetBlendShapeWeight` in Unity? Explain its purpose and usage.
SkinnedMeshRenderer.GetBlendShapeWeight Declaration public float GetBlendShapeWeight (int index ); Parameters Parameter Description index The index of the BlendShape whose weight you want to retrieve. Index must be smaller than the Mesh.blendShapeCount of the Mesh attached to this Renderer. Returns floa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5d0e87252efc
unity_docs
editor
Show me a Unity C# example demonstrating `PlayerSettings.Android.buildApkPerCpuArchitecture`.
PlayerSettings.Android.buildApkPerCpuArchitecture public static bool buildApkPerCpuArchitecture ; Description Create a separate APK for each CPU architecture. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class BuildApkPerCpuArchitectureSample : MonoBehaviour { [MenuItem("Buil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38e1fc17ecd9_doc_3
github
scripting
What does `GetAttributeFieldByName` do in this Unity script? Explain its purpose and signature.
Get first FieldInfo for by Signature: ```csharp public static FieldInfo GetAttributeFieldByName(Attribute attribute, string fieldName) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_4bc26106fad8
unity_docs
rendering
What is `LightShadowCasterMode` in Unity? Explain its purpose and usage.
LightShadowCasterMode enumeration Description Allows mixed lights to control shadow caster culling when Shadowmasks are present. Properties Property Description Default Use the global Shadowmask Mode from the quality settings. NonLightmappedOnly Render only non-lightmapped objects into the shadow map. This cor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a1f428468077
unity_docs
rendering
What is `ShaderKeywordFilter.TagConstraintAttribute` in Unity? Explain its purpose and usage.
TagConstraintAttribute class in UnityEditor.ShaderKeywordFilter Description Enable or disable shader keyword filter attributes based on shader tags. You can use TagConstraintAttribute to enable or disable filter attributes based on shader tags. For example, you can filter shader keywords differently on differ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ee64d6d52e53
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerRequestMetric.AssetName` in Unity? Explain its purpose and usage.
AsyncReadManagerRequestMetric.AssetName public string AssetName ; Description The name of the asset being read. Note: This will often be empty, due to many reads not being directly relatable to assets, or subsystems that are unable to get contextual information of the read.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c62e6d0c7fd8_doc_0
github
scripting
What does `InitTooltip` do in this Unity script? Explain its purpose and signature.
Use to initialize visibility of the tooltip once created. Signature: ```csharp public void InitTooltip() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_715fa4f83095
unity_docs
rendering
What is `QualitySettings.shadowNearPlaneOffset` in Unity? Explain its purpose and usage.
QualitySettings.shadowNearPlaneOffset public static float shadowNearPlaneOffset ; Description Offset shadow frustum near plane. Offset shadow near plane to account for large triangles being distorted by shadow pancaking. Additional resources: Quality Settings .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6ec536dd5e24
unity_docs
scripting
What is `SceneManagement.LocalPhysicsMode` in Unity? Explain its purpose and usage.
LocalPhysicsMode enumeration Description Provides options for 2D and 3D local physics. By default, when a Scene is created or loaded, any 2D or 3D physics component added to a GameObject within the Scene is added to the default physics Scene. Each Scene however has the ability to create and own its own (local)...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3d145f073328
github
scripting
Write a Unity C# XR/VR script for AR Capabilities Manager
```csharp using System.Collections; using UnityEngine; using UnityEngine.XR.ARFoundation; public class ARCapabilitiesManager : MonoBehaviour { private ARSession arSession; private void Awake() { arSession = FindObjectOfType<ARSession>(); arSession.enabled = false; } private void S...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_8867890b3f2f
unity_docs
physics
Show me a Unity C# example demonstrating `PhysicsShape2D.radius`.
PhysicsShape2D.radius public float radius ; Description The radius of the shape. All PhysicsShapeType2D use this radius with the exception of the Polygon type. Refer to the individual shape types for details on how the radius is used for the respective shape. ```csharp using UnityEngine; using UnityEngine....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c87b109ecd4d
unity_docs
editor
What is `EditorWindow.maxSize` in Unity? Explain its purpose and usage.
EditorWindow.maxSize public Vector2 maxSize ; Description The maximum size of this window when it is floating or modal. The maximum size is not used when the window is docked. An EditorWindow can be resized. The maxSize variable provides the largest width and height that is supported. This is typically a V...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_115e18112049
unity_docs
audio
What is `Audio.AudioPlayableBinding.Create` in Unity? Explain its purpose and usage.
AudioPlayableBinding.Create Declaration public static Playables.PlayableBinding Create (string name , Object key ); Parameters Parameter Description key A reference to a UnityEngine.Object that acts as a key for this binding. name The name of the AudioPlayableOutput. Returns PlayableBinding Return...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7ad4e5bfe77
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.DestroyImmediate`.
lts in an error. Using DestroyImmediate with the optional allowDestroyingAssets parameter set to true can permanently remove assets from your project. Destroying or removing objects from a collection (such as an array or list) while looping through it can cause skipped elements, out-of-bounds errors, or other un...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c3914b78f301
unity_docs
math
What is `Unity.Hierarchy.HierarchyPropertyStorageType` in Unity? Explain its purpose and usage.
HierarchyPropertyStorageType enumeration Description Describes how property values of a specific property are stored in memory. Properties Property Description Sparse The property is stored in a sparse array. In a sparse array, memory is allocated for each node regardless if the node has a value for the pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49f35165bbce
unity_docs
animation
What is `AnimationMode.StopAnimationMode` in Unity? Explain its purpose and usage.
AnimationMode.StopAnimationMode Declaration public static void StopAnimationMode (); Declaration public static void StopAnimationMode ( AnimationModeDriver driver ); Parameters Parameter Description driver An AnimationModeDriver object must be specified if one was specified when the Animation mode was...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62f8e0ad8030
unity_docs
scripting
What is `VideoClipImporter.GetResizeModeName` in Unity? Explain its purpose and usage.
VideoClipImporter.GetResizeModeName Declaration public string GetResizeModeName ( VideoResizeMode mode ); Parameters Parameter Description mode Mode for which the width is queried. Returns string Name for the specified resize mode. Description Get the full name of the resize operation for the specif...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_16
github
scripting
What does `AnimateTo` do in this Unity script? Explain its purpose and signature.
Smoothly animates the camera to view the supplied interest point. Requires that a camera has been set using SetControlledCamera.The latitude and longitude of the point on the ground which the camera should be looking at once the transition is complete.Optional. The distance in metres from the interest point at which th...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_d269a6ffab0a
unity_docs
scripting
What is `EditorGUI.Vector3Field` in Unity? Explain its purpose and usage.
EditorGUI.Vector3Field Declaration public static Vector3 Vector3Field ( Rect position , string label , Vector3 value ); Declaration public static Vector3 Vector3Field ( Rect position , GUIContent label , Vector3 value ); Parameters Parameter Description position Rectangle on the screen t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b1e5483bbdd
unity_docs
editor
What is `HideFlags.DontSaveInEditor` in Unity? Explain its purpose and usage.
HideFlags.DontSaveInEditor Description The object will not be saved to the Scene in the editor. For Prefab instances in a scene, you can set the hideflag on the Prefab instance handle object as a way to set the same hideflags on all the objects of the Prefab instance. (See PrefabUtility.GetPrefabInstanceHandle ).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28da6a121a62
unity_docs
scripting
What is `Experimental.GraphView.Attacher.Detach` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Attacher.Detach Declaration public void Detach (); Description Stop monitoring the target element and postioning the attached element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_751dcee342e3
github
scripting
Write a Unity Editor script for Asset Store Tools
```csharp using UnityEditor; using UnityEngine; using System; using AssetStoreTools.Uploader; using AssetStoreTools.Validator; using AssetStoreTools.Utility; namespace AssetStoreTools { internal class AssetStoreTools : EditorWindow { [MenuItem("Asset Store Tools/Asset Store Uploader", false, 0)] ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_f239e8fc3b43
unity_docs
editor
What is `PackageManager.VersionsInfo` in Unity? Explain its purpose and usage.
VersionsInfo class in UnityEditor.PackageManager Description Identifies the available versions of a package and which are the compatible, latest, and recommended versions. Properties Property Description all All available versions of the package. compatible Versions of the package compatible with the current...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f348f286f89d
unity_docs
scripting
What is `GUIStyle.ctor` in Unity? Explain its purpose and usage.
GUIStyle Constructor Declaration public GUIStyle (); Description Constructor for empty GUIStyle. Declaration public GUIStyle ( GUIStyle other ); Description Constructs GUIStyle identical to given other GUIStyle.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54dd0aee2e0a
unity_docs
networking
What is `Networking.PlayerConnection.EditorConnection.Unregister` in Unity? Explain its purpose and usage.
EditorConnection.Unregister Declaration public void Unregister (Guid messageId , UnityAction<MessageEventArgs> callback ); Parameters Parameter Description messageId Message ID associated with the callback that you wish to deregister. callback The Action callback you wish to deregister. Description Dere...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84514ae9d332
unity_docs
scripting
What is `ParticleSystem.CollisionModule.type` in Unity? Explain its purpose and usage.
ParticleSystem.CollisionModule.type public ParticleSystemCollisionType type ; Description The type of particle collision to perform. Here is an example of plane collsiion: ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehavio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f642e57dd09
unity_docs
rendering
What is `Camera.GetGateFittedLensShift` in Unity? Explain its purpose and usage.
Camera.GetGateFittedLensShift Declaration public Vector2 GetGateFittedLensShift (); Returns Vector2 Returns the effective lens shift value. Description Retrieves the effective lens offset of the camera, including GateFit. Fitting the sensor gate and the resolution gate has an impact on the final obliq...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b8029ed5317
unity_docs
scripting
What is `AudioHighPassFilter` in Unity? Explain its purpose and usage.
AudioHighPassFilter class in UnityEngine / Inherits from: Behaviour / Implemented in: UnityEngine.AudioModule Description The Audio High Pass Filter passes high frequencies of an AudioSource, and cuts off signals with frequencies lower than the Cutoff Frequency. Additional resources: Audio High Pass Filter ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21b878d12c5b
unity_docs
editor
Show me a Unity C# example demonstrating `Gradient`.
y time value and that it is ensured to always have a minimum of 2 color keys and 2 alpha keys. How the colors are interpolated between the keys is controlled by GradientMode . Public Gradient variables used in scripts automatically display the gradient editor in the inspector window. GradientUsageAttribute allows sp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e41105e5552
unity_docs
rendering
Show me a Unity C# example demonstrating `Profiling.Sampler.isValid`.
Sampler.isValid public bool isValid ; Description Returns true if Sampler is valid. (Read Only) Invalid Sampler represents non-existing Profiler label. Note: At the moment all built-in counters are available only in the Editor and Development Players. Sampler.Get in non-Development Players returns invalid Sa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8aad8a91b703
unity_docs
xr
What is `ObjectChangeEventStream.GetChangeRootOrderEvent` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.GetChangeRootOrderEvent Declaration public void GetChangeRootOrderEvent (int eventIdx , out ChangeRootOrderEventArgs data ); Parameters Parameter Description eventIdx The index of the event to get the data for. data The data associated with the event. Description Retrieves the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_394f5700b96c
unity_docs
networking
Explain 'Debug C# code' in Unity.
Before you can debug C# code with IL2CPP for your Universal Windows Platform (UWP) application, you need to do the following: Go to File > Build Profiles . In the Platform Settings section, enable Script Debugging . In Player settings, enable the InternetClient , InternetClientServer , and PrivateNetworkClientServer ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6982a850555d
unity_docs
editor
Show me a Unity C# example demonstrating `EditorGUI.PropertyField`.
true the property including children is drawn; otherwise only the control itself (such as only a foldout but nothing below it). Returns bool True if the property has children and is expanded and includeChildren was set to false; otherwise false. Description Use this to make a field for a SerializedProperty i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_98df70f80efc
unity_docs
rendering
In Unity's 'Color gradients', what is 'Create a color gradient preset' and how does it work?
To create a color gradient with one or more colors, and place it in a specific folder, follow these steps: From the menu, select Assets > create > Text Core > Color Gradient to add a new color gradient preset. In the Color Gradient’s Inspector window, select a color mode from the dropdown menu: Single : Applies a singl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b5cb0302e7ed
unity_docs
math
What is `LightProbes.GetPositionsSelf` in Unity? Explain its purpose and usage.
LightProbes.GetPositionsSelf Declaration public Vector3[] GetPositionsSelf (); Returns Vector3[] The array of positions of the baked light probes. Description Gets the positions of the baked light probes stored in this LightProbes object. Additional resources: LightProbes.countSelf .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2b61dd28c300
unity_docs
math
Show me a Unity C# example demonstrating `TrailRenderer.AddPositions`.
nderer.time property, is used to determine when they will be removed. For trails to disappear smoothly, each position must have a unique, increasing timestamp. When positions are supplied from script and the current time is identical for multiple points, position timestamps are adjusted to interpolate smoothly between...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9e3650fd8b61
unity_docs
input
Show me a Unity code example for 'Create a custom activity'.
ity application entry point, you need to create a class that extends UnityPlayerGameActivity class. In the new class, override the various base Activity methods to implement the custom behavior you want your activity to have. For more information, refer to Android’s Activity documentation. ## Example activity The fol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86309ba6af19
unity_docs
physics
What is `BoxCollider2D.center` in Unity? Explain its purpose and usage.
Removed BoxCollider2D.center Obsolete BoxCollider2D.center has been deprecated. Use BoxCollider2D.offset instead. Upgrade to offset public Vector2 center ; Description The center point of the collider in local space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3e65a6abc140
unity_docs
scripting
Show me a Unity C# example demonstrating `Object.GetInstanceID`.
efore the sign of the InstanceID value is not a safe indicator for whether or not the object is persistent. The ID changes between sessions of the player runtime and Editor. As such, the ID is not reliable for performing actions that could span between sessions, for example, loading an object state from a file. Additio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5035c9bfd5d6
unity_docs
audio
What is `AudioConfiguration.numVirtualVoices` in Unity? Explain its purpose and usage.
AudioConfiguration.numVirtualVoices public int numVirtualVoices ; Description The maximum number of managed sounds in the game. Beyond this limit sounds will simply stop playing. WebGL: This setting doesn't affect WebGL because there is no limit on the number of audio channels in the WebGL platform. For an exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_46f2f322cb51
unity_docs
physics
In Unity's 'Particle emissions and emitters', what is 'Configuring mesh-based emitter shapes' and how does it work?
You can choose to only emit particles from a particular material (sub-Mesh) by checking the Single Material property and you can offset the emission position along the Mesh’s normals by checking the Normal Offset property. To ignore the color of the Mesh, check the Use Mesh Colors property. To read the texture colors f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d5addab25616
unity_docs
rendering
What is `ParticleSystem.ShapeModule.scale` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.scale public Vector3 scale ; Description Apply scale to the shape from which the system emits particles. 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_72c2de9d7006
unity_docs
scripting
Give me an overview of the `HideFlags` class in Unity.
HideFlags enumeration Description Bit mask that controls object destruction, saving and visibility in inspectors. Additional resources: Object.hideFlags . ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { // Creates a material that is explicitly created & destroye...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f74d2cf12e32
unity_docs
xr
Explain 'Unity scripting symbol reference' in Unity.
## Platform symbols Unity automatically defines certain symbols based on the authoring and build target platform. These are as follows: Define Function UNITY_EDITOR Scripting symbol to call Unity Editor scripts from your game code. UNITY_EDITOR_WIN Scripting symbol for Editor code on Windows. UNITY_EDITOR_OSX Scriptin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2f14af221351
unity_docs
rendering
Explain 'Save and load lighting settings with Lightmap Parameters Assets' in Unity.
A Lightmap Parameters Asset contains a set of values for the parameters that control Unity’s lighting features. These Assets allow you to define and save different sets of values for lighting, for use in different situations. Lightmap Parameters Assets allow you to quickly create presets optimized for different types o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8254f598e8c5
unity_docs
xr
Show me a Unity C# example demonstrating `Search.SearchFlags.NoIndexing`.
SearchFlags.NoIndexing Description Prevents the search from using indexing. Asset Provider will use its builtin Find in Files provider. ```csharp using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; public class SearchFlags_NoIndexing { [MenuI...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_08d14346d92f_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Stores a transient collection of strokes for implementing features such as Copy, Paste andDuplicate. The ClipboardManager implicitly uses the SelectionManager as the source for brushstrokes during copy operations.Future work: support other types of objects such as reference images, models, guides, mirrorposition, etc. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b7ced4f458ef
unity_docs
scripting
What is `Events.UnityEventTools.UnregisterPersistentListener` in Unity? Explain its purpose and usage.
UnityEventTools.UnregisterPersistentListener Declaration public static void UnregisterPersistentListener ( Events.UnityEventBase unityEvent , int index ); Parameters Parameter Description unityEvent Event to modify. index Index to unregister. Description Unregisters the given listener at the specified ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_23c614bfa85b
unity_docs
math
Explain 'Sample a cubemap array in a shader' in Unity.
Here is an example of a shader that uses a cubemap array. ``` Shader "CubemapArrayShaderExample" { Properties { _MainTex ("CubemapArray", CubeArray) = "" {} _Mip ("Mip", Float) = 0.0 _Intensity ("Intensity", Float) = 1.0 _SliceIndex ("Slice", Int) = 0 _Exposure ("Exposure", Float) = 0.0 } SubShader { Tags {"Queu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7af7c6c039fc
unity_docs
rendering
What are the parameters of `ImageConversion.LoadImage` in Unity?
Returns bool Returns true if the data can be loaded, false otherwise. Description Loads PNG, JPG or EXR image byte array into a texture. The LoadImage function replaces texture contents with new image data. This function can also change texture size and format. JPG files are loaded into RGB24 format, PNG files are load...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c05f9c645095
unity_docs
animation
In Unity's 'State machine basics', what is 'State machines in Mecanim' and how does it work?
Unity’s Mecanim Animation system uses a state machine to arrange and play animation associated with a character or GameObject . Like a traditional state machine, an animation state machine remains in the same state until it satisfies the criteria for a transition. This criteria might be when an animation completes, a s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2dcf724aea1
unity_docs
rendering
What is `SystemInfo.supportsMotionVectors` in Unity? Explain its purpose and usage.
SystemInfo.supportsMotionVectors public static bool supportsMotionVectors ; Description Whether motion vectors are supported on this platform. Will return true on platforms where motion vectors are supported. This means that the target supports RenderTextureFormat.RGHalf and the configured motion vector shade...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d845cb95c6f
unity_docs
animation
What is `Animator.targetRotation` in Unity? Explain its purpose and usage.
Animator.targetRotation public Quaternion targetRotation ; Description Returns the rotation of the target specified by SetTarget . The rotation is only valid when a frame is being evaluated after the SetTarget call. Animator.applyRootMotion must be enabled for targetRotation to be calculated.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8675ad7ef70
unity_docs
scripting
What is `IMGUI.Controls.MultiColumnHeader.OnSortingChanged` in Unity? Explain its purpose and usage.
MultiColumnHeader.OnSortingChanged Declaration protected void OnSortingChanged (); Description Called when sorting changes and dispatches the sortingChanged event. Can be overridden to control the dispatching of the sortingChanged event.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_bd5969e828d3_doc_17
github
scripting
What does `AnimateTo` do in this Unity script? Explain its purpose and signature.
Smoothly animates the camera to view the supplied interest point. Requires that a camera has been set using SetControlledCamera.The latitude and longitude of the point on the ground which the camera should be looking at once the transition is complete.The latitude, longitude and altitude from which the camera will look...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_108075b43cd7
unity_docs
scripting
Explain 'Overriding prefab instance data' in Unity.
Use overrides to create variations of prefab instances , while still linking those instances to the same prefab asset. Topic Description Override prefab instances Modify properties, components, or child GameObjects on individual prefab instances. Remove unused override data Clean up override data that’s no longer in us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a19f27187f6c
unity_docs
editor
Show me a Unity C# example demonstrating `AssetSettingsProvider.CreateProviderFromObject`.
to compare against what the user is searching for. When the user enters values in the search box on the Settings window, SettingsProvider.HasSearchInterest tries to match those keywords to this list. Returns AssetSettingsProvider Returns an AssetSettingsProvider that will create an Editor for this particular as...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_59c2ed0041b2
unity_docs
physics
What is `AreaEffector2D.forceVariation` in Unity? Explain its purpose and usage.
AreaEffector2D.forceVariation public float forceVariation ; Description The variation of the magnitude of the force to be applied. A random value between 0 and forceVariation is used and added to the force magnitude. The forceVariation can be negative to randomly reduce the force magnitude. Additional resou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2df3ef1e62e
unity_docs
editor
Show me a Unity C# example demonstrating `VersionControl.Provider.LockIsValid`.
Provider.LockIsValid Declaration public static bool LockIsValid ( VersionControl.AssetList assets ); Parameters Parameter Description assets List of assets to test. Description Returns true if the Provider.Lock task can be executed on one or more assets from the given asset list. ```csharp using System...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c44bfdba6cdd
github
scripting
Write a Unity Editor script for Class Type Dropdown Item
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System; using System.Linq; using System.Reflection; using UnityEditor.IMGUI.Controls; using MBT; namespace MBTEditor { public class ClassTypeDropdownItem : AdvancedDropdownItem { public Ty...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_ecf5c027a1af
unity_docs
scripting
Show me a Unity C# example demonstrating `MonoBehaviour.CancelInvoke`.
MonoBehaviour.CancelInvoke Declaration public void CancelInvoke (); Description Cancels all Invoke calls on this MonoBehaviour. ```csharp using UnityEngine; using System.Collections.Generic;public class ExampleScript : MonoBehaviour { public GameObject projectile; void Start() { // Starting in 2 seconds, a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_90275fcc6b2a
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.LimitVelocityOverLifetimeModule.enabled`.
ParticleSystem.LimitVelocityOverLifetimeModule.enabled public bool enabled ; Description Specifies whether the LimitForceOverLifetimeModule is enabled or disabled. Additional resources: ParticleSystem.limitForceOverLifetime. ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(Partic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28f6a6323ad3
unity_docs
editor
What is `EditorUserBuildSettings.iOSXcodeBuildConfig` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.iOSXcodeBuildConfig public static XcodeBuildConfig iOSXcodeBuildConfig ; Description The scheme Xcode uses to run this project. You can change the project scheme later in Xcode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_52082b61fc80
unity_docs
audio
Explain 'Reverb Zones' in Unity.
Reverb Zones take an Audio Clip and distorts it depending where the audio listener is located inside the reverb zone. They are used when you want to gradually change from a point where there is no ambient effect to a place where there is one, for example when you are entering a cavern. ## Properties Property: Functio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_211387f89e33_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
An object that allows users to edit objects when using the Unity inspector. Signature: ```csharp public sealed class EditableOrderedDictionary_string_Texture : EditableEntry<OrderedDictionary_string_Texture> ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_604c81cbae79
unity_docs
xr
Explain 'Behavior' in Unity.
com.unity.behavior ## Description Unity Behavior is a graph-based tool to create and run behavior trees with a modular architecture. Human-readable graphs flow top-to-bottom with plain-language nodes Comprehensive library of pre-built nodes for movement, detection, and decision-making Seamless C# integration with a f...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1ccf3cf25260
unity_docs
ui
In Unity's 'Structure UI with C# scripts', what is 'Add controls to a UI with C# scripts' and how does it work?
To use a control in a UI, add it to the visual tree . The following example adds a Button control to an existing visual tree. ``` var newButton = new Button("Click me!"); rootVisualElement.Add(newButton); ``` When adding controls to a UI hierarchy, the layout engine automatically handles the sizing and positioning. You...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.