id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_sr_fb5b99040ded
unity_docs
scripting
Show me a Unity C# example demonstrating `RectTransform.GetWorldCorners`.
ld space. Each corner provides its world space value. The returned array of 4 vertices is clockwise. It starts bottom left and rotates to top left, then top right, and finally bottom right. Note that bottom left, for example, is an (x, y, z) vector with x being left and y being bottom. Note : If the RectTransform ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a32441f58bd7
unity_docs
editor
Show me a Unity C# example demonstrating `MouseCursor.ArrowPlus`.
MouseCursor.ArrowPlus Description Arrow with the plus symbol next to it. ```csharp //Create a folder and name it “Editor” if this doesn’t already exist //Put this script in the folder//This script creates a new menu (“Examples”) and a menu item (“Mouse Cursor”). Click on this option. This displays a small window th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b46940b51323
unity_docs
editor
What is `Device.Application.isMobilePlatform` in Unity? Explain its purpose and usage.
Application.isMobilePlatform public static bool isMobilePlatform ; Description This has the same functionality as Application.isMobilePlatform 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_man_cb1b78dff3e3
unity_docs
rendering
Explain 'Configuring Light components' in Unity.
Resources for calculating lighting in real time at runtime, or storing precalculated lighting in a build. Page Description Setting a light as realtime or baked Resources for setting the Mode of a Light component. Configuring Mixed lights with Lighting Modes Resources for setting the Lighting Mode of a scene , which det...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9151839f9108
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchProvider.fetchPreview`.
SearchProvider.fetchPreview public Func<SearchItem,SearchContext,Vector2,FetchPreviewOptions,Texture2D> fetchPreview ; Description Similar to fetchThumbnail, fetchPreview usually returns a bigger preview. The Search UI will progressively show one preview each frame, preventing the UI from blocking if many previe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d96522b0382f
unity_docs
audio
Explain 'Audio Reference' in Unity.
Topic Description Audio Clip Reference information about the AudioClip class. Audio Listener Reference information about the AudioListener class. Audio Source Reference information about the AudioSource class. Audio Mixer Reference information about the Unity AudioMixer class and its UI. Audio Effect Reference informat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67d389a62cdc
unity_docs
rendering
What is `Transform.worldToLocalMatrix` in Unity? Explain its purpose and usage.
Transform.worldToLocalMatrix public Matrix4x4 worldToLocalMatrix ; Description Matrix that transforms a point from world space into local space (Read Only). You can also use Transform.InverseTransformPoint to transform coordinates instead of this matrix. Do not use this matrix to set shader parameters or t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_889c3e16c027
unity_docs
physics
In Unity's 'Character Joint component reference', what is 'Limit properties' and how does it work?
The following limit properties are available for Low Twist Limit , High Twist Limit , Swing 1 Limit , and Swing 2 Limit . Values apply to force for linear motion, and torque for rotational motion. Property Function Limit Set a value to define the limits of the movement for the swing or twist axes, relative to the start...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dd748518b051
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerRecorderDescription.Name` in Unity? Explain its purpose and usage.
ProfilerRecorderDescription.Name public string Name ; Description The name of the Profiler metric. Note: Accessing this property allocates a new managed string on every access, which contributes to GC allocated memory. As such, this might slow down the performance of your application.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9cda7d1e4874
github
scripting
Write a Unity C# MonoBehaviour script called colortest
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; // [ExecuteInEditMode] public class colortest : MonoBehaviour { private Material _material; void Start() { _material = GetComponent<Renderer>().material; } // Update is called once p...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_93ac18a82379
unity_docs
scripting
What is `UIElements.BaseTreeViewController.GetParentId` in Unity? Explain its purpose and usage.
BaseTreeViewController.GetParentId Declaration public int GetParentId (int id ); Parameters Parameter Description id The ID of the item to fetch the parent from. Returns int The parent ID, or -1 if the item is at the root of the tree. Description Returns the parent ID of an item, by ID.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bd1e4f8b939b
unity_docs
editor
What are the parameters of `AssetImporters.CollectImportedDependenciesAttribute.ctor` in Unity?
Description Use the CollectImportedDependencies attribute to declare getters for imported dependencies. It is recommended to always increment the version number of the callback whenever the script is changed. This forces assets imported with lower version numbers to be re-imported. This example shows how you can declar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca3e35e9de57
unity_docs
scripting
What is `Animator.SetBool` in Unity? Explain its purpose and usage.
Animator.SetBool Declaration public void SetBool (string name , bool value ); Declaration public void SetBool (int id , bool value ); Parameters Parameter Description name The parameter name. id The parameter ID. value The new parameter value. Description Sets the value of the given boolean par...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_13de4f07e588
unity_docs
rendering
Explain 'Process to become a Verified Solution' in Unity.
The Verified Solutions program exhibits tools and services that provide additional functionality for Unity users. These products can, for example, include software development kits (SDKs), plugins, and Editor extensions, among other offerings. The Verified Solutions program is not suitable for third-party products that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_543eafdd1731
unity_docs
scripting
What is `Device.Application.OpenURL` in Unity? Explain its purpose and usage.
Application.OpenURL Declaration public static void OpenURL (string url ); Description This has the same functionality as Application.OpenURL . At the moment, the Device Simulator doesn't support simulation of this method.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f1925ec217c1
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLightPyramidShape.shadow` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLightPyramidShape.shadow public bool shadow ; Description Specifies whether the light casts shadows or not. This is true if the light does cast shadows and false otherwise.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7a1caef78cdd
unity_docs
physics
In Unity's 'Profiler markers reference', what is 'Rendering and VSync markers' and how does it work?
These markers contain the samples where the CPU spends time processing data for the GPU, or where it might be waiting for the GPU to finish. If the GPU Profiler module isn’t available, or it adds too much overhead, the toolbar in the Profiler module details pane doesn’t display this information. The samples under these...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c03cf14db632
unity_docs
scripting
Give me an overview of the `AndroidBuildType` class in Unity.
AndroidBuildType enumeration Description Build configurations for the generated project. Properties Property Description Debug Build configuration set to Debug for the generated project. Development Build configuration set to Development for the generated project. Release Build configuration set to Release fo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7ada8413b79c
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.startRotation3D`.
ParticleSystem.MainModule.startRotation3D public bool startRotation3D ; Description A flag to enable 3D particle rotation. 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_man_ca52b59d6104
unity_docs
rendering
In Unity's 'Tessellation Surface Shader examples in the Built-In Render Pipeline', what is 'Render pipeline compatibility' and how does it work?
Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Custom SRP Built-in Render Pipeline Surface Shaders No For a streamlined way of creating Shader objects in URP, see Shader Graph . No For a streamlined way of creating Shader objects in HDRP, see Shader Graph .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4a992a8100c7
unity_docs
rendering
Show me a Unity C# example demonstrating `GUILayout.RepeatButton`.
. Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns bool true when the holds down the mouse. Description Make a repeating button. The button returns tr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b06675799045
unity_docs
performance
Show me a Unity code example for 'IUnityMemoryManager API reference'.
to make this reallocation came from. Use the predefined macro FILE here. int32_t line The line number in the source file where the call to make this reallocation came from. Use the predefined macro LINE here. ## Description Reallocates an existing pointer to point to a different block of memory. ## Implementation ex...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b10b6103659
unity_docs
rendering
Give me an overview of the `ModelImporter` class in Unity.
ModelImporter class in UnityEditor / Inherits from: AssetImporter Description Model importer lets you modify model import settings from editor scripts. Settings of this class match the ones exposed in Model tab Import Settings . Properties Property Description addCollider Add mesh colliders to imported m...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f46de256c2cc
unity_docs
rendering
What is `Camera.ResetProjectionMatrix` in Unity? Explain its purpose and usage.
Camera.ResetProjectionMatrix Declaration public void ResetProjectionMatrix (); Description Make the projection reflect normal camera's parameters. Call this to end the effect of setting projectionMatrix .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95a295a79374
unity_docs
editor
What is `EditorWindow.HasOpenInstances` in Unity? Explain its purpose and usage.
EditorWindow.HasOpenInstances Declaration public static bool HasOpenInstances (); Parameters Parameter Description windowType The type of the window. Must derive from EditorWindow . Returns bool Returns true if an EditorWindow , matching the specified type, is open. Returns false otherwise. Descripti...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d89e2d674885
unity_docs
rendering
In Unity's 'Web browser compatibility', what is 'Web browser compatibility for desktop' and how does it work?
Unity’s Web platform support for desktop browsers differs depending on the browser. It supports browsers providing the following conditions are true: The browser is WebGL 2 capable. The browser is HTML 5 standards-compliant. The browser is 64-bit and supports WebAssembly. The Unity Web platform supports some compressed...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c5b1c63bb626
unity_docs
scripting
What is `MPE.ChannelService.IsRunning` in Unity? Explain its purpose and usage.
ChannelService.IsRunning Declaration public static bool IsRunning (); Returns bool True if the service has started and false if it hasn't. Description Checks whether the ChannelService is running and listening to new connections..
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_86c31ac4e054
unity_docs
physics
What is `CharacterJoint.swing2Limit` in Unity? Explain its purpose and usage.
CharacterJoint.swing2Limit public SoftJointLimit swing2Limit ; Description The angular limit of rotation (in degrees) around the primary axis of the character joint. The limit is symmetric. Thus a value of eg. 30 will limit the rotation between -30 and +30 degrees. The limit is relative to the angle the two ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4858b93d26fd
unity_docs
scripting
What is `GUITargetAttribute` in Unity? Explain its purpose and usage.
GUITargetAttribute class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description Allows to control for which display the OnGUI is called. Constructors Constructor Description GUITargetAttribute Default constructor initializes the attribute for OnGUI to be called for all available displays.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_88f6d9a237af
unity_docs
editor
Explain 'Running the Profiler in its own process' in Unity.
To get better Profiler data when you target the Unity Editor or Play mode, use the Standalone Profiler, which launches the Profiler in its own dedicated process. The Standalone Profiler reduces overhead, because the Profiler isn’t profiling itself or sharing a process with your application or the Editor. The functional...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a326a9e5b629_doc_8
github
scripting
What does `DoNothing` do in this Unity script? Explain its purpose and signature.
The empty coroutine. Just immediately calls yield break;.This is basically the 'null' for constructing coroutines: You can usethis when code expects a coroutine, but you do not need any behavior.An IEnumerator that does nothing, not even wait. Signature: ```csharp public static IEnumerator DoNothing() ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_8a8004bba5a3
unity_docs
scripting
In Unity's 'Create a binding with the Inspector', what is 'Define the custom Inspector component' and how does it work?
Define a custom Inspector UI class called TankScript , style it with USS, and set the visual elements and the binding path in UXML. In your Project window , create a folder named create-a-binding-inspector to store all your files. Create a C# script named TankScript.cs and replace its content with the following: ```csh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d2aef51d279a
unity_docs
scripting
What is `SystemLanguage.Estonian` in Unity? Explain its purpose and usage.
SystemLanguage.Estonian Description Estonian. ```csharp using UnityEngine;public class Example : MonoBehaviour { void Start() { //This checks if your computer's operating system is in the Estonian language if (Application.systemLanguage == SystemLanguage.Estonian) { //Outputs into console that the system is E...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_190968a2ed32
unity_docs
xr
What is `Android.AndroidAssetPackError` in Unity? Explain its purpose and usage.
AndroidAssetPackError enumeration Description Values that indicate the type of Android asset pack error when the status is either AndroidAssetPackStatus.Failed or AndroidAssetPackStatus.Unknown. Unity always returns the error value and the status together in AndroidAssetPackInfo or AndroidAssetPackState objects. U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6886b23cd8e2
unity_docs
audio
What is `Media.MediaEncoder.AddSamples` in Unity? Explain its purpose and usage.
MediaEncoder.AddSamples Declaration public bool AddSamples (ushort trackIndex , NativeArray<float> interleavedSamples ); Declaration public bool AddSamples (NativeArray<float> interleavedSamples ); Parameters Parameter Description trackIndex Index of the track to which sample frames will be added. int...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28ba1363181d
unity_docs
ui
What is `Accessibility.AccessibilityState` in Unity? Explain its purpose and usage.
AccessibilityState enumeration Description Describes the state of an accessibility node. Properties Property Description None The accessibility node is in none of the other states. Disabled The accessibility node is currently in a disabled state and does not respond to user interaction. Selected The accessibi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c161fee5b4ef
unity_docs
rendering
What is `Tilemaps.TilemapRenderer` in Unity? Explain its purpose and usage.
TilemapRenderer class in UnityEngine.Tilemaps / Inherits from: Renderer / Implemented in: UnityEngine.TilemapModule Description The tile map renderer is used to render the tile map marked out by a tile map component and a grid component. This class is a script interface for a tile map renderer component...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4ef710c6c178
unity_docs
rendering
What is `Rendering.ShaderKeyword.GetGlobalKeywordType` in Unity? Explain its purpose and usage.
ShaderKeyword.GetGlobalKeywordType Declaration public static Rendering.ShaderKeywordType GetGlobalKeywordType ( Rendering.ShaderKeyword index ); Description Returns the type of global keyword: built-in or user defined.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3247aff8188c
unity_docs
rendering
What is `Rendering.ShadowCastingMode.TwoSided` in Unity? Explain its purpose and usage.
ShadowCastingMode.TwoSided Description Shadows are cast from this object, treating it as two-sided. Shadow rendering will turn off backface culling, even if object's shader has backface culling on. This means that single-sided objects (like a Plane or a Quad) will cast shadows, even if the light is behind them. Add...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb46ec2dd23e
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.cyan`.
Color.cyan public static Color cyan ; Description Cyan. RGBA is (0, 1, 1, 1). ```csharp //Attach this script to a GameObject with a Renderer (go to Create>3D Object and select one of the first 6 options to create a GameObject with a Renderer automatically attached). //This script changes the Color of your Gam...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_12
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive one argument as part of its initialization process.Base interface of . Signature: ```csharp public interface IOneArgument ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0666c42ce55e
unity_docs
scripting
What is `PlayModeWindow.SetViewType` in Unity? Explain its purpose and usage.
PlayModeWindow.SetViewType Declaration public static void SetViewType ( PlayModeWindow.PlayModeViewTypes type ); Parameters Parameter Description type The new PlayModeView type. Description Changes the type of the selected PlayModeView window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_1f742366fe2d
unity_docs
ui
Show me a Unity code example for 'Receive callbacks when a bound property changes'.
track one property at any given time. Create a project in Unity with any template. In your Project window , create a folder named callback-SerializedProperty-changes to store your files. In the callback-SerializedProperty-change folder, create a folder named Editor . In the Editor folder, create a C# script named Simpl...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d39d62fe59e0
unity_docs
scripting
What is `ObjectChangeEventStream.GetEventType` in Unity? Explain its purpose and usage.
ObjectChangeEventStream.GetEventType Declaration public ObjectChangeKind GetEventType (int eventIdx ); Parameters Parameter Description eventIdx The index of the event whose type should be returned. Returns ObjectChangeKind The type of the event at the specified index. Description Returns the type ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f3ea0a2466ba_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Save any game data, such as "EnemyUnits" or "PlayerHealth". Signature: ```csharp public void SetGameData<T>(string name, T value) ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_db81dde9f8ba
unity_docs
editor
What is `EditorUserSettings.allowAsyncStatusUpdate` in Unity? Explain its purpose and usage.
EditorUserSettings.allowAsyncStatusUpdate public static bool allowAsyncStatusUpdate ; Description Allow version control status updates to be performed asynchronously. When enabled, version control status updates are performed asynchronously in the background. This can improve Editor responsiveness when working ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_195e8a119e25
unity_docs
rendering
In Unity's 'Cookie texture Import Settings window reference', what is 'Directional Light' and how does it work?
When you select this light type, Unity sets the Wrap Mode to Repeat by default and the light cookie texture tiles. Note: You can apply a cookie formatted for the Spot Light or Directional Light type to a Directional Light, but both have different effects. The Directional Light will repeat the Directional Light type in ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ab3c79463ff9
unity_docs
editor
What is `Rendering.BatchCullingContext.sceneCullingMask` in Unity? Explain its purpose and usage.
BatchCullingContext.sceneCullingMask public ulong sceneCullingMask ; Description Use this bit mask to discard the draw commands in a particular context. A draw command is not discarded if the expression (1 << layer) & sceneCullingMask is true. This field is typically used when rendering Editor previews.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fee943157dcb
unity_docs
scripting
In Unity's 'Label', what is 'Inherited UXML attributes' and how does it work?
This element inherits the following attributes from its base class: Name Type Description binding-path string Path of the target property to be bound. display-tooltip-when-elided boolean When true, a tooltip displays the full version of elided text, and also if a tooltip had been previously provided, it will be overwri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9104e232eda5
unity_docs
scripting
Show me a Unity C# example demonstrating `Quaternion.Equals`.
ical copies. Floating-point precision: Returns false even for tiny differences due to floating-point arithmetic. Mathematically equivalent rotations: Returns false for rotations that represent the same orientation but have different component values. For practical rotation comparison, consider using the == ope...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b2646994dccd
unity_docs
scripting
Show me a Unity C# example demonstrating `RigidbodyConstraints.FreezePositionX`.
RigidbodyConstraints.FreezePositionX Description Freeze motion along the X-axis. ```csharp //This example shows how RigidbodyConstraints is used to freeze the position and rotation of a Rigidbody in the x axis at start-up. //It also shows what happens when these constraints are removed, when you press the space key...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df661ac8d848
unity_docs
rendering
What is `Rendering.CopyTextureSupport.Copy3D` in Unity? Explain its purpose and usage.
CopyTextureSupport.Copy3D Description Support for Texture3D in Graphics.CopyTexture . Not all platforms can do 3D texture copies, e.g. currently Direct3D9 systems can not do that. See CopyTextureSupport for an overview.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6bfc30d3fe28
unity_docs
scripting
Show me a Unity C# example demonstrating `Rigidbody2D.angularDamping`.
ro indicates that no damping should be used whereas higher values increase the damping, effectively slowing down the rotational movement faster. Unlike contact friction, angular damping is always applied. Note: The following formula is how the angular damping is applied angularVelocity *= 1.0f / ( 1.0f + simulation-t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3d89d76ba8af
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.GetBlockWidth` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.GetBlockWidth Declaration public static uint GetBlockWidth ( Experimental.Rendering.GraphicsFormat format ); Declaration public static uint GetBlockWidth ( TextureFormat format ); Description Ret...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6910d9d9a9ea_doc_7
github
scripting
What does `OnCollisionStayAsObservable` do in this Unity script? Explain its purpose and signature.
OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. Signature: ```csharp public static IObservable<Collision> OnCollisionStayAsObservable(this Component component) ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e5685a35991b
unity_docs
scripting
In Unity's 'Access meshes via the Mesh API', what is 'Access an object’s Mesh' and how does it work?
The mesh data is attached to an object using the Mesh Filter component (and the object will also need a MeshRenderer to make the geometry visible). This component is accessed using the familiar GetComponent function: ```csharp using UnityEngine; public class ExampleScript : MonoBehaviour { MeshFilter mf; void Start()...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_95d0afcd1e76
unity_docs
scripting
What is `AnimatorUtility.OptimizeTransformHierarchy` in Unity? Explain its purpose and usage.
AnimatorUtility.OptimizeTransformHierarchy Declaration public static void OptimizeTransformHierarchy ( GameObject go , string[] exposedTransforms ); Parameters Parameter Description go GameObject to Optimize. exposedTransforms List of transform name to expose. Description This function will remove all ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_e8ec85e7c91e
unity_docs
scripting
In Unity's 'AssetBundle file format reference', what is 'Examining AssetBundle file contents' and how does it work?
The Unity Editor installation includes the WebExtract and Binary2Text executables which you can use to extract the files nested inside the AssetBundle and produce a text format dump of the contents of a binary SerializedFile . Its output is similar to the YAML format used by Unity. For more information about these tool...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56f05a2c817c
unity_docs
scripting
What is `iOS.Xcode.XcScheme.MetalValidation` in Unity? Explain its purpose and usage.
MetalValidation enumeration Description Metal API Validation. Use the members of the MetalValidation enumeration to set the /Metal API Validation/ option in the scheme of an Xcode project generated by Unity. These options determine the level of runtime Metal API validation. Additional resources: XcScheme.SetMet...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_be8a0004dcde
unity_docs
editor
What is `ShortcutManagement.ShortcutArguments.context` in Unity? Explain its purpose and usage.
ShortcutArguments.context public object context ; Description Instance of the context in which the shortcut was triggered. If the triggered shortcut was registered with a context of type EditorWindow then context will be the instance of the EditorWindow in which the shortcut was triggered.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_736d4506fb15
unity_docs
animation
What is `ClipAnimationMaskType.CreateFromThisModel` in Unity? Explain its purpose and usage.
ClipAnimationMaskType.CreateFromThisModel Description A mask containing all the transform in the file will be created internally. For Humanoid rig, unity will convert all the transforms animation into muscle animation, these transforms cannot be edited in the mask. Additional resources: ModelImporterClipAnimation....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1842ff47b74b
unity_docs
scripting
What is `Mesh.MeshData.vertexBufferCount` in Unity? Explain its purpose and usage.
Mesh.MeshData.vertexBufferCount public int vertexBufferCount ; Description Gets the number of vertex buffers in the MeshData . (Read Only) Additional resources: Mesh.vertexBufferCount , GetVertexData , Mesh.AcquireReadOnlyMeshData .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84a21a2f9c68
unity_docs
scripting
What is `UIElements.UxmlBoolAttributeDescription` in Unity? Explain its purpose and usage.
UxmlBoolAttributeDescription class in UnityEngine.UIElements / Inherits from: UIElements.TypedUxmlAttributeDescription_1 / Implemented in: UnityEngine.UIElementsModule Description Describes a UXML bool attribute. Properties Property Description defaultValueAsString The default value for the attribut...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4e563de8c3e4
unity_docs
physics
What is `Rigidbody2D.GetContacts` in Unity? Explain its purpose and usage.
Rigidbody2D.GetContacts Declaration public int GetContacts (ContactPoint2D[] contacts ); Parameters Parameter Description contacts An array of ContactPoint2D used to receive the results. Returns int Returns the number of contacts placed in the contacts array. Description Retrieves all contact poi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_823241bce503
unity_docs
rendering
What is `Rendering.CommandBuffer.SetRayTracingIntParam` in Unity? Explain its purpose and usage.
CommandBuffer.SetRayTracingIntParam Declaration public void SetRayTracingIntParam ( Rendering.RayTracingShader rayTracingShader , string name , int val ); Declaration public void SetRayTracingIntParam ( Rendering.RayTracingShader rayTracingShader , int nameID , int val ); Parameters Parameter Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b3d2f0dabb6
unity_docs
rendering
What is `TerrainTools.TerrainPaintUtilityEditor.ShowDefaultPreviewBrush` in Unity? Explain its purpose and usage.
TerrainPaintUtilityEditor.ShowDefaultPreviewBrush Declaration public static void ShowDefaultPreviewBrush ( Terrain terrain , Texture brushTexture , float brushSize ); Parameters Parameter Description terrain Terrain object. brushTexture Brush texture. brushSize Brush size. Description Helper funct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_9d0d31f5a918
unity_docs
editor
Explain 'Splines' in Unity.
com.unity.splines ## Description Work with curves and paths. Use the Splines package to generate objects and behaviors along paths, create trajectories, and draw shapes. ## Released for Unity Package version 2.8.4 is released for Unity Editor version 6000.0.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd5f384e5d36
unity_docs
physics
What is `PhysicsScene2D.OverlapArea` in Unity? Explain its purpose and usage.
PhysicsScene2D.OverlapArea Declaration public Collider2D OverlapArea ( Vector2 pointA , Vector2 pointB , int layerMask = Physics2D.DefaultRaycastLayers); Declaration public Collider2D OverlapArea ( Vector2 pointA , Vector2 pointB , ContactFilter2D contactFilter ); Parameters Parameter Des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3799644f9346
unity_docs
physics
What is `Rigidbody2D.linearVelocityY` in Unity? Explain its purpose and usage.
Rigidbody2D.linearVelocityY public float linearVelocityY ; Description The Y component of the linear velocity of the Rigidbody2D in world-units per second. The linear velocity is specified as a Vector2 with components in the X and Y directions (there is no Z direction in 2D physics). This property lets you re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_99f099b28379
unity_docs
rendering
Show me a Unity C# example demonstrating `AssetDatabase.GetTypeFromPathAndFileID`.
's local file identifier. Returns Type The object's type. Description Gets an object's type from an Asset path and a local file identifier. The following script example shows how to get the types of a nested asset. A material asset is added to a scriptable object asset (in this case called DummyObject), and th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ce0823762ae8
unity_docs
scripting
What is `SerializedProperty.floatValue` in Unity? Explain its purpose and usage.
SerializedProperty.floatValue public float floatValue ; Description Value of a float property. Contains a valid value when propertyType is SerializedPropertyType.Float . For accessing float properties. If you are accessing double precision properties use doubleValue instead. Additional resources: dou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ccc04dabb312
unity_docs
physics
What are the parameters of `VersionControl.Provider.Submit` in Unity?
Description Starts a task that submits the assets to version control. In version control systems like Git new changes have to be committed and then pushed to the repository separately. In Perforce or Plastic SCM a submit is an all in one task that both commits and pushes the newly made changes all at once. ```csharp us...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ac30a2783be9
unity_docs
scripting
Show me a Unity C# example demonstrating `Color.a`.
Color.a public float a ; Description Alpha component of the color (0 is transparent, 1 is opaque). ```csharp using UnityEngine;public class Example : MonoBehaviour { public Color color = Color.white; void Start() { color.a = 0.42f; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_82c6c4300a25
unity_docs
editor
Give me an overview of the `IDataModeController` class in Unity.
IDataModeController interface in UnityEditor Description Interface with which any EditorWindow can interact with DataMode functionalities. To obtain an instance, use EditorWindow.dataModeController . This interface displays a switch in the docking area when the window is visible and has more than one support...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35755bea1330
unity_docs
scripting
What is `SpeedTreeImporter.hueVariation` in Unity? Explain its purpose and usage.
SpeedTreeImporter.hueVariation public Color hueVariation ; Description Gets and sets a default hue variation color and amount (in alpha). The color of each tree varies based on its world space position and this hue variation color. Hue variation breaks up a large forest of trees and makes it look more natura...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b64862f0b64a
unity_docs
rendering
What is `WebCamTexture.autoFocusPoint` in Unity? Explain its purpose and usage.
WebCamTexture.autoFocusPoint public Nullable<Vector2> autoFocusPoint ; Description This property allows you to set/get the auto focus point of the camera. This works only on Android and iOS devices. Vector2.x and Vector2.y components are relative values in the range 0..1 with the origin (0, 0) positioned...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_5723c63975d2
unity_docs
rendering
In Unity's 'Introduction to the Standard Shader in the Built-In Render Pipeline', what is 'Terminology' and how does it work?
There are a number of concepts that are very useful when talking about Physically Based Shading in Unity. These include: Energy conservation - This is a physics-based concept that ensures objects never reflect more light than they receive. The more specular a material is, the less diffuse it should be; the smoother a s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b14cc28595db
unity_docs
rendering
What is `PlatformIcon.GetTexture` in Unity? Explain its purpose and usage.
PlatformIcon.GetTexture Declaration public Texture2D GetTexture (int layer ); Parameters Parameter Description layer Cannot be larger than PlatformIcon.maxLayerCount . Description Retrieve the texture which is currently assigned to the specified layer.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f7c420d0171
unity_docs
physics
What are the parameters of `PhysicsScene.Raycast` in Unity?
Returns bool True if the ray intersects with a Collider, otherwise false. Description Casts a ray, from point origin , in direction direction , of length maxDistance , against all colliders in the Scene. You may optionally provide a LayerMask , to filter out any Colliders you aren't interested in generating collisions ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c5a741cd4892
unity_docs
scripting
In Unity's 'Branch group reference', what is 'Distribution' and how does it work?
Property Function Group Seed The randomizing seed for the branch group. Change the seed to vary the group’s procedural generation. Frequency The number of branches (or, for the first group, the number of trunks). Note that the final number of branches might not equal the frequency: a branch group functioning as the tru...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5247578e6ae
unity_docs
ui
In Unity's 'Create a custom style for a custom control', what is 'Create the custom control' and how does it work?
Create a C# script to define the custom control and a USS file to define the custom style. Create a Unity project with any template. Create a folder named create-custom-style-custom-control to store your files. In the ExampleElementCustomStyle folder, create a C# script named ExampleElementCustomStyle.cs and replace it...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ea9031dc0602
unity_docs
rendering
What is `Experimental.GlobalIllumination.SpotLight.angularFalloff` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SpotLight.angularFalloff public Experimental.GlobalIllumination.AngularFalloffType angularFalloff ; Description The angular falloff model to use for baking the spot light.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_650351047092
unity_docs
editor
What is `Windows.Directory.temporaryFolder` in Unity? Explain its purpose and usage.
Directory.temporaryFolder public static string temporaryFolder ; Description Returns a path to temporary folder. On Windows Store Apps, it will be <main drive>:\Users\<user name>\AppData\Local\Packages\<package id>\TempState, directory is writeable, so you can create, read and write files to it. In Editor, it w...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3da3193a718e
unity_docs
scripting
What is `PackageManager.PackageInfo.FindForPackageName` in Unity? Explain its purpose and usage.
PackageInfo.FindForPackageName Declaration public static PackageInfo FindForPackageName (string name ); Parameters Parameter Description name The package name to look for. Returns PackageInfo The PackageInfo instance describing the package, or null if there is no registered package with the given name...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68f1a231d57a
unity_docs
scripting
Give me an overview of the `InstantiateParameters` class in Unity.
InstantiateParameters struct in UnityEngine / Implemented in: UnityEngine.CoreModule Description Parameters for Object.Instantiate and Object.InstantiateAsync. This structure is used in Object.Instantiate and Object.InstantiateAsync in order to provide maximum flexibility in the parameters you provide. It h...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b718d72f118
unity_docs
scripting
What is `Mesh.isReadable` in Unity? Explain its purpose and usage.
Mesh.isReadable public bool isReadable ; Description Returns true if the Mesh is read/write enabled, or false if it is not. When a Mesh is read/write enabled, Unity uploads the Mesh data to GPU-addressable memory, but also keeps it in CPU-addressable memory. When a Mesh is not read/write enabled, Unity uploads...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_506506d95a6d
unity_docs
physics
What is `BuoyancyEffector2D.flowMagnitude` in Unity? Explain its purpose and usage.
BuoyancyEffector2D.flowMagnitude public float flowMagnitude ; Description The magnitude of the force used to similate fluid flow. Fluid flow can be defined to move in any direction with a specific magnitude and a random variation on that magnitude. This property defines the size of the force to be applied in th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_50178e4477b6
unity_docs
scripting
In Unity's 'Layout Element', what is 'Properties' and how does it work?
When you enable a width or height property, a value field appears next to it. Use this value field to enter the exact value for the width or height. Min and Preferred sizes are in regular units, while the Flexible sizes are in relative units. Property: Function: Ignore Layout When enabled, the layout system ignores thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9906a52df61a
unity_docs
scripting
What are the parameters of `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCmp` in Unity?
Returns int Returns 0 if the contents of the two memory regions are identical; returns a non-zero value if they differ. Description Checks whether two memory regions are identical. The MemCmp method compares two memory regions to determine if they contain identical data. It returns zero if the memory contents are the s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ebc428fecf5c
unity_docs
scripting
What is `Unity.Android.Gradle.AndroidResources` in Unity? Explain its purpose and usage.
AndroidResources class in Unity.Android.Gradle / Inherits from: Unity.Android.Gradle.BaseBlock Description The C# definition of the androidResources element in a gradle file. For more information about the element, see Android's documentation: androidresources element Inherited Members Public Methods Metho...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_40eb1ccc10e2
unity_docs
input
What is `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.CopyStructureToPtr` in Unity? Explain its purpose and usage.
UnsafeUtility.CopyStructureToPtr Declaration public static void CopyStructureToPtr (ref T input , void* ptr ); Parameters Parameter Description ptr The memory pointer to copy from. input A struct to copy data to. Description Copies sizeof(T) bytes from a memory pointer to a struct.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7b915dc6926
unity_docs
scripting
What is `Unity.Loading.ContentLoadInterface.LoadContentFileAsync` in Unity? Explain its purpose and usage.
ContentLoadInterface.LoadContentFileAsync Declaration public static Unity.Loading.ContentFile LoadContentFileAsync ( Unity.Content.ContentNamespace nameSpace , string filename , NativeArray<ContentFile> dependencies , Unity.Jobs.JobHandle dependentFence ); Parameters Parameter Description nameSpace T...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f01f612c18ae
unity_docs
math
What is `Hash128.Compute` in Unity? Explain its purpose and usage.
Hash128.Compute Declaration public static Hash128 Compute (ref T val ); Declaration public static Hash128 Compute (int val ); Declaration public static Hash128 Compute (float val ); Parameters Parameter Description val Input value. Returns Hash128 The 128-bit hash. Description Compute...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f5673f7ea789_doc_0
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Manages the XR camera rig for Gaussian Splatting VR viewing.Hierarchy: XROrigin [this script + VRLocomotion] └── CameraOffset └── Main Camera (tag: MainCamera)Works with Quest 3 (Meta Link / Air Link) and Virtual Desktop (SteamVR OpenXR runtime).Requires: XR Plug-in Management + OpenXR provider enabled in...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_696196969ba3
unity_docs
editor
What is `AssemblyIsEditorAssembly` in Unity? Explain its purpose and usage.
AssemblyIsEditorAssembly class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Assembly level attribute. Any classes in an assembly with this attribute will be considered to be Editor Classes. Constructors Constructor Description AssemblyIsEditorAssembly Constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_64a51c87bfba
unity_docs
physics
What is `ParticlePhysicsExtensions.GetTriggerParticles` in Unity? Explain its purpose and usage.
ParticlePhysicsExtensions.GetTriggerParticles(ParticleSystem,ParticleSystemTriggerEventType,Particle[]) Parameters Parameter Description ps Particle system. type Type of trigger to return particles for. particles The array of particles matching the trigger event type. Returns void Number of particles with...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a66688085c49
unity_docs
scripting
What is `ParticleSystem.ExternalForcesModule.multiplier` in Unity? Explain its purpose and usage.
ParticleSystem.ExternalForcesModule.multiplier public float multiplier ; Description Multiplies the magnitude of external forces affecting the particles. Changing this property is more efficient than accessing the entire curve, if you only want to change the overall force multiplier. ```csharp using UnityEngi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19cf905e358a
unity_docs
physics
What is `LazyLoadReference_1.ctor` in Unity? Explain its purpose and usage.
LazyLoadReference<T0> Constructor Declaration public LazyLoadReference<T0> (T asset ); Declaration public LazyLoadReference<T0> (int instanceID ); Parameters Parameter Description asset The asset reference. instanceID The asset instance ID. Description Construct a new LazyLoadReference. Note that t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7cc17f875fed
unity_docs
scripting
What is `UIElements.EventBase.PreDispatch` in Unity? Explain its purpose and usage.
EventBase.PreDispatch Declaration protected void PreDispatch ( UIElements.IPanel panel ); Parameters Parameter Description panel The panel where the event will be dispatched. Description Allows subclasses to perform custom logic before the event is dispatched.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_912cce4f56ff
unity_docs
scripting
Show me a Unity C# example demonstrating `Terrain.treeDistance`.
Terrain.treeDistance public float treeDistance ; Description The maximum distance at which trees are rendered. The higher this is, the further the distance trees can be seen and the slower it will run. Additional resources: Terrain.treeBillboardDistance . ```csharp using UnityEngine;public class Example : Mon...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.