Exemplo n.º 1
0
    public byte[] LoadByte(string fileResPath)
    {
        string realResPath = LocalPath.HotUpdatePath + LocalPath.PackagingResources + "/" + fileResPath;

        if (!File.Exists(realResPath))
        {
            realResPath = LocalPath.StreamingAssetsPath + LocalPath.PackagingResources + "/" + fileResPath;
        }

        return(C_Save.LoadByte(C_String.GetFileName(fileResPath), C_String.GetSavePath(realResPath)));
    }
Exemplo n.º 2
0
    public static void PlayAudio_URL_MP3(string url)
    {
        if (string.IsNullOrEmpty(url))
        {
            return;
        }

        string filePath = C_LocalPath.DataPath + C_String.GetFileName(url);

        if (!File.Exists(filePath))
        {
            C_UnityWebRequestDownloader.SyncDownloadFile(url, C_LocalPath.DataPath);
        }

        if (File.Exists(filePath))
        {
            C_MonoSingleton <C_AudioMgr> .GetInstance().PlayClipOneShot_MP3(filePath);
        }
    }