Skip to content

Commit 035cc65

Browse files
Selva1910timbotimbo
authored andcommitted
Required Bug Fixes
- Prefs not Initializing so that the toggle state was not synced - Uncommented Addressables Headers - Added Name References for Addressables to Editor AsmDef
1 parent 02e27e1 commit 035cc65

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
#if USING_ADDRESSABLES
1212
// uncomment for addressables
13-
//using UnityEditor.AddressableAssets;
14-
//using UnityEditor.AddressableAssets.Settings;
13+
using UnityEditor.AddressableAssets;
14+
using UnityEditor.AddressableAssets.Settings;
1515
#endif
1616

1717
namespace FlutterUnityIntegration.Editor
@@ -148,9 +148,15 @@ private void Apply()
148148
}
149149

150150
private void OnEnable()
151+
{
152+
InitPrefs();
153+
}
154+
private void InitPrefs()
151155
{
152156
_pluginMode = EditorPrefs.GetBool(_persistentKey, false);
157+
_usingAddressables = EditorPrefs.GetBool(_persistentKeyHasAddressable, false);
153158
}
159+
154160
//#endregion
155161

156162

example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/FlutterUnityIntegration.Editor.asmdef

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "FlutterUnityIntegration.Editor",
33
"rootNamespace": "FlutterUnityIntegration.Editor",
4-
"references": [],
4+
"references": [
5+
"Unity.Addressables.Editor"
6+
],
57
"includePlatforms": [
68
"Editor"
79
],

0 commit comments

Comments
 (0)