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_e24d306ab6ad
unity_docs
editor
Show me a Unity C# example demonstrating `AssetModificationProcessor.FileModeChanged`.
AssetModificationProcessor.FileModeChanged(string[],FileMode) Description Unity calls this method when file mode has been changed for one or more files. Array of strings specifies changed files. FileMode specifies new file mode. This method must be static if implemented. ```csharp using UnityEngine; using UnityE...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d88da7b66e0c
unity_docs
scripting
What is `Experimental.GraphView.IconBadge` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. IconBadge class in UnityEditor.Experimental.GraphView / Inherits from: UIElements.VisualElement Description A rectangular badge, usually attached to another visual element. Properties Property Description alignment Relati...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a9c26b71e746
unity_docs
scripting
Show me a Unity C# example demonstrating `Search.CustomObjectIndexerAttribute.ctor`.
CustomObjectIndexerAttribute Constructor Declaration public CustomObjectIndexerAttribute (Type type ); Parameters Parameter Description type Type of object to be indexed. Description Register a new Indexing function bound to the specific type. ```csharp [CustomObjectIndexer(typeof(SceneAsset), version = 2...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c807667a30d5
unity_docs
input
Show me a Unity code example for 'Move a camera along a ray'.
es useful to get a ray corresponding to a screen position and then move the camera along that ray. For example, you may want to allow the user to select an object with the mouse and then zoom in on it while keeping it “pinned” to the same screen position under the mouse (this might be useful when the camera is looking ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0839493b918c
unity_docs
editor
Show me a Unity C# example demonstrating `Search.SearchExpressionEvaluatorAttribute`.
SearchExpressionEvaluatorAttribute class in UnityEditor.Search Description Attribute used to register new SearchExpressionEvaluator. This will allow to use new function in SearchExpression . As a side note all builtin evaluators (count{}, select{}, ...) are defined using this attribute. ```csharp using System; u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75bafc69edf9
unity_docs
rendering
What is `Editor.OnInteractivePreviewGUI` in Unity? Explain its purpose and usage.
Editor.OnInteractivePreviewGUI Declaration public void OnInteractivePreviewGUI ( Rect r , GUIStyle background ); Parameters Parameter Description r Rectangle in which to draw the preview. background Background image. Description Implement to create your own interactive custom preview. Interactive cus...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_853681b30759
unity_docs
math
What is `Experimental.GraphView.Scope.HitTest` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. Scope.HitTest Declaration public bool HitTest ( Vector2 localPoint ); Parameters Parameter Description localPoint The point in local coordinates. Returns bool Returns true if the point is within the selectable area o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dc861aa45bc9
unity_docs
ui
What is `Overlays.OverlayCanvas.ShowPopup` in Unity? Explain its purpose and usage.
OverlayCanvas.ShowPopup Declaration public void ShowPopup (); Declaration public void ShowPopup ( Vector2 position ); Parameters Parameter Description position The GUI position relative to the window. Description Displays an overlay as a pop-up in a EditorWindow . ```csharp using UnityEditor; using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ef10dc3bfae
unity_docs
scripting
What is `FileUtil.GetPhysicalPath` in Unity? Explain its purpose and usage.
FileUtil.GetPhysicalPath Declaration public static string GetPhysicalPath (string path ); Parameters Parameter Description path Logical path. Returns string Physical path. Description Converts a logical path to a physical path. Logical paths in Unity are virtual paths which point to real (or "physic...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_898f31a1ec2b
unity_docs
rendering
Explain 'Platform and graphics API macros' in Unity.
Macro: Target platform: SHADER_API_D3D11 Direct3D 11 SHADER_API_GLCORE Desktop OpenGL “core” (GL 3/4) SHADER_API_GLES3 OpenGL ES 3.0/3.1 SHADER_API_METAL iOS/Mac Metal SHADER_API_VULKAN Vulkan SHADER_API_D3D11_9X Direct3D 11 “feature level 9.x” target for Universal Windows Platform SHADER_API_DESKTOP Windows, Mac and L...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_316a5318ae3e
unity_docs
scripting
What is `Caching` in Unity? Explain its purpose and usage.
Caching class in UnityEngine / Implemented in: UnityEngine.CoreModule Description The Caching class lets you manage cached AssetBundles, downloaded using UnityWebRequestAssetBundle.GetAssetBundle . Note: The Cache API is not supported in WebGL because AssetBundles are stored in the browser cache for the WebGL...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_abf25ee07855
unity_docs
scripting
What is `SystemInfo.graphicsDeviceType` in Unity? Explain its purpose and usage.
SystemInfo.graphicsDeviceType public static Rendering.GraphicsDeviceType graphicsDeviceType ; Description The graphics API type used by the graphics device (Read Only). Additional resources: GraphicsDeviceType enum, SystemInfo.graphicsDeviceVersion , SystemInfo.graphicsDeviceName , SystemInfo.graphicsDev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c49b1e5f64a5
unity_docs
editor
What is `EditorUserBuildSettings.windowsDevicePortalUsername` in Unity? Explain its purpose and usage.
EditorUserBuildSettings.windowsDevicePortalUsername public static string windowsDevicePortalUsername ; Description Specifies the Windows DevicePortal username for the device to deploy and launch the UWP app on when using Build and Run. This parameter is only necessary if WDP authentication is enabled on the tar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49420ec163de
unity_docs
physics
What is `SoftJointLimit` in Unity? Explain its purpose and usage.
SoftJointLimit struct in UnityEngine / Implemented in: UnityEngine.PhysicsModule Description The limits defined by the CharacterJoint . Properties Property Description bounciness When the joint hits the limit, it can be made to bounce off it. contactDistance Determines how far ahead in space the solver can...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f9eab35337c5
unity_docs
xr
What is `Experimental.Licensing.LicensingUtility.HasEntitlements` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. LicensingUtility.HasEntitlements Declaration public static string[] HasEntitlements (string[] entitlements ); Parameters Parameter Description entitlements The requested list of entitlement strings. Returns string[] R...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d79b0b1dfa01
unity_docs
input
What is `Display.RelativeMouseAt` in Unity? Explain its purpose and usage.
Display.RelativeMouseAt Declaration public static Vector3 RelativeMouseAt ( Vector3 inputMouseCoordinates ); Parameters Parameter Description inputMouseCoordinates Mouse Input Position as Coordinates. Description Query relative mouse coordinates. RelativeMouseAt can be used to query relative mouse inpu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_fe5829e703a5
unity_docs
rendering
Explain 'Visual Effect Graph asset' in Unity.
A Visual Effect Graph asset contains all of the necessary data, such as the graph and shaders , that Unity requires to process an effect This Asset only works when you install the Visual Effect Graph package. For information on how to install the Visual Effect Graph, refer to Install a package from a registry . For inf...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_36f8babee104
unity_docs
rendering
What is `ShadowObjectsFilter` in Unity? Explain its purpose and usage.
ShadowObjectsFilter enumeration Description The filters that Unity can use when it renders GameObjects in the shadow pass. Properties Property Description AllObjects Renders all GameObjects. DynamicOnly Only renders GameObjects that do not include the Static Shadow Caster tag. StaticOnly Only renders GameObje...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ded52f4e1e8c
unity_docs
scripting
What is `Time.fixedUnscaledTime` in Unity? Explain its purpose and usage.
Time.fixedUnscaledTime public static float fixedUnscaledTime ; Description The timeScale-independent time at the beginning of the last MonoBehaviour.FixedUpdate phase (Read Only). This is the time in seconds since the start of the game. This value is updated in fixed increments equal to Time.fixedUnscaledDel...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_71d9429ac45b
unity_docs
rendering
What is `ParticleSystemRenderer.enableGPUInstancing` in Unity? Explain its purpose and usage.
ParticleSystemRenderer.enableGPUInstancing public bool enableGPUInstancing ; Description Enables GPU Instancing on platforms that support it. To use GPU Instancing to render a Particle System, the particle must use a Shader that contains a Procedural Instancing pass (that is, it contains the #pragma instancing...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e14ac6fd8b37
unity_docs
scripting
What is `IMGUI.Controls.TreeView.GetContentIndent` in Unity? Explain its purpose and usage.
TreeView.GetContentIndent Declaration protected float GetContentIndent ( IMGUI.Controls.TreeViewItem item ); Parameters Parameter Description item Item used to determine the indent. Returns float Indent. Description Returns the horizontal content offset for an item. This is where the content should ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_4537818d0785_doc_3
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
If the interactable has a speed scale override. Signature: ```csharp public bool HasScaleSpeedOverride ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_10c84d8e0de6
unity_docs
rendering
Explain 'Mesh Renderer component reference' in Unity.
A Mesh Renderer component renders a mesh. It works with a Mesh Filter component on the same GameObject ; the Mesh Renderer renders the mesh that the Mesh Filter references. To render a deformable mesh, use a Skinned Mesh Renderer instead. In C# code, the MeshRenderer class represents a Mesh Renderer component. The Mesh...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92ea88c388ce
unity_docs
editor
What is `Device.Screen.orientation` in Unity? Explain its purpose and usage.
Screen.orientation public static ScreenOrientation orientation ; Description This has the same functionality as Screen.orientation and also mimics platform-specific behavior in the Unity Editor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f59968032813
unity_docs
scripting
What is `UIElements.UxmlTypeRestriction` in Unity? Explain its purpose and usage.
UxmlTypeRestriction class in UnityEngine.UIElements / Implemented in: UnityEngine.UIElementsModule Description Base class to restricts the value of an attribute. Public Methods Method Description Equals Indicates whether the current UxmlTypeRestriction object is equal to another object of the same type.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b96e42ab1ce3
unity_docs
rendering
In Unity's 'Create a cubemap', what is 'Creating Cubemaps from Textures' and how does it work?
The fastest way to create cubemaps is to import them from specially laid out Textures . Select the Texture in the Project window , to see the Import Settings in the Inspector window. In the Import Settings, set the Texture Type to Default , Normal Map or Single Channel , and the Texture Shape to Cube . Unity then autom...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c44da998c60
unity_docs
math
What is `AndroidJavaObject.Call` in Unity? Explain its purpose and usage.
AndroidJavaObject.Call Declaration public void Call (string methodName , params object[] args ); Declaration public void Call (string methodName , T[] args ); Parameters Parameter Description methodName Specifies which method to call. args An array of parameters passed to the method. Description C...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f264717bbc9
unity_docs
rendering
What are the parameters of `Texture2D.PackTextures` in Unity?
Returns Rect[] An array of rectangles containing the UV coordinates in the atlas for each input texture, or null if packing fails. Description Packs multiple Textures into a texture atlas. This function will replace the current texture with the atlas made from the supplied textures. The size, format and mipmaps of any ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fc93dd889c6b
unity_docs
ui
What is `GUIStyle.margin` in Unity? Explain its purpose and usage.
GUIStyle.margin public RectOffset margin ; Description The margins between elements rendered in this style and any other GUI elements. This only has effect when using automatic layout (Additional resources: GUILayout ). ```csharp using UnityEngine;public class Example : MonoBehaviour { // Prints the left,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7d7ebfe90eba
unity_docs
audio
What is `AudioSource.priority` in Unity? Explain its purpose and usage.
AudioSource.priority public int priority ; Description Sets the priority of the AudioSource . Unity virtualizes AudioSources when the number of active AudioSources exceeds the limit set by your project's maximum real voices. Real voices are audio sources that are audible in the scene. When Unity virtualizes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_76487a6f1382
unity_docs
editor
What is `Unity.Profiling.ProfilerMarker` in Unity? Explain its purpose and usage.
ProfilerMarker struct in Unity.Profiling / Implemented in: UnityEngine.CoreModule Description Performance marker used for profiling arbitrary code blocks. Use ProfilerMarker to mark up script code blocks for the Profiler. The information produced by markers is displayed in the CPU Profiler and can be also ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f2ed46e70821
unity_docs
editor
In Unity's 'Assign assets to an AssetBundle', what is 'Assign assets to AssetBundles in the Editor' and how does it work?
To assign a given asset to an AssetBundle in the Unity Editor, perform the following steps: Select the asset in the Project window and view it in the Inspector . Use the AssetBundle left-hand dropdown menu at the bottom of the Inspector window to assign or create an AssetBundle: To create a new AssetBundle, select the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ecba01a7a235
unity_docs
math
What is `Rendering.AttachmentIndexArray` in Unity? Explain its purpose and usage.
AttachmentIndexArray struct in UnityEngine.Rendering / Implemented in: UnityEngine.CoreModule Description Struct encapsulating a fixed list of attachment indices used when declaring native render passes. This fixed size struct allows for non-GC declaration of the required indices. Indices point into the attachm...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_cdba2988389c
unity_docs
physics
Explain 'Optimize physics for query-only or non-simulating games' in Unity.
Prevent the default physics update loop from running to reduce unnecessary performance overhead by changing the Simulation Mode to Script . Preventing the default physics update loop from running can be beneficial if your game doesn’t require physics simulation for the default physics scene . For example, your game mig...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5c5287bea3f0
unity_docs
rendering
What is `Rendering.ShaderPropertyFlags.Gamma` in Unity? Explain its purpose and usage.
ShaderPropertyFlags.Gamma Description Signifies that values of this property are in gamma space. If the active color space is linear, Unity converts the values to linear space values. This flag corresponds to the "[Gamma]" attribute. Additional resources: Linear rendering overview .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c7c0ff0b569f
unity_docs
rendering
What is `Shader.FindTextureStack` in Unity? Explain its purpose and usage.
Shader.FindTextureStack Declaration public bool FindTextureStack (int propertyIndex , out string stackName , out int layerIndex ); Parameters Parameter Description propertyIndex Index of the property. stackName On exit, contanis the name of the stack if one was found. layerIndex On exit, contains the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6baf551fbe5
unity_docs
scripting
What is `Events.UnityEventBase.GetPersistentTarget` in Unity? Explain its purpose and usage.
UnityEventBase.GetPersistentTarget Declaration public Object GetPersistentTarget (int index ); Parameters Parameter Description index Index of the listener to query. Description Get the target component of the listener at index index.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_bca35194ca0b
unity_docs
scripting
Explain 'Debug and troubleshoot Web builds' in Unity.
Debug errors and common problems in Unity Web builds. Visual Studio doesn’t support debugging Unity Web content. Unity Web also doesn’t support source-level debugging, so debugging workflows rely on browser console output, development builds , symbol files, and troubleshooting. Topic Description Debug Web builds in dev...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b24a9e9d448b
unity_docs
scripting
What is `Profiling.HierarchyFrameDataView.columnCalls` in Unity? Explain its purpose and usage.
HierarchyFrameDataView.columnCalls public static int columnCalls ; Description The Calls column. The number of samples a marker generates at a specific level of the hierarchy. This is similar to a call counting function.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c665d157d2e3
unity_docs
editor
What is `Experimental.GraphView.EdgeDragHelper.HandlePointerDown` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. EdgeDragHelper.HandlePointerDown Declaration public bool HandlePointerDown ( UIElements.PointerDownEvent evt ); Parameters Parameter Description evt The pointer down event. Returns bool Returns true if the edge drag ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb608a610e22
unity_docs
networking
What is `Android.AndroidConfiguration.screenWidthDp` in Unity? Explain its purpose and usage.
AndroidConfiguration.screenWidthDp public int screenWidthDp ; Description Mirrors the Android property screenWidthDp . For information about this property, refer to the Android developer documentation on screenWidthDp .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_73f8ddfec6a8
unity_docs
rendering
Explain 'Bumped Specular' in Unity.
Note. Unity 5 introduced the Standard Shader which replaces this` ## Normal Mapped Properties Like a Diffuse shader , this computes a simple (Lambertian) lighting model. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on the angle, and does not change a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8ff2f50aab1e
unity_docs
scripting
What is `Terrain.SetConnectivityDirty` in Unity? Explain its purpose and usage.
Terrain.SetConnectivityDirty Declaration public static void SetConnectivityDirty (); Description Marks the current connectivity status as invalid. Use this method after adding / removing terrain tiles to inform the terrain that the connectivity needs to be rebuilt.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0f4e0121351c
unity_docs
editor
What is `PlayerSettings.Android.buildApkPerCpuArchitecture` in Unity? Explain its purpose and usage.
PlayerSettings.Android.buildApkPerCpuArchitecture public static bool buildApkPerCpuArchitecture ; Description Create a separate APK for each CPU architecture. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Build;public class BuildApkPerCpuArchitectureSample : MonoBehaviour { [MenuItem("Buil...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_e7d05f293a2a
github
scripting
Write a Unity C# XR/VR script for Hand Ray Controller
```csharp // Copyright (c) 2022 Takahiro Miyaura // Released under the MIT license // http://opensource.org/licenses/mit-license.php using UnityEngine; namespace ReSeul.OpenXRSample { public class HandRayController : MonoBehaviour { private BaseCursor cursor; private LineRenderer lineRenderer...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
gh_a5889bb29b1c_doc_18
github
scripting
What does `MoveEnd` do in this Unity script? Explain its purpose and signature.
MoveEnd is called when user has ended the move of the area previously selected with the selection marquee.The GameObjectBrush overrides this to provide GameObject moving functionality.Grid used for layout.Target of the move operation. By default the currently selected GameObject.Position where the move operation has en...
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_4974610b938b
unity_docs
scripting
What is `Video.VideoClip.GetAudioSampleRate` in Unity? Explain its purpose and usage.
VideoClip.GetAudioSampleRate Declaration public uint GetAudioSampleRate (ushort audioTrackIdx ); Parameters Parameter Description audioTrackIdx Index of the audio queried audio track. Returns uint The sampling rate in hertz. Description Get the audio track sampling rate in hertz (Hz). The audio samp...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_899a642da29d
unity_docs
performance
In Unity's 'Generate your Visual Studio C++ solution', what is 'Visual Studio build configurations' and how does it work?
Unity provides the following build configuration options in Visual Studio : Configuration Description Debug Use Debug to debug your code. This configuration: - Disables all optimization. - Preserves all debugging information in the code. - Results in code that runs slowly. - Results in the fastest build time. Release U...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_c90e233d8ec2
unity_docs
rendering
In Unity's 'Transparent Parallax Specular', what is 'Parallax Normal mapped Properties' and how does it work?
Parallax Normal mapped is the same as regular Normal mapped , but with a better simulation of “depth”. The extra depth effect is achieved through the use of a Height Map . The Height Map is contained in the alpha channel of the Normal map . In the alpha, black is zero depth and white is full depth. This is most often u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_707a572b8e96
unity_docs
scripting
What is `SubsystemsImplementation.SubsystemDescriptorWithProvider` in Unity? Explain its purpose and usage.
SubsystemDescriptorWithProvider class in UnityEngine.SubsystemsImplementation / Implemented in: UnityEngine.SubsystemsModule Implements interfaces: ISubsystemDescriptor Description Information about a SubsystemWithProvider that can be queried before creating a subsystem instance. Properties Property Descri...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_581ec56d5086
unity_docs
physics
What is `Physics.ClosestPoint` in Unity? Explain its purpose and usage.
Physics.ClosestPoint Declaration public static Vector3 ClosestPoint ( Vector3 point , Collider collider , Vector3 position , Quaternion rotation ); Parameters Parameter Description point Location you want to find the closest point to. collider The collider that you find the closest point on. p...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9668402afcc9
unity_docs
rendering
What is `GL.sRGBWrite` in Unity? Explain its purpose and usage.
GL.sRGBWrite public static bool sRGBWrite ; Description Controls whether Linear-to-sRGB color conversion is performed while rendering. This property is only relevant when Linear Color Space rendering is used. Typically when linear color space is used, non-HDR render textures are treated as sRGB data (i.e. "re...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2fbef8858351
unity_docs
editor
In Unity's 'Engineering feature set', what is 'Getting started' and how does it work?
For a list of IDEs Unity supports, refer to Integrated development environment (IDE) support . To choose which IDE to use with the Unity Editor, open the Preferences window, then go to External Tools > External Script Editor . The Unity Test Framework (UTF) lets you test your code in both Edit mode and Play mode, and a...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_06f2979cc4f0
unity_docs
performance
Show me a Unity C# example demonstrating `Profiling.Profiler.EndSample`.
Profiler.EndSample Declaration public static void EndSample (); Description Ends the current profiling sample. The Profiler displays samples in its Hierarchy and Timeline views. ```csharp using UnityEngine; using System.Collections; using UnityEngine.Profiling;public class ExampleClass : MonoBehaviour { void ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_64061ac9991b
unity_docs
xr
In Unity's 'Remove a UPM package from a project', what is 'Locked and non-removable packages' and how does it work?
You can remove packages only if they’re not required by another package or a feature set. The Package Manager enforces this by disabling the Remove button for all required packages. Required by Description A feature set If a feature set requires the package, it displays a lock icon in both the list panel and in the det...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc8f1cc1bb9d
unity_docs
physics
What is `PhysicsVisualizationSettings.GetShowKinematicBodies` in Unity? Explain its purpose and usage.
PhysicsVisualizationSettings.GetShowKinematicBodies Declaration public static bool GetShowKinematicBodies (); Description Should the kinematic Rigidbodies be considered by the display filter. Rigidbody.isKinematic .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_622e10b79145
unity_docs
ui
What is `Networking.PlayerConnection.PlayerConnectionGUI` in Unity? Explain its purpose and usage.
PlayerConnectionGUI class in UnityEditor.Networking.PlayerConnection Description This class contains methods to draw IMGUI Editor UI that relates to the Player Connection. Use the methods in this class to manually position UI elements. To automatically layout UI, use the corresponding methods in PlayerConnection...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a0bc42140ce
unity_docs
scripting
What is `XR.InputDevices` in Unity? Explain its purpose and usage.
InputDevices class in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description An interface for accessing devices in the XR input subsytem. To route haptic feedback to XR input devices, specify an XRNode as the destination. This interface provides access to input devices using an XRNode. For example,...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6f489df7fbd5
unity_docs
editor
What is `Search.SearchExpressionContext` in Unity? Explain its purpose and usage.
SearchExpressionContext struct in UnityEditor.Search Description This context encapsulate all the datas needed to evaluate a SearchExpression and it allows user to interact with the evaluation runtime of an expression. A SearchExpressionContext is created automatically with a SearchExpressionRuntime anytime S...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_75203dc41683
unity_docs
editor
What is `PrefabUtility.UnpackPrefabInstance` in Unity? Explain its purpose and usage.
PrefabUtility.UnpackPrefabInstance Declaration public static void UnpackPrefabInstance ( GameObject instanceRoot , PrefabUnpackMode unpackMode , InteractionMode action ); Parameters Parameter Description instanceRoot The root of the Prefab instance to unpack. unpackMode Whether to unpack the outermo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_08d14346d92f_doc_2
github
scripting
What does `DuplicateSelection` do in this Unity script? Explain its purpose and signature.
Copies and pastes the current selection to the current canvas. Signature: ```csharp public void DuplicateSelection(bool stampMode = false) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_59da1f364dee
unity_docs
math
What is `Tilemaps.Tilemap.SetTilesBlock` in Unity? Explain its purpose and usage.
Tilemap.SetTilesBlock Declaration public void SetTilesBlock ( BoundsInt position , TileBase[] tileArray ); Parameters Parameter Description position Bounds to be filled. tileArray An array of Tile s to be placed. Description Fills bounds with array of Tile s. This is meant for a more performant way ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_16bc440c3aba
unity_docs
performance
What is `ScriptCallOptimizationLevel` in Unity? Explain its purpose and usage.
ScriptCallOptimizationLevel enumeration Description Script call optimization level. Properties Property Description SlowAndSafe Default setting. FastButNoExceptions Script method call overhead decreased at the expense of limited compatibility.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_844deeea0e8f
unity_docs
editor
What is `EditorBuildSettings.TryGetConfigObject` in Unity? Explain its purpose and usage.
EditorBuildSettings.TryGetConfigObject Declaration public static bool TryGetConfigObject (string name , out T result ); Parameters Parameter Description name The name in string format of the config object reference to be fetched. result The config object reference where the returned object will be stored....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_afc3b3f8eea2
unity_docs
scripting
Show me a Unity C# example demonstrating `Animation`.
imations, Animation Mixing, Layers and full control over all aspects of playback. For an overview of animation scripting in Unity please read this introduction . AnimationState can be used to change the layer of an animation, modify playback speed, and for direct control over blending and mixing. Also Animation sup...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_34d9f840cfbe
unity_docs
scripting
What is `ParticleSystem.MainModule.simulationSpace` in Unity? Explain its purpose and usage.
ParticleSystem.MainModule.simulationSpace public ParticleSystemSimulationSpace simulationSpace ; Description This selects the space in which to simulate particles. It can be either world or local space. Toggle between local and world space simulation using the following example: ```csharp using UnityEngine;...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f958afb006ea
unity_docs
ui
Show me a Unity C# example demonstrating `ScriptableWizard.isValid`.
ScriptableWizard.isValid public bool isValid ; Description Allows you to enable and disable the wizard create button, so that the user can not click it. Additional resources: ScriptableWizard.OnWizardUpdate The finish button gets disabled until the user sets the number to 5. ```csharp // Asks the user to set...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e0e1df86c26c
unity_docs
scripting
What are the parameters of `Search.QueryEngine_1.GetOperator` in Unity?
Returns QueryFilterOperator The global QueryFilterOperator . Description Get a custom operator added on the QueryEngine . This method returns a QueryFilterOperator that was added on the QueryEngine . If the operator does not exist, the QueryFilterOperator will be invalid (see QueryFilterOperator.valid ). ``` // Get an ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_92db14c6ce64
unity_docs
rendering
What is `Rendering.LightUnit.Ev100` in Unity? Explain its purpose and usage.
LightUnit.Ev100 Description A value that represents a combination of a camera's shutter speed and f-number. It is essentially a measurement of exposure such that all combinations of shutter speed and f-number that yield the same level of exposure have the same EV. Lights can use EV100, which is EV with a 100 Intern...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d781e4098393
unity_docs
rendering
What is `LineTextureMode` in Unity? Explain its purpose and usage.
LineTextureMode enumeration Description Choose how textures are applied to Lines and Trails. Properties Property Description Stretch Map the texture once along the entire length of the line. Tile Repeat the texture along the line, based on its length in world units. To set the tiling rate, use Material.SetText...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cb8c81dc4d27
unity_docs
ui
What is `GUISkin.verticalScrollbarUpButton` in Unity? Explain its purpose and usage.
GUISkin.verticalScrollbarUpButton public GUIStyle verticalScrollbarUpButton ; Description Style used by default for the up button on GUI.VerticalScrollbar controls. ```csharp using UnityEngine;public class Example : MonoBehaviour { // Modifies only the vertical scrollbar // up button of the current GUISk...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_75e564574579
unity_docs
editor
In Unity's 'Documentation versions', what is 'Install offline documentation' and how does it work?
You can install a local, offline copy of the documentation when you install a Unity version through one of the following methods: The Unity Download Assistant The Unity Hub You can also download it outside of the installer. For more information, refer to Offline Documentation .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2482350f1ce0
unity_docs
editor
What are the parameters of `iOS.Xcode.PBXProject.IsKnownExtension` in Unity?
Returns bool Returns true of the extension is known. Description Checks if files with the given extension are known to PBXProject. ```csharp using UnityEngine; using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class Sample_IsKnownExtension { [PostProcessBuild] public static vo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_6a5f8278c8d6
unity_docs
scripting
In Unity's 'Supported data types for Java/Kotlin and C# code', what is 'Example 2: Transfer complex data types' and how does it work?
The following C# script calls the Java functions to transfer complex data types, such as class/object. ```csharp using UnityEngine; using System; public class PassComplexStructure : MonoBehaviour { [Serializable] public class DataTypes { public int number; public float floatNumber; public bool boolValue; public...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_56926522e390
unity_docs
rendering
What is `Rendering.LightUnit.Candela` in Unity? Explain its purpose and usage.
LightUnit.Candela Description The base unit of luminous intensity in the International System of Units. For reference, a common wax candle emits light with a luminous intensity of roughly 1 candela. Compatible light types: LightType.Point , LightType.Spot , LightType.Pyramid . Additional resources: Light.lightU...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_8c21f425961f_doc_3
github
scripting
What does `Initialize` do in this Unity script? Explain its purpose and signature.
Initialize the state to a particular value, without firingany events or listeners.The value to initialize the state to. Signature: ```csharp public void Initialize(bool value) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_2c67f3137aa2
unity_docs
scripting
What is `Experimental.GraphView.ISelection.RemoveFromSelection` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. ISelection.RemoveFromSelection Declaration public void RemoveFromSelection ( Experimental.GraphView.ISelectable selectable ); Parameters Parameter Description selectable Selectable element to remove. Description Remove...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8f687f05e469
unity_docs
scripting
What is `ChangeChildrenOrderEventArgs.ctor` in Unity? Explain its purpose and usage.
ChangeChildrenOrderEventArgs Constructor Declaration public ChangeChildrenOrderEventArgs (int instanceId , SceneManagement.Scene scene ); Parameters Parameter Description instanceId The instance ID of the parent GameObject whose children have been reordered. Note that this is not the instance ID of the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_961a188d6c20
unity_docs
ui
Show me a Unity code example for 'Lock files'.
e package’s manifest (either embedded or installed from local folder ) can potentially compel the Package Manager to recalculate the resolved package versions. But as long as the version of a package in the lock file satisfies the range implied by the dependency version and the resolution strategy , the package remains...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_f069ee25dc59
unity_docs
editor
Explain 'Manage Asset Store packages in the Editor' in Unity.
Asset Store packages are collections of files and data from Unity projects, or elements of projects. An Asset Store package type is either a UPM package or an asset package (.unitypackage format). When you add an Asset Store package to your project, the Unity Package Manager unpacks the package and maintains its direct...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a5ba42c2260
unity_docs
rendering
Show me a Unity C# example demonstrating `Rendering.IRenderPipelineResources`.
ace will contain all the resources that are mandatory for your Render Pipeline to work. There is a mechanism that allows to set up null fields for you based on ResourcePathAttribute attribute. When the resource is created, a loading mechanism is called to make sure your resources are not created with null values. It ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_163c06d95ed6
unity_docs
rendering
What is `Rendering.CommandBuffer.GetTemporaryRT` in Unity? Explain its purpose and usage.
CommandBuffer.GetTemporaryRT Declaration public void GetTemporaryRT (int nameID , int width , int height , int depthBuffer , FilterMode filter , Experimental.Rendering.GraphicsFormat format , int antiAliasing , bool enableRandomWrite , RenderTextureMemoryless memorylessMode , bool useDynamicScale ); ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_dc6bc17c5d98
unity_docs
rendering
Explain 'Per-pixel and per-vertex lights' in Unity.
If you use the default Forward rendering path , each realtime Light component can be one of the following types: A per-pixel light, which lights each pixel of an object accurately. A per-vertex light, which lights each vertex of an object accurately. Unity interpolates lighting for the pixels between vertices. Per-pixe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_19b6fa628a96
unity_docs
scripting
What is `UIElements.EventBase.target` in Unity? Explain its purpose and usage.
EventBase.target public UIElements.IEventHandler target ; Description The target visual element that received this event. Unlike currentTarget, this target does not change when the event is sent to other elements along the propagation path.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_92ef62903d6d
unity_docs
editor
Explain 'Manage search indices' in Unity.
The Index Manager allows you to create, edit, and remove search indexes. Indexes update when you add or change content in your project. ## Index types Asset - An index of all Assets in a Project. This index is created automatically when you create a Project and rebuilds when you add or modify new content. The Asset i...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6a38cb25bbfa
unity_docs
scripting
What is `XR.MeshGenerationResult.Timestamp` in Unity? Explain its purpose and usage.
MeshGenerationResult.Timestamp public ulong Timestamp ; Description The timestamp associated with the generated mesh. Because generation is asynchronous, the transform provided by this MeshGenerationResult may be older than the most recent transform provided by XRMeshSubsystem.GetUpdatedMeshTransforms . Co...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_d531146bfd96
github
scripting
Write a Unity C# MonoBehaviour script called Translate Object
```csharp using UnityEngine; public class TranslateObject : MonoBehaviour { private Vector3 startPos; private Quaternion startRot; private void Start() { startPos = transform.position; startRot = transform.rotation; } public void TranslateX(float amount) { transf...
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_sr_3777f50c0a33
unity_docs
rendering
Give me an overview of the `Gizmos` class in Unity.
Gizmos class in UnityEngine / Implemented in: UnityEngine.CoreModule Description Gizmos are used to give visual debugging or setup aids in the Scene view. All gizmo drawing has to be done in either MonoBehaviour.OnDrawGizmos or MonoBehaviour.OnDrawGizmosSelected functions of the script. MonoBehaviour.OnDra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_90999d471240
unity_docs
physics
Explain 'Rays from the camera' in Unity.
Resources about calculating and using lines that point from the camera to positions in world space. Page Description Introduction to raycasting Learn about rays that point from the camera to a position in world space. Cast a ray from a camera Cast a ray and fetch information about what the ray hits. Move a camera along...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a669ed298bfa
unity_docs
scripting
What is `Undo.AddComponent` in Unity? Explain its purpose and usage.
Undo.AddComponent Declaration public static Component AddComponent ( GameObject gameObject , Type type ); Parameters Parameter Description gameObject The game object you want to add the component to. type The type of component you want to add. Returns Component The newly added component. Descrip...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0be16d000aa7
unity_docs
xr
What is `MPE.EventService.Request` in Unity? Explain its purpose and usage.
EventService.Request Declaration public static void Request (string eventType , Action<Exception,object[]> promiseHandler , object args , long timeoutInMs , MPE.EventDataSerialization eventDataSerialization ); Declaration public static void Request (string eventType , Action<Exception,object[]> promiseH...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8b6873111a4d
unity_docs
xr
What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerSummaryMetrics.AverageReadTimeMicroseconds` in Unity? Explain its purpose and usage.
AsyncReadManagerSummaryMetrics.AverageReadTimeMicroseconds public float AverageReadTimeMicroseconds ; Description The mean time taken for reading (excluding queue time), in microseconds, for read request metrics included in the summary calculation.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_797cd900c034
github
scripting
Write a Unity C# physics script for Projectile Rotation From Velocity
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Rigidbody))] public class ProjectileRotationFromVelocity : MonoBehaviour { private Rigidbody MyRigidbody; [Tooltip("If you want the forward direction of the flight of an object to be different tha...
You are a senior Unity engineer. Answer questions about Unity scripting, XR/VR development, and game systems with working code examples.
local_sr_d4032a6bbb70
unity_docs
rendering
Show me a Unity C# example demonstrating `WebCamTexture.Stop`.
WebCamTexture.Stop Declaration public void Stop (); Description Stops the camera. Call Application.RequestUserAuthorization before creating a WebCamTexture. ```csharp // Starts a camera and assigns the texture to the current renderer. // Stops the camera when the "Stop" button is clicked and released. using ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8c868b4b07f8
unity_docs
editor
In Unity's 'Simulated classes', what is 'Updating your scripts to use simulated classes' and how does it work?
If you want to convert existing code to use classes from the UnityEngine.Device namespace, it’s best practice to use alias directives . For example: ``` using Screen = UnityEngine.Device.Screen; using Application = UnityEngine.Device.Application; using SystemInfo = UnityEngine.Device.SystemInfo; ``` This way you can ch...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bb361a8f7dd6
unity_docs
scripting
What is `Build.Content.ResourceFile.serializedFile` in Unity? Explain its purpose and usage.
ResourceFile.serializedFile public bool serializedFile ; Description Bool to determine if this resource file represents serialized Unity objects (serialized file) or binary resource data. Internal use only. See ResourceFile .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_7504ed5dfbf7
unity_docs
rendering
In Unity's 'Draw and configure a trail behind a moving GameObject', what is 'Set the Trail Renderer Material' and how does it work?
By default, a Trail Renderer uses the built-in Material, Default-Line . You can make many changes to the appearance of the trail without changing this Material, such as editing the color gradient or width of the trail. For other effects, such as applying a texture to the trail, you will need to use a different Material...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_5b96ec760e07_doc_5
github
scripting
What does `StopCoroutine` do in this Unity script? Explain its purpose and signature.
Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.Name of coroutine. Signature: ```csharp protected void StopCoroutine(string methodName) ```
You are an experienced Unity developer specializing in C# scripting, XR/VR development, and performance optimization.
local_man_882932f43273
unity_docs
rendering
In Unity's 'Introduction to video transparency support in Unity', what is 'Alpha values' and how does it work?
An alpha value determines the level of transparency of a video or a pixel within a video. Alpha values can take on any value within the range 0 to 1 or 0 to 255. This range allows for smooth and gradual changes in transparency. Value Transparency level Lowest (0) Image or pixel is fully transparent. Highest (1 or 255) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_affb6c914837
unity_docs
physics
What is `IMGUI.Controls.JointAngularLimitHandle.angleHandleDrawFunction` in Unity? Explain its purpose and usage.
JointAngularLimitHandle.angleHandleDrawFunction public Handles.CapFunction angleHandleDrawFunction ; Description The CapFunction to use when displaying the angle control handle. Defaults to ArcHandle.DefaultAngleHandleDrawFunction for new instances of JointAngularLimitHandle . No angle handle will be dra...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.