#if UNITY_EDITOR using UnityEditor; namespace UnityEngine.InputSystem.Editor { // Note that non-existing caching here is intentional since icon selected might be theme dependent. // There is no reason to cache icons unless there is a significant performance impact on the editor. /// /// Provides access to icons associated with and . /// internal static class InputActionAssetIconLoader { private const string kActionIcon = "Packages/com.unity.inputsystem/InputSystem/Editor/Icons/InputAction.png"; private const string kAssetIcon = "Packages/com.unity.inputsystem/InputSystem/Editor/Icons/InputActionAsset.png"; /// /// Attempts to load the icon associated with an . /// /// Icon resource reference or null if the resource could not be loaded. internal static Texture2D LoadAssetIcon() { return (Texture2D)EditorGUIUtility.Load(kAssetIcon); } /// /// Attempts to load the icon associated with an sub-asset of an /// . /// /// Icon resource reference or null if the resource could not be loaded. internal static Texture2D LoadActionIcon() { return (Texture2D)EditorGUIUtility.Load(kActionIcon); } } } #endif // #if UNITY_EDITOR