Compare commits

...

3 Commits

Author SHA1 Message Date
cbc8bbd20f 1.3.13 2018-10-30 01:50:19 +07:00
0a2a0de800 new icons 2018-10-30 01:49:08 +07:00
9217dee8c2 Fix preview shutdown warning 2018-10-29 23:06:51 +07:00
21 changed files with 31 additions and 11 deletions

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@ obj/*
Temp/*
Library/*
.vs/*
FTSources/.vs/*
FTSources/FTEditor/obj/*
FTSources/FTRuntime/obj/*

View File

@@ -1,3 +1,6 @@
###### Version 1.3.13
* Fix preview shutdown warning
###### Version 1.3.12
* Upgrade to minimal LTS version
* Fix anchor frame label detector

View File

@@ -8,9 +8,9 @@ using FTRuntime;
namespace FTEditor.Editors {
[CustomPreview(typeof(SwfClipAsset))]
class SwfClipAssetPreview : ObjectPreview {
int _sequence = 0;
static MaterialPropertyBlock _matPropBlock = null;
static PreviewRenderUtility _previewUtils = null;
int _sequence = 0;
MaterialPropertyBlock _matPropBlock = null;
PreviewRenderUtility _previewUtils = null;
Sprite targetSprite {
get {
@@ -142,6 +142,11 @@ namespace FTEditor.Editors {
: 0;
}
public void Shutdown() {
_matPropBlock.Clear();
_previewUtils.Cleanup();
}
// ---------------------------------------------------------------------
//
// Messages

View File

@@ -131,7 +131,7 @@ namespace FTEditor.Editors {
}
void SetupPreviews() {
_previews.Clear();
ShutdownPreviews();
foreach ( var clip in _clips.Where(p => !!p.clip) ) {
var preview = new SwfClipAssetPreview();
preview.Initialize(new Object[]{clip.clip});
@@ -139,18 +139,29 @@ namespace FTEditor.Editors {
}
}
// ---------------------------------------------------------------------
//
// Messages
//
// ---------------------------------------------------------------------
void ShutdownPreviews() {
foreach ( var p in _previews ) {
p.Value.Shutdown();
}
_previews.Clear();
}
void OnEnable() {
// ---------------------------------------------------------------------
//
// Messages
//
// ---------------------------------------------------------------------
void OnEnable() {
_clips = targets.OfType<SwfClip>().ToList();
SetupPreviews();
}
public override void OnInspectorGUI() {
void OnDisable() {
ShutdownPreviews();
}
public override void OnInspectorGUI() {
serializedObject.Update();
DrawDefaultInspector();
DrawSequence();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

BIN
ProjectStuff/Promo/Icon.psd Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB