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 "krpch.h"
14
15#include "Object.h"
16
17namespace Karma
18{
27 class UGameInstance : public UObject
28 {
30
31 public:
38
39 protected:
40 struct FWorldContext* m_WorldContext;
41
42 protected:
48 virtual void Init();
49
55 class KEngine* GetEngine() const;
56
57 public:
66 void InitializeStandalone(const std::string& InWorldName = "No_Name", UPackage* InWorldPackage = nullptr);
67
73 struct FWorldContext* GetWorldContext() const { return m_WorldContext; }
74 };
75}
#define DECLARE_KARMA_CLASS(TClass, TSuperClass)
Karma's gamecode object class declaration.
Definition GFrameworkMacros.h:44
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:191
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:73
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:23
A context for dealing with UWorlds at the engine level. As the engine brings up and destroys world,...
Definition Engine.h:45