diff --git a/engine/include/cubos/engine/assets/assets.hpp b/engine/include/cubos/engine/assets/assets.hpp index 5dc627659d..4066d98739 100644 --- a/engine/include/cubos/engine/assets/assets.hpp +++ b/engine/include/cubos/engine/assets/assets.hpp @@ -152,14 +152,15 @@ namespace cubos::engine /// /// @tparam T Type of the asset data. /// @param handle Handle to get the asset data for. + /// @param incVersion Whether to increase the asset's version. /// @return Reference to the asset data. template - inline AssetWrite write(Asset handle) + inline AssetWrite write(Asset handle, bool incVersion = true) { // Create a strong handle to the asset, so that the asset starts loading if it isn't already. auto strong = this->load(handle); auto lock = this->lockWrite(strong); - auto data = static_cast(this->access(strong, typeid(T), lock, true)); + auto data = static_cast(this->access(strong, typeid(T), lock, incVersion)); return AssetWrite(*data, std::move(lock)); }