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