Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class PhotoLoader : MonoBehaviour
- {
- public static PhotoLoader Instance
- {
- get { return PhotoLoader._instance; }
- }
- private void Awake()
- {
- PhotoLoader._instance = this;
- }
- public void LoadPhotoAsync(string path, FileLoadUtils.ImageLoaded cb)
- {
- base.StartCoroutine(FileLoadUtils.LoadImageAsync(path, delegate(Texture2D img) { cb(img); }));
- }
- public void LoadPhotoStremmingAssetsAsync(string path, FileLoadUtils.ImageLoaded cb)
- {
- base.StartCoroutine(FileLoadUtils.LoadImageAsync(Application.streamingAssetsPath + path, delegate(Texture2D img) { cb(img); }));
- }
- private static PhotoLoader _instance;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement