feat: add camera culling masks
This commit is contained in:
@@ -317,6 +317,7 @@ void GameObject::Destroy() {
|
||||
void GameObject::Serialize(std::ostream& os) const {
|
||||
os << "name=" << m_name << ";";
|
||||
os << "active=" << (m_activeSelf ? "1" : "0") << ";";
|
||||
os << "layer=" << static_cast<uint32_t>(m_layer) << ";";
|
||||
os << "id=" << m_id << ";";
|
||||
os << "uuid=" << m_uuid << ";";
|
||||
os << "transform=";
|
||||
@@ -346,6 +347,11 @@ void GameObject::Deserialize(std::istream& is) {
|
||||
is.get(val);
|
||||
m_activeSelf = (val == '1');
|
||||
if (is.peek() == ';') is.get();
|
||||
} else if (strcmp(key, "layer") == 0) {
|
||||
uint32_t layer = 0;
|
||||
is >> layer;
|
||||
SetLayer(static_cast<uint8_t>(layer));
|
||||
if (is.peek() == ';') is.get();
|
||||
} else if (strcmp(key, "id") == 0) {
|
||||
is >> m_id;
|
||||
if (is.peek() == ';') is.get();
|
||||
|
||||
Reference in New Issue
Block a user