Toast Engine
Loading...
Searching...
No Matches
script.hpp
Go to the documentation of this file.
1
8
9#pragma once
10#include "core_types.hpp"
11
12namespace assets {
13
14class TOAST_API Script : public Asset {
15public:
16 explicit Script(std::vector<uint8_t> data) : m_data(std::move(data)) { }
17
18 [[nodiscard]]
19 auto type() const -> std::string_view override {
20 return "script";
21 }
22
23 [[nodiscard]]
24 auto get() const noexcept -> const std::vector<uint8_t>& {
25 return m_data;
26 }
27
29 void setData(std::vector<uint8_t> data) noexcept { m_data = std::move(data); }
30
31private:
32 std::vector<uint8_t> m_data;
33};
34
35}
void setData(std::vector< uint8_t > data) noexcept
Replaces the source in place on hot reload.
Definition script.hpp:29
Base types for the asset system.