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_026c661cc574
unity_docs
math
In Unity's 'Serialization rules', what is 'Field serialization rules' and how does it work?
Serializers in Unity work directly on the fields of your C# classes rather than their properties, so Unity only serializes your fields if they meet certain conditions. The following section outlines how to use field serialization in Unity. To use field serialization you must ensure that the field: Is public , or has a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_221713f444a3_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Destroys the given GameObject if it is not null, then creates a clone of the given TComponent and assigns it to the reference.IHierarchyBehaviour's will be initialized.Can be null, if it is not then it will be destroyed.The GameObject to clone.The new TComponent Signature: ```csharp public static TComponent OverwriteC...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_ba0f5b7a208c
unity_docs
scripting
Show me a Unity C# example demonstrating `Video.VideoClip.audioTrackCount`.
ifferent audio tracks. Play certain tracks depending on the context or user’s choice. Change the volume on certain tracks. Mute certain tracks. To enable or deactivate a certain audio track from the clip, use VideoPlayer.EnableAudioTrack . Additional resources: VideoClip.GetAudioLanguage , VideoPlayer.EnableAudi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7e551553658
unity_docs
math
What is `AndroidJNI.CallStaticDoubleMethodUnsafe` in Unity? Explain its purpose and usage.
AndroidJNI.CallStaticDoubleMethodUnsafe Declaration public static double CallStaticDoubleMethodUnsafe (IntPtr clazz , IntPtr methodID , jvalue* args ); Description Invokes the specified methodID static method on a Java object, optionally passing in an array of arguments ( args ). Additional resources: Jav...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bbb565488da2
unity_docs
scripting
In Unity's 'Look At Constraint component', what is 'Properties' and how does it work?
Property Description Is Active Enable this option to evaluate the Constraint. To also apply the Constraint, enable the Lock property. Weight Set the strength of the Constraint. Valid values range from 0 (the Constraint has no effect) to 1 (this GameObject rotates at the same rate as its source GameObjects move). This w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_66d1b59b4a2c_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Visualizes an ExPresSXR Timer as a filling circle. Signature: ```csharp public class TimerUi : MonoBehaviour ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_0f62998bd5d0
unity_docs
scripting
Explain 'Optimizing AssetBundle memory usage' in Unity.
Loading AssetBundles can consume memory depending on compression formats and access patterns. When you load an AssetBundle, Unity allocates memory to both the assets contained in the AssetBundle and to its internal data. The main types of internal data for a loaded AssetBundle include: Loading cache : Stores recently a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9709f50a92e4
unity_docs
scripting
What is `ObjectPreview.DrawPreview` in Unity? Explain its purpose and usage.
ObjectPreview.DrawPreview Declaration public void DrawPreview ( Rect previewArea ); Parameters Parameter Description previewArea The available area to draw the preview. Description This is the first entry point for Preview Drawing. The default implementation will draw a grid of previews if there are mult...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00c60598b042
unity_docs
scripting
What is `Unity.Properties.TypeUtility.GetRootType` in Unity? Explain its purpose and usage.
TypeUtility.GetRootType Declaration public static Type GetRootType (Type type ); Parameters Parameter Description type The <see cref="System.Type" /> for which we want the base type. Returns Type The base type. Description Utility method to return the base type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b54aa7373f92
unity_docs
scripting
What is `PhysicsScene2D.Simulate` in Unity? Explain its purpose and usage.
PhysicsScene2D.Simulate Declaration public bool Simulate (float deltaTime , int simulationLayers = Physics2D.AllLayers); Parameters Parameter Description deltaTime The time to advance physics by. simulationLayers The Rigidbody2D and Collider2D layers to simulate. Returns bool Whether the simulati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_88927a2aef00
unity_docs
ui
What is `UIElements.VisualElement.GetFirstAncestorOfType` in Unity? Explain its purpose and usage.
VisualElement.GetFirstAncestorOfType Declaration public T GetFirstAncestorOfType (); Description Walks up the hierarchy, starting from this element's parent, and returns the first VisualElement of this type
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe291570c1ff
unity_docs
physics
Explain 'Compilation and code reload' in Unity.
Compilation transforms the code you write into code that runs in a given context on a given platform. As you work in the Unity Editor, there are several scenarios where Unity may recompile and reload your code. Depending on your settings and the location of your code, opening the Editor for the first time, modifying yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6082c7b347cd
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.NoiseModule.enabled`.
ParticleSystem.NoiseModule.enabled public bool enabled ; Description Specifies whether the the NoiseModule is enabled or disabled. Additional resources: ParticleSystem.noise . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBeha...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc5d04ad3754
unity_docs
scripting
What is `Unity.Properties.PropertyContainer.TrySetValue` in Unity? Explain its purpose and usage.
PropertyContainer.TrySetValue Declaration public static bool TrySetValue (TContainer container , string name , TValue value ); Parameters Parameter Description container The container whose property will be set. name The name of the property to set. value The value to assign to the property. Returns ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9a8a4c338f1
unity_docs
editor
What is `Device.SystemInfo.supportsHardwareQuadTopology` in Unity? Explain its purpose and usage.
SystemInfo.supportsHardwareQuadTopology public static bool supportsHardwareQuadTopology ; Description This has the same functionality as SystemInfo.supportsHardwareQuadTopology 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_de77b0db249b
unity_docs
scripting
Show me a Unity C# example demonstrating `Transform.localEulerAngles`.
le demonstrates the rotation of a GameObject using eulerAngles based on the Input of the user. The example shows that we never rely on reading the Quanternion.eulerAngles to increment the rotation, instead we set it using our Vector3 currentEulerAngles. All rotational changes happen in the currentEulerAngles variable, ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c0edfed2459
unity_docs
editor
What is `EditorApplication.EnterPlaymode` in Unity? Explain its purpose and usage.
EditorApplication.EnterPlaymode Declaration public static void EnterPlaymode (); Description Switches the editor to Play mode. Equivalent to setting EditorApplication.isPlaying to true. Additional resources: isPlaying .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ad78926003e6
unity_docs
editor
Explain 'Assembly metadata and compilation details' in Unity.
You can define additional metadata for your assemblies and retrieve information on the assemblies included in a project build . ## Setting assembly attributes You can use assembly attributes to set metadata properties for your assemblies. Although not a requirement, it’s good practice to define these attributes in a ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_fb052fdaeec5_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Convert single column data by header name. Signature: ```csharp public static IEnumerable<T> ConvertColumnEnumerator<T>(string csvContent, string headerName, char cellSeparator = CSVDataHelper.CommaCharacter, bool supportCellMultiline = true) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_f710cd634f0e
unity_docs
animation
Explain 'Importing models into Unity' in Unity.
This section contains information on importing models that you create in an external application into Unity. Topic Description Importing a model How to import any type of model. Importing a model with humanoid animations How to import a humanoid model for use with Unity’s Animation System. Importing a model with non-hu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c1b14020306
unity_docs
scripting
What is `PlayerSettings.fullScreenMode` in Unity? Explain its purpose and usage.
PlayerSettings.fullScreenMode public static FullScreenMode fullScreenMode ; Description Platform agnostic setting to define fullscreen behavior. Not all platforms support all modes. See FullScreenMode documentation for possible settings.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_096f2e319860
unity_docs
xr
What is `Search.SearchService.GetAction` in Unity? Explain its purpose and usage.
SearchService.GetAction Declaration public static Search.SearchAction GetAction ( Search.SearchProvider provider , string actionId ); Parameters Parameter Description provider Search provider to look up. actionId Unique action ID within the search provider. Returns SearchAction The matching action....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0c5b207399d5
unity_docs
rendering
In Unity's 'Particle rotation', what is 'Rotation by speed' and how does it work?
The Rotation by Speed module can change a particle’s rotation based on its speed in distance units per second. This module can be used when the particles represent solid objects moving over the ground such as rocks from a landslide. The rotation of the particles can be set in proportion to the speed so that they roll o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e3638f791235_doc_5
github
scripting
What does `FullFileFolder` do in this Unity script? Explain its purpose and signature.
Full folder path with Signature: ```csharp public string FullFileFolder(string relativePath) => Path.Combine(Environment.CurrentDirectory, relativePath); ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_man_e725a99bcb58
unity_docs
input
In Unity's 'UnsignedLongField', what is 'Create an UnsignedLongField' and how does it work?
You can create an UnsignedLongField with UI Builder, UXML, or C#. The following C# code creates an UnsignedLongField: ``` var unsignedLongField = new UnsignedLongField(); ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d797eb97ac65
unity_docs
physics
Show me a Unity C# example demonstrating `QueryTriggerInteraction`.
QueryTriggerInteraction enumeration Description Overrides the global Physics.queriesHitTriggers . Overrides the global Physics.queriesHitTriggers to specify whether queries (raycasts, spherecasts, overlap tests, etc.) hit Triggers by default. Use Ignore for queries to ignore trigger Colliders. ```csharp //Crea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_abd2b9402b79
unity_docs
scripting
What is `AssetDeleteResult` in Unity? Explain its purpose and usage.
AssetDeleteResult enumeration Description Result of Asset delete operation Properties Property Description DidNotDelete Tells the internal implementation that the callback did not delete the asset. The asset will be delete by the internal implementation. FailedDelete Tells Unity that the file cannot be deleted...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c51d74f5d5ef
unity_docs
editor
What are the parameters of `EditorGUILayout.BeginFoldoutHeaderGroup` in Unity?
Returns bool The foldout state selected by the user. If true, you should render sub-objects. Description Make a label with a foldout arrow to the left of it. This is useful for folder-like structures, where child objects only appear if you've unfolded the parent folder. This control cannot be nested in another BeginFol...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_872a4e4e9565
unity_docs
physics
What is `AI.NavMeshAgent.SetDestination` in Unity? Explain its purpose and usage.
NavMeshAgent.SetDestination Declaration public bool SetDestination ( Vector3 target ); Parameters Parameter Description target The target point to navigate to. Returns bool True if the destination was requested successfully, otherwise false. Description Sets or updates the destination thus triggerin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9aa4ae7db1a3
unity_docs
input
What is `Toolbars.EditorToolbarFloatField` in Unity? Explain its purpose and usage.
EditorToolbarFloatField class in UnityEditor.Toolbars / Inherits from: UIElements.FloatField Description A float field used with EditorToolbarElementAttribute . Constructors Constructor Description EditorToolbarFloatField Creates a float field visual element that is styled to match a toolbar in an UnityEdit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e4f0959d70de
unity_docs
scripting
What is `UIElements.PropagationPhase` in Unity? Explain its purpose and usage.
PropagationPhase enumeration Description The propagation phases of an event. When an element receives an event, the event propagates from the panel's root element to the target element. In the TrickleDown phase, the event is sent from the panel's root element to the target element. In the BubbleUp phase, the...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dc218cc48f99
unity_docs
editor
Explain 'Dedicated Server requirements' in Unity.
You must meet the following requirements to use the Dedicated Server build target. Download and install Unity Editor version 2021.3 LTS or later. Install the Dedicated Server module for the platform you want to build your application on. For example, enable Linux Dedicated Server Build Support if you want to build for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d426ddc1ec5b
unity_docs
input
Give me an overview of the `TouchPhase` class in Unity.
TouchPhase enumeration Description Describes phase of a finger touch. TouchPhase is an enum type that contains the states of possible finger touches. The states represent each action the finger can take on the most recent frame update. Since a touch is tracked over its "lifetime" by the device, the start and end o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_00d715e37c6e
unity_docs
physics
What is `LightmapParameters.systemTag` in Unity? Explain its purpose and usage.
LightmapParameters.systemTag public int systemTag ; Description System tag is an integer identifier. It lets you force an object into a different Enlighten Realtime Global Illumination system even though all the other parameters are the same.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82902235d24b
unity_docs
scripting
What is `Unity.Loading.ContentFile` in Unity? Explain its purpose and usage.
ContentFile struct in Unity.Loading / Implemented in: UnityEngine.ContentLoadModule Description This struct acts like a handle for accessing a file loaded by ContentLoadInterface.LoadContentFileAsync . You can use it to access the status and results of the load operation. Static Properties Property Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c1ceed7164b
unity_docs
rendering
What is `AssetDatabase.FindAssets` in Unity? Explain its purpose and usage.
AssetDatabase.FindAssets Declaration public static string[] FindAssets (string filter ); Declaration public static string[] FindAssets (string filter , string[] searchInFolders ); Parameters Parameter Description filter The filter string can contain search data. See below for details about this string....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3a758d7c290
unity_docs
rendering
What is `Rendering.ShadowSamplingMode.RawDepth` in Unity? Explain its purpose and usage.
ShadowSamplingMode.RawDepth Description Shadow sampling mode for sampling the depth value. The texture and sampler can be declared with: sampler2D _Shadowmap; and sampled with: tex2D(_Shadowmap, uv).r; .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a711b147a25d
unity_docs
physics
Explain 'Particle physics' in Unity.
Resources for configuring simulated physics and collisions on particles . Topic Description Particle physics forces Understand how the Particle System can simulate physics forces that act on a particle. Apply forces to particles Use the Particle System Force Field to set up forces on the particles in a Particle System....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ee23244ae2e8
unity_docs
physics
In Unity's 'Create a ragdoll', what is 'Use the Ragdoll Wizard' and how does it work?
It’s not possible to make the actual source asset into a ragdoll. This would require modifying the source asset file, and is therefore impossible. You will make an instance of the character asset into a ragdoll, which can then be saved as a Prefab for re-use. Create an instance of the character by dragging it from the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ac37f9c8f363
github
scripting
Write a Unity C# audio script for Play Continuous Sound
```csharp using UnityEngine; /// <summary> /// Play a long continuous sound /// </summary> [RequireComponent(typeof(AudioSource))] public class PlayContinuousSound : MonoBehaviour { [Tooltip("The sound that is played")] public AudioClip sound = null; [Tooltip("Controls if the sound plays on start")] ...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_f34ae26929be
unity_docs
editor
What is `Device.SystemInfo.supportsStoreAndResolveAction` in Unity? Explain its purpose and usage.
SystemInfo.supportsStoreAndResolveAction public static bool supportsStoreAndResolveAction ; Description This property has the same functionality as SystemInfo.supportsStoreAndResolveAction and also shows 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_9056b409a94c
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.AnimatorController.layers`.
AnimatorController.layers public AnimatorControllerLayer[] layers ; Description The layers in the controller. It's important to note that the AnimatorControllerLayer are returned as a copy. The array should be set back into the property when changed. ```csharp class ControllerModifier { UnityEditor.Animatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4f76f5fdcdff
unity_docs
editor
What is `Build.Reporting.BuildStepMessage` in Unity? Explain its purpose and usage.
BuildStepMessage struct in UnityEditor.Build.Reporting Description Contains information about a single log message recorded during the build process. Additional resources: BuildStep.messages Properties Property Description content The text content of the log message. type The LogType of the log message.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7c06b6fa468a
unity_docs
rendering
What is `ParticleSystem.SizeBySpeedModule.y` in Unity? Explain its purpose and usage.
ParticleSystem.SizeBySpeedModule.y public ParticleSystem.MinMaxCurve y ; Description Size by speed curve for the y-axis. Additional resources: MinMaxCurve . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_885110ea51e8
unity_docs
editor
What is `PrefabUtility.prefabInstanceApplied` in Unity? Explain its purpose and usage.
PrefabUtility.prefabInstanceApplied Parameters Parameter Description value Instance root GameObject. Description Unity calls this method automatically after a Prefab instance has been applied.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e7501112da14
unity_docs
rendering
In Unity's 'Shader loading', what is 'Check when Unity loads shaders' and how does it work?
To check when a shader loads from serialized data, search for the following profiler markers in the Profiler : Shader.ParseThreaded Shader.ParseMainThread To check when a shader unloads shader variants, search for the Shader.MainThreadCleanup profiler marker.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f053d9142661
unity_docs
scripting
What is `iOS.DeviceGeneration` in Unity? Explain its purpose and usage.
DeviceGeneration enumeration Description iOS device generation. ```csharp using UnityEngine; using UnityEngine.iOS;public class DeviceGenerationExample : MonoBehaviour { string m_DeviceGeneration = "Undefined"; void Start() { // Check if the device running this is an "iPhone 14 Pro Max" if (Device.generation =...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d50a987edcfe
unity_docs
rendering
What is `Rendering.RenderQueueRange` in Unity? Explain its purpose and usage.
RenderQueueRange struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Describes a material render queue range. Additional resources: ScriptableRenderContext.DrawRenderers, FilteringSettings.renderQueueRange . Static Properties Property Description all A range that includes a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b0bcb8f489e5
unity_docs
scripting
What is `Experimental.GraphView.GraphElement.OnCustomStyleResolved` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.OnCustomStyleResolved Declaration protected void OnCustomStyleResolved ( UIElements.ICustomStyle style ); Description Called when the custom style properties are resolved.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07a7a59cb1b0
unity_docs
scripting
What are the parameters of `WaitWhile.ctor` in Unity?
Description Initializes a yield instruction with a given delegate to be evaluated. Declaration public WaitWhile (Func<bool> predicate , TimeSpan timeout , Unity.Android.Gradle.Manifest.Action onTimeout , WaitTimeoutMode timeoutMode ); Parameters Parameter Description predicate The supplied delegate will be evaluated ea...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0efaf42a1ff
unity_docs
scripting
What is `iOS.Xcode.XcScheme.WriteToStream` in Unity? Explain its purpose and usage.
XcScheme.WriteToStream Declaration public void WriteToStream (TextWriter tw ); Parameters Parameter Description tw Text writer to write to. Description Writes the scheme contents to the specified text writer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd0c3708309b
unity_docs
audio
In Unity's 'Audio High Pass Filter', what is 'Properties' and how does it work?
Property: Function: Cutoff Frequency Highpass cutoff frequency in Hertz (range 10.0 to 22000.0, default = 5000.0). Highpass Resonance Q Highpass resonance quality value (range 1.0 to 10.0, default = 1.0).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_db4b77babd2a
unity_docs
rendering
What is `UIElements.IPanel.isDirty` in Unity? Explain its purpose and usage.
IPanel.isDirty public bool isDirty ; Description Checks whether any element within the panel has had any changes to its state since the panel was last rendered. This method doesn't verify if any bindings have been updated, if there are any pending transitions, or if any referenced assets (such as renderText...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_58c857a09115
unity_docs
scripting
In Unity's 'Change the fade distance of lights with fall-off', what is 'Example' and how does it work?
Note : The code example below only works with the Progressive Lightmapper when you use Baked or Mixed lights. To use the code example with realtime lights , use Enlighten Realtime Global Illumination . ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Experimenta...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ed02ea17950
unity_docs
animation
What is `AssetPostprocessor.OnPostprocessAnimation` in Unity? Explain its purpose and usage.
AssetPostprocessor.OnPostprocessAnimation(GameObject, AnimationClip) Parameters Parameter Description root The root GameObject of the imported Asset. clip The current animation clip. Description This function is called when an AnimationClip has finished importing. This function is called for every AnimationC...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d527a18c8f41
unity_docs
xr
In Unity's 'AssetBundle platform considerations', what is 'Build AssetBundles into the StreamingAssets folder' and how does it work?
AssetBundles placed in the StreamingAssets folder are automatically packaged as part of your application’s APK or OBB file. You can’t load these files directly from the APK or OBB file with the standard file path APIs. Instead, you must load them with the UnityWebRequestAssetBundle API with a file:/// URL scheme. For e...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8500a2976c5f
unity_docs
physics
In Unity's 'Introduction to rigid body physics', what is 'Rigid body GameObjects with physics-based movement' and how does it work?
In Unity, a Rigidbody component provides a physics-based way to control the movement and position of a GameObject. Instead of the Transform properties, you can use simulated physics forces and torque to move the GameObject, and let the physics engine calculate the results. In most cases, if a GameObject has a Rigidbody...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9bf8ff2a52fe
unity_docs
rendering
What is `LightTransport.IProbeIntegrator.IntegrateValidity` in Unity? Explain its purpose and usage.
IProbeIntegrator.IntegrateValidity Declaration public LightTransport.IProbeIntegrator.Result IntegrateValidity ( LightTransport.IDeviceContext context , int positionOffset , int positionCount , int sampleCount , BufferSlice<float> validityEstimateOut ); Parameters Parameter Description context Device ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2095cbde6ede
unity_docs
scripting
In Unity's 'Reference type management', what is 'Avoid closures and anonymous methods' and how does it work?
In general, avoid closures in C# whenever possible. You should minimize the use of anonymous methods and method references in performance-sensitive code, especially in code that executes on a per-frame basis. Method references in C# are reference types, so they’re allocated on the managed heap. This means that if you p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c982ed94f032
unity_docs
animation
What is `Animations.TransformStreamHandle.GetPositionReadMask` in Unity? Explain its purpose and usage.
TransformStreamHandle.GetPositionReadMask Declaration public bool GetPositionReadMask ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that holds the animated values. Returns bool Returns true if the position can be read. Description Gets the posit...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1a34909e21e6
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerRequestMetric.SizeBytes` in Unity? Explain its purpose and usage.
AsyncReadManagerRequestMetric.SizeBytes public ulong SizeBytes ; Description The size of the read request, in bytes. For AsyncReadManager operations, the size reported by this metric corresponds to the value specified in the ReadCommand.Size field.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cce60f3e22bf
unity_docs
editor
Explain 'Remote Config' in Unity.
com.unity.remote-config ## Description Remote Config is a cloud service that lets you tune and customize your app over the air without requiring an update to your game. You can use rules to enable or disable features, change the difficulty of your game or run special events to target specific audiences. Campaigns con...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_97a369479878
unity_docs
editor
What is `SearchService.SceneSearchContext` in Unity? Explain its purpose and usage.
SceneSearchContext class in UnityEditor.SearchService Implements interfaces: ISearchContext Description A search context implementation for Scene search engines. All methods that are called on a Scene search engine, and expect a ISearchContext , receive an object of this type. Properties Property Description ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_351bd1a7dbc4
unity_docs
rendering
Explain 'macOS build settings reference' in Unity.
Use these settings to configure how Unity builds your application for macOS platform. You can update your macOS build settings from the Platform Settings section of the Build Profiles window. Property Description Architecture Select the CPU to build for (only applies to Build And Run). Intel 64-bit : Use Intel/AMD 64-b...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_541e8410f7b6
unity_docs
editor
What is `iOS.Xcode.PBXProject.RemoveAssetTagForFile` in Unity? Explain its purpose and usage.
PBXProject.RemoveAssetTagForFile Declaration public void RemoveAssetTagForFile (string targetGuid , string fileGuid , string tag ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . fileGuid The GUID of the file. tag The name of the asse...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd75a65f67fa
unity_docs
scripting
What is `UIElements.BaseVerticalCollectionView.horizontalScrollingEnabled` in Unity? Explain its purpose and usage.
BaseVerticalCollectionView.horizontalScrollingEnabled public bool horizontalScrollingEnabled ; Description This property controls whether the collection view shows a horizontal scroll bar when its content does not fit in the visible area.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52729ddd7b15
unity_docs
editor
What is `EditorWindow.CreateWindow` in Unity? Explain its purpose and usage.
EditorWindow.CreateWindow Declaration public static T CreateWindow (params Type[] desiredDockNextTo ); Declaration public static T CreateWindow (string title , params Type[] desiredDockNextTo ); Parameters Parameter Description T The type of the window. Must derive from EditorWindow. title The title ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_3760a924465d
github
scripting
Write a Unity C# UI script for Game Logic
```csharp using UnityEngine; using TetrisEngine.TetriminosPiece; using System.Collections.Generic; using pooling; namespace TetrisEngine { //This class is responsable for conecting the engine to the view //It is also responsable for calling Playfield.Step public class GameLogic : MonoBehaviour { priva...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ec498e606d7e
unity_docs
scripting
What is `Unity.Properties.PropertyContainer.GetValue` in Unity? Explain its purpose and usage.
PropertyContainer.GetValue Declaration public static TValue GetValue (TContainer container , string name ); Parameters Parameter Description container The container whose property value will be returned. name The name of the property to get. Returns TValue The value for the specified name. Descript...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b3f87d32ceaa
unity_docs
ui
What is `UIElements.Vertex.position` in Unity? Explain its purpose and usage.
Vertex.position public Vector3 position ; Description Describes the vertex's position. Note this value is a Vector3 . If the vertex represents flat UI geometry, set the z component of this position field to Vertex.nearZ . The position value is relative to the VisualElement 's local rectangle top-left c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5cebec699275
unity_docs
scripting
What is `UIElements.Columns.IndexOf` in Unity? Explain its purpose and usage.
Columns.IndexOf Declaration public int IndexOf ( UIElements.Column column ); Parameters Parameter Description column The column to locate in the <see cref="Columns" />. Returns int The index of the column if found in the collection; otherwise, -1. Description Returns the index of the specified colu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bc5f7db779d4
unity_docs
scripting
Explain 'Animate trees with Wind Zones' in Unity.
To create the effect of wind on your trees and particle systems, you can add one or more GameObjects with Wind Zone components. Trees within a wind zone bend in a realistic animated fashion, and the wind itself moves in pulses to create natural patterns of movement among the trees. ## Wind for Terrain To create a Win...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_47dfd7e908c8
unity_docs
ui
What is `UIElements.TreeView.bindItem` in Unity? Explain its purpose and usage.
TreeView.bindItem public Action<VisualElement,int> bindItem ; Description Callback for binding a data item to the visual element. The method called by this callback receives the VisualElement to bind, and the index of the element to bind it to. If this property and makeItem are not set, Unity will try to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_958997c02ebe
unity_docs
animation
Show me a Unity C# example demonstrating `Animations.AnimatorController.parameters`.
AnimatorController.parameters public AnimatorControllerParameter[] parameters ; Description Parameters are used to communicate between scripting and the controller. They are used to drive transitions and blendtrees for example. It's important to note that the AnimatorControllerParameters are returned as a copy....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fdab2473cfc8
unity_docs
scripting
Show me a Unity code example for 'Change the fade distance of lights with fall-off'.
the table for a visual representation of how these work, and the code sample below the image for an example of how to use this functionality. Refer to FalloffType for more information. ## Example Note : The code example below only works with the Progressive Lightmapper when you use Baked or Mixed lights. To use the c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bcb13c2cd7b9
unity_docs
ui
What is `UIElements.BaseListView.overridingAddButtonBehavior` in Unity? Explain its purpose and usage.
BaseListView.overridingAddButtonBehavior public Action<BaseListView,Button> overridingAddButtonBehavior ; Description This callback allows the user to implement a DropdownMenu when the Add Button is clicked. This callback will only be called if showAddRemoveFooter is set to true . Setting this callback ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_426a4a5fef22
unity_docs
scripting
Explain 'Style text with rich text tags' in Unity.
You can use USS to style a whole text string , but what if you only want to style one word of your text string? This is difficult with USS, but it’s simple with rich text tags. Topic Description Introduction to rich text tags Learn about the syntax and scope of rich text tags. Supported rich text tags Find all the supp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d7c3f5e6f71d
unity_docs
scripting
Show me a Unity C# example demonstrating `PrimitiveType.Plane`.
PrimitiveType.Plane Description A plane primitive. Additional resources: GameObject.CreatePrimitive . ```csharp using UnityEngine; using System.Collections;// Creates a plane primitivepublic class ExampleClass : MonoBehaviour { void Start() { GameObject plane = GameObject.CreatePrimitive(PrimitiveType.Plane); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0136cb7c478
unity_docs
performance
What is `Profiling.RawFrameDataView.GetFlowEvents` in Unity? Explain its purpose and usage.
RawFrameDataView.GetFlowEvents Declaration public void GetFlowEvents (List<FlowEvent> outFlowEvents ); Parameters Parameter Description outFlowEvents Returns the list of all profiler flow events for the current frame and thread. Description Gets all flow events for the current frame and thread.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f6c1ce890647
unity_docs
scripting
What is `Search.QueryEngine_1.skipIncompleteFilters` in Unity? Explain its purpose and usage.
QueryEngine<T0>.skipIncompleteFilters public bool skipIncompleteFilters ; Description Boolean. Indicates if incomplete filters should be skipped. If true, filters are skipped. If false and validateFilters is true, incomplete filters will generate errors when parsed. See QueryValidationOptions.skipIncompleteF...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e3441f35303e
unity_docs
editor
What is `Networking.PlayerConnection.PlayerConnectionGUIUtility.GetConnectionState` in Unity? Explain its purpose and usage.
PlayerConnectionGUIUtility.GetConnectionState Declaration public static Networking.PlayerConnection.IConnectionState GetConnectionState ( EditorWindow parentWindow , Action<string> connectedCallback ); Parameters Parameter Description parentWindow The EditorWindow that will use the connection. connect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bd0089bffd92
unity_docs
ui
In Unity's 'Bind a custom control', what is 'Create a serialized object' and how does it work?
Create a serialized object that contains a Texture2D. Create a Unity project with any template. In the Project window , create a folder named bind-custom-control to store the files. Create a C# script named TextureAsset.cs and replace its contents with the following: ```csharp using UnityEngine; namespace UIToolkitExa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ba5c4506927
unity_docs
physics
What is `OverlapBoxCommand.ctor` in Unity? Explain its purpose and usage.
OverlapBoxCommand Constructor Declaration public OverlapBoxCommand ( Vector3 center , Vector3 halfExtents , Quaternion orientation , QueryParameters queryParameters ); Parameters Parameter Description center The center of the box. halfExtents The half of the size of the box in each dimension. or...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d32754ea980b
unity_docs
rendering
What is `Rendering.RayTracingAccelerationStructure.Settings.buildFlagsStaticGeometries` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.Settings.buildFlagsStaticGeometries public Rendering.RayTracingAccelerationStructureBuildFlags buildFlagsStaticGeometries ; Description The flags Unity uses when it builds acceleration structures associated with static geometries. To customize the flags per ray tracing instan...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_54d0299fca4d
unity_docs
scripting
What is `Transform.DetachChildren` in Unity? Explain its purpose and usage.
Transform.DetachChildren Declaration public void DetachChildren (); Description Unparents all children. Useful if you want to destroy the root of a hierarchy without destroying the children. Additional resources: Transform.parent to detach/change the parent of a single transform.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a05bce10935c
unity_docs
editor
What is `Terrain.editorRenderFlags` in Unity? Explain its purpose and usage.
Terrain.editorRenderFlags public TerrainRenderFlags editorRenderFlags ; Description Controls what part of the terrain should be rendered. Set the value to a combination of TerrainRenderFlags values. The default value is TerrainRenderFlags.all. The value is not serialized with Terrain component.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d36149af6090
unity_docs
scripting
What is `Windows.Speech.DictationRecognizer.DictationResult` in Unity? Explain its purpose and usage.
DictationRecognizer.DictationResult Parameters Parameter Description value The delegate to be triggered when this event is triggered. Description Event indicating a phrase has been recognized with the specified confidence level.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_389b0ac527f2
unity_docs
ui
Explain 'Panel events' in Unity.
A panel represents a visible instance of a UI hierarchy. It handles element behavior event dispatching within the hierarchy of the visual tree . It holds a reference to the root visual element of the hierarchy. For runtime UI, it’s comparable to the Canvas in UGUI. You must attach an instance of a visual element to a p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4ed02f795a8
unity_docs
scripting
Show me a Unity C# example demonstrating `AssetPostprocessor.OnPostprocessGameObjectWithAnimatedUserProperties`.
ription Called when the animation curves for a custom property of type float are finished importing. Called for every GameObject with an animated custom property of type float . Each animated property has an animation curve that is represented by an EditorCurveBinding . This lets you dynamically add components to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_abee88af7020
unity_docs
rendering
What is `HandleUtility.PushCamera` in Unity? Explain its purpose and usage.
HandleUtility.PushCamera Declaration public static void PushCamera ( Camera camera ); Description Store all camera settings. The camera settings will be added to a so-called "stack" list, where they will stay until retrieved by a call to PopCamera . The settings will be stored in the reverse of the order in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6327faf783a0
unity_docs
editor
In Unity's 'Set up the Android SDK Target API', what is 'Configure Target API version' and how does it work?
To configure the Android SDK Target API version in Android Player settings , follow these steps: Open Android Player Settings (menu: Edit > Project Settings > Player ). In the Other Settings section, change the Target API Level .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1a9173caa29b
unity_docs
rendering
Explain 'XR Plug-in Management settings' in Unity.
Understand the settings you can configure with XR Plug-in Management. The XR Plug-in Management section of the Project Settings window contains the settings you can use to configure XR in your Unity project. Use this section to Choose XR provider plug-ins and Configure settings for each XR platform your project targets...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ca5c7504cff9
unity_docs
audio
In Unity's 'Audio Mixer', what is 'Audio Mixer window' and how does it work?
The window displays the Audio Mixer which is basically a tree of Audio Mixer Groups. An Audio Mixer group (bus) is a mix of audio signals processed through a signal chain which allows you to control volume attenuation and pitch correction. It allows you to insert effects that process the audio signal and change the par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c17e3f6a21bd
unity_docs
rendering
What is `ParticleSystem.SubEmittersModule.AddSubEmitter` in Unity? Explain its purpose and usage.
ParticleSystem.SubEmittersModule.AddSubEmitter Declaration public void AddSubEmitter ( ParticleSystem subEmitter , ParticleSystemSubEmitterType type , ParticleSystemSubEmitterProperties properties ); Declaration public void AddSubEmitter ( ParticleSystem subEmitter , ParticleSystemSubEmitterType ty...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e47e840583da
unity_docs
rendering
What is `UIElements.PanelRenderMode.ScreenSpaceOverlay` in Unity? Explain its purpose and usage.
PanelRenderMode.ScreenSpaceOverlay Description Renders the panel as a 2D overlay on top of the screen, independent of any camera or world geometry. The panel is drawn last in the rendering order and always appears on top of the scene. This mode is suitable for HUDs and other UI that should always be visible to...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_404ea3809f42_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
struct TOnViewWaitForInitEventComponentThe structure describes a parameters of an event which is generated with BaseViewwhen some instance of it has awaken and need to be registered Signature: ```csharp public struct TOnViewWaitForInitEventComponent: IComponent ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_673fe4eb5926
unity_docs
animation
What is `Animations.AnimationHumanStream.rightFootHeight` in Unity? Explain its purpose and usage.
AnimationHumanStream.rightFootHeight public float rightFootHeight ; Description The right foot height from the floor. (Read Only) The foot height is the distance between the ankle and the floor computed when the avatar was configured.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c477ebde62ff
unity_docs
editor
Give me an overview of the `AssetBundleBuild` class in Unity.
AssetBundleBuild struct in UnityEditor Description AssetBundle building map entry. This structure is used with BuildPipeline.BuildAssetBundles to specify the name of a bundle and the names of the assets that it will contain. The array of AssetBundleBuild elements that is passed to the function is known as the "...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0604f2deab5e
unity_docs
editor
What is `EditorApplication.SerializedPropertyCallbackFunction` in Unity? Explain its purpose and usage.
EditorApplication.SerializedPropertyCallbackFunction Declaration public delegate void SerializedPropertyCallbackFunction ( GenericMenu menu , SerializedProperty property ); Parameters Parameter Description menu The contextual menu which is about to be shown to the user. property The property for which ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ef989b838a82
unity_docs
scripting
What is `GL.TRIANGLE_STRIP` in Unity? Explain its purpose and usage.
GL.TRIANGLE_STRIP public static int TRIANGLE_STRIP ; Description Mode for Begin : draw triangle strip. Draws triangles between each vertex passed, from the beginning to the end. If you pass five vertices, A, B, C, D and E, three triangles are drawn. The first triangle is drawn between the first 3 vertices. All...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.