Calling Android NDK function from Unity Script

前端 未结 2 994
没有蜡笔的小新
没有蜡笔的小新 2021-01-07 04:11

So I\'m creating an Android app that uses Unity ... I am getting some assetbundle from Unity but I do not know the url before Unity starts. Thus Unity needs to call a funct

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-07 04:42

    You could likely send the 'dynamic' url in your call to getURL. Do something like:

    return plugin.Call("getURL", new object[] {"http://thisIsMyUrl.com"});

    and then your java looking like this:

    public String getURL(Object newUrl) {
        return newUrl.ToString();
    }
    

提交回复
热议问题