AndroidJavaObject.Call array passing error (Unity for Android)

前端 未结 2 635
时光取名叫无心
时光取名叫无心 2021-01-20 05:17

I\'m working on Unity for Android application, which uses native Android plugin. Inside of it I use AndroidJavaObject\'s Call method.

As it

2条回答
  •  太阳男子
    2021-01-20 05:45

    All you need to do is just cast the string array to an object, like the following code;

    string[] strings = new string[] { "string1", "string2", ...};
    
    myAndroidJavaObject.Call("myMethod", **(object)** strings);
    

提交回复
热议问题