Make sure to duplicate the materials before adding them to the cache in _setup_cache.

This commit is contained in:
Relintai 2021-08-18 16:57:11 +02:00
parent 1f45f626d3
commit 9c970bbed5

View File

@ -245,7 +245,9 @@ void TiledWallData::_setup_cache(Ref<PropMaterialCache> cache) {
const Ref<Material> &m = _materials[i];
if (m.is_valid()) {
cache->material_add(m);
Ref<Material> nm = m->duplicate();
cache->material_add(nm);
}
}
}