Explorar el Código

device: enable hot-reloading for all resource types

Daniele Bartolini hace 3 años
padre
commit
ff01a660fa
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 1 0
      docs/changelog.rst
  2. 2 1
      src/device/device.cpp

+ 1 - 0
docs/changelog.rst

@@ -17,6 +17,7 @@ Changelog
 * Added ``graph`` command to plot profiler data at runtime.
 * The ConsoleServer will now report an error when a command is not found.
 * Fixed a crash when reloading materials.
+* Hot-reloading has been enabled for all resource types.
 
 **Tools**
 

+ 2 - 1
src/device/device.cpp

@@ -766,9 +766,10 @@ void Device::refresh()
 				StringId64 resource_type(type);
 				StringId64 resource_name(resource.c_str(), len);
 
+				_resource_manager->reload(resource_type, resource_name);
+
 				if (resource_type == RESOURCE_TYPE_SCRIPT) {
 					refresh_lua = true;
-					_resource_manager->reload(resource_type, resource_name);
 				}
 			}