public void Init() { //LoadSourceByResources(); if (native != null) { BDTtsConfig bdtts = new BDTtsConfig(Tips.AppID, Tips.APIKey, Tips.SecretKey); string config = JsonUtility.ToJson(bdtts); native.InitBDTts(config); } }
void Start() { if (Application.platform == RuntimePlatform.Android) { AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); currentActivity = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity"); cb = new ConvertToBase64(); mAudio = AudioManager.Instance; } DontDestroyOnLoad(gameObject); BDTtsConfig bdtts = new BDTtsConfig(Tips.AppID, Tips.APIKey, Tips.SecretKey); string config = JsonUtility.ToJson(bdtts); InitBDTts(config); //arcontrol = GameObject.Find("SceneObj/ARToolKit").GetComponent<ARController>(); }