View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.8.2
- Last updated
- First released
- Unity version
- 5.5.4 or later
- Package size
- 450 KB
- Files
- 23
- Favorites
- 148
- Views in the past week
- 5
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- Free on
iOS Load Texture From PhotoLibrary/Camera
Price $10.00
Buy on Asset Store (opens in new tab)
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 4
iOS Load Texture From PhotoLibrary/Camera screenshot 1
About this asset
This plugin is run on iOS native code. You can use UIImagePicker for load a texture on Unity.
Note:
Must add two keys to Info.plist to work in iOS 10.
- NSPhotoLibraryUsageDescription
- NSCameraUsageDescription
New Feature:
- Added functions to Save/Load to local storage as png file.
It's to enable to resume with the last selected image.
Features:
- Load Texture from PhotoLibrary on Device
- Take a photo by Camera
- Save Image to PhotoLibrary (JPG/PNG/PNG with transparency)
Demo Video
How to use (C# Script):
ShowCamera:
LoadTextureFromImagePicker.ShowCamera(gameObject.name, "OnFinishedImagePicker");
Load Image from PhotoLibrary:
LoadTextureFromImagePicker.ShowPhotoLibrary(gameObject.name, "OnFinishedImagePicker");
Callback function on finished, and get Image:
private void OnFinishedImagePicker (string message) {
Texture2D texture = LoadTextureFromImagePicker.GetLoadedTexture(message, 512, 512);
targetMaterial.mainTexture = texture;
}
Save Image to PhotoLibrary:
LoadTextureFromImagePicker.SaveAsJpgToPhotoLibrary(image, gameObject.name, "OnFinishedSaveImage");
Support: [email protected]
Note:
Must add two keys to Info.plist to work in iOS 10.
- NSPhotoLibraryUsageDescription
- NSCameraUsageDescription
New Feature:
- Added functions to Save/Load to local storage as png file.
It's to enable to resume with the last selected image.
Features:
- Load Texture from PhotoLibrary on Device
- Take a photo by Camera
- Save Image to PhotoLibrary (JPG/PNG/PNG with transparency)
Demo Video
How to use (C# Script):
ShowCamera:
LoadTextureFromImagePicker.ShowCamera(gameObject.name, "OnFinishedImagePicker");
Load Image from PhotoLibrary:
LoadTextureFromImagePicker.ShowPhotoLibrary(gameObject.name, "OnFinishedImagePicker");
Callback function on finished, and get Image:
private void OnFinishedImagePicker (string message) {
Texture2D texture = LoadTextureFromImagePicker.GetLoadedTexture(message, 512, 512);
targetMaterial.mainTexture = texture;
}
Save Image to PhotoLibrary:
LoadTextureFromImagePicker.SaveAsJpgToPhotoLibrary(image, gameObject.name, "OnFinishedSaveImage");
Support: [email protected]
From the publisher's Asset Store listing.