GamePackage
namespace Griff.Runtime;
public static class GamePackageA game’s content (project.griff, Assets and compiled scripts) zipped onto the end of the player executable, so an exported game is a single file. The exe ends with the zip, then its length (8 bytes) and a magic tag (8 bytes).
The player unpacks the content to a cache folder the first time it runs, and plays from there: sounds and fonts are played from real files.
Methods
Section titled “Methods”Append
Section titled “Append”public static void Append(string executable, string gameFolder)Zips gameFolder onto the end of executable.
Extract
Section titled “Extract”public static string? Extract(string executable, string cacheRoot, string name)Unpacks the game carried by executable into a folder under cacheRoot (once per version of the game) and returns that folder, or null if the executable carries no game.
IsPackaged
Section titled “IsPackaged”public static bool IsPackaged(string executable)True if executable carries a game.