GameLoader
namespace Griff.Runtime;
public static class GameLoaderLoads an exported game folder (or a project folder) for the player.
Methods
Section titled “Methods”LoadAsync
Section titled “LoadAsync”public static Task<LoadedGame> LoadAsync(string gameFolder)Loads a game folder (an export’s, or a project’s): the modules it carries first (ModulesFolder, so its scenes read with their components), then its scripts and its start scene. Its games run the modules it uses.
LoadScene
Section titled “LoadScene”public static Scene LoadScene(Project project, ComponentRegistry components, string nameOrPath)RegisterComponents
Section titled “RegisterComponents”public static void RegisterComponents(Assembly assembly, ComponentRegistry registry, ICollection<string> warnings)UseProjectSettings
Section titled “UseProjectSettings”public static void UseProjectSettings(Game game, Project project)Sets game up as project says, before it starts: its controls (the game’s own input actions), its step rate, its save version, its tables (every .table file in Assets, see Tables) and its balance simulations (every .sim file, see Game.Simulate). Every host does this, so a game plays the same in the editor, exported and in a browser.