Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix unable to change setting values in InspectorView #51

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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