public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Preload to Resources 预加载到资源")) { GifUtil.PreloadToResources(_target.GifBytes); AssetDatabase.Refresh(); EditorUtility.DisplayDialog("Message", "Preloaded, please check the checkbox!\r\n\r\n预加载完毕,请勾选Preloaded!", "OK"); } }
protected override void Awake() { if (!GifBytes) { Debug.LogError("UnityGif@" + name + ": GifBytes is null, Check GifBytes 请检查文件流"); return; } base.Awake(); if (Preloaded) { Frames = GifUtil.GetFramesFromResources(GifBytes); } else { Frames = GifUtil.GetFrames(GifBytes); } }