(question) Removing sprites
Opened this issue · 2 comments
mattkrins commented
Hi Clavus, you can remove a model from a table on the fly using something like
if CLIENT then for _, v in pairs( self.WElements ) do if v.modelEnt and IsValid(v.modelEnt) then v.modelEnt:Remove() end end end
But is it possible to remove sprites in a similar fashion?
Clavus commented
Looking at the base code, sprite materials are stored in v.spriteMaterial
. So simply do v.spriteMaterial = nil
and it should disappear.
mattkrins commented
Thanks, i'll check it out.