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_8ef18c7a9273
unity_docs
rendering
What are the parameters of `Graphics.DrawProceduralNow` in Unity?
Description Draws procedural geometry on the GPU. DrawProceduralNow does a draw call on the GPU, without any vertex or index buffers. If the shader requires vertex buffers, one of the following occurs depending on platform: - If the vertex buffer is declared but the compiler can optimize it away, the no...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dd067449622c
unity_docs
rendering
Explain 'Height maps' in Unity.
Height mapping (also known as parallax mapping) is a similar concept to normal mapping, however this technique is more complex - and therefore also more performance-expensive. Heightmaps are usually used in conjunction with normalmaps, and often they are used to give extra definition to surfaces where the texture maps ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b065cca9fd09
unity_docs
scripting
What is `GameObject.activeSelf` in Unity? Explain its purpose and usage.
GameObject.activeSelf public bool activeSelf ; Description The local active state of the GameObject. True if active, false if inactive. (Read Only) The local active state of this GameObject, which is set using GameObject.SetActive . A locally active GameObject may still be inactive in the scene hierarchy beca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_67be5a97db8e
unity_docs
scripting
Show me a Unity C# example demonstrating `Networking.DownloadHandlerBuffer`.
mory. It preallocates a data buffer based on any received Content-Length header, but expands its buffer if the actual download size exceeds the value of the Content-Length header (or if a Content-Length header is not received). Note : When accessing DownloadHandler.data or DownloadHandler.text on this subclas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_119af07f778a
unity_docs
performance
What is `Unity.Profiling.LowLevel.Unsafe.ProfilerUnsafeUtility.CreateMarker` in Unity? Explain its purpose and usage.
ProfilerUnsafeUtility.CreateMarker Declaration public static IntPtr CreateMarker (string name , ushort categoryId , Unity.Profiling.LowLevel.MarkerFlags flags , int metadataCount ); Declaration public static IntPtr CreateMarker (char* name , int nameLen , ushort categoryId , Unity.Profiling.LowLevel.Ma...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0b2b3272e6a7
unity_docs
scripting
What is `AI.NavMesh.GetSettingsByID` in Unity? Explain its purpose and usage.
NavMesh.GetSettingsByID Declaration public static AI.NavMeshBuildSettings GetSettingsByID (int agentTypeID ); Parameters Parameter Description agentTypeID The ID to look for. Returns NavMeshBuildSettings The settings found. Description Returns an existing entry of NavMesh build settings. If no pre...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_12
github
scripting
What does `RequestCloseAndRelaunchWithCurrentArguments` do in this Unity script? Explain its purpose and signature.
Closes and relaunches editor with the current window and scene Signature: ```csharp public static void RequestCloseAndRelaunchWithCurrentArguments() ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38a1071e82e8_doc_4
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The index of the prefab to spawn. If outside the range of , this behavior willselect a random object each time it spawns. Signature: ```csharp public int spawnOptionIndex ```
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_man_2a4a17531abc
unity_docs
rendering
In Unity's 'Enroll as a UPM publisher on the Publisher Portal', what is 'Verify an organization' and how does it work?
A DUNS Number (Data Universal Numbering System) is a unique nine‑digit identifier issued by Dun & Bradstreet (D&B). Unity uses this number to verify the identity and legal existence of one of the following organization types: A company or organization A nonprofit organization An educational institution A government org...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_466eb97602ee
unity_docs
xr
Explain 'AssetBundles in Web' in Unity.
Note : Unity’s Addressables system is the recommended approach for asset loading. The following content applies only if you use AssetBundles directly. As all asset data must be pre-downloaded before your content starts, consider moving assets out of your main data files and into AssetBundles . Doing so creates a smalle...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76c5253ac0ee
unity_docs
rendering
What is `ILightingExplorerExtension` in Unity? Explain its purpose and usage.
ILightingExplorerExtension interface in UnityEditor Description Interface for when you extend the Lighting Explorer. Used in full overrides of the default behavior. Public Methods Method Description GetContentTabs Returns the tabs that you have selected to display in the Lighting Explorer. OnDisable This is c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_098a9f5f2112
unity_docs
editor
What is `Build.Content.ContentBuildInterface.ArchiveAndCompress` in Unity? Explain its purpose and usage.
ContentBuildInterface.ArchiveAndCompress Declaration public static uint ArchiveAndCompress (ResourceFile[] resourceFiles , string outputBundlePath , BuildCompression compression ); Declaration public static uint ArchiveAndCompress (ResourceFile[] resourceFiles , string outputBundlePath , BuildCompression...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_255eafb52995
github
scripting
Write a Unity C# XR/VR script for OVR Debug Head Controller
```csharp /* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * Licensed under the Oculus SDK License Agreement (the "License"); * you may not use the Oculus SDK except in compliance with the License, * which is provided at the time of installation or download, or which * otherwise a...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_ea11a8d45845
unity_docs
scripting
Show me a Unity C# example demonstrating `Animator.SetIKPositionWeight`.
s a target position and rotation for a specific body part. Unity can calculate how to move the part toward the target from the starting point (ie, the current position and rotation obtained from the animation). This function sets a weight value in the range 0..1 to determine how far between the start and goal positions...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_238b4a8bf73f
unity_docs
editor
Give me an overview of the `ExpressionEvaluator` class in Unity.
ExpressionEvaluator class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Evaluates simple math expressions; supports int / float and operators: + - * / % ^ ( ). This class has a single generic static method Evaluate , that evaluates a mathematical expression and returns the result. Support...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9b908f5052d2
unity_docs
editor
What are the parameters of `Build.IPostBuildPlayerScriptDLLs.OnPostBuildPlayerScriptDLLs` in Unity?
Description Implement this interface to receive a callback just after the player scripts have been compiled. You can implement this if you need to read or patch managed Assemblies for players being built. You can get assembly locations from the files property of the report parameter. Note that implementing this callbac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_da3bb8145a3e
unity_docs
scripting
What is `Unity.Properties.PropertyContainer` in Unity? Explain its purpose and usage.
PropertyContainer class in Unity.Properties / Implemented in: UnityEngine.PropertiesModule Description The PropertyContainer class is used as the entry point to operate on data containers using properties. Static Methods Method Description Accept Visit the specified using the specified . GetPropert...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d82534843655
unity_docs
rendering
What are the parameters of `Texture3D.GetPixels` in Unity?
Returns Color[] An array that contains the pixel colors. Description Gets the pixel color data for a mipmap level as Color structs. This method gets pixel data from the texture in CPU memory. Texture.isReadable must be true . The array contains the pixels slice by slice starting at the front of the texture. Each slice ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_855bf0d42148
unity_docs
editor
Show me a Unity C# example demonstrating `Profiling.FrameDataView.GetCounterValueAsFloat`.
ataView.GetCounterValueAsFloat Declaration public float GetCounterValueAsFloat (int markerId ); Parameters Parameter Description markerId Marker identifier. Returns float Returns the counter value as float . Description Gets the last value of a counter marker in the frame as a float data type'. Use...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8251788a38fe
unity_docs
math
What is `Unity.Properties.TypeUtility.TryInstantiateArray` in Unity? Explain its purpose and usage.
TypeUtility.TryInstantiateArray Declaration public static bool TryInstantiateArray (int count , out TArray instance ); Parameters Parameter Description count The count the array should have. instance When this method returns, contains the created instance, if type instantiation succeeded; otherwise, the d...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_62a2da0d2763
unity_docs
rendering
In Unity's 'ShaderLab: legacy fog', what is 'Examples' and how does it work?
This example code demonstrates the syntax for using this command in a Pass block. ``` Shader "Examples/FogExample" { SubShader { // The rest of the code that defines the SubShader goes here. Pass { Fog Off // The rest of the code that defines the Pass goes here. } } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5b4db408bf7d
unity_docs
animation
What is `ModelImporterClipAnimation.lockRootRotation` in Unity? Explain its purpose and usage.
ModelImporterClipAnimation.lockRootRotation public bool lockRootRotation ; Description Enable to make root rotation be baked into the movement of the bones. Disable to make root rotation be stored as root motion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f9e3378f847
unity_docs
editor
Show me a Unity C# example demonstrating `BuildAssetBundleOptions.DisableLoadAssetByFileNameWithExtension`.
me with extension are generated when an Asset Bundle is loaded from file. Example: "Assets/Prefabs/Player.prefab", "Player", and "Player.prefab" This option will set a flag on Asset Bundles to prevent creating the asset file name with extension lookup. This option saves runtime memory and loading performance for asset ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_764bdebec287
unity_docs
physics
What is `ContactPoint.separation` in Unity? Explain its purpose and usage.
ContactPoint.separation public float separation ; Description The distance between the colliders at the contact point. This value represents how far apart or interpenetrated the two colliders are at the time the contact was registered: • A positive separation means the colliders are close but not touching, and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d3a89fb615b2
unity_docs
rendering
Explain 'Add an HLSL shader program' in Unity.
To add a High-Level Shader Language (HLSL) program to a shader file , add the code to the Pass block. Wrap the code in HLSLPROGRAM and ENDHLSL macros. For example: ``` Shader "Examples/ExampleShader" { SubShader { Pass { Name "ExamplePassName" HLSLPROGRAM // Add HLSL shader program code here ENDHLSL } } ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d64a605927dd
unity_docs
audio
What are the parameters of `Microphone.Start` in Unity?
Returns AudioClip The function returns null if the recording fails to start. Description Start Recording with device. If you pass a null or empty string for the device name then the default microphone is used. You can get a list of available microphone devices from the devices property and the range of sample rates sup...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cf2a89d5e124
unity_docs
scripting
What is `ConstantForce2D` in Unity? Explain its purpose and usage.
ConstantForce2D class in UnityEngine / Inherits from: PhysicsUpdateBehaviour2D / Implemented in: UnityEngine.Physics2DModule Description Applies both linear and angular (torque) forces continuously to the rigidbody each physics update. This is equivalent of calling Rigidbody2D.AddForce , Rigidbody2D.AddRela...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_3193a32fe88b
unity_docs
editor
Show me a Unity code example for 'Search the Unity Editor main menu'.
Use the Menus search provider to access the Unity Editor main menu commands. ## Query syntax Provider token: m: Query example: List all menu commands related to splines, from all submenus. ``` m: splines ``` ## Provider filters The Menus provider has additional filters in the visual query builder . This table lists...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a57e3fb888b
unity_docs
editor
Show me a Unity C# example demonstrating `AssetImporters.CollectImportedDependenciesAttribute.ctor`.
mportedDependencies 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 declare a dependency between two ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9c56f3839170
unity_docs
ui
What is `GUI.BringWindowToFront` in Unity? Explain its purpose and usage.
GUI.BringWindowToFront Declaration public static void BringWindowToFront (int windowID ); Parameters Parameter Description windowID The identifier used when you created the window in the Window call. Description Bring a specific window to front of the floating windows. ```csharp // Draws 2 overlapped wi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d35633dd9b43
unity_docs
math
What is `Vector4.operator_eq` in Unity? Explain its purpose and usage.
Vector4.operator == public static bool operator == ( Vector4 lhs , Vector4 rhs ); Description Returns true if two vectors are approximately equal. To allow for floating point inaccuracies, the two vectors are considered equal if the magnitude of their difference is less than 1e-5.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0eecdce5fe99
unity_docs
scripting
What is `Unity.Hierarchy.HierarchySearchFilter` in Unity? Explain its purpose and usage.
HierarchySearchFilter struct in Unity.Hierarchy / Implemented in: UnityEngine.HierarchyCoreModule Description Encapsulates all data needed to filter a hierarchy. Static Properties Property Description Invalid The default invalid HierarchySearchFilter. This assumes the Hierarchy has a query, but is inval...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_68bf399465ef
unity_docs
rendering
Show me a Unity code example for 'On-demand resources'.
ipt: Right-click in the Editor folder and select Create > MonoBehaviour Script . Name the new script BuildiOSAssetBundles . Open BuildiOSAssetBundles.cs and copy in the following code example. In this example, the label textures is used. Change this throughout with the name of your label in lowercase. Note : This examp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f28ab1552cbf
unity_docs
scripting
What is `UIElements.DoubleField.ValueToString` in Unity? Explain its purpose and usage.
DoubleField.ValueToString Declaration protected string ValueToString (double v ); Parameters Parameter Description v The double to be converted to string. Returns string The double as string. Description Converts the given double to a string.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f65332466e72
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.AddBuildPropertyForConfig` in Unity?
Description Adds a value to build property list of the given build configuration(s). Duplicate build properties are ignored. Values for names LIBRARY_SEARCH_PATHS and FRAMEWORK_SEARCH_PATHS are quoted if they contain spaces. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.iOS.Xcode; using UnityEditor....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_644ec93adaf3
unity_docs
rendering
What are the parameters of `Texture2D.SetPixelData` in Unity?
Description Sets the raw data of an entire mipmap level directly in CPU memory. This method sets pixel data for the texture in CPU memory. Texture.isReadable must be true , and you must call Apply after SetPixelData to upload the changed pixels to the GPU. SetPixelData is useful if you want to load compressed or other ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0e43370db161
unity_docs
scripting
Explain 'Introduction to build profiles' in Unity.
A build profile is a set of configuration settings you can use to build your application on a particular platform. Use the Build Profiles window to create multiple build profiles for each platform you work on, saving different configurations for release and development builds . For more information on release and devel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06e4e2ea37b5
unity_docs
rendering
What is `LightingSettings.filterTypeAO` in Unity? Explain its purpose and usage.
LightingSettings.filterTypeAO public LightingSettings.FilterType filterTypeAO ; Description Specifies the filter kernel that the Progressive Lightmapper uses for ambient occlusion. (Editor only). When this is set to None , the Progressive Lightmapper does not filter ambient occlusion. When this is set to an...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_676997bb82d1
unity_docs
audio
What is `AudioSource.loop` in Unity? Explain its purpose and usage.
AudioSource.loop public bool loop ; Description Checks if the audio clip is looping Return or set whether the audio clip replays after it finishes playing. Disable looping on a playing AudioSource to stop the sound after the end of the current loop. Use the checkbox in the AudioSource component to enable or di...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_96b77d23b55b
unity_docs
ui
What is `GUIStyle.onNormal` in Unity? Explain its purpose and usage.
GUIStyle.onNormal public GUIStyleState onNormal ; Description Rendering settings for when the control is turned on. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { GUI.skin.button.onNormal.textColor = Color.red; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0a0efb0f740
unity_docs
ui
What is `GUILayout` in Unity? Explain its purpose and usage.
GUILayout class in UnityEngine / Implemented in: UnityEngine.IMGUIModule Description The GUILayout class is the interface for Unity gui with automatic layout. Additional resources: GUI Layout tutorial . Static Methods Method Description BeginArea Begin a GUILayout block of GUI controls in a fixed screen ar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fee3b75eb33d
unity_docs
scripting
What is `Rendering.FormatSwizzle.FormatSwizzleG` in Unity? Explain its purpose and usage.
FormatSwizzle.FormatSwizzleG Description The channel specified contains green. When querying a specific channel for a graphics format, returns this enum when the channel contains green. Additional resources: GraphicsFormatUtility.GetSwizzleG .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_ca98ba8ffc96
unity_docs
rendering
In Unity's 'Mesh Renderer component reference', what is 'Lighting' and how does it work?
The Lighting section contains properties that relate to lighting. Property Description Cast Shadows Specify if and how this Renderer casts shadows when a suitable Light shines on it. This property corresponds to the Renderer.shadowCastingMode API. The options are: On : This Renderer casts a shadow when a shadow-casting...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c0579f00eb6f
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.FindFileGuidByRealPath`.
sical path of the file. sourceTree The source tree path is relative to. The PBXSourceTree.Group tree is not supported. Returns string The GUID of the file if the search succeeded. Returns null if not successful. Description Finds a file with the given physical path in the project. The version without sourc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_12448b4e02cb
unity_docs
performance
What is `Profiling.Profiler.enableAllocationCallstacks` in Unity? Explain its purpose and usage.
Profiler.enableAllocationCallstacks public static bool enableAllocationCallstacks ; Description Enables the recording of callstacks for managed allocations. When enabled, the Unity player saves callstack for each managed allocation sample which is known as GC.Alloc . You can see the callstacks in the Timeline ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1268dd13516b
unity_docs
rendering
Give me an overview of the `TextureMipmapLimitBiasMode` class in Unity.
TextureMipmapLimitBiasMode enumeration Description An enumeration that represents the bias mode to use for TextureMipmapLimitSettings.limitBias . For additional information, see TextureMipmapLimitSettings.limitBias . Additional resources: TextureMipmapLimitSettings , TextureMipmapLimitSettings.limitBiasMode . ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6b145c15ab9c
unity_docs
ui
What is `Experimental.GraphView.GraphElement.Select` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphElement.Select Declaration public void Select ( UIElements.VisualElement selectionContainer , bool additive ); Parameters Parameter Description selectionContainer Container in which the GraphElement is being select...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_38a1071e82e8_doc_9
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
The range in degrees that the object will randomly be rotated about the y axis when spawned, in relationto the direction of the spawn point to the camera. Signature: ```csharp public float spawnAngleRange ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c4c8aa1210b3
unity_docs
editor
What is `iOS.Xcode.PBXProject.GetPBXProjectPath` in Unity? Explain its purpose and usage.
PBXProject.GetPBXProjectPath Declaration public static string GetPBXProjectPath (string buildPath ); Parameters Parameter Description buildPath The project build path. Returns string The path to the PBX project file. This path can be opened later using the ReadFromFile function. Description Returns...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c17a62f80a2c
unity_docs
rendering
In Unity's 'Set up multiple scenes', what is 'Add scenes' and how does it work?
To add a new scene to your project, do one of the following: Right click to open the menu of a scene asset in the Project window and select Open Scene Additive . Drag one or more scenes from the Project window into the Hierarchy window.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_39bfdd57730f
unity_docs
scripting
Show me a Unity code example for 'Loading assets from AssetBundles'.
UnityWebRequestAssetBundle.GetAssetBundle . Refer to the API references for these classes for the full range of AssetBundle loading methods available and usage examples. ## Loading assets Once an AssetBundle is loaded, you can use the AssetBundle class to load individual assets from it as follows. Use LoadAsset to lo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_acf24cbbfa27
unity_docs
physics
In Unity's 'Add collision to trees', what is 'Set up the terrain to support tree colliders' and how does it work?
On the Terrain tile’s Inspector window, go to Terrain Collider and make sure Enable Tree Colliders is selected. Note : This option is enabled by default. If you disable it for one tile, other tiles still enable it, including any new tiles you add.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b6767fd43d4f
unity_docs
editor
What is `iOS.Xcode.PBXProject.AddResourcesBuildPhase` in Unity? Explain its purpose and usage.
PBXProject.AddResourcesBuildPhase Declaration public string AddResourcesBuildPhase (string targetGuid ); Parameters Parameter Description targetGuid The GUID of the target, such as the one returned by TargetGuidByName . Returns string Returns the GUID of the new phase. Description Creates a new reso...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4b6df7081349
unity_docs
scripting
What is `GameObjectUtility.RemoveMonoBehavioursWithMissingScript` in Unity? Explain its purpose and usage.
GameObjectUtility.RemoveMonoBehavioursWithMissingScript Declaration public static int RemoveMonoBehavioursWithMissingScript ( GameObject go ); Parameters Parameter Description go The GameObject to remove MonoBehaviours with a missing script from. Returns int The number of MonoBehaviours with a missing s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df80c8723c20
unity_docs
editor
Give me an overview of the `InSceneAssetInformation` class in Unity.
InSceneAssetInformation struct in UnityEditor Description Provides information related to an in-scene asset collected during a InSceneAssetUtility.CollectInSceneAssets call. Additional resources: InSceneAssetUtility . Properties Property Description inSceneAsset The collected in-scene asset. referencingOb...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_208f5fb46397
unity_docs
rendering
Give me an overview of the `HandleUtility` class in Unity.
HandleUtility class in UnityEditor Description Helper functions for Scene View style 3D GUI. These are mainly mathematical functions that assist in converting between the 3D Scene space and the 2D GUI. The functions are used in the construction of the Unity Editor itself and so using them is a good way to make yo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9ef7b189ee2
unity_docs
rendering
What is `PlayerSettings.GetIconSizes` in Unity? Explain its purpose and usage.
PlayerSettings.GetIconSizes Declaration public static int[] GetIconSizes ( Build.NamedBuildTarget buildTarget , IconKind kind ); Parameters Parameter Description buildTarget The NamedBuildTarget . Description Returns a list of icon sizes for the specified platform. Unity enables you to specify multi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2a6f5cfd436d
unity_docs
scripting
What is `UIElements.Clickable.OnPointerDown` in Unity? Explain its purpose and usage.
Clickable.OnPointerDown Declaration protected void OnPointerDown ( UIElements.PointerDownEvent evt ); Parameters Parameter Description evt The event. Description This method is called when a PointerDownEvent is sent to the target element.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7b68e28b2278
unity_docs
editor
Explain 'Accessibility' in Unity.
com.unity.modules.accessibility ## Description The Accessibility module includes utilities to facilitate the development of accessible user experiences in Unity. ## Version information Built-in packages are fixed to a single version matching the Editor version.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fd303912f097
unity_docs
rendering
What is `Experimental.Rendering.GraphicsFormatUtility.IsCrunchFormat` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormatUtility.IsCrunchFormat Declaration public static bool IsCrunchFormat ( TextureFormat format ); Description Returns true if the format data is compressed with Crunch. Returns false otherwise.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5652ae2cb9c1
unity_docs
rendering
What are the parameters of `ColorUtility.TryParseHtmlString` in Unity?
Returns bool True if the string was successfully converted else false. Description Attempts to convert a html color string. Strings that begin with '#' will be parsed as hexadecimal in the following way: #RGB (becomes RRGGBB) #RRGGBB #RGBA (becomes RRGGBBAA) #RRGGBBAA When not specified alpha will default to FF. String...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a6222172fc25
unity_docs
input
Explain 'Mobile device input' in Unity.
Important : This page documents part of the Input Manager system, which is a legacy feature and not recommended for new projects. For mobile device input in new projects, use the Input System Package . On mobile devices, the Input class offers access to touchscreen, accelerometer and geographical/location input. Access...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c44efa7072e
unity_docs
ui
What is `UIElements.PointerDownEvent` in Unity? Explain its purpose and usage.
PointerDownEvent class in UnityEngine.UIElements / Inherits from: UIElements.PointerEventBase_1 / Implemented in: UnityEngine.UIElementsModule Description Sends when a pointer is pressed inside a visual element. In a runtime UI, a PointerDownEvent is sent each time a user touches the screen or presses a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fde7bb9668a2
unity_docs
scripting
What is `Undo.SetTransformParent` in Unity? Explain its purpose and usage.
Undo.SetTransformParent Declaration public static void SetTransformParent ( Transform transform , Transform newParent , string name ); Parameters Parameter Description transform The Transform component whose parent is to be changed. newParent The parent Transform to be assigned. name The name of thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_33da8e7f319a
unity_docs
scripting
Show me a Unity C# example demonstrating `UIElements.PopupField_1`.
PopupField<T0> class in UnityEngine.UIElements / Inherits from: UIElements.BasePopupField_2 / Implemented in: UnityEngine.UIElementsModule Description Generic popup selection field. The following example shows how to create a popup field for a custom data type. ```csharp using System.Collections.Gene...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a7d657185a71
unity_docs
editor
Show me a Unity C# example demonstrating `ProfilerWindow.gpuModuleIdentifier`.
ProfilerWindow.gpuModuleIdentifier public static string gpuModuleIdentifier ; Description The identifier of the GPU Usage Profiler module . Compare this constant to ProfilerWindow.selectedModuleIdentifier to check if the currently selected Profiler module is the CPU Usage Profiler module . ```csharp usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_65cf1a2bd71e
unity_docs
ui
In Unity's 'Create a complex list view', what is 'Create the example' and how does it work?
This example builds the visual elements in the list from a C# script. It uses a custom CharacterInfoVisualElement class that inherits from VisualElement , and binds the custom elements to CharacterInfo objects. Create a Unity project with any template. In the Project window , create a folder named Editor . In the Edito...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_9abb5d501c72
github
scripting
Write a Unity C# ScriptableObject for Time Machine
```csharp using UnityEngine; namespace THEBADDEST.Coroutines { public delegate void EverySecondActionDelegate(); [CreateAssetMenu(menuName = "THEBADDEST/Coroutines/TimeMachine", fileName = "TimeMachine", order = 0)] public class TimeMachine : ScriptableObject { private int ...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_4a2ec6bb12f7
unity_docs
editor
In Unity's 'Install dependencies', what is 'Install modules' and how does it work?
You can install the modules in two ways: During installation of a new Unity Editor version. For more information, refer to Download and install the Unity Editor . By adding them to an existing Unity Editor installation. For more information, refer to Add modules . The three modules to install are: Android Build Support...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5db05594fe74
unity_docs
scripting
What is `RenderPickingArgs.RenderObjectSetContains` in Unity? Explain its purpose and usage.
RenderPickingArgs.RenderObjectSetContains Declaration public bool RenderObjectSetContains ( GameObject go ); Parameters Parameter Description go The GameObject to test. Returns bool True if the GameObject is in either the ignore set or the filter set depending on renderPickingType . Description The...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c24b367745af
unity_docs
editor
Show me a Unity C# example demonstrating `SerializedProperty.GetEndProperty`.
lic SerializedProperty GetEndProperty (); Declaration public SerializedProperty GetEndProperty (bool includeInvisible ); Description Retrieves the SerializedProperty that defines the end range of this property. It's the first property that's not a child or grandchild of this property. The end property ca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_c6010f8489b3
github
scripting
Write a Unity C# script called Timer
```csharp using Goap.Agent.Core; using UnityEngine; namespace Goap.Agent.Runtime { public class Timer : ITimer { private float lastTouch = 0; public void Touch() { this.lastTouch = Time.realtimeSinceStartup; } public float GetElapsed() ...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_8567441c9b47
unity_docs
physics
In Unity's 'UnityYAML', what is 'Supported features' and how does it work?
Feature Support Mappings UnityYAML supports both flow and block styles. Scalars UnityYAML supports double and single quoted scalars as well as plain scalars. You can split them onto multiple lines. Be aware that multi-line scalars can create performance and memory overheads during parsing. Plain scalars split onto mult...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1cf77d35b493
unity_docs
scripting
Show me a Unity C# example demonstrating `Events.UnityEvent_1`.
UnityEvent<T0> class in UnityEngine.Events / Inherits from: Events.UnityEventBase / Implemented in: UnityEngine.CoreModule Description One argument version of UnityEvent . Generics are supported, specify a type parameter on initialization as shown in the example. Refer to Configure callbacks in the Inspecto...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_62535ed40765
unity_docs
scripting
What is `UIElements.PointerMoveEvent.ctor` in Unity? Explain its purpose and usage.
PointerMoveEvent Constructor Declaration public PointerMoveEvent (); Description Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_71f90b9d53e0
unity_docs
rendering
In Unity's 'Introduction to video transparency support in Unity', what is 'Per-pixel alpha value transparency' and how does it work?
Videos can have per-pixel alpha values, which means that transparency can vary across the video image. For example, the background of a video is transparent while an object in the foreground is opaque. For instructions on how to import a per-pixel alpha video, refer to Change the transparency of pixels in your video (p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_491d7346fb63
unity_docs
scripting
Show me a Unity code example for 'Receive callbacks when any bound properties change'.
b repository . ## Create a Weapon object Create a C# script to define the class Weapon as a MonoBehaviour with two properties: m_BaseDamage and m_HardModeModifier . Create a project in Unity with any template. In your Project window , create a folder named callback-any-SerializedProperty-changes to store your files. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9a651b746932
unity_docs
editor
What is `CustomEditor.isFallback` in Unity? Explain its purpose and usage.
CustomEditor.isFallback public bool isFallback ; Description If true, match this editor only if all non-fallback editors do not match. Defaults to false. Unity does a two-pass match to hook up editors with inspected types. First the non-fallback editors are tested, and if none match, then the fallbacks are test...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2d6720a42594
unity_docs
physics
What is `PhysicsScene.IsValid` in Unity? Explain its purpose and usage.
PhysicsScene.IsValid Declaration public bool IsValid (); Returns bool Is the physics scene valid? Description Gets whether the physics Scene is valid or not. If the physics Scene is associated with a specific Scene which has been destroyed then the physics Scene is no longer valid. Note that the Physic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdfa1708bed9
unity_docs
rendering
What is `LightingDataAsset.SetAmbientProbe` in Unity? Explain its purpose and usage.
LightingDataAsset.SetAmbientProbe Declaration public void SetAmbientProbe ( Rendering.SphericalHarmonicsL2 probe ); Parameters Parameter Description probe The ambient probe to set. Description Sets the ambient probe stored in a LightingDataAsset.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61baebdd9c57
unity_docs
animation
What is `UIElements.Experimental.ValueAnimation_1.KeepAlive` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ValueAnimation<T0>.KeepAlive Declaration public ValueAnimation<T> KeepAlive (); Description Will not return the object to the instance pool when the animation has completed.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e76de935a861
unity_docs
scripting
What are the parameters of `Experimental.Rendering.GraphicsStateCollection.LoadFromFile` in Unity?
Returns bool Returns true if the collection was successfully loaded, false otherwise. Description Load the GraphicsStateCollection at the given path. The file extension of GraphicsStateCollection is *.graphicsstate. ```csharp using UnityEngine; using UnityEngine.Experimental.Rendering;public class LoadFromFileExample :...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0b93c6d0409
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.RGBA_ASTC5X5_SRGB` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.RGBA_ASTC5X5_SRGB Description A four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5312cfd21465
unity_docs
editor
Show me a Unity C# example demonstrating `Help.ShowHelpForObject`.
Help.ShowHelpForObject Declaration public static void ShowHelpForObject ( Object obj ); Description Show help page for this object. Additional resources: Help.HasHelpForObject , Help.GetHelpURLForObject . Editor Window that lets you load docs for any Selected GameObject. ```csharp using UnityEngine; using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_574e5d2b8f40
unity_docs
rendering
Show me a Unity C# example demonstrating `GUILayout.SelectionGrid`.
Any values passed in here will override settings defined by the style . Additional resources: GUILayout.Width , GUILayout.Height , GUILayout.MinWidth , GUILayout.MaxWidth , GUILayout.MinHeight , GUILayout.MaxHeight , GUILayout.ExpandWidth , GUILayout.ExpandHeight . Returns int The index of the selected bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_574e14f8fa5a
unity_docs
performance
What is `Profiling.Profiler.SetAreaEnabled` in Unity? Explain its purpose and usage.
Profiler.SetAreaEnabled Declaration public static void SetAreaEnabled ( Profiling.ProfilerArea area , bool enabled ); Parameters Parameter Description area The area you want to enable or disable. enabled Enable or disable the collection of data for this area. Description Enable or disable a given Prof...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8c2a03e107c6
unity_docs
scripting
What is `AssetBundle` in Unity? Explain its purpose and usage.
AssetBundle class in UnityEngine / Inherits from: Object / Implemented in: UnityEngine.AssetBundleModule Description API for accessing the content of AssetBundle files. This class exposes an API, via static methods, for loading and managing AssetBundles. This same class offers non-static methods and propertie...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0244ca6615ce
unity_docs
scripting
What is `SceneVisibilityManager.visibilityChanged` in Unity? Explain its purpose and usage.
SceneVisibilityManager.visibilityChanged Description The event raised whenever the visibility of a GameObject changes. For performance reasons, this event is not raised for every visibility operation. For example, if you select multiple GameObjects and hide them all at once, the event will be raised only once.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31bc87cb57eb
unity_docs
animation
What is `Animations.PositionConstraint.GetSources` in Unity? Explain its purpose and usage.
PositionConstraint.GetSources Declaration public void GetSources (List<ConstraintSource> sources ); Parameters Parameter Description sources The list of sources to be filled by the component. Description Gets the list of sources. Throws ArgumentNullException, if the list of sources is null.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_35f1c282314f
unity_docs
editor
Show me a Unity C# example demonstrating `Search.ISearchView.selection`.
ISearchView.selection public Search.SearchSelection selection ; Description Returns the selected items in the view. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Search; static class Example_ISearchView_AddSelection { static ISearchView s_View; [MenuItem("Examples/ISearchView/AddSelect...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_07b8d789dddc
unity_docs
scripting
Show me a Unity C# example demonstrating `Undo.CollapseUndoOperations`.
index automatically increases on mouse down, by clicking on menu items, and other operations. This method collapses all undo operations with group indices above the provided group index to that group index. This is used by the color picker to combine all color modifications into a single step once the color picker is c...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4765e81aa940
unity_docs
scripting
What is `AssetBundle.LoadAssetAsync` in Unity? Explain its purpose and usage.
AssetBundle.LoadAssetAsync Declaration public AssetBundleRequest LoadAssetAsync (string name ); Declaration public AssetBundleRequest LoadAssetAsync (string name ); Declaration public AssetBundleRequest LoadAssetAsync (string name , Type type ); Parameters Parameter Description name Name of ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_f522b91ce703_doc_24
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Represents an object which can receive one or more arguments as part of its initialization process,with the first one being an object of type . Type of the first argument. Signature: ```csharp public interface IFirstArgument<TFirstArgument> ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_096bcca49a8f
unity_docs
scripting
What is `ParticleSystem.ShapeModule.enabled` in Unity? Explain its purpose and usage.
ParticleSystem.ShapeModule.enabled public bool enabled ; Description Specifies whether the ShapeModule is enabled or disabled. Additional resources: ParticleSystem.shape . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviou...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fbbf1fc29a17
unity_docs
input
What is `KeyCode.Mouse6` in Unity? Explain its purpose and usage.
KeyCode.Mouse6 Description Additional (or seventh) mouse button. Use this for detecting mouse button presses. The “6” mouse button is the seventh button on the user’s mouse if this additional button exists. Unity defines this as the sixth mouse button because the mouse button numbering begins at 0. ```csharp using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_09957f902691
unity_docs
rendering
What is `MaterialProperty.floatValue` in Unity? Explain its purpose and usage.
MaterialProperty.floatValue public float floatValue ; Description Float value of the property. Setting a new value will apply it to all material targets , and will automatically record an undo operation. Additional resources: type , MaterialEditor .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_28fd1c414f1b
unity_docs
scripting
What is `Search.PropertyDatabase.CreateDocumentKey` in Unity? Explain its purpose and usage.
PropertyDatabase.CreateDocumentKey Declaration public static ulong CreateDocumentKey (string documentId ); Parameters Parameter Description documentId A document identifier. Returns ulong The document key. Description Creates a document key from a document identifier. Additional resources: Property...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_42a0022336eb
unity_docs
scripting
What is `Unity.Android.Gradle.Manifest.Package.ctor` in Unity? Explain its purpose and usage.
Package Constructor Declaration public Package (); Declaration public Package ( Unity.Android.Gradle.Manifest.Package package ); Parameters Parameter Description package Element to copy. Description Element constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1398f56182e0
unity_docs
editor
What is `iOS.Xcode.PBXProject.FindFileGuidByRealPath` in Unity? Explain its purpose and usage.
PBXProject.FindFileGuidByRealPath Declaration public string FindFileGuidByRealPath (string path , iOS.Xcode.PBXSourceTree sourceTree ); Declaration public string FindFileGuidByRealPath (string path ); Parameters Parameter Description path The physical path of the file. sourceTree The source tree pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cd77c6c343e8
unity_docs
physics
What are the parameters of `PhysicsScene2D.BoxCast` in Unity?
Returns RaycastHit2D The cast results returned. Description Casts a box against colliders in the PhysicsScene2D, returning the first intersection only. A "BoxCast" is conceptually like dragging a box shape through the Scene in a particular direction. Any Collider2D making contact with the box can be detected and repor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.