Images are not available using context.getClassLoader.getResaurceAsStream from the android jar in the Unity plugin

I am trying to create an SDK in which I have few images and all classes in a .jar file.

I have already created the unity plugin and bridge class for the Android SDK. Functionality works in the SDK. But I ran into the problem below, I create the whole view programmatically in this SDK,

In the native android, it works fine. Images are accessible using the context.getClassLoader.getResourceAsStream method, and I get the Image InputStream well and the image appears when the view is created.

But when I call the SDK from the unity plugin and the android-bridge class, I get null as an InputStream .

Does anyone have any ideas about this? And how to solve it. Thank you in advance.

+6
source share
1 answer
+1
source

All Articles