mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-10 21:09:08 -05:00
prefab check
This commit is contained in:
@@ -349,6 +349,10 @@ namespace VRM
|
||||
var root = (GameObject)EditorGUILayout.ObjectField(ExportRoot, typeof(GameObject), true);
|
||||
UpdateRoot(root);
|
||||
|
||||
//
|
||||
// ここでも validate している。ここで失敗して return した場合は Export UI を表示しない
|
||||
//
|
||||
|
||||
//
|
||||
// root
|
||||
//
|
||||
@@ -367,6 +371,12 @@ namespace VRM
|
||||
Validation.Error("ExportRootに回転・拡大縮小は持てません。子階層で回転・拡大縮小してください").DrawGUI();
|
||||
return;
|
||||
}
|
||||
if (AssetDatabase.GetAssetPath(root) != null)
|
||||
{
|
||||
// is prefab
|
||||
Validation.Error("シーンに出していない Prefab はエクスポートできません(細かい挙動が違い、想定外の動作をところがあるため)。シーンに展開してからエクスポートしてください").DrawGUI();
|
||||
return;
|
||||
}
|
||||
if (HasRotationOrScale(ExportRoot))
|
||||
{
|
||||
if (m_settings.PoseFreeze)
|
||||
@@ -696,3 +706,4 @@ namespace VRM
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user