mirror of https://github.com/tuyoogame/YooAsset
fix #389
parent
6f07faf4da
commit
13e8410d80
|
@ -7,6 +7,15 @@ namespace YooAsset
|
|||
{
|
||||
internal class RemoteDebuggerInRuntime : MonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_sampleOnce = false;
|
||||
_autoSample = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
private static bool _sampleOnce = false;
|
||||
private static bool _autoSample = false;
|
||||
|
||||
|
|
|
@ -8,6 +8,14 @@ namespace YooAsset
|
|||
{
|
||||
internal class RemoteEditorConnection
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_instance = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
private static RemoteEditorConnection _instance;
|
||||
public static RemoteEditorConnection Instance
|
||||
{
|
||||
|
|
|
@ -8,6 +8,14 @@ namespace YooAsset
|
|||
{
|
||||
internal class RemotePlayerConnection
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_instance = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
private static RemotePlayerConnection _instance;
|
||||
public static RemotePlayerConnection Instance
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using UnityEngine.Networking;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
|
@ -9,6 +10,14 @@ namespace YooAsset
|
|||
|
||||
internal class DownloadSystemHelper
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
UnityWebRequestCreater = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
public static UnityWebRequestDelegate UnityWebRequestCreater = null;
|
||||
public static UnityWebRequest NewUnityWebRequestGet(string requestURL)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,14 @@ namespace YooAsset
|
|||
{
|
||||
internal class WebRequestCounter
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_requestFailedRecorder.Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 记录网络请求失败事件的次数
|
||||
/// </summary>
|
||||
|
|
|
@ -6,6 +6,14 @@ namespace YooAsset
|
|||
{
|
||||
internal class OperationSystem
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
DestroyAll();
|
||||
}
|
||||
#endif
|
||||
|
||||
private static readonly List<AsyncOperationBase> _operations = new List<AsyncOperationBase>(1000);
|
||||
private static readonly List<AsyncOperationBase> _newList = new List<AsyncOperationBase>(1000);
|
||||
|
||||
|
|
|
@ -5,6 +5,14 @@ namespace YooAsset
|
|||
{
|
||||
public static class YooAssetSettingsData
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_setting = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
private static YooAssetSettings _setting = null;
|
||||
internal static YooAssetSettings Setting
|
||||
{
|
||||
|
|
|
@ -9,6 +9,16 @@ namespace YooAsset
|
|||
{
|
||||
public static partial class YooAssets
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_isInitialize = false;
|
||||
_packages.Clear();
|
||||
_defaultPackage = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
private static bool _isInitialize = false;
|
||||
private static GameObject _driver = null;
|
||||
private static readonly List<ResourcePackage> _packages = new List<ResourcePackage>();
|
||||
|
|
|
@ -5,6 +5,14 @@ namespace YooAsset
|
|||
{
|
||||
internal class YooAssetsDriver : MonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
LastestUpdateFrame = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
private static int LastestUpdateFrame = 0;
|
||||
|
||||
void Update()
|
||||
|
|
Loading…
Reference in New Issue