private static void CloseDialog() { if (s_window != null) { try { s_window.Close(); } catch (Exception ex) { Debug.LogError("Close Exception : " + ex); } s_window = null; } }
private static object ShowDialog(FUNC_RETARGET_SINGLE_POSE_IMPORT_ANIM funcResult_Anim, FUNC_RETARGET_SINGLE_POSE_IMPORT_MOD funcResult_Mod, apEditor editor, apMeshGroup targetMeshGroup, apModifierBase targetModifier, apModifierParamSet targetParamSet, //<<일반 Modifier에서 작업하는 경우 apAnimClip targetAnimClip, apAnimTimeline targetAnimTimeline, int targetFrame //<<애니메이션에서 Pose를 여는 경우 ) { CloseDialog(); if (editor == null || editor._portrait == null || editor._portrait._controller == null) { return(null); } EditorWindow curWindow = EditorWindow.GetWindow(typeof(apDialog_RetargetSinglePoseImport), true, "Import Pose", true); apDialog_RetargetSinglePoseImport curTool = curWindow as apDialog_RetargetSinglePoseImport; object loadKey = new object(); if (curTool != null && curTool != s_window) { int width = 500; int height = 700; s_window = curTool; s_window.position = new Rect((editor.position.xMin + editor.position.xMax) / 2 - (width / 2), (editor.position.yMin + editor.position.yMax) / 2 - (height / 2), width, height); s_window.Init(funcResult_Anim, funcResult_Mod, editor, loadKey, targetMeshGroup, targetModifier, targetParamSet, targetAnimClip, targetAnimTimeline, targetFrame); return(loadKey); } else { return(null); } }