9 CORI_CORE_ERROR_TAGGED({ Logger::Tags::Core::Self, Logger::Tags::Core::Layer },
"Creating a Layer with an empty name. This WILL cause issues.");
28 return std::unexpected(
CoriError(
"Scene name cannot be empty!"));
34 return std::unexpected(result.error());
37 const bool success = result.value().OnBind();
39 return std::unexpected(
CoriError(std::format(
"Failed to bind Scene '{}'", name)));
57 return std::unexpected(
CoriError(std::format(
"Failed to unbind Scene '{}'",
ActiveScene.GetName())));
61 ActiveScene.m_SceneRaw = std::shared_ptr<World::Scene>(
nullptr);
#define CORI_CORE_DEBUG_TAGGED(...)
#define CORI_CORE_WARN_TAGGED(...)
#define CORI_CORE_INFO_TAGGED(...)
Custom error class mainly used in std::expected.
virtual void OnDetach()
Method that runs when the layer gets detached to the LayerStack.
std::expected< void, CoriError<> > BindScene(const std::string &name)
Binds the Scene to the Layer.
World::SceneHandle ActiveScene
A SceneHandle to the Scene that is currently bound.
std::expected< void, CoriError<> > UnbindScene()
Unbinds the Scene from the Layer.
virtual void OnAttach()
Method that runs when the layer gets attached to the LayerStack.
static std::expected< SceneHandle, Core::CoriError<> > GetScene(const std::string &name)
Retries the scene with the specified name from the cache.
Core systems of the engine are here.