| | |
| | | { |
| | | {typeof(GameObject), "prefab"}, |
| | | {typeof(Sprite), "png"}, |
| | | {typeof(Texture2D), "png"}, |
| | | {typeof(Shader), "shader"}, |
| | | {typeof(Texture2D), "jpg"}, |
| | | {typeof(Texture), "jpg"}, |
| | | { typeof(Shader), "shader"}, |
| | | {typeof(TextAsset), "txt"}, |
| | | {typeof(AudioClip), "wav"}, |
| | | {typeof(Font), "ttf"}, |
| | |
| | | } |
| | | else |
| | | { |
| | | if (directory == "UI" || directory == "UIComp" || directory.StartsWith("Sprite") || directory == "Battle/Prefabs") |
| | | { |
| | | directory = "UI/" + directory; |
| | | } |
| | | var assetInfo = new AssetInfo(directory.ToLower(), name.ToLower()); |
| | | asset = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo, typeof(T)) as T; |
| | | } |
| | |
| | | else |
| | | #endif |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath($"Config/{name}.txt"); |
| | | path = AssetVersionUtility.GetAssetFilePath($"config/{name}.txt"); |
| | | } |
| | | |
| | | return File.ReadAllLines(path); |
| | |
| | | LoadAssetAsync<SpriteAtlas>(atlasName, spriteName, (isLoaded, atlas) => { |
| | | if (isLoaded) |
| | | { |
| | | callBack?.Invoke(isLoaded, atlas.GetSprite(spriteName)); |
| | | SpriteAtlas _atlas = atlas as SpriteAtlas; |
| | | callBack?.Invoke(isLoaded, _atlas.GetSprite(spriteName)); |
| | | } |
| | | else |
| | | { |