示例#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);
 }