UniVRM/Assets/MeshUtility/Editor/ExportDialog/ExporterExtensions.cs
ousttrue 3c86952228 Export dialog のバリデーターを整理
* vrm-1.0 と共用にできるように移動
* 例外のcatch
2020-11-10 16:37:22 +09:00

19 lines
426 B
C#

using System.Linq;
using UnityEngine;
namespace MeshUtility
{
public static class ExporterExtensions
{
public static bool EnableForExport(this Component mono)
{
if (mono.transform.Ancestors().Any(x => !x.gameObject.activeSelf))
{
// 自分か祖先に !activeSelf がいる
return false;
}
return true;
}
}
}