|
|
|
|
|
|
[SerializeField] private GameSceneSO _thisSceneSO = default; |
|
|
|
[SerializeField] private GameSceneSO _persistentManagersSO = default; |
|
|
|
[SerializeField] private AssetReference _notifyColdStartupChannel = default; |
|
|
|
[SerializeField] private SaveSystem _saveSystem = default; |
|
|
|
|
|
|
|
private void Start() |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
CreateSaveFileIfNotPresent(); |
|
|
|
} |
|
|
|
|
|
|
|
private void LoadEventChannel(AsyncOperationHandle<SceneInstance> obj) |
|
|
|
|
|
|
{ |
|
|
|
LoadEventChannelSO loadEventChannelSO = (LoadEventChannelSO)_notifyColdStartupChannel.Asset; |
|
|
|
loadEventChannelSO.RaiseEvent(_thisSceneSO); |
|
|
|
} |
|
|
|
|
|
|
|
private void CreateSaveFileIfNotPresent() |
|
|
|
{ |
|
|
|
if (_saveSystem != null && !_saveSystem.LoadSaveDataFromDisk()) |
|
|
|
{ |
|
|
|
_saveSystem.WriteEmptySaveFile(); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |