实现bake的自动化,但是autoorient的重建还是需要一些优化
Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
@@ -938,6 +938,30 @@ namespace Ichni.Editor
|
||||
UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
|
||||
#endif
|
||||
}
|
||||
public static void TrybakeAllMesh()
|
||||
{
|
||||
EditorManager.instance.beatmapContainer.gameElementList.OfType<Track>().ToList().ForEach(
|
||||
track =>
|
||||
{
|
||||
if (track.trackTimeSubmodule is TrackTimeSubmoduleMovable ||
|
||||
track.trackRendererSubmodule is TrackRendererSubmoduleAutoOrient ||
|
||||
track.childElementList.OfType<Scale>().Count() > 0 ||
|
||||
(track.trackPathSubmodule.pathNodeList.Any(o => o.childElementList.OfType<AnimationBase>().Count() == 0) == false))
|
||||
{
|
||||
Debug.LogWarning("TrackRendererSubmodule.getMeshFromGenerator: Track has animation, cannot get mesh.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
track.Refresh();
|
||||
|
||||
track.trackRendererSubmodule?.meshGenerator.Bake(true, false);
|
||||
|
||||
track.Refresh();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加 Tag Matcher 到 TagManager
|
||||
|
||||
Reference in New Issue
Block a user