Skip to content

Commit

Permalink
Merge pull request #51 from suzuryg/fix/inspector-view-not-working
Browse files Browse the repository at this point in the history
fix: Fix unable to change setting values in InspectorView
  • Loading branch information
suzuryg authored Oct 16, 2023
2 parents bbbfb9e + f4285e6 commit f6c2e35
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ private void Field_MouthMorphBlendShape()
HelpBoxDrawer.InfoLayout(_localizationTable.InspectorView_Tooltip_ConfirmMouthMorphBlendShape);
}

_av3Setting.Update();
var useMouthMorphCancelClip = _av3Setting.FindProperty(nameof(AV3Setting.UseMouthMorphCancelClip));
var mouthMorphsProperty = _av3Setting.FindProperty(nameof(AV3Setting.MouthMorphs));
var mouthMorphs = GetValue<List<BlendShape>>(mouthMorphsProperty);
Expand Down Expand Up @@ -635,7 +634,6 @@ private void Field_MouthMorphBlendShape()
_localizationTable.Common_Delete, _localizationTable.Common_Cancel, isRiskyAction: true))
{
_av3Setting.FindProperty(nameof(AV3Setting.MouthMorphs)).ClearArray();
_av3Setting.ApplyModifiedProperties();
}
}

Expand All @@ -656,7 +654,6 @@ private void Field_ExcludedBlendShape()
HelpBoxDrawer.InfoLayout(_localizationTable.InspectorView_Hints_ExcludedBlendShapes);
}

_av3Setting.Update();
var excludedProperty = _av3Setting.FindProperty(nameof(AV3Setting.ExcludedBlendShapes));
var excluded = GetValue<List<BlendShape>>(excludedProperty);
_excludedBlendShapes.list = excluded; // Is it necessary to get every frame?
Expand All @@ -670,7 +667,6 @@ private void Field_ExcludedBlendShape()
_localizationTable.Common_Delete, _localizationTable.Common_Cancel, isRiskyAction: true))
{
_av3Setting.FindProperty(nameof(AV3Setting.ExcludedBlendShapes)).ClearArray();
_av3Setting.ApplyModifiedProperties();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,44 @@ namespace Suzuryg.FaceEmo.Components
{
public class FaceEmoLauncherComponent : MonoBehaviour
{
[HideInInspector] public int InstanceId;
[HideInInspector] public AV3Setting AV3Setting;
[HideInInspector] public ThumbnailSetting ThumbnailSetting;
[HideInInspector] public ExpressionEditorSetting ExpressionEditorSetting;
[HideInInspector] public HierarchyViewState HierarchyViewState;
[HideInInspector] public MenuItemListViewState MenuItemListViewState;
[HideInInspector] public ViewSelection ViewSelection;
[HideInInspector] public InspectorViewState InspectorViewState;
#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public int InstanceId;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public AV3Setting AV3Setting;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public ThumbnailSetting ThumbnailSetting;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public ExpressionEditorSetting ExpressionEditorSetting;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public HierarchyViewState HierarchyViewState;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public MenuItemListViewState MenuItemListViewState;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public ViewSelection ViewSelection;

#if !SHOW_FACE_EMO_FIELDS
[HideInInspector]
#endif
public InspectorViewState InspectorViewState;
}
}
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ PlayerSettings:
webGLThreadsSupport: 0
webGLWasmStreaming: 0
scriptingDefineSymbols:
1: TPS;VRC_SDK_VRCSDK3
1: TPS;VRC_SDK_VRCSDK3;SHOW_FACE_EMO_FIELDS
platformArchitecture: {}
scriptingBackend: {}
il2cppCompilerConfiguration:
Expand Down

0 comments on commit f6c2e35

Please sign in to comment.