i want to dispose the objectContain3D of the root of the Scene3D,
i met following problem in MaterialLibrary.
arcane function unregisterMaterial(material : MaterialBase) : void
{
var [color=red]id[/color] : int = material.uniqueId;
_names[id] = null;
_materials[id] = null;
material.setUniqueId(-1);
}
the var id is -1, so i guess this material is also used by other mesh, and it has already been disposed.
so i changed the code to
arcane function unregisterMaterial(material : MaterialBase) : void
{
var id : int = material.uniqueId;
[color=red] if (id == -1)
return;[/color]
_names[id] = null;
_materials[id] = null;
material.setUniqueId(-1);
}
no problem occurs.
BTW. would there be a problem if other asset is disposed multiple times?