Interface component, Serialization of mesh components

This commit is contained in:
antopilo
2021-09-08 18:35:10 -04:00
parent 61e54c5a46
commit b1a1f4f063
14 changed files with 145 additions and 64 deletions

View File

@@ -8,6 +8,7 @@
#include "../Components/QuakeMap.h"
#include "../Components/WrenScriptComponent.h"
#include "../Components/CharacterControllerComponent.h"
#include <src/Scene/Components/MeshComponent.h>
namespace Nuake
{
@@ -38,6 +39,8 @@ namespace Nuake
SERIALIZE_OBJECT_REF_LBL("WrenScriptComponent", GetComponent<WrenScriptComponent>());
if (HasComponent<CharacterControllerComponent>())
SERIALIZE_OBJECT_REF_LBL("CharacterControllerComponent", GetComponent<CharacterControllerComponent>());
if (HasComponent<MeshComponent>())
SERIALIZE_OBJECT_REF_LBL("MeshComponent", GetComponent<MeshComponent>());
END_SERIALIZE();
}
@@ -50,6 +53,7 @@ namespace Nuake
DESERIALIZE_COMPONENT(CameraComponent);
DESERIALIZE_COMPONENT(QuakeMapComponent);
DESERIALIZE_COMPONENT(LightComponent);
DESERIALIZE_COMPONENT(MeshComponent);
DESERIALIZE_COMPONENT(WrenScriptComponent);
DESERIALIZE_COMPONENT(CharacterControllerComponent);
return true;