Post

虚拟文件系统

一、Virtual File System C++

https://github.com/nextgeniuspro/vfspp

二、基本功能

  1. 挂载本地文件系统
1
2
3
auto rootFS = std::make_unique<NativeFileSystem>(GetBundlePath() + "Documents/");
//
vfs->AddFileSystem("/", std::move(rootFS));

可以挂载Editor中的工程目录,也可以挂在运行平台的读写目录

  1. 挂载zip文件(只读)

挂载打包后的资源,或者Android的内置资源

  1. 挂载内存

Editor或者运行时的场景

三、 一切皆文件

尝试将资源、场景渲染、逻辑都基于虚拟文件系统实现

This post is licensed under CC BY 4.0 by the author.