mirror of
https://github.com/maxartz15/VertexAnimation.git
synced 2024-12-04 17:20:44 +01:00
ApplyAnimationBounds option.
This commit is contained in:
parent
43049094af
commit
b16b0aedcd
@ -37,6 +37,7 @@ namespace TAO.VertexAnimation.Editor
|
||||
private void BakeGUI()
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("lodSettings").FindPropertyRelative("lodSettings"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("applyAnimationBounds"));
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("generateAnimationBook"));
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
|
@ -18,6 +18,7 @@ namespace TAO.VertexAnimation.Editor
|
||||
public bool includeInactive = false;
|
||||
|
||||
public LODSettings lodSettings = new LODSettings();
|
||||
public bool applyAnimationBounds = true;
|
||||
public bool generateAnimationBook = true;
|
||||
public bool generatePrefab = true;
|
||||
public Shader materialShader = null;
|
||||
@ -117,8 +118,12 @@ namespace TAO.VertexAnimation.Editor
|
||||
};
|
||||
|
||||
for (int i = 0; i < meshes.Length; i++)
|
||||
{
|
||||
if (applyAnimationBounds)
|
||||
{
|
||||
meshes[i].bounds = bounds;
|
||||
}
|
||||
|
||||
meshes[i].Finalize();
|
||||
AssetDatabase.AddObjectToAsset(meshes[i], this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user