Model Baker Updates

...
Added fps to book data.
Cleanup.
Preparing LOD generation.
This commit is contained in:
max
2021-01-14 00:45:25 +01:00
parent 322b50b2bd
commit d3b4d34409
20 changed files with 1009 additions and 838 deletions

View File

@ -0,0 +1,47 @@
using UnityEngine;
using UnityEditor;
namespace TAO.VertexAnimation.Editor
{
public static class AssetDatabaseUtils
{
public static bool HasChildAsset(Object parent, Object child)
{
var assets = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(parent));
foreach (var a in assets)
{
if (a == child)
{
return true;
}
}
return false;
}
public static void RemoveChildAssets(Object parent, Object[] filter = null)
{
var assets = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(parent));
foreach (var a in assets)
{
bool filterSkip = false;
foreach (var f in filter)
{
if (a == f)
{
filterSkip = true;
break;
}
}
if (!filterSkip && a != parent)
{
AssetDatabase.RemoveObjectFromAsset(a);
}
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d394aa43ff9889d45878e965ac0f1a30
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -68,6 +68,7 @@ namespace TAO.VertexAnimation.Editor
using (new EditorGUILayout.VerticalScope())
{
EditorGUILayout.LabelField("General", EditorStyles.centeredGreyMiniLabel);
EditorGUILayout.PropertyField(editorData.FindPropertyRelative("fps"));
EditorGUILayout.PropertyField(editorData.FindPropertyRelative("maxFrames"));
}
}