Example #1
0
 /// <summary>
 /// 从路径预载异步游戏对象
 /// </summary>
 /// <param name="resPath">路径</param>
 public static void PreLoadFromPath(string resPath)
 {
     if (!CachePrefabs.Contains(resPath))
     {
         AssetSystem.LoadAssetAsyn(resPath, answer);
     }
 }
Example #2
0
 public void Start()
 {
     if (CachePrefabs.Contains(resPath))
     {
         GameObject prefab = CachePrefabs[resPath] as GameObject;
         Perform(prefab);
         DestroyImmediate(this);
     }
     else
     {
         AssetSystem.LoadAssetAsyn(resPath, this);
     }
 }
Example #3
0
 public static void PreLoad(string path)
 {
     AssetSystem.LoadAssetAsyn(path, Instance);
 }