diff --git a/fie.csproj b/fie.csproj index 8b19c21..24de698 100644 --- a/fie.csproj +++ b/fie.csproj @@ -4797,10 +4797,10 @@ - packages\Unity3D.SDK.2017.4.37.1\lib\UnityEditor.dll + packages\Unity3D.SDK.2018.4.11.1\lib\UnityEditor.dll - packages\Unity3D.SDK.2017.4.37.1\lib\UnityEngine.dll + packages\Unity3D.UnityEngine.2018.3.5.1\lib\UnityEngine.dll diff --git a/packages.config b/packages.config index 2498135..142aeff 100644 --- a/packages.config +++ b/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/Fie.Manager/FieManagerBase.cs b/src/Fie.Manager/FieManagerBase.cs index f58fb12..51f8f3b 100644 --- a/src/Fie.Manager/FieManagerBase.cs +++ b/src/Fie.Manager/FieManagerBase.cs @@ -1,25 +1,20 @@ using Photon; using UnityEngine; -namespace Fie.Manager -{ +namespace Fie.Manager { [FieManagerExists(FieManagerExistSceneFlag.ANYTIME_DESTROY)] - public abstract class FieManagerBase : Photon.MonoBehaviour - { + public abstract class FieManagerBase : Photon.MonoBehaviour { private bool _isEndStartup; private bool _isDestroyed; public bool isDestroyed => _isDestroyed; - protected virtual void StartUpEntity() - { + protected virtual void StartUpEntity() { } - public void StartUp() - { - if (!_isEndStartup) - { + public void StartUp() { + if (!_isEndStartup) { StartUpEntity(); _isEndStartup = true; } diff --git a/src/Fie.Manager/FieManagerBehaviour.cs b/src/Fie.Manager/FieManagerBehaviour.cs index ad23bd3..fae1f3d 100644 --- a/src/Fie.Manager/FieManagerBehaviour.cs +++ b/src/Fie.Manager/FieManagerBehaviour.cs @@ -1,27 +1,21 @@ using UnityEngine; -namespace Fie.Manager -{ - public class FieManagerBehaviour : FieManagerBase where T : FieManagerBase - { +namespace Fie.Manager { + public class FieManagerBehaviour : FieManagerBase where T : FieManagerBase { [SerializeField] private bool _isAutoStartUp; private static T instance; - public static T I - { - get - { - if ((UnityEngine.Object)instance != (UnityEngine.Object)null && instance.isDestroyed) - { - instance = (T)null; + public static T I { + get { + if (instance != null && instance.isDestroyed) { + instance = null; } - if ((UnityEngine.Object)instance == (UnityEngine.Object)null) + if (instance == null) { instance = UnityEngine.Object.FindObjectOfType(); - if ((UnityEngine.Object)instance == (UnityEngine.Object)null || instance.isDestroyed) - { + if (instance == null || instance.isDestroyed) { GameObject gameObject = new GameObject(); UnityEngine.Object.DontDestroyOnLoad(gameObject); instance = gameObject.AddComponent(); @@ -31,18 +25,14 @@ namespace Fie.Manager } return instance; } - set - { + set { instance = value; } } - private void Start() - { - if (_isAutoStartUp) - { - T i = I; - i.StartUp(); + private void Start() { + if (_isAutoStartUp) { + I.StartUp(); } } }