예제 #1
0
        public void Load(string assetPath)
        {
            key   = assetPath;
            asset = Assets.Load(assetPath, typeof(GameObject));

            UIPanelManager.Instance.Add(this);
        }
예제 #2
0
 public void Load()
 {
     asset = Assets.Load(assetPath, assetType);
     if (onLoad != null)
     {
         onLoad(this);
     }
 }
예제 #3
0
        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);
        }
예제 #4
0
        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);
                }
            }
        }
예제 #5
0
 internal void Load()
 {
     asset = Assets.Load(assetPath, assetType);
 }