public LoadedAssetsStruct CreateLoadedAsset(AssetBundle AB, string S, bool bL, bool bW) { LoadedAssetsStruct LA = new LoadedAssetsStruct(); LA.AssetBundle = AB; LA.Path = S; LA.bLocal = bL; LA.bWorld = bW; return(LA); }
public bool AddLoadedAsset(LoadedAssetsStruct LA) { for (int i = 0; i < LoadedAssets.Count; i++) { if (LoadedAssets[i].Path == LA.Path) { return(false); } } LoadedAssets.Add(LA); AddHistoryAsset(CreateAssetInfo(LA.Path, LA.bLocal, bWorld)); return(true); }
public void OpenScene(LoadedAssetsStruct LoadedAssets) { if (LoadedAssets.AssetBundle == null) { return; } if (LoadedAssets.bWorld) { string[] scenePaths = LoadedAssets.AssetBundle.GetAllScenePaths(); string sceneName = System.IO.Path.GetFileNameWithoutExtension(scenePaths[0]); // EditorSceneManager.OpenScene(sceneName); EditorSceneManager.LoadScene(sceneName); // EditorApplication.OpenScene(sceneName); } }
public void AddToScene(LoadedAssetsStruct LoadedAssets) { if (LoadedAssets.AssetBundle == null) { return; } if (LoadedAssets.bWorld) { string[] scenePaths = LoadedAssets.AssetBundle.GetAllScenePaths(); string sceneName = System.IO.Path.GetFileNameWithoutExtension(scenePaths[0]); SceneManager.LoadScene(sceneName); } else { GameObject ava = LoadAvatar(LoadedAssets.AssetBundle); Instantiate(ava); } }