Skip to content

Commit fc36949

Browse files
committed
Preserve Optional Fields state
1 parent 1ca01ee commit fc36949

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/Thirdweb/Editor/ThirdwebManagerEditor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class ThirdwebManagerEditor : Editor
5151
private Texture2D bannerImage;
5252

5353
private static readonly string ExpandedStateKey = "ThirdwebManagerEditor_ExpandedState_4.7.11";
54+
private static readonly string OptionalStateKey = "ThirdwebManagerEditor_OptionalState_4.7.11";
5455

5556
private void OnEnable()
5657
{
@@ -135,11 +136,16 @@ private void OnEnable()
135136
bannerImage = Resources.Load<Texture2D>("EditorBanner");
136137

137138
sectionExpanded = GetExpandedState();
139+
140+
showGaslessOptionalFields = EditorPrefs.GetBool($"{OptionalStateKey}_showGaslessOptionalFields", false);
141+
showSmartWalletOptionalFields = EditorPrefs.GetBool($"{OptionalStateKey}_showSmartWalletOptionalFields", false);
138142
}
139143

140144
private void OnDisable()
141145
{
142146
SetExpandedState(sectionExpanded);
147+
EditorPrefs.SetBool($"{OptionalStateKey}_showGaslessOptionalFields", showGaslessOptionalFields);
148+
EditorPrefs.SetBool($"{OptionalStateKey}_showSmartWalletOptionalFields", showSmartWalletOptionalFields);
143149
}
144150

145151
public override void OnInspectorGUI()

0 commit comments

Comments
 (0)