Skip to content

Commit c3f2709

Browse files
committed
Work on EditorWindow
1 parent fb11c3b commit c3f2709

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

Assets/FbxExporters/Editor/FbxPrefabAutoUpdater.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ public class UpdateList
632632
{
633633
// We build up a flat list of names for the nodes of the old fbx,
634634
// the new fbx, and the prefab. We also figure out the parents.
635-
class Data {
635+
public class Data {
636636
// Parent of each node, by name.
637637
// The empty-string name is the root of the prefab/fbx.
638638
// Never null.
@@ -738,7 +738,15 @@ public List<string> GetComponentValues(string name, string typename)
738738
/// <summary>
739739
/// Data for the hierarchy of the old fbx file, the new fbx file, and the prefab.
740740
/// </summary>
741-
Data m_oldFbxData, m_newFbxData, m_prefabData;
741+
static Data m_oldFbxData, m_newFbxData, m_prefabData;
742+
743+
public static Data OldFbxData
744+
{
745+
get
746+
{
747+
return m_oldFbxData;
748+
}
749+
}
742750

743751
/// <summary>
744752
/// Names of the new nodes to create in step 1.

Assets/FbxExporters/Editor/FbxPrefabInspector.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@ public override void OnInspectorGUI() {
3333

3434
EditorGUILayout.PropertyField(m_GameObjectProp, true);
3535

36+
if (GUILayout.Button("Update prefab manually..."))
37+
{
38+
// Get existing open window or if none, make a new one:
39+
ManualUpdateEditorWindow window = (ManualUpdateEditorWindow)EditorWindow.GetWindow(typeof(ManualUpdateEditorWindow));
40+
window.Show();
41+
}
42+
43+
3644
#if FBXEXPORTER_DEBUG
37-
EditorGUILayout.LabelField ("Debug info:");
45+
EditorGUILayout.LabelField ("Debug info:");
3846
try {
3947
fbxPrefabUtility.GetFbxHistory().ToJson();
4048
} catch(System.Exception xcp) {

0 commit comments

Comments
 (0)