Example #1
0
        private void OnReceiveImage(WebCall webCall)
        {
            Texture2D texture = PhotoConverter.ConvertToSquare(webCall.ResponseImage, 128);

            texture.name = "User" + ID + "Picture";

            Image      = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
            Image.name = texture.name;

            if (OnGetImage != null)
            {
                OnGetImage();
            }
        }
 private void OnGetPhoto(Texture2D photo)
 {
     mSelectedPhoto   = PhotoConverter.ConvertToSquare(photo);
     mHasUpdatedPhoto = true;
     RefreshPhotoContent();
 }