예제 #1
0
        /// <summary>
        /// VCHAT初始化,需要在SDK的Client.Init成功之后
        /// </summary>
        /// <param name="path">服务器配置文件路径 </param>
        /// <returns>初始化结果,如果是false则以下所有接口调用无效</returns>
        public static bool Init(string server_setting_path)
        {
            string info = "";

            if (!String.IsNullOrEmpty(server_setting_path))
            {
                NIMVChatResourceJsonEx json = new NIMVChatResourceJsonEx();
                json.Path = server_setting_path;
                info      = json.Serialize();
            }
            return(VChatNativeMethods.nim_vchat_init(info));
        }
예제 #2
0
        /// <summary>
        /// VCHAT初始化,需要在SDK的Client.Init成功之后
        /// </summary>
        /// <param name="path">nrtc等资源库路径,Unity下有效</param>
        /// <returns>初始化结果,如果是false则以下所有接口调用无效</returns>
        public static bool Init(string path)
        {
#if NIMAPI_UNDER_WIN_DESKTOP_ONLY || UNITY_STANDALONE_WIN
            string info = "";
            if (!String.IsNullOrEmpty(path))
            {
                NIMVChatResourceJsonEx json = new NIMVChatResourceJsonEx();
                json.Path = path;
                info      = json.Serialize();
            }
            return(VChatNativeMethods.nim_vchat_init(info));
#else
            return(false);
#endif
        }
예제 #3
0
        /// <summary>
        /// VCHAT初始化,需要在SDK的Client.Init成功之后
        /// </summary>
        /// <param name="path">nrtc等资源库路径,Unity下pc有效</param>
        /// <param name="context">android 上下文,Unity下android有效</param>
        /// <returns>初始化结果,如果是false则以下所有接口调用无效</returns>
        public static bool Init(string path, IntPtr context)
        {
            string info = "";

            if (!String.IsNullOrEmpty(path))
            {
                NIMVChatResourceJsonEx json = new NIMVChatResourceJsonEx();
                json.Path = path;
                info      = json.Serialize();
            }

#if UNITY_ANDROID
            return(VChatNativeMethods.nim_vchat_init(context));
#else
            return(VChatNativeMethods.nim_vchat_init(info));
#endif
        }
예제 #4
0
 /// <summary>
 /// VCHAT初始化,需要在SDK的Client.Init成功之后
 /// </summary>
 /// <returns></returns>
 public static bool Init()
 {
     return(VChatNativeMethods.nim_vchat_init(""));
 }