Skip to content

Commit 03a8ade

Browse files
committed
add warning dialog when converting with compatible naming
1 parent 88ff7f8 commit 03a8ade

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Assets/FbxExporters/Editor/ConvertToPrefabEditorWindow.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ protected override bool Export ()
105105
return false;
106106
}
107107

108+
if (SettingsObject.UseMayaCompatibleNames && SettingsObject.AllowSceneModification)
109+
{
110+
// give a warning dialog that indicates that names in the scene may change
111+
int result = UnityEditor.EditorUtility.DisplayDialogComplex(
112+
string.Format("{0} Warning", ModelExporter.PACKAGE_UI_NAME),
113+
"Names of objects in the hierarchy may change with the Compatible Naming option turned on",
114+
"OK", "Convert Without Compatible Naming", "Cancel");
115+
if (result == 1)
116+
{
117+
// turn compatible naming off
118+
SettingsObject.SetUseMayaCompatibleNames(false);
119+
}
120+
else if (result == 2)
121+
{
122+
return false;
123+
}
124+
}
125+
108126
if (ToExport.Length == 1) {
109127
var go = ModelExporter.GetGameObject (ToExport [0]);
110128

0 commit comments

Comments
 (0)