gg.easy.airship 0.1.2109 → 0.1.2111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/BuildMenu.cs +20 -5
- package/Editor/CreateAssetBundles.cs +3 -3
- package/Editor/Publish/Deploy.cs +11 -10
- package/Editor/TypescriptServices/Editor/TypescriptOptions.cs +9 -14
- package/Editor/TypescriptServices/TypescriptServices.cs +0 -1
- package/Editor/Util/AirshipEditorGUI.cs +4 -2
- package/Runtime/Code/Accessories/Clothing/PlatformGear.cs +17 -2
- package/Runtime/Code/Auth/AuthManager.cs +63 -51
- package/Runtime/Code/UI/ManageFullscreenSwitch.cs +9 -10
- package/package.json +1 -1
- package/Runtime/Code/Accessories/Clothing/PlatformGearManager.cs +0 -22
- package/Runtime/Code/Accessories/Clothing/PlatformGearManager.cs.meta +0 -3
package/Editor/BuildMenu.cs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#if UNITY_EDITOR
|
|
2
2
|
using System;
|
|
3
|
+
using System.Collections.Generic;
|
|
3
4
|
using UnityEditor;
|
|
4
5
|
using UnityEditor.Build;
|
|
6
|
+
using UnityEditor.Build.Profile;
|
|
5
7
|
using UnityEditor.Build.Reporting;
|
|
6
8
|
using UnityEngine;
|
|
7
9
|
#if UNITY_EDITOR_OSX
|
|
@@ -226,11 +228,24 @@ namespace Editor {
|
|
|
226
228
|
|
|
227
229
|
PlayerSettings.SplashScreen.show = false;
|
|
228
230
|
PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP);
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
PlayerSettings.Android.splitApplicationBinary = !development;
|
|
232
|
+
|
|
233
|
+
BuildProfile buildProfile;
|
|
234
|
+
if (development) {
|
|
235
|
+
buildProfile = AssetDatabase.LoadAssetAtPath<BuildProfile>("Assets/Settings/Build Profiles/Android Debug.asset");
|
|
236
|
+
} else {
|
|
237
|
+
buildProfile = AssetDatabase.LoadAssetAtPath<BuildProfile>("Assets/Settings/Build Profiles/Android Google Play.asset");
|
|
238
|
+
}
|
|
239
|
+
var options = new BuildPlayerWithProfileOptions();
|
|
240
|
+
var editorBuildScenes = new List<EditorBuildSettingsScene>();
|
|
241
|
+
foreach (var sceneName in scenes) {
|
|
242
|
+
editorBuildScenes.Add(new EditorBuildSettingsScene(sceneName, true));
|
|
243
|
+
}
|
|
244
|
+
buildProfile.overrideGlobalScenes = true;
|
|
245
|
+
buildProfile.scenes = editorBuildScenes.ToArray();
|
|
246
|
+
options.buildProfile = buildProfile;
|
|
247
|
+
options.locationPathName = $"build/client_android/{ClientExecutableName}.{(development ? "apk" : "aab")}";
|
|
248
|
+
if (development) {
|
|
234
249
|
options.options = BuildOptions.Development;
|
|
235
250
|
}
|
|
236
251
|
|
|
@@ -237,7 +237,7 @@ public static class CreateAssetBundles {
|
|
|
237
237
|
}
|
|
238
238
|
#endif
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
public static GameConfig BuildGameConfig() {
|
|
241
241
|
GameConfig gameConfig = GameConfig.Load();
|
|
242
242
|
|
|
243
243
|
// Update tags
|
|
@@ -264,7 +264,7 @@ public static class CreateAssetBundles {
|
|
|
264
264
|
return gameConfig;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
public static bool BuildGameAssetBundles(AirshipPlatform platform, bool useCache = true) {
|
|
268
268
|
ResetScenes();
|
|
269
269
|
|
|
270
270
|
if (!PrePublishChecks()) {
|
|
@@ -277,7 +277,7 @@ public static class CreateAssetBundles {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
var sw = Stopwatch.StartNew();
|
|
280
|
-
var gameConfig =
|
|
280
|
+
var gameConfig = GameConfig.Load();
|
|
281
281
|
if(!gameConfig){
|
|
282
282
|
return false;
|
|
283
283
|
}
|
package/Editor/Publish/Deploy.cs
CHANGED
|
@@ -42,7 +42,7 @@ public class Deploy {
|
|
|
42
42
|
// NetworkPrefabManager.WriteAllCollections();
|
|
43
43
|
// Sort the current platform first to speed up build time
|
|
44
44
|
List<AirshipPlatform> platforms = new();
|
|
45
|
-
var gameConfig =
|
|
45
|
+
var gameConfig = CreateAssetBundles.BuildGameConfig();
|
|
46
46
|
if (gameConfig.supportsMobile) {
|
|
47
47
|
platforms.Add(AirshipPlatform.iOS);
|
|
48
48
|
platforms.Add(AirshipPlatform.Android);
|
|
@@ -122,8 +122,7 @@ public class Deploy {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// Rebuild Typescript
|
|
125
|
-
var
|
|
126
|
-
var shouldRecompile = !skipBuild || !skipRecompileOnCodeDeploy;
|
|
125
|
+
var shouldRecompile = !skipBuild;
|
|
127
126
|
var shouldResumeTypescriptWatch = shouldRecompile && TypescriptCompilationService.IsWatchModeRunning;
|
|
128
127
|
|
|
129
128
|
// We want to do a full publish
|
|
@@ -303,15 +302,17 @@ public class Deploy {
|
|
|
303
302
|
// UploadSingleGameFile(urls.Windows_client_scenes, $"{AirshipPlatform.Windows}/client/scenes", AirshipPlatform.Windows),
|
|
304
303
|
UploadSingleGameFile(urls.Windows_shared_resources, $"{AirshipPlatform.Windows}/shared/resources", AirshipPlatform.Windows),
|
|
305
304
|
UploadSingleGameFile(urls.Windows_shared_scenes, $"{AirshipPlatform.Windows}/shared/scenes", AirshipPlatform.Windows),
|
|
305
|
+
});
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
307
|
+
if (gameConfig.supportsMobile) {
|
|
308
|
+
uploadList.AddRange(new List<IEnumerator>() {
|
|
309
|
+
UploadSingleGameFile(urls.iOS_shared_resources, $"{AirshipPlatform.iOS}/shared/resources", AirshipPlatform.iOS),
|
|
310
|
+
UploadSingleGameFile(urls.iOS_shared_scenes, $"{AirshipPlatform.iOS}/shared/scenes", AirshipPlatform.iOS),
|
|
311
311
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
UploadSingleGameFile(urls.Android_shared_resources, $"{AirshipPlatform.Android}/shared/resources", AirshipPlatform.Android),
|
|
313
|
+
UploadSingleGameFile(urls.Android_shared_scenes, $"{AirshipPlatform.Android}/shared/scenes", AirshipPlatform.Android),
|
|
314
|
+
});
|
|
315
|
+
}
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
// wait for all
|
|
@@ -143,13 +143,6 @@ namespace Airship.Editor {
|
|
|
143
143
|
EditorGUILayout.ToggleLeft(new GUIContent("Automatically Run on Editor Startup", "Compilation of TypeScript files will be handled by the editor"), projectSettings.typescriptAutostartCompiler);
|
|
144
144
|
projectSettings.typescriptPreventPlayOnError =
|
|
145
145
|
EditorGUILayout.ToggleLeft(new GUIContent("Prevent Play Mode With Errors", "Stop being able to go into play mode if there are active compiler errors"), projectSettings.typescriptPreventPlayOnError);
|
|
146
|
-
|
|
147
|
-
localSettings.skipCompileOnCodeDeploy =
|
|
148
|
-
EditorGUILayout.ToggleLeft(new GUIContent("Skip Compile on Code Publish *", "This will skip compilation on code publish"), localSettings.skipCompileOnCodeDeploy);
|
|
149
|
-
|
|
150
|
-
if (localSettings.skipCompileOnCodeDeploy) {
|
|
151
|
-
EditorGUILayout.HelpBox("Skipping compilation on code deploy may speed up the deploy, but it has a very small chance of publishing broken code if the watch state is incorrect.", MessageType.Warning);
|
|
152
|
-
}
|
|
153
146
|
}
|
|
154
147
|
AirshipEditorGUI.EndSettingGroup();
|
|
155
148
|
|
|
@@ -169,8 +162,6 @@ namespace Airship.Editor {
|
|
|
169
162
|
|
|
170
163
|
|
|
171
164
|
projectSettings.typescriptVerbose = EditorGUILayout.ToggleLeft(new GUIContent("Verbose Output", "Will display much more verbose information when compiling a TypeScript project"), projectSettings.typescriptVerbose );
|
|
172
|
-
|
|
173
|
-
|
|
174
165
|
|
|
175
166
|
#if AIRSHIP_INTERNAL
|
|
176
167
|
projectSettings.typescriptWriteOnlyChanged = EditorGUILayout.ToggleLeft(new GUIContent("Write Only Changed", "Will write only changed files (this shouldn't be enabled unless there's a good reason for it)"), projectSettings.typescriptWriteOnlyChanged);
|
|
@@ -178,8 +169,8 @@ namespace Airship.Editor {
|
|
|
178
169
|
}
|
|
179
170
|
AirshipEditorGUI.EndSettingGroup();
|
|
180
171
|
|
|
181
|
-
EditorGUILayout.Space(10);
|
|
182
|
-
EditorGUILayout.LabelField("* This property only applies to your instance of the project");
|
|
172
|
+
// EditorGUILayout.Space(10);
|
|
173
|
+
// EditorGUILayout.LabelField("* This property only applies to your instance of the project");
|
|
183
174
|
|
|
184
175
|
if (GUI.changed) {
|
|
185
176
|
projectSettings.Modify();
|
|
@@ -266,13 +257,17 @@ namespace Airship.Editor {
|
|
|
266
257
|
}
|
|
267
258
|
}
|
|
268
259
|
|
|
260
|
+
private static GUIContent projectSettingsIcon;
|
|
261
|
+
private static GUIContent userSettingsIcon;
|
|
262
|
+
|
|
269
263
|
private static TypescriptOptionsTab selectedTab;
|
|
270
264
|
internal static void RenderSettings() {
|
|
271
|
-
|
|
265
|
+
projectSettingsIcon ??= EditorGUIUtility.IconContent("Project");
|
|
266
|
+
userSettingsIcon ??= EditorGUIUtility.IconContent("BuildSettings.Standalone.Small");
|
|
272
267
|
|
|
273
268
|
selectedTab = (TypescriptOptionsTab) AirshipEditorGUI.BeginTabs((int) selectedTab, new[] {
|
|
274
|
-
"Project Settings",
|
|
275
|
-
"
|
|
269
|
+
new GUIContent(" Project Settings", projectSettingsIcon.image),
|
|
270
|
+
new GUIContent(" User Settings", userSettingsIcon.image)
|
|
276
271
|
});
|
|
277
272
|
{
|
|
278
273
|
if (selectedTab == TypescriptOptionsTab.ProjectSettings) {
|
|
@@ -16,7 +16,6 @@ namespace Airship.Editor {
|
|
|
16
16
|
internal class TypescriptServicesLocalConfig : ScriptableSingleton<TypescriptServicesLocalConfig> {
|
|
17
17
|
[SerializeField]
|
|
18
18
|
internal bool hasInitialized = false;
|
|
19
|
-
[SerializeField] internal bool skipCompileOnCodeDeploy = false;
|
|
20
19
|
|
|
21
20
|
public void Modify() {
|
|
22
21
|
Save(true);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
2
4
|
using Editor.EditorInternal;
|
|
3
5
|
using UnityEditor;
|
|
4
6
|
using UnityEngine;
|
|
@@ -66,8 +68,8 @@ public class AirshipEditorGUI {
|
|
|
66
68
|
int right = Mathf.RoundToInt((tabIndex + 1) * tabWidth);
|
|
67
69
|
return new Rect(rect.x + left, rect.y, right - left, /* kTabButtonHeight */ TabButtonHeight);
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
internal static int BeginTabs(int selectedIndex,
|
|
71
|
+
|
|
72
|
+
internal static int BeginTabs(int selectedIndex, GUIContent[] tabs) {
|
|
71
73
|
var rect = EditorGUILayout.BeginVertical(new GUIStyle("FrameBox"));
|
|
72
74
|
GUILayoutUtility.GetRect(10, TabButtonHeight);
|
|
73
75
|
|
|
@@ -8,6 +8,16 @@ using UnityEngine.Networking;
|
|
|
8
8
|
using UnityEngine.Serialization;
|
|
9
9
|
|
|
10
10
|
namespace Code.Accessories.Clothing {
|
|
11
|
+
public class PlatformGearBundleInfo {
|
|
12
|
+
public AssetBundle assetBundle;
|
|
13
|
+
public PlatformGearBundleManifest manifest;
|
|
14
|
+
|
|
15
|
+
public PlatformGearBundleInfo(AssetBundle assetBundle, PlatformGearBundleManifest manifest) {
|
|
16
|
+
this.assetBundle = assetBundle;
|
|
17
|
+
this.manifest = manifest;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
/**
|
|
12
22
|
* Clothing exists on the backend and consists of one or many accessories.
|
|
13
23
|
* Usually it's just one accessory (ie: a hat)
|
|
@@ -21,10 +31,15 @@ namespace Code.Accessories.Clothing {
|
|
|
21
31
|
public AccessoryFace face;
|
|
22
32
|
|
|
23
33
|
public static Dictionary<string, Task<bool>> inProgressDownloads = new();
|
|
34
|
+
/// <summary>
|
|
35
|
+
/// AirId to asset bundle
|
|
36
|
+
/// </summary>
|
|
37
|
+
public static Dictionary<string, PlatformGearBundleInfo> loadedPlatformGearBundles = new();
|
|
24
38
|
|
|
25
39
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
|
26
40
|
public static void OnReload() {
|
|
27
41
|
inProgressDownloads.Clear();
|
|
42
|
+
loadedPlatformGearBundles.Clear();
|
|
28
43
|
}
|
|
29
44
|
|
|
30
45
|
public static async Task<PlatformGear> DownloadYielding(string classId, string airId) {
|
|
@@ -38,7 +53,7 @@ namespace Code.Accessories.Clothing {
|
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
// Check if we already loaded an asset bundle that contains this clothing piece.
|
|
41
|
-
if (
|
|
56
|
+
if (loadedPlatformGearBundles.TryGetValue(airId, out var loadedBundleInfo)) {
|
|
42
57
|
foreach (var clothing in loadedBundleInfo.manifest.gearList) {
|
|
43
58
|
if (clothing.classId == classId) {
|
|
44
59
|
return clothing;
|
|
@@ -83,7 +98,7 @@ namespace Code.Accessories.Clothing {
|
|
|
83
98
|
|
|
84
99
|
await manifestReq;
|
|
85
100
|
var manifest = (PlatformGearBundleManifest) manifestReq.asset;
|
|
86
|
-
|
|
101
|
+
loadedPlatformGearBundles[airId] = new PlatformGearBundleInfo(bundle, manifest);
|
|
87
102
|
foreach (var clothing in manifest.gearList) {
|
|
88
103
|
if (clothing.classId == classId) {
|
|
89
104
|
inProgressTask.SetResult(true);
|
|
@@ -15,71 +15,71 @@ using UnityEngine.Networking;
|
|
|
15
15
|
public class AuthManager {
|
|
16
16
|
public static Action authed;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
private static string GetAccountJSONPath() {
|
|
19
19
|
var stagingExtension = "";
|
|
20
20
|
#if AIRSHIP_STAGING
|
|
21
21
|
stagingExtension = "_staging";
|
|
22
22
|
#endif
|
|
23
23
|
#if DEVELOPMENT_BUILD
|
|
24
|
-
|
|
24
|
+
return Path.Combine(Application.persistentDataPath, $"account_devbuild{stagingExtension}.json");
|
|
25
25
|
#endif
|
|
26
26
|
#if UNITY_EDITOR
|
|
27
|
-
|
|
27
|
+
return Path.Combine(Application.persistentDataPath, $"account_editor{stagingExtension}.json");
|
|
28
28
|
#endif
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return Path.Combine(Application.persistentDataPath, $"account{stagingExtension}.json");
|
|
30
|
+
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
[CanBeNull]
|
|
33
|
+
public static AuthSave GetSavedAccount() {
|
|
34
|
+
var path = GetAccountJSONPath();
|
|
35
|
+
if (!File.Exists(path)) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
try {
|
|
40
|
+
var authSave = JsonUtility.FromJson<AuthSave>(File.ReadAllText(path));
|
|
41
|
+
return authSave;
|
|
42
|
+
} catch (Exception e) {
|
|
43
|
+
Debug.LogError(e);
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
public static void SaveAuthAccount(string refreshToken) {
|
|
49
|
+
var authSave = new AuthSave {
|
|
50
|
+
refreshToken = refreshToken,
|
|
51
|
+
time = DateTimeOffset.Now.ToUnixTimeSeconds()
|
|
52
|
+
};
|
|
53
|
+
var path = GetAccountJSONPath();
|
|
54
|
+
File.WriteAllText(path, JsonUtility.ToJson(authSave));
|
|
55
|
+
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
public static async Task<FirebaseTokenResponse> LoginWithRefreshToken(string refreshToken) {
|
|
58
|
+
var body = $"grantType=refresh_token&refresh_token={refreshToken}";
|
|
59
|
+
var req = UnityWebRequest.PostWwwForm("https://securetoken.googleapis.com/v1/token?key=" + AirshipApp.firebaseApiKey + "&" + body, "");
|
|
60
|
+
req.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
61
|
+
await req.SendWebRequest();
|
|
62
|
+
if (req.result == UnityWebRequest.Result.ProtocolError) {
|
|
63
|
+
Debug.LogError(req.error);
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return JsonUtility.FromJson<FirebaseTokenResponse>(req.downloadHandler.text);
|
|
67
|
+
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
public static void ClearSavedAccount() {
|
|
70
70
|
#if UNITY_EDITOR
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
InternalHttpManager.editorAuthToken = "";
|
|
72
|
+
InternalHttpManager.editorUserId = "";
|
|
73
73
|
#else
|
|
74
|
-
|
|
74
|
+
InternalHttpManager.authToken = "";
|
|
75
75
|
#endif
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
var path = GetAccountJSONPath();
|
|
77
|
+
if (File.Exists(path)) {
|
|
78
|
+
File.Delete(path);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
public static async Task<(bool success, string error)> AuthWithGoogle() {
|
|
83
83
|
#if AIRSHIP_STAGING
|
|
84
84
|
string clientId = "987279961241-0mjidme48us0fis0vtqk4jqrsmk7ar0n.apps.googleusercontent.com";
|
|
85
85
|
string clientSecret = "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";
|
|
@@ -99,6 +99,16 @@ public class AuthManager {
|
|
|
99
99
|
clientSecret = null;
|
|
100
100
|
redirectUri = "gg.easy.airship:/oauth2";
|
|
101
101
|
#endif
|
|
102
|
+
#endif
|
|
103
|
+
|
|
104
|
+
#if UNITY_ANDROID && !UNITY_EDITOR
|
|
105
|
+
#if AIRSHIP_STAGING
|
|
106
|
+
// TODO
|
|
107
|
+
#else
|
|
108
|
+
clientId = "457451560440-htottasd1788to2boc7lg08jrkduotg1.apps.googleusercontent.com";
|
|
109
|
+
clientSecret = null;
|
|
110
|
+
redirectUri = "https://airship.gg/oauth2";
|
|
111
|
+
#endif
|
|
102
112
|
#endif
|
|
103
113
|
|
|
104
114
|
var auth = new GoogleAuth(new AuthorizationCodeFlow.Configuration() {
|
|
@@ -110,6 +120,8 @@ public class AuthManager {
|
|
|
110
120
|
redirectUri = redirectUri,
|
|
111
121
|
scope = "openid email profile",
|
|
112
122
|
});
|
|
123
|
+
|
|
124
|
+
Debug.Log($"Redirect URI: {redirectUri}");
|
|
113
125
|
|
|
114
126
|
var crossPlatformBrowser = new CrossPlatformBrowser();
|
|
115
127
|
var standaloneBrowser = new StandaloneBrowser();
|
|
@@ -121,8 +133,8 @@ public class AuthManager {
|
|
|
121
133
|
crossPlatformBrowser.platformBrowsers.Add(RuntimePlatform.OSXEditor, standaloneBrowser);
|
|
122
134
|
crossPlatformBrowser.platformBrowsers.Add(RuntimePlatform.OSXPlayer, standaloneBrowser);
|
|
123
135
|
crossPlatformBrowser.platformBrowsers.Add(RuntimePlatform.IPhonePlayer, new ASWebAuthenticationSessionBrowser());
|
|
124
|
-
|
|
125
|
-
crossPlatformBrowser.platformBrowsers.Add(RuntimePlatform.Android, new AndroidBrowser("http://*:8080"));
|
|
136
|
+
crossPlatformBrowser.platformBrowsers.Add(RuntimePlatform.Android, new DeepLinkBrowser());
|
|
137
|
+
// crossPlatformBrowser.platformBrowsers.Add(RuntimePlatform.Android, new AndroidBrowser("http://*:8080"));
|
|
126
138
|
|
|
127
139
|
using var authenticationSession = new AuthenticationSession(auth, crossPlatformBrowser);
|
|
128
140
|
|
|
@@ -166,4 +178,4 @@ public class AuthManager {
|
|
|
166
178
|
return (false, ""); // Don't return a display error
|
|
167
179
|
}
|
|
168
180
|
}
|
|
169
|
-
}
|
|
181
|
+
}
|
|
@@ -10,26 +10,25 @@ public class ManageFullscreenSwitch : MonoBehaviour
|
|
|
10
10
|
|
|
11
11
|
private bool _fullscreen = false;
|
|
12
12
|
|
|
13
|
-
private void Start()
|
|
14
|
-
|
|
13
|
+
private void Start() {
|
|
14
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
15
15
|
_fullscreen = Screen.fullScreen;
|
|
16
16
|
SetFullScreenValues();
|
|
17
|
+
#endif
|
|
17
18
|
}
|
|
18
|
-
private void Update()
|
|
19
|
-
|
|
20
|
-
if (_fullscreen != Screen.fullScreen)
|
|
21
|
-
|
|
22
|
-
if (Screen.fullScreen)
|
|
23
|
-
{
|
|
19
|
+
private void Update() {
|
|
20
|
+
#if !UNITY_IOS && !UNITY_ANDROID
|
|
21
|
+
if (_fullscreen != Screen.fullScreen) {
|
|
22
|
+
if (Screen.fullScreen) {
|
|
24
23
|
RestoreFullscreenResolution();
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
_fullscreen = Screen.fullScreen;
|
|
28
27
|
}
|
|
28
|
+
#endif
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
private void RestoreFullscreenResolution()
|
|
32
|
-
{
|
|
31
|
+
private void RestoreFullscreenResolution() {
|
|
33
32
|
SetFullScreenValues();
|
|
34
33
|
Screen.SetResolution(_fullscreenWidth, _fullscreenHeight, true, _fullscreenAspectRatio);
|
|
35
34
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
using System.Collections.Generic;
|
|
2
|
-
using UnityEngine;
|
|
3
|
-
using UnityEngine.Serialization;
|
|
4
|
-
|
|
5
|
-
namespace Code.Accessories.Clothing {
|
|
6
|
-
public class PlatformGearBundleInfo {
|
|
7
|
-
public AssetBundle assetBundle;
|
|
8
|
-
public PlatformGearBundleManifest manifest;
|
|
9
|
-
|
|
10
|
-
public PlatformGearBundleInfo(AssetBundle assetBundle, PlatformGearBundleManifest manifest) {
|
|
11
|
-
this.assetBundle = assetBundle;
|
|
12
|
-
this.manifest = manifest;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public class PlatformGearManager : Singleton<PlatformGearManager> {
|
|
17
|
-
/// <summary>
|
|
18
|
-
/// AirId to asset bundle
|
|
19
|
-
/// </summary>
|
|
20
|
-
public Dictionary<string, PlatformGearBundleInfo> loadedPlatformGearBundles = new();
|
|
21
|
-
}
|
|
22
|
-
}
|