Skip to content

Commit

Permalink
#123 Update save/load IndirectLighting
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamhong committed May 21, 2022
1 parent 71659eb commit babbce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This file is part of the "Skylicht Engine".

#include "Utils/CActivator.h"
#include "Serializable/CObjectSerializable.h"
#include "Serializable/CArraySerializable.h"
#include "CComponentCategory.h"

namespace Skylicht
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace Skylicht
enumType->addEnumString("SH9", EIndirectType::SH9);
object->addAutoRelease(enumType);

CObjectSerializable* textureArray = new CObjectSerializable("LMTextures", object);
CArraySerializable* textureArray = new CArraySerializable("LMTextures", object);
object->addAutoRelease(textureArray);

std::vector<std::string> textureExts = { "tga","png" };
Expand All @@ -150,12 +150,12 @@ namespace Skylicht

EIndirectType type = object->get<EIndirectType>("type", EIndirectType::SH9);

CObjectSerializable* textureArray = (CObjectSerializable*)object->getProperty("LMTextures");
CArraySerializable* textureArray = (CArraySerializable*)object->getProperty("LMTextures");
if (textureArray != NULL)
{
m_lightmapPaths.clear();

int count = (int)textureArray->getNumProperty();
int count = textureArray->getElementCount();
for (int i = 0; i < count; i++)
{
char name[43];
Expand Down

0 comments on commit babbce9

Please sign in to comment.