public static void GetPhoto(Action <Texture2D> onSuccess, Action onFail) { if (mHandler == null) { mHandler = new GameObject("ImportPhotoHandler").AddComponent <ImportPhotoHandler>(); } mHandler.Import(onSuccess, onFail); }
public void ButtonPhotoSelect() { if (Application.isEditor) { OnGetPhoto(Resources.Load <Texture2D>("test_stick_figure")); } else { ImportPhotoHandler.GetPhoto(OnGetPhoto, OnGetPhotoFail); } }
public void ButtonPhoto() { ImportPhotoHandler.GetPhoto(OnGetPhoto, OnGetPhotoFail); }