/******************************************************************************/ /* Project - MudBun Publisher - Long Bunny Labs http://LongBunnyLabs.com Author - Ming-Lun "Allen" Chou http://AllenChou.net */ /******************************************************************************/ using System.Collections.Generic; using UnityEditor; using UnityEngine; namespace MudBun { public class MudBunEditorWindowBase : EditorWindow where T : EditorWindow { private static Dictionary s_textures = new Dictionary(); internal static Texture2D GetTexture(string guid) { Texture2D texture; if (!s_textures.TryGetValue(guid, out texture) || texture == null) { texture = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guid)); s_textures[guid] = texture; } return texture; } } }