备份CatanBuilding瘦身独立工程
This commit is contained in:
23
Assets/Scripts/Scenes/SceneTools.cs
Normal file
23
Assets/Scripts/Scenes/SceneTools.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using GameCore;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.ResourceManagement.ResourceProviders;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneTools
|
||||
{
|
||||
public static AsyncOperationHandle<SceneInstance> asyncOperationHandle;
|
||||
|
||||
public static AsyncOperationHandle<SceneInstance> LoadSceneAsyncByAddressables(string key, LoadSceneMode loadMode)
|
||||
{
|
||||
return Addressables.LoadSceneAsync(key, loadMode);
|
||||
}
|
||||
|
||||
public static AsyncOperationHandle<SceneInstance> UnloadSceneAsyncByAddressables(AsyncOperationHandle<SceneInstance> handle, bool autoReleaseHandle = true)
|
||||
{
|
||||
return Addressables.UnloadSceneAsync(handle, autoReleaseHandle);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Scenes/SceneTools.cs.meta
Normal file
11
Assets/Scripts/Scenes/SceneTools.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b5603fea3d056143b1c12c95c288b65
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user