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 "Core/Object.h"
13
14namespace Karma
15{
16 class AActor;
17 class UWorld;
18
19 class AWorldSettings;
20
27 class KARMA_API ULevel : public UObject
28 {
30
31 public:
32 ULevel();
33
34 public:
35
38
41
43 std::vector<AActor*> m_ActorsForGC;
44
51 UWorld* m_OwningWorld; // UE uses smart pointer
52
53 public:
62 void Initialize(const FURL& InURL);
63
70 void SetWorldSettings(AWorldSettings* NewWorldSettings);
71
72 public:
80 virtual UWorld* GetWorld() const override final;
81
82 private:
86 // TObjectPTR in UE
87 AWorldSettings* m_WorldSettings;
88 };
89}
#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:45
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:35
Actor containing all script accessible world properties.
Definition WorldSettings.h:22
UWorld * m_OwningWorld
The World that has this level in its Levels array.
Definition Level.h:51
void SetWorldSettings(AWorldSettings *NewWorldSettings)
Set level's world settings.
Definition Level.cpp:23
FURL m_URL
Definition Level.h:37
KarmaVector< AActor * > m_Actors
Definition Level.h:40
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:43
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:148
Karma's std::vector wrapper with additional functionalities.
Definition KarmaTypes.h:243
URL structure.
Definition KarmaTypes.h:720