Added if statement for particle texture check

This commit is contained in:
Brandon Mak 2023-03-20 15:03:18 +08:00
parent b8a2e206f7
commit 9ead2b6b12
2 changed files with 10 additions and 3 deletions

View File

@ -170,7 +170,7 @@
Angular Ranges And Offset: {x: 6.19999981, y: 1.10000002, z: 0, w: 0.100000001} Angular Ranges And Offset: {x: 6.19999981, y: 1.10000002, z: 0, w: 0.100000001}
Rotation Speed: 0.0309999995 Rotation Speed: 0.0309999995
Rotation Decay: 0.0199999996 Rotation Decay: 0.0199999996
Texture Asset ID: 0 Texture Asset ID: 63456868
Custom Update Shader Asset ID: 0 Custom Update Shader Asset ID: 0
IsActive: true IsActive: true
Scripts: ~ Scripts: ~

View File

@ -590,8 +590,15 @@ namespace YAML
SHResourceManager::FinaliseChanges(); SHResourceManager::FinaliseChanges();
//gfxSystem->BuildTextures(); //gfxSystem->BuildTextures();
rhs.SetTextureIndex(texture->TextureArrayIndex); if (texture)
rhs.SetTextureAssetID(id); {
rhs.SetTextureIndex(texture->TextureArrayIndex);
rhs.SetTextureAssetID(id);
}
else
{
SHLOG_WARNING ("Texture not set for particle emitter component: texture handle is null. ");
}
} }
if (node[CUSTOM_UPDATE_SHADER_ASSET_ID_TAG.data()].IsDefined()) if (node[CUSTOM_UPDATE_SHADER_ASSET_ID_TAG.data()].IsDefined())