Esempio n. 1
0
    public void Begin()
    {
        // 检测网络状态
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            // 开启网络状态提示框
            m_uiNetworkBox.SetActive(true);
            return;
        }
        else
        {
            // 关闭网络状态提示框
            m_uiNetworkBox.SetActive(false);
        }

        // 读取包里的资源版本文件
        m_pPackageResverIni.OpenFromStreamingAssets(m_szResverTxt);

        // 读取本地的资源版本文件
        m_pLocalResverIni.OpenFromTXT(PathUtil.ConfigPath() + m_szResverTxt);

        if (Const.ResourceMode == "assetbundle")
        {
            // 其它模式先检查源
            CheckResource();
        }
        else
        {
            // 非assetbundle模式直接从Resource目录读取资源
            OnInited();
        }
    }
Esempio n. 2
0
 static int OpenFromStreamingAssets(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         IniUtil obj  = (IniUtil)ToLua.CheckObject(L, 1, typeof(IniUtil));
         string  arg0 = ToLua.CheckString(L, 2);
         bool    o    = obj.OpenFromStreamingAssets(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }