Ejemplo n.º 1
0
        private void XiangCe(GameObject obj)
        {
#if UNITY_ANDROID
            AndroidJavaClass  jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            AndroidJavaObject jo = jc.GetStatic <AndroidJavaObject>("currentActivity");
            jo.Call("TakePhoto", 1, 200, 200, "personalcenter", "HeadImage");
#elif UNITY_IPHONE
            IOSAlbumCamera.iosOpenPhotoAlbums(true);
#endif
            // AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            // AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
            // jo.Call("TakePhoto", 1, 200, 200);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 从相册_时刻获取图片
 /// </summary>
 void GetPictureFromMoment()
 {
     Debug.Log("Unity 打开相册_时刻 --> ");
     IOSAlbumCamera.iosOpenPhotoAlbums(false);
 }
Ejemplo n.º 3
0
 void onclick_album()
 {
     IOSAlbumCamera.iosOpenPhotoAlbums(true);
 }