Skip to content

Commit

Permalink
Merge pull request #1081 from ousttrue/fix10/ApplyModifiedProperties
Browse files Browse the repository at this point in the history
ApplyModifiedProperties
  • Loading branch information
PoChang007 authored Jun 29, 2021
2 parents fa9969f + 94f2d9f commit dfbb953
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Assets/VRM10/Editor/Vrm10ExportDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,12 @@ VRM10Object Vrm
{
return;
}
if (m_metaEditor != null)
{
m_metaEditor = null;
}
m_metaEditor = default;
m_meta = value;
}
}
VRM10Object m_tmpObject;
VRM10MetaEditor m_metaEditor;
(VRM10MetaEditor, SerializedObject) m_metaEditor;

protected override void Initialize()
{
Expand Down Expand Up @@ -238,18 +235,22 @@ protected override bool DoGUI(bool isValid)
switch (_tab)
{
case Tabs.Meta:
if (m_metaEditor == null)
if (m_metaEditor.Item1 == null)
{
SerializedObject so;
if (m_meta != null)
{
m_metaEditor = VRM10MetaEditor.Create(new SerializedObject(Vrm));
so = new SerializedObject(Vrm);
}
else
{
m_metaEditor = VRM10MetaEditor.Create(new SerializedObject(m_tmpObject));
so = new SerializedObject(m_tmpObject);
}
m_metaEditor = (VRM10MetaEditor.Create(so), so);
}
m_metaEditor.OnInspectorGUI();
m_metaEditor.Item2.Update();
m_metaEditor.Item1.OnInspectorGUI();
m_metaEditor.Item2.ApplyModifiedProperties();
break;

case Tabs.Mesh:
Expand Down

0 comments on commit dfbb953

Please sign in to comment.