Thanks, ill try doing it.
Hi, just to be sure, i download the package from the package manager, then i go to Assets/Plugins/Android/Proguard.txt , then i add -keep class com.yasirkula.unity.* { *; } there right? Cause the file seems to be empty
T
Thanks, working fine!
Hey Yasirkula.
I tried to use “Texture2D texture = NativeGallery.LoadImageAtPath(path);” However, “texture” does not seem to be readable and that is causing some issues for me. Would you happen to know a fix for this?
Yes, LoadImageAtPath takes an optional markTextureNonReadable parameter.
Hi, can i use this plugin for text files as well?
Hi, i am getting this problem, so i guess that an empty file path is being returned before the user has finished selecting the file, in the editor this work great but problem on build android
You must execute your code inside the callback function.
NativeGallery won’t work for text files but NativeFilePicker might: Native File Picker for Android & iOS [Open Source]
Thanks I’ll try it out!
Im not sure if this is because of my lack of experience but I tried to do:
Texture2D texture = NativeGallery.LoadImageAtPath(path, bool markTextureNonReadable = false);
I get an error, “markTextureNonReadable” does exist in the current context.
It should be Texture2D texture = NativeGallery.LoadImageAtPath(path, markTextureNonReadable: false);
.
Hi, i am getting an error : out of memory when loading the image from a file. Why that?
Hi, also, when i want to pick a text file with the NativeFilePicker, it says that i have no app to pick one… Can’t i just call the same file picker as the image one?
Out of memory usually means that your game’s RAM usage has exceeded the free RAM allocated to your game. You must pass a small maxSize parameter to LoadImageAtPath if you don’t want the Textures to consume too much RAM.
NativeGallery invokes Android’s native user interface, so I didn’t create that UI. If NativeFilePicker fails to find an application for text files (I must say that I find it unlikely, you might be doing something wrong), we can’t do anything about this. You can use SimpleFileBrowser as a last resort: GitHub - yasirkula/UnitySimpleFileBrowser: A uGUI based runtime file browser for Unity 3D (draggable and resizable)
I’ll need to see how you are calling NativeFilePicker functions.
Sorry for another follow up but now Im getting a “Not Implemented” error after passing the parameter the way you mentioned above.
Can I see full stacktrace?
What is “Not Implemented” error’s full stacktrace?
My mistake, it had to do with something else. Nothing related to Native Gallery.