Catch material.load error
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user