public void Load(string assetPath) { key = assetPath; asset = Assets.Load(assetPath, typeof(GameObject)); UIPanelManager.Instance.Add(this); }
public void Load() { asset = Assets.Load(assetPath, assetType); if (onLoad != null) { onLoad(this); } }
internal Asset GetAsset <T> (string path) where T : UnityEngine.Object { Asset asset; if (!assets.TryGetValue(path, out asset)) { asset = Assets.Load <T> (path); assets.Add(path, asset); } return(asset); }
void LoadPrefab() { var asset = Assets.Load <GameObject>(assetPath); if (asset != null) { var prefab = asset.asset; if (prefab != null) { var go = Instantiate(prefab) as GameObject; // ReleaseAssetOnDestroy.Register(go, asset); // GameObject.Destroy(go, 10); } } }
internal void Load() { asset = Assets.Load(assetPath, assetType); }