KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
GameInstance.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include "Object.h"
14
15namespace Karma
16{
25 class UGameInstance : public UObject
26 {
28
29 public:
36
37 protected:
38 struct FWorldContext* m_WorldContext;
39
40 protected:
46 virtual void Init();
47
53 class KEngine* GetEngine() const;
54
55 public:
64 void InitializeStandalone(const std::string& InWorldName = "No_Name", UPackage* InWorldPackage = nullptr);
65
71 struct FWorldContext* GetWorldContext() const { return m_WorldContext; }
72 };
73}
#define DECLARE_KARMA_CLASS(TClass, TSuperClass)
Karma's gamecode object class declaration.
Definition GFrameworkMacros.h:45
This file contains the class UObject along with helper functions.
Base class of all Engine classes, responsible for management of systems critical to editor or game sy...
Definition Engine.h:189
class KEngine * GetEngine() const
Getter for KEngine object.
Definition GameInstance.cpp:16
virtual void Init()
Virtual function to allow custom GameInstances an opportunity to set up what it needs.
Definition GameInstance.cpp:12
struct FWorldContext * GetWorldContext() const
Getter for FWorldContext instance.
Definition GameInstance.h:71
UGameInstance()
Constructor.
Definition GameInstance.cpp:8
void InitializeStandalone(const std::string &InWorldName="No_Name", UPackage *InWorldPackage=nullptr)
Called to initialize the game instance for standalone instances of the game.
Definition GameInstance.cpp:21
UObject()
Definition Object.cpp:10
A generic outer for UObjects, for instance UWorld.
Definition Package.h:22
A context for dealing with UWorlds at the engine level. As the engine brings up and destroys world,...
Definition Engine.h:43