update resource manager
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class RawBundle
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly PackageBundle _packageBundle;
|
||||
private readonly string _filePath;
|
||||
|
||||
internal RawBundle(IFileSystem fileSystem, PackageBundle packageBundle, string filePath)
|
||||
{
|
||||
_fileSystem = fileSystem;
|
||||
_packageBundle = packageBundle;
|
||||
_filePath = filePath;
|
||||
}
|
||||
|
||||
public string GetFilePath()
|
||||
{
|
||||
return _filePath;
|
||||
}
|
||||
public byte[] ReadFileData()
|
||||
{
|
||||
if (_fileSystem != null)
|
||||
return _fileSystem.ReadFileData(_packageBundle);
|
||||
else
|
||||
return FileUtility.ReadAllBytes(_filePath);
|
||||
}
|
||||
public string ReadFileText()
|
||||
{
|
||||
if (_fileSystem != null)
|
||||
return _fileSystem.ReadFileText(_packageBundle);
|
||||
else
|
||||
return FileUtility.ReadAllText(_filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6e71c986d2a8c74d981deeed7b5a8ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class VirtualBundle
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly PackageBundle _packageBundle;
|
||||
|
||||
internal VirtualBundle(IFileSystem fileSystem, PackageBundle packageBundle)
|
||||
{
|
||||
_fileSystem = fileSystem;
|
||||
_packageBundle = packageBundle;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 822bb85f05144d842977dda341174db2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user