Manages files used for game assets. Can use a packed data file of paths and byte arrays. The game will attempt to use local files before the packed data file. Packed data is expected as: bool: true to continue reading, false to stop string: the path of the file that was packed int32: the size of the file that was packed bytes: the actual data from the file
More...
|
static void | LoadPackedData (string path) |
| Reads data from a uncompressed packed file More...
|
|
static bool | FileExists (string path) |
| Check if a file exists, or if it has been loaded from the packed data. More...
|
|
static Stream | LoadFileStream (string path) |
| Load a file as a memory stream from local files or packed data. Probably don't use this a lot it probably is memory leak city. More...
|
|
static byte[] | LoadFileBytes (string path) |
| Load a file as a byte array from local files or packed data. More...
|
|
static bool | IsUsingDataPack (string path) |
| Check if a file is being loaded from a local file or the packed data. Note that the game will attempt to load from local files before packed data. More...
|
|
|
static Dictionary< string, byte[]> | Data = new Dictionary<string, byte[]>() |
| The unpacked data from a packed data file. File paths mapped to byte arrays. More...
|
|
static string | AssetsFolderPrefix = "Assets/" |
|
Manages files used for game assets. Can use a packed data file of paths and byte arrays. The game will attempt to use local files before the packed data file. Packed data is expected as: bool: true to continue reading, false to stop string: the path of the file that was packed int32: the size of the file that was packed bytes: the actual data from the file
static bool Otter.Files.FileExists |
( |
string |
path | ) |
|
|
static |
Check if a file exists, or if it has been loaded from the packed data.
- Parameters
-
- Returns
- True if the file exists or if it has been loaded from the packed data.
static bool Otter.Files.IsUsingDataPack |
( |
string |
path | ) |
|
|
static |
Check if a file is being loaded from a local file or the packed data. Note that the game will attempt to load from local files before packed data.
- Parameters
-
- Returns
- True if the data is coming from the packed file.
static byte [] Otter.Files.LoadFileBytes |
( |
string |
path | ) |
|
|
static |
Load a file as a byte array from local files or packed data.
- Parameters
-
path | The path to load from. |
- Returns
- The byte array of the data from the file.
static Stream Otter.Files.LoadFileStream |
( |
string |
path | ) |
|
|
static |
Load a file as a memory stream from local files or packed data. Probably don't use this a lot it probably is memory leak city.
- Parameters
-
path | The path to load from. |
- Returns
- The stream.
static void Otter.Files.LoadPackedData |
( |
string |
path | ) |
|
|
static |
Reads data from a uncompressed packed file
- Parameters
-
path | The path to the packed data file. |
Dictionary<string, byte[]> Otter.Files.Data = new Dictionary<string, byte[]>() |
|
static |
The unpacked data from a packed data file. File paths mapped to byte arrays.
The documentation for this class was generated from the following file: