Do I need to add camera and gallery permissions manually in AndroidManifest.xml and Info.plist?
No. Essential Kit automatically injects required permissions during the build process. Just enable the appropriate features in Essential Kit Settings (Services tab) and the plugin adds:
Android: CAMERA, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE based on enabled features
iOS: NSCameraUsageDescription, NSPhotoLibraryUsageDescription, NSPhotoLibraryAddUsageDescription with your configured descriptions
Images are not saving to Android gallery. What should I check?
For Android 10+ (API level 29+), ensure you have gallery write permissions. The most common issues:
Missing Configuration: Enable "Saves Files to Photo Gallery" in Essential Kit Settings
Permission Denied: First call to SaveMediaContent() requests permission automatically; check error callback for denial
Development Build Issue: Unity development builds may have restricted permissions. Test release builds or call MediaServices.GetGalleryAccessStatus(GalleryAccessMode.ReadWrite) to verify permission state
User denied camera/gallery access. How do I let them re-enable it?
Use Utilities.OpenApplicationSettings() to deep link into the platform settings screen. Pair it with in-app messaging explaining why the permission enables your feature:
voidOnPermissionDenied(){Debug.LogWarning("Camera access is required for profile photos. Opening Settings.");Utilities.OpenApplicationSettings();}
Can I test camera and gallery features in the Unity Editor?
Yes, Essential Kit provides editor simulation automatically. The simulator uses sample images and videos to test your integration. However, you must test on physical devices before release to verify:
Actual permission dialogs and user flows
Platform-specific pickers (Photo Picker on Android 13+, PHPicker on iOS 14+)
Real camera capture and video recording
Performance with large media files
My captured photos appear rotated incorrectly. How do I fix this?
This happens when image metadata (EXIF orientation) isn't applied. Essential Kit handles orientation automatically when converting to Texture2D:
If you're reading raw data yourself, check the EXIF orientation tag and rotate accordingly.
How can I limit file sizes for selected images?
Media selection APIs don't provide built-in file size filtering. Check file size after selection:
For automatic compression, convert to Texture2D and re-encode:
Where can I confirm plugin behavior versus my implementation?
Run Assets/Plugins/VoxelBusters/EssentialKit/Examples/Scenes/MediaServicesDemo.unity. If the sample works but your scene does not, compare:
content.AsTexture2D((texture, error) =>
{
// Texture is already rotated correctly based on EXIF data
if (error == null)
{
Debug.Log($"Texture ready with size {texture.width}x{texture.height}.");
}
});
content.AsRawMediaData((rawData, error) =>
{
if (error == null)
{
int fileSizeKB = rawData.Bytes.Length / 1024;
if (fileSizeKB > 5000) // 5MB limit
{
Debug.LogWarning("Please select an image smaller than 5MB.");
return;
}
Debug.Log($"Processing image of size {fileSizeKB} KB.");
}
});
content.AsFilePath(Application.temporaryCachePath, "upload_image",
(filePath, error) =>
{
if (error == null)
{
Debug.Log($"Saved file to {filePath} for upload.");
System.IO.File.Delete(filePath); // Clean up after upload
}
});
var saveOptions = new MediaContentSaveOptions(
directoryName: "MyGame Photos", // Creates custom album
fileName: "screenshot"
);
MediaServices.SaveMediaContent(imageData, MimeType.kPNGImage, saveOptions,
(success, error) =>
{
if (success)
{
Debug.Log("Saved to 'MyGame Photos' album");
}
else
{
Debug.LogError($"Save failed: {error}");
}
});