Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ModMinigame.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class ModMinigame<T> : MiniGame where T : Component
4{
5 public T game;
6
7 public void Load()
8 {
9 Debug.Log(path);
10 if (!game)
11 {
12 asset = AssetBundle.LoadFromFile(path + "/Asset_" + id + "/asset");
13 Object @object = asset.LoadAsset(id);
14 Debug.Log(@object);
15 go = Object.Instantiate(@object) as GameObject;
16 Debug.Log(go);
17 game = go.GetComponentInChildren<T>();
18 }
20 Debug.Log(game);
21 }
22
23 public void Kill()
24 {
25 Object.Destroy(go);
26 game = null;
27 if ((bool)asset)
28 {
29 asset.Unload(unloadAllLoadedObjects: true);
30 }
31 }
32}
GameObject go
Definition: MiniGame.cs:27
string path
Definition: MiniGame.cs:31
void SetAudioMixer(GameObject go)
Definition: MiniGame.cs:101
AssetBundle asset
Definition: MiniGame.cs:29
void Kill()
Definition: ModMinigame.cs:23
void Load()
Definition: ModMinigame.cs:7