diff --git a/birb/core/assets.lua b/birb/core/assets.lua index 291dae5..45ed313 100644 --- a/birb/core/assets.lua +++ b/birb/core/assets.lua @@ -67,10 +67,17 @@ function AssetManager:clearLocal() end function AssetManager:get(name) + local asset if self.locals[name] ~= nil then - return self.locals[name] + asset = self.locals[name] + end + asset = self.globals[name] + + if (asset ~= nil) then + return asset + else + core.debug:fail("birb.modules.assets", "L'asset " .. name .. " n'existe pas.") end - return self.globals[name] end -- Specific functions