Ver código fonte

device: enable hot-reloading for all resource types

Daniele Bartolini 3 anos atrás
pai
commit
ff01a660fa
2 arquivos alterados com 3 adições e 1 exclusões
  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.
 * Added ``graph`` command to plot profiler data at runtime.
 * The ConsoleServer will now report an error when a command is not found.
 * The ConsoleServer will now report an error when a command is not found.
 * Fixed a crash when reloading materials.
 * Fixed a crash when reloading materials.
+* Hot-reloading has been enabled for all resource types.
 
 
 **Tools**
 **Tools**
 
 

+ 2 - 1
src/device/device.cpp

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