i got problem. trying hide agameobject
using setactive(false);
object still shown in game.
here code:
public class test : monobehaviour { public gameobject a; public gameobject b; void start () { a.setactive (false); b.setactive (false); } }
(going off presumptions here, please correct if not scenario)
in order work, a
, b
need gameobject
s in actual scene. not work prefabs because prefabs aren't ever in scene, they're copied in.
Comments
Post a Comment