Question by
chipscal · May 25, 2016 at 07:07 PM ·
androidpluginproblem during runtimethreadingjni
How to make work an android plugin on another thread??
hi, i made an android plugin and if i "use" it from the main thread (in the update() of game controller) it works fine, but if i try it on a different thread i got a JNI error:
unity JNI ERROR (app bug): accessed stale local reference ...
if i put on the thread function this statement :
AndroidJNI.attachCurrentThread()
that error disappear but the JNI doesn't find the classes that i need with the helper function AndroidJavaObject(), instead if i use the raw JNI i can found that class without problem...
Can anyone tell me why this happen??
thanks for your help!! :)
Comment