diff --git a/Packages/io.chainsafe.web3-unity.ramp/Runtime/Scripts/RampExchangerUniversal.cs b/Packages/io.chainsafe.web3-unity.ramp/Runtime/Scripts/RampExchangerUniversal.cs index 1b1446933..cb1ea8b7c 100644 --- a/Packages/io.chainsafe.web3-unity.ramp/Runtime/Scripts/RampExchangerUniversal.cs +++ b/Packages/io.chainsafe.web3-unity.ramp/Runtime/Scripts/RampExchangerUniversal.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using ChainSafe.Gaming.Evm.Signers; +using ChainSafe.Gaming.Web3.Analytics; using ChainSafe.Gaming.Web3.Core; namespace ChainSafe.Gaming.Exchangers.Ramp @@ -9,20 +10,28 @@ public class RampExchangerUniversal : IRampExchanger, ILifecycleParticipant { private readonly IRampExchangerConfig config; private readonly ISigner signer; - + private readonly IAnalyticsClient analyticsClient; + public event Action OnRampPurchaseCreated; public event Action OffRampSaleCreated; private IRampExchanger platformImplementation; + - public RampExchangerUniversal(IRampExchangerConfig config, ISigner signer) + public RampExchangerUniversal(IRampExchangerConfig config, ISigner signer, IAnalyticsClient analyticsClient) { this.signer = signer; this.config = config; + this.analyticsClient = analyticsClient; } public ValueTask WillStartAsync() { + analyticsClient.CaptureEvent(new AnalyticsEvent() + { + EventName = "Ramp Initialized", + PackageName = "io.chiansafe.web3-unity.exchangers.ramp" + }); platformImplementation = RampExchangerFactory.CreateRampExchanger(config, signer); platformImplementation.OnRampPurchaseCreated += InvokeOnRampPurchaseCreated; platformImplementation.OffRampSaleCreated += InvokeOffRampSaleCreated; @@ -47,9 +56,23 @@ public Task BuyOrSellCrypto(RampBuyOrSellWidgetSettings set => platformImplementation.BuyOrSellCrypto(settings); private void InvokeOnRampPurchaseCreated(OnRampPurchaseData obj) - => OnRampPurchaseCreated?.Invoke(obj); + { + analyticsClient.CaptureEvent(new AnalyticsEvent() + { + EventName = "Ramp Purchased Happened", + PackageName = "io.chiansafe.web3-unity.exchangers.ramp" + }); + OnRampPurchaseCreated?.Invoke(obj); + } private void InvokeOffRampSaleCreated(OffRampSaleData obj) - => OffRampSaleCreated?.Invoke(obj); + { + analyticsClient.CaptureEvent(new AnalyticsEvent() + { + EventName = "Ramp Sale Happened", + PackageName = "io.chiansafe.web3-unity.exchangers.ramp" + }); + OffRampSaleCreated?.Invoke(obj); + } } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthInjectScripts.jspre b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthInjectScripts.jspre new file mode 100644 index 000000000..f9bbecfac --- /dev/null +++ b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthInjectScripts.jspre @@ -0,0 +1,21 @@ +// custom.jspre + +Module.InjectExternalScripts = function() { + const scripts = [ + "https://cdn.jsdelivr.net/npm/@web3auth/no-modal", + "https://cdn.jsdelivr.net/npm/@web3auth/wallet-services-plugin", + "https://cdn.jsdelivr.net/npm/@web3auth/openlogin-adapter", + "https://cdn.jsdelivr.net/npm/@web3auth/ethereum-provider" + ]; + + scripts.forEach(src => { + const script = document.createElement('script'); + script.src = src; + document.body.appendChild(script); + }); +}; + +// Automatically call the function to inject the scripts +Module['onRuntimeInitialized'] = function() { + Module.InjectExternalScripts(); +}; diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.InProcessTransactionExecutor.Unity.dll.meta b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthInjectScripts.jspre.meta similarity index 81% rename from Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.InProcessTransactionExecutor.Unity.dll.meta rename to Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthInjectScripts.jspre.meta index 39cb9aa5f..5798a757e 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.InProcessTransactionExecutor.Unity.dll.meta +++ b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthInjectScripts.jspre.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fb6ec2e0f5ff4676860fedbe54aeec82 +guid: da65e374b20db6244bccea0b9e93aae1 PluginImporter: externalObjects: {} serializedVersion: 2 @@ -14,7 +14,7 @@ PluginImporter: - first: Any: second: - enabled: 1 + enabled: 0 settings: {} - first: Editor: Editor @@ -23,11 +23,10 @@ PluginImporter: settings: DefaultValueInitialized: true - first: - Windows Store Apps: WindowsStoreApps + WebGL: WebGL second: - enabled: 0 - settings: - CPU: AnyCPU + enabled: 1 + settings: {} userData: assetBundleName: assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthSDK/Web3Auth.cs b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthSDK/Web3Auth.cs index 3af050a67..68e7b205f 100644 --- a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthSDK/Web3Auth.cs +++ b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthSDK/Web3Auth.cs @@ -376,7 +376,7 @@ private void authorizeSession(string newSessionId) sessionId = newSessionId; // Debug.Log("sessionId during authorizeSession in else part =>" + sessionId); } - + if (!string.IsNullOrEmpty(sessionId)) { var pubKey = KeyStoreManagerUtils.getPubKey(sessionId); @@ -391,10 +391,12 @@ private void authorizeSession(string newSessionId) shareMetadata.ephemPublicKey, shareMetadata.iv ); + var encryptedShareBytes = AES256CBC.toByteArray(new BigInteger(shareMetadata.ciphertext, 16)); var share = aes256cbc.decrypt(encryptedShareBytes, shareMetadata.mac); var tempJson = JsonConvert.DeserializeObject(System.Text.Encoding.UTF8.GetString(share)); + this.web3AuthResponse = JsonConvert.DeserializeObject(tempJson.ToString()); if (this.web3AuthResponse != null) diff --git a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthWebGLModal.jslib b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthWebGLModal.jslib new file mode 100644 index 000000000..e9d1cfe8f --- /dev/null +++ b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthWebGLModal.jslib @@ -0,0 +1,78 @@ +var Web3AuthWebGLNoModal = { + $Web3AuthWebGLNoModal : {}, + + SetLoginCallback: function (login) { + Web3AuthWebGLNoModal.loginCallback = function(sessionId){ + var returnStr = sessionId; + var bufferSize = lengthBytesUTF8(returnStr) + 1; + var buffer = _malloc(bufferSize); + stringToUTF8(returnStr, buffer, bufferSize); + Module.dynCall_vi(login, [buffer]); + }; + }, + InitWeb3Auth: function (clientId, chainId, rpcTarget, displayName, blockExplorerUrl, ticker, tickerName, network) { + window.web3auth = null; + window.walletServicesPlugin = null; + + + + (async function init() { + try { + + console.log("Initializing Web3Auth..."); + + const chainConfig = { + chainNamespace: "eip155", + chainId: UTF8ToString(chainId), + rpcTarget: UTF8ToString(rpcTarget), + displayName: UTF8ToString(displayName), + blockExplorerUrl: UTF8ToString(blockExplorerUrl), + ticker: UTF8ToString(ticker), + tickerName: UTF8ToString(tickerName), + }; + + const privateKeyProvider = new window.EthereumProvider.EthereumPrivateKeyProvider({ config: { chainConfig } }); + window.web3auth = new window.NoModal.Web3AuthNoModal({ + clientId: UTF8ToString(clientId), + privateKeyProvider, + web3AuthNetwork: UTF8ToString(network), + }); + + window.web3auth.on("connected", (data) => { + const openLoginStore = localStorage.getItem("openlogin_store"); + const openLoginStoreObj = openLoginStore ? JSON.parse(openLoginStore) : null; + if (openLoginStoreObj && openLoginStoreObj.sessionId) { + const sessionId = openLoginStoreObj.sessionId; + Web3AuthWebGLNoModal.loginCallback(sessionId); + } else { + console.log("No session ID found in localStorage."); + } + }); + + const openloginAdapter = new window.OpenloginAdapter.OpenloginAdapter(); + window.web3auth.configureAdapter(openloginAdapter); + + await window.web3auth.init(); + console.log("Web3Auth Initialized Successfully!"); + } catch (error) { + console.error("Error during Web3Auth initialization:", error); + } + })(); + }, + + Web3AuthLogin: async function (provider, rememberMe) { + try { + await window.web3auth.connectTo("openlogin", { + loginProvider: UTF8ToString(provider) + }); + if (!rememberMe){ + localStorage.removeItem("openlogin_store"); + } + } catch (error) { + console.log(error.message); + } + }, +}; + +autoAddDeps(Web3AuthWebGLNoModal, '$Web3AuthWebGLNoModal'); +mergeInto(LibraryManager.library,Web3AuthWebGLNoModal); diff --git a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthWebGLModal.jslib.meta b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthWebGLModal.jslib.meta new file mode 100644 index 000000000..181891564 --- /dev/null +++ b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthWebGLModal.jslib.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: b31123935c9c1474689207ddaccb5067 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Web3AuthWallet.cs b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Web3AuthWallet.cs index de7a770a8..ac91c0d46 100644 --- a/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Web3AuthWallet.cs +++ b/Packages/io.chainsafe.web3-unity.web3auth/Runtime/Web3AuthWallet.cs @@ -82,11 +82,13 @@ public async ValueTask WillStartAsync() if (config.LoginParams != null) coreInstance.login(config.LoginParams); var privateKeyString = await loginTcs.Task; - var privateKey = new EthECKey(privateKeyString); + var signerConfig = new InProcessSignerConfig { PrivateKey = privateKey }; + signer = new InProcessSigner(signerConfig); + transactionExecutor = new InProcessTransactionExecutor(signer, analyticsClient.ChainConfig, rpcProvider, rpcClient); transactionHandler.OnTransactionApproved += OnTransactionApproved; @@ -190,7 +192,6 @@ private TWeb3Auth CreateCoreInstance() Object.DontDestroyOnLoad(gameObject); var instance = gameObject.GetComponent(); - instance.Awake(); instance.setOptions(config.Web3AuthOptions, config.RememberMe); return instance; diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.MetaMask.dll.meta b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.MetaMask.dll.meta deleted file mode 100644 index e0dba78cb..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.MetaMask.dll.meta +++ /dev/null @@ -1,92 +0,0 @@ -fileFormatVersion: 2 -guid: a5549f3a1ff14f448ce488218a0501ea -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : Any - second: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 1 - Exclude Linux64: 1 - Exclude OSXUniversal: 1 - Exclude WebGL: 0 - Exclude Win: 1 - Exclude Win64: 1 - Exclude iOS: 1 - - first: - Android: Android - second: - enabled: 0 - settings: - CPU: ARMv7 - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - - first: - Standalone: Linux64 - second: - enabled: 0 - settings: - CPU: None - - first: - Standalone: OSXUniversal - second: - enabled: 0 - settings: - CPU: None - - first: - Standalone: Win - second: - enabled: 0 - settings: - CPU: None - - first: - Standalone: Win64 - second: - enabled: 0 - settings: - CPU: None - - first: - WebGL: WebGL - second: - enabled: 1 - settings: {} - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - - first: - iPhone: iOS - second: - enabled: 0 - settings: - AddToEmbeddedBinaries: false - CPU: AnyCPU - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs index b4d691aaa..f2ce3bb6a 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; -using System.Threading.Tasks; using ChainSafe.Gaming.Web3; using ChainSafe.Gaming.Web3.Analytics; using Plugins.CountlySDK; using Plugins.CountlySDK.Models; -using UnityEngine; public class CountlyAnalytics : IAnalyticsClient { diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/UnityEnvironmentExtension.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/UnityEnvironmentExtension.cs index 8a5efabd8..330ef3403 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/UnityEnvironmentExtension.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/UnityEnvironmentExtension.cs @@ -4,7 +4,6 @@ using ChainSafe.Gaming.Web3.Core.Unity; using ChainSafe.Gaming.Web3.Environment; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; namespace ChainSafe.Gaming.Web3.Unity { diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity index e482bbdf0..642ed1d09 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity @@ -209,7 +209,6 @@ GameObject: m_Component: - component: {fileID: 118889340} - component: {fileID: 118889341} - - component: {fileID: 118889342} m_Layer: 5 m_Name: Toggle - Remember Me m_TagString: Untagged @@ -298,19 +297,6 @@ MonoBehaviour: m_BoolArgument: 0 m_CallState: 2 m_IsOn: 0 ---- !u!114 &118889342 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 118889339} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 86740c22756c992438bba39abdbae13f, type: 3} - m_Name: - m_EditorClassIdentifier: - platform: 17 --- !u!1 &249944480 GameObject: m_ObjectHideFlags: 0 diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scripts/Web3AuthLoginProvider.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scripts/Web3AuthLoginProvider.cs index edc077ae9..301510459 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scripts/Web3AuthLoginProvider.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.6.0/Web3Auth Samples/Scripts/Web3AuthLoginProvider.cs @@ -1,11 +1,15 @@ using System; using System.Collections.Generic; +using System.Numerics; +using System.Runtime.InteropServices; +using AOT; using System.Threading.Tasks; using ChainSafe.Gaming.UnityPackage; using ChainSafe.Gaming.UnityPackage.Common; using ChainSafe.Gaming.Web3.Analytics; using ChainSafe.Gaming.Web3.Build; using ChainSafe.GamingSdk.Web3Auth; +using Nethereum.Hex.HexTypes; using Scenes; using TMPro; using UnityEngine; @@ -34,6 +38,7 @@ public struct ProviderAndButtonPair [SerializeField] private Network network; [Header("UI")] [SerializeField] private List providerAndButtonPairs; + [Header("Wallet GUI Options")] [SerializeField] private GameObject web3AuthWalletGUIPrefab; [SerializeField] private bool enableWalletGUI; @@ -48,10 +53,21 @@ public struct ProviderAndButtonPair [SerializeField] private Color primaryTextColour; [SerializeField] private Color secondaryTextColour; [SerializeField] private Color borderButtonColour; - private bool useProvider; - private Provider selectedProvider; + private Provider? selectedProvider; private bool rememberMe; - + + #if UNITY_WEBGL && !UNITY_EDITOR + [DllImport("__Internal")] + private static extern void InitWeb3Auth(string clientId, string chainId, string rpcTarget, string displayName, string blockExplorerUrl, string ticker, string tickerName, string network); + [DllImport("__Internal")] + private static extern void Web3AuthLogin(string provider, bool rememberMe); + [DllImport("__Internal")] + private static extern void SetLoginCallback(Action callback); + + public static event Action Web3AuthWebGLConnected; + #endif + + public void SetRememberMe(bool rememberMe) { this.rememberMe = rememberMe; @@ -60,36 +76,46 @@ public void SetRememberMe(bool rememberMe) protected override async void Initialize() { base.Initialize(); - - //Always first add listeners. providerAndButtonPairs.ForEach(p => p.Button.onClick.AddListener(delegate { LoginWithWeb3Auth(p.Provider); })); - -#if UNITY_WEBGL && !UNITY_EDITOR - Uri uri = new Uri(Application.absoluteURL); - - // make sure this load isn't redirected from Web3Auth a login - if (!string.IsNullOrEmpty(uri.Fragment)) + #if !UNITY_EDITOR && UNITY_WEBGL + Web3AuthWebGLConnected += Web3AuthSet; + var projectSettings = ProjectConfigUtilities.Load(); + SetLoginCallback(Web3AuthConnected); + //1155 is a decimal number, we need to convert it to an integer + InitWeb3Auth(clientId, new HexBigInteger(BigInteger.Parse(projectSettings.ChainId)).HexValue, + projectSettings.Rpc, projectSettings.Network, "", projectSettings.Symbol, "", network.ToString().ToLower()); + #else + if (!string.IsNullOrEmpty(KeyStoreManagerUtils.getPreferencesData(KeyStoreManagerUtils.SESSION_ID))) { - useProvider = false; - await TryLogin(); - } -#else - if (!string.IsNullOrEmpty(KeyStoreManagerUtils.getPreferencesData(KeyStoreManagerUtils.SESSION_ID)) && rememberMe) - { - useProvider = false; + rememberMe = true; await TryLogin(); Debug.Log("Restoring existing Web3Auth session (Remember Me"); } + #endif + } +#if !UNITY_EDITOR && UNITY_WEBGL + private async void Web3AuthSet(string sessionId) + { + Web3AuthWebGLConnected -= Web3AuthSet; + KeyStoreManagerUtils.savePreferenceData(KeyStoreManagerUtils.SESSION_ID, sessionId); + await TryLogin(); + } #endif + +#if !UNITY_EDITOR && UNITY_WEBGL + [MonoPInvokeCallback(typeof(Action))] + private static void Web3AuthConnected(string sessionId) + { + Web3AuthWebGLConnected?.Invoke(sessionId); } +#endif private async void LoginWithWeb3Auth(Provider provider) { - if (!useProvider) - { - useProvider = true; - } +#if UNITY_WEBGL && !UNITY_EDITOR + Web3AuthLogin(provider.ToString().ToLower(), rememberMe); +#else selectedProvider = provider; await TryLogin(); LogAnalytics(provider); @@ -138,8 +164,10 @@ private void LogAnalytics(Provider provider) EventName = $"Login provider {provider}", PackageName = "io.chainsafe.web3-unity.web3auth", }); - } +#endif + } + public Web3Builder ConfigureServices(Web3Builder web3Builder) { return web3Builder.Configure(services => @@ -161,11 +189,11 @@ public Web3Builder ConfigureServices(Web3Builder web3Builder) RememberMe = rememberMe }; - if (useProvider) + if (selectedProvider.HasValue) { web3AuthConfig.LoginParams = new LoginParams() { - loginProvider = selectedProvider + loginProvider = selectedProvider.Value }; } diff --git a/src/UnitySampleProject/Packages/manifest.json b/src/UnitySampleProject/Packages/manifest.json index a8f5838f7..c9e0e1c84 100644 --- a/src/UnitySampleProject/Packages/manifest.json +++ b/src/UnitySampleProject/Packages/manifest.json @@ -2,7 +2,7 @@ "dependencies": { "com.tools.webglthreadingpatcher": "https://github.com/VolodymyrBS/WebGLThreadingPatcher.git", "com.unity.collab-proxy": "2.3.1", - "com.unity.ide.rider": "3.0.28", + "com.unity.ide.rider": "3.0.31", "com.unity.ide.vscode": "1.2.5", "com.unity.nuget.newtonsoft-json": "3.2.1", "com.unity.test-framework": "2.0.1-pre.18", diff --git a/src/UnitySampleProject/Packages/packages-lock.json b/src/UnitySampleProject/Packages/packages-lock.json index a24246176..b03543a31 100644 --- a/src/UnitySampleProject/Packages/packages-lock.json +++ b/src/UnitySampleProject/Packages/packages-lock.json @@ -24,7 +24,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.rider": { - "version": "3.0.28", + "version": "3.0.31", "depth": 0, "source": "registry", "dependencies": { diff --git a/src/UnitySampleProject/ProjectSettings/ProjectSettings.asset b/src/UnitySampleProject/ProjectSettings/ProjectSettings.asset index 052a83825..9b2b39670 100644 --- a/src/UnitySampleProject/ProjectSettings/ProjectSettings.asset +++ b/src/UnitySampleProject/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 24 + serializedVersion: 26 productGUID: 2d36d76f9c79214498bace334980ebcd AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -48,14 +48,16 @@ PlayerSettings: defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 + unsupportedMSAAFallback: 0 + m_SpriteBatchVertexThreshold: 300 m_MTRendering: 1 mipStripping: 0 numberOfMipsStripped: 0 + numberOfMipsStrippedPerMipmapLimitGroup: {} m_StackTraceTypes: 010000000200000002000000020000000200000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 iosUseCustomAppBackgroundBehavior: 0 - iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToLandscapeRight: 1 @@ -74,6 +76,7 @@ PlayerSettings: androidMinimumWindowWidth: 400 androidMinimumWindowHeight: 300 androidFullscreenMode: 1 + androidAutoRotationBehavior: 1 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 0 @@ -85,6 +88,7 @@ PlayerSettings: hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 + dedicatedServerOptimizations: 0 bakeCollisionMeshes: 0 forceSingleInstance: 0 useFlipModelSwapchain: 1 @@ -119,8 +123,12 @@ PlayerSettings: switchNVNShaderPoolsGranularity: 33554432 switchNVNDefaultPoolsGranularity: 16777216 switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 switchNVNMaxPublicTextureIDCount: 0 switchNVNMaxPublicSamplerIDCount: 0 + switchNVNGraphicsFirmwareMemory: 32 + switchMaxWorkerMultiple: 8 stadiaPresentMode: 0 stadiaTargetFramerate: 0 vulkanNumSwapchainBuffers: 3 @@ -128,12 +136,9 @@ PlayerSettings: vulkanEnablePreTransform: 0 vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 + loadStoreDebugModeEnabled: 0 + visionOSBundleVersion: 1.0 + tvOSBundleVersion: 1.0 bundleVersion: 1.0 preloadedAssets: [] metroInputSource: 0 @@ -146,8 +151,9 @@ PlayerSettings: isWsaHolographicRemotingEnabled: 0 enableFrameTimingStats: 0 enableOpenGLProfilerGPURecorders: 1 + allowHDRDisplaySupport: 0 useHDRDisplay: 0 - D3DHDRBitDepth: 0 + hdrBitDepth: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 @@ -167,7 +173,7 @@ PlayerSettings: AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: - stripEngineCode: 1 + stripEngineCode: 0 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 ForceInternetPermission: 0 @@ -176,12 +182,15 @@ PlayerSettings: APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 + strictShaderVariantMatching: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 iOSTargetOSVersionString: 12.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 + VisionOSSdkVersion: 0 + VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -229,8 +238,10 @@ PlayerSettings: appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: + VisionOSManualSigningProvisioningProfileID: iOSManualSigningProvisioningProfileType: 0 tvOSManualSigningProvisioningProfileType: 0 + VisionOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 iOSRequireARKit: 0 iOSAutomaticallyDetectAndAddCapabilities: 1 @@ -245,6 +256,7 @@ PlayerSettings: useCustomLauncherGradleManifest: 0 useCustomBaseGradleTemplate: 0 useCustomGradlePropertiesTemplate: 0 + useCustomGradleSettingsTemplate: 0 useCustomProguardFile: 0 AndroidTargetArchitectures: 2 AndroidTargetDevices: 0 @@ -252,6 +264,7 @@ PlayerSettings: androidSplashScreen: {fileID: 0} AndroidKeystoreName: AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0 AndroidIsGame: 1 @@ -265,7 +278,6 @@ PlayerSettings: banner: {fileID: 0} androidGamepadSupportLevel: 0 chromeosInputEmulation: 1 - AndroidMinifyWithR8: 0 AndroidMinifyRelease: 0 AndroidMinifyDebug: 0 AndroidValidateAppBundleSize: 1 @@ -513,7 +525,9 @@ PlayerSettings: m_BuildTargetGroupLightmapEncodingQuality: - m_BuildTarget: WebGL m_EncodingQuality: 1 + m_BuildTargetGroupHDRCubemapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] m_BuildTargetNormalMapEncoding: [] m_BuildTargetDefaultTextureCompressionFormat: - m_BuildTarget: Android @@ -528,6 +542,7 @@ PlayerSettings: locationUsageDescription: microphoneUsageDescription: bluetoothUsageDescription: + macOSTargetOSVersion: 10.13.0 switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 @@ -535,10 +550,11 @@ PlayerSettings: switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 - switchUseGOLDLinker: 0 + switchEnableFileSystemTrace: 0 switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: + switchCompilerFlags: switchTitleNames_0: switchTitleNames_1: switchTitleNames_2: @@ -664,7 +680,6 @@ PlayerSettings: switchSocketBufferEfficiency: 4 switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 - switchPlayerConnectionEnabled: 1 switchUseNewStyleFilepaths: 0 switchUseLegacyFmodPriorities: 1 switchUseMicroSleepForYield: 1 @@ -754,6 +769,7 @@ PlayerSettings: webGLMemorySize: 32 webGLExceptionSupport: 1 webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 webGLDataCaching: 1 webGLDebugSymbols: 0 webGLEmscriptenArgs: @@ -761,11 +777,17 @@ PlayerSettings: webGLTemplate: PROJECT:MetaMask webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 1 - webGLCompressionFormat: 0 + webGLCompressionFormat: 2 webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 webGLPowerPreference: 2 scriptingDefineSymbols: WebGL: RAMP_AVAILABLE @@ -774,6 +796,7 @@ PlayerSettings: scriptingBackend: Android: 1 il2cppCompilerConfiguration: {} + il2cppCodeGeneration: {} managedStrippingLevel: EmbeddedLinux: 1 GameCoreScarlett: 1 @@ -792,12 +815,9 @@ PlayerSettings: suppressCommonWarnings: 1 allowUnsafeCode: 0 useDeterministicCompilation: 1 - enableRoslynAnalyzers: 1 - selectedPlatform: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 1 - assemblyVersionValidation: 0 gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: {} m_RenderingPath: 1 @@ -823,6 +843,7 @@ PlayerSettings: metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} metroSplashScreenUseBackgroundColor: 0 + syncCapabilities: 0 platformCapabilities: {} metroTargetDeviceFamilies: {} metroFTAName: @@ -869,6 +890,11 @@ PlayerSettings: luminVersion: m_VersionCode: 1 m_VersionName: + hmiPlayerDataPath: + hmiForceSRGBBlit: 1 + embeddedLinuxEnableGamepadInput: 1 + hmiLogStartupTiming: 0 + hmiCpuConfiguration: apiCompatibilityLevel: 6 activeInputHandler: 0 windowsGamepadBackendHint: 0 @@ -879,6 +905,7 @@ PlayerSettings: organizationId: cloudEnabled: 0 legacyClampBlendShapeWeights: 0 - playerDataPath: - forceSRGBBlit: 1 + hmiLoadingImage: {fileID: 0} + platformRequiresReadableAssets: 0 virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0