Beispiel #1
0
    public static AssetBundleCreateRequest LoadBundleAsync(string name)
    {
#if ASSETBUNDLE
        int offset = AutherFile.LKFile_GetDataOffset(name);

        if (offset == -1)
        {
            Debug.LogError(name + " not exsit");
            return(null);
        }
        else
        {
            AssetBundleCreateRequest request = AssetBundle.LoadFromFileAsync(data_path_ + "/data", 0, (ulong)offset);
            return(request);
        }
#else
        return(null);
#endif
    }
Beispiel #2
0
    private static AssetBundle LoadBundle(string name)
    {
#if ASSETBUNDLE
        int offset = AutherFile.LKFile_GetDataOffset(name);

        if (offset == -1)
        {
            Debug.LogError(name + " not exsit");
            return(null);
        }
        else
        {
            AssetBundle ab = AssetBundle.LoadFromFile(data_path_ + "/data", 0, (ulong)offset);
#if DEBUG
            ab.name = name;
#endif
            return(ab);
        }
#else
        return(null);
#endif
    }