Unity
Clone URL of Demo:
Unity Project:
http://dnsdk.vimedia.cn:8080/r/UnityDemo.git
Android Studio Project:
http://dnsdk.vimedia.cn:8080/r/UnityDemo-Google.git
Import Unity Plugin
download:Please obtain the UniWb.Wb.unitypackage from Vigame.
Imported the UniWb.Wb.unitypackage, two folders named Streanming and Wb will appear in the resource management interface.
StreamingAssets/st.txt saved signature info。
Wb folder is interface, there are ADManger , CoreManger, PayManger, ToolManger, XyxManger etc.
Use interface
Reference bellow:
Android
1.Add Android modules
Reference:Android
Please skip the 5.2,because we will use Activity inherit instead.
2.Add UnityBridge module in build.gradle
implementation WB.fixVersions('Bridge:UnityBridge')
3.Made the main Acitivy inherit UniWbActivity Or Made the UniWbActivity as main Activity
package org.cocos2dx.cpp;
import android.os.Bundle;
import com.vigame.unitybridge.UniWbActivity;
public class AppActivity extends UniWbActivity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
}
UniWbActivity has inherited UnityPlayerActivity
最后更新于
这有帮助吗?