7

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

I have already created the unity plugin and bridge class for android SDK. Functionality is working all fine in SDK. But i am facing the below problem, I am creating all the view programetically in this SDK,

In native android it is working fine. Images are accessible using the context.getClassLoader.getResourceAsStream method and i get the InputStream of image well and image is showing when view is created.

But when i call the SDK from the unity plugin and android-bridge class i am getting null as InputStream.

Does anyone has any idea about this? And how to solve this. Thanks in Advance.

user3071284
  • 6,955
  • 6
  • 43
  • 57
Hardik Chauhan
  • 2,750
  • 15
  • 30

1 Answers1

2

You need to copy your images to assets and use getAssets().open("yourimage.jpg").


Source:

Android files in jar library not accessible when using with Unity

Android files in jar library not accessible when using with Unity - Please help

Community
  • 1
  • 1
Jared Rummler
  • 37,824
  • 19
  • 133
  • 148