Catch material.load error
This commit is contained in:
parent
a47d2b43f7
commit
844f9ed217
@ -62,7 +62,11 @@ function MeshBuilder:initialize(link)
|
||||
if (isURL(mat.basetexture)) then
|
||||
mat = self:_createMaterial(mat.shader, mat.basetexture, mat.bumpmap, mat.options)
|
||||
else
|
||||
mat = material.load(mat.basetexture)
|
||||
hasErr, mat = pcall(material.load, mat.basetexture)
|
||||
|
||||
if not hasErr then
|
||||
mat = material.load("models/debug/debugwhite")
|
||||
end
|
||||
end
|
||||
|
||||
local object = {name = name, mat = mat, holo = holo}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user