mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2026-01-04 23:46:51 +07:00
demo functionality
This commit is contained in:
@@ -22,8 +22,16 @@ namespace FTEditor.Postprocessors {
|
||||
{
|
||||
var swf_paths = imported_assets
|
||||
.Where(p => Path.GetExtension(p).ToLower().Equals(".swf"));
|
||||
foreach ( var swf_path in swf_paths ) {
|
||||
SwfFileProcess(swf_path);
|
||||
if ( swf_paths.Any() && SwfEditorUtils.IsDemoEnded ) {
|
||||
var title = "Demo version";
|
||||
var message =
|
||||
"This demo is for evaluation purpose only. " +
|
||||
"It means that you can't have more than 5 animation assets in the project.";
|
||||
EditorUtility.DisplayDialog(title, message, "Ok");
|
||||
} else {
|
||||
foreach ( var swf_path in swf_paths ) {
|
||||
SwfFileProcess(swf_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,27 @@ namespace FTEditor {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Demo
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#if FT_VERSION_DEMO
|
||||
public static bool IsDemoEnded {
|
||||
get {
|
||||
var guids = AssetDatabase.FindAssets("t:SwfAsset");
|
||||
return guids.Length >= 5;
|
||||
}
|
||||
}
|
||||
#else
|
||||
public static bool IsDemoEnded {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Menu
|
||||
|
||||
Reference in New Issue
Block a user