Exemplo n.º 1
0
    // ***********************************************************************************************************
    /// <summary>
    /// <私有函数 (End)>
    /// </summary>
    // ***********************************************************************************************************
    #endregion // 私有函数


    #region 公有函数
    // ***********************************************************************************************************
    /// <summary>
    /// <公有函数 (Start)>
    /// </summary>
    // ***********************************************************************************************************

    public static void CheckUpdate(Action <int, string> callback, string updateurl)
    {
        UpdateMono updater = GetUpdateMono();

        updater.CheckUpdate((int a, string b) =>
        {
            callback(a, b);
            UnityEngine.Object.Destroy(updater);
        }, updateurl);
    }
Exemplo n.º 2
0
    public static UpdateMono GetUpdateMono()
    {
        UpdateMono updater = Camera.main.gameObject.GetComponent <UpdateMono>();

        if (updater == null)
        {
            updater = Camera.main.gameObject.AddComponent <UpdateMono>();
        }
        return(updater);
    }