KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Level.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "krpch.h"
13
14#include "Core/Object.h"
15
16namespace Karma
17{
18 class AActor;
19 class UWorld;
20
21 class AWorldSettings;
22
29 class KARMA_API ULevel : public UObject
30 {
32
33 public:
34 ULevel();
35
36 public:
37
40
43
45 std::vector<AActor*> m_ActorsForGC;
46
53 UWorld* m_OwningWorld; // UE uses smart pointer
54
55 public:
64 void Initialize(const FURL& InURL);
65
72 void SetWorldSettings(AWorldSettings* NewWorldSettings);
73
74 public:
82 virtual UWorld* GetWorld() const override final;
83
84 private:
88 // TObjectPTR in UE
89 AWorldSettings* m_WorldSettings;
90 };
91}
#define KARMA_API
Defining Karma's API macro for storage class information.
Definition Core.h:41
#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.
Actor is the base class for an object that can be placed or spawned in a level.
Definition Actor.h:34
Actor containing all script accessible world properties.
Definition WorldSettings.h:24
UWorld * m_OwningWorld
The World that has this level in its Levels array.
Definition Level.h:53
void SetWorldSettings(AWorldSettings *NewWorldSettings)
Set level's world settings.
Definition Level.cpp:23
FURL m_URL
Definition Level.h:39
KarmaVector< AActor * > m_Actors
Definition Level.h:42
void Initialize(const FURL &InURL)
Initializes the Level appropriately.
Definition Level.cpp:12
virtual UWorld * GetWorld() const override final
Override for UObject's GetWorld.
Definition Level.cpp:17
std::vector< AActor * > m_ActorsForGC
Definition Level.h:45
UObject()
Definition Object.cpp:10
The World is the top level object representing a map or a sandbox in which Actors and Components will...
Definition World.h:150
Karma's std::vector wrapper.
Definition KarmaTypes.h:152
URL structure.
Definition KarmaTypes.h:487