Hi Unity Developers,
This post is for unity developers who want to pick image from gallery in his/her unity games or app.
Here are the steps to pick image from gallery.
1). Write native code (Java for Android, Objective-C for iOS) to pick image from gallery.
2). Call this code from C#.
Native Plugins
iOS Plugins
Android Plugins
3). Native code will pick image and return you image path in unity
This code will return path from native code to Unity3D
4). Load image into texture from the path and use anywhere you want.
You are most welcome to leave your comments about this post.
Tags : pick image from gallery, pick image from camera roll, get image from device gallery, pick image from native gallery, image and video picker, best image picker for unity, image picker for android and ios, image and video picker for unity 3d, easy way to pick image and video from gallery or camera roll.
This post is for unity developers who want to pick image from gallery in his/her unity games or app.
Here are the steps to pick image from gallery.
1). Write native code (Java for Android, Objective-C for iOS) to pick image from gallery.
These link will help you to write native code.
2). Call this code from C#.
Native Plugins
iOS Plugins
Android Plugins
3). Native code will pick image and return you image path in unity
This code will return path from native code to Unity3D
UnitySendMessage("GameObjectName1", "MethodName1", "Message to send");4). Load image into texture from the path and use anywhere you want.
http://docs.unity3d.com/Documentation/ScriptReference/WWW.LoadImageIntoTexture.html
http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.LoadImage.html
If you are new to unity or don't want to waste your time to do all these things then you can buy this awesome ready to use plugin to pick image from gallery. Just download following plugin as per your need and enable image picking feature in your project.
Pick image from gallery
Pick image from camera
http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.LoadImage.html
If you are new to unity or don't want to waste your time to do all these things then you can buy this awesome ready to use plugin to pick image from gallery. Just download following plugin as per your need and enable image picking feature in your project.
Pick image from gallery
Pick image from camera
You are most welcome to leave your comments about this post.
Tags : pick image from gallery, pick image from camera roll, get image from device gallery, pick image from native gallery, image and video picker, best image picker for unity, image picker for android and ios, image and video picker for unity 3d, easy way to pick image and video from gallery or camera roll.
No comments:
Post a Comment