客户端rsa,冗余清理,bug修复,安卓build问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
#if !UNITY_WEBGL
|
||||
#if UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX
|
||||
using Steamworks;
|
||||
#endif
|
||||
|
||||
@@ -118,6 +118,34 @@ public static class DlcOwnershipService
|
||||
Cache.Clear();
|
||||
}
|
||||
|
||||
public static void ClearLocalPersistence()
|
||||
{
|
||||
dlcData[] allDlcs = RuntimeResourcesCache.LoadAllDlcs();
|
||||
if (allDlcs != null)
|
||||
{
|
||||
for (int i = 0; i < allDlcs.Length; i++)
|
||||
{
|
||||
dlcData dlc = allDlcs[i];
|
||||
if (dlc == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string key = dlc.GetResolvedDlcKey();
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerPrefs.DeleteKey(RemoteOwnershipPrefsPrefix + key);
|
||||
PlayerPrefs.DeleteKey(LocalOverridePrefsPrefix + key);
|
||||
}
|
||||
}
|
||||
|
||||
PlayerPrefs.Save();
|
||||
Cache.Clear();
|
||||
}
|
||||
|
||||
private static DlcEntitlementState ResolveEntitlement(dlcData dlc, string key)
|
||||
{
|
||||
if (!dlc.ShouldEnforceEntitlement())
|
||||
@@ -137,7 +165,7 @@ public static class DlcOwnershipService
|
||||
return new DlcEntitlementState(key, true, true, DlcEntitlementSource.LocalFlag);
|
||||
}
|
||||
|
||||
#if !UNITY_WEBGL
|
||||
#if UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX
|
||||
if (dlc.steamAppId > 0 && SteamManager.Initialized)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user