KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::UGameInstance Class Reference

A high-level manager object for an instance of the running game. More...

#include <GameInstance.h>

Inheritance diagram for Karma::UGameInstance:
Collaboration diagram for Karma::UGameInstance:

Public Member Functions

 UGameInstance ()
 Constructor.
 
void InitializeStandalone (const std::string &InWorldName="No_Name", UPackage *InWorldPackage=nullptr)
 Called to initialize the game instance for standalone instances of the game.
 
struct FWorldContextGetWorldContext () const
 Getter for FWorldContext instance.
 
- Public Member Functions inherited from Karma::UObject
 UObject ()
 
virtual void FinishDestroy ()
 
virtual const std::string & GetDesc ()
 Return a one line description of an object for viewing in the thumbnail view of the generic browser.
 
virtual class UWorldGetWorld () const
 Returns what UWorld this object is contained within.
 
bool IsValidChecked (const UObject *Test)
 
virtual void BeginDestroy ()
 Called before destroying the object. This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.
 
FORCEINLINE bool Modify (bool bAlwaysMarkDirty=true)
 
bool IsSelected () const
 Test the selection state of a UObject.
 
- Public Member Functions inherited from Karma::UObjectBase
 UObjectBase (UClass *inClass, EObjectFlags inFlags, EInternalObjectFlags inInternalFlags, UObject *inOuter, const std::string &inName)
 
UPackageGetPackage () const
 
UPackageGetExternalPackage () const
 
bool IsUnreachable () const
 
FORCEINLINE void SetInternalIndex (uint32_t StoreIndex)
 
FORCEINLINE uint32_t GetInternalIndex () const
 
void MarkAsGarbage ()
 
void ClearGarbage ()
 
FORCEINLINE const std::string & GetName () const
 
FORCEINLINE void SetObjectName (const std::string &aName)
 
FORCEINLINE UObjectGetOuter () const
 
UObjectGetTypedOuter (UClass *Target) const
 
template<typename T>
T * GetTypedOuter () const
 
bool IsValidLowLevel () const
 
template<typename OtherClassType>
FORCEINLINE bool IsA (OtherClassType SomeBase) const
 
FORCEINLINE UClassGetClass () const
 
FORCEINLINE EObjectFlags GetFlags () const
 
FORCEINLINE void SetFlags (EObjectFlags NewFlags)
 
FORCEINLINE void ClearFlags (EObjectFlags FlagsToClear)
 
FORCEINLINE bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 
FORCEINLINE bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 
FORCEINLINE void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 
FORCEINLINE void AddToRoot ()
 

Protected Member Functions

virtual void Init ()
 Virtual function to allow custom GameInstances an opportunity to set up what it needs.
 
class KEngineGetEngine () const
 Getter for KEngine object.
 
- Protected Member Functions inherited from Karma::UObjectBase
 UObjectBase ()
 Providing a default constructor.
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

Protected Attributes

struct FWorldContextm_WorldContext
 

Additional Inherited Members

- Static Public Member Functions inherited from Karma::UObject
static const char * StaticConfigName ()
 
- Static Public Member Functions inherited from Karma::UObjectBase
static FORCEINLINE EInternalObjectFlags FixGarbageOrPendingKillInternalObjectFlags (const EInternalObjectFlags InFlags)
 

Detailed Description

A high-level manager object for an instance of the running game.

Spawned at game creation and not destroyed until game instance is shut down.

Remarks
Running as a standalone game, there will be one of these.
Running in PIE (play-in-editor) will generate one of these per PIE instance.

Constructor & Destructor Documentation

◆ UGameInstance()

Karma::UGameInstance::UGameInstance ( )

Constructor.

Since
Karma 1.0.0

Member Function Documentation

◆ GetEngine()

KEngine * Karma::UGameInstance::GetEngine ( ) const
protected

Getter for KEngine object.

Since
Karma 1.0.0

◆ GetWorldContext()

struct FWorldContext * Karma::UGameInstance::GetWorldContext ( ) const
inline

Getter for FWorldContext instance.

Since
Karma 1.0.0

◆ Init()

void Karma::UGameInstance::Init ( )
protectedvirtual

Virtual function to allow custom GameInstances an opportunity to set up what it needs.

Since
Karma 1.0.0

◆ InitializeStandalone()

void Karma::UGameInstance::InitializeStandalone ( const std::string & InWorldName = "No_Name",
UPackage * InWorldPackage = nullptr )

Called to initialize the game instance for standalone instances of the game.

Parameters
InWorldNameThe name of the new world
InWorldPackageThe container of the new world
Since
Karma 1.0.0

The documentation for this class was generated from the following files: