Looooong / UnityAsyncImageLoader

Asynchronous Image Loader for Unity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Does this plugin work with android builds?

MurkesM opened this issue · comments

If not is there a way to get it to work on android?

As far as I know, FreeImage seems to only support Windows, Linux and MacOS. You need to find a way to build FreeImage library that targets Android.

There is another async image loader package that has android support for free image and bc I liked this package better for working with I just grabbed the specific android file needed to make it compatible and put it in this package. The other package: https://github.com/mlavik1/unity-async-textureimport-package
Anyone whos trying to do the same can check out the issue I opened on the other package. mlavik1/unity-async-textureimport-package#1
Unity_lDjN1q7gUA
Unity_r4gTohjaRA

Also, @Looooong if you want to support Android in your releases, feel free to just grab the Android binaries from here: https://github.com/mlavik1/unity-async-textureimport-package/actions/runs/3685186662
(the artifacts called "arm64-v8a-unity-2021", "armeabi-v7a-unity-2022" etc. )

There are different binaries for 2021.2+ and 2022.2+ since they use different versions of NDK

Maybe I should set up a separate repository that provies FreeImage binaries for Unity.

@mlavik1 Thanks for the binaries. Btw, do you happen to have a binary for MacOS or iOS as well?

@mlavik1

Maybe I should set up a separate repository that provies FreeImage binaries for Unity.

I second this decision. I think that it's not possible to bundle android binary into this package, because different version of Unity requires different version of NDK.

@mlavik1 Thanks for the binaries. Btw, do you happen to have a binary for MacOS or iOS as well?

No, but I'll try adding that to the build actions. I'll have no way of testing the generated binaries though, since I don't own a Mac, but I suppose they should just work anyway.

And yes, you're right. It would maybe be possible if you rename the .so files depending on the UnityVersion, and then load them differently depending on the Unity version, but it's probably better to just create different .unitypackages for each version of Unity.