fix: search global asset only if there is no local
This commit is contained in:
parent
e5d8e699bc
commit
92c10440a1
1 changed files with 3 additions and 2 deletions
|
@ -70,13 +70,14 @@ function AssetManager:get(name)
|
|||
local asset
|
||||
if self.locals[name] ~= nil then
|
||||
asset = self.locals[name]
|
||||
else
|
||||
asset = self.globals[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.")
|
||||
core.debug:fail("core.assets", "L'asset " .. name .. " n'existe pas.")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue