- Home /
BoxCollider2D can't enable in runtime
Hey. I'm trying to add a 2d boxcollider to a sprite in runtime. For some reason, it gets disabled and I cannot re-enable it.
Temp.AddComponent<BoxCollider2D>();
Temp.collider2D.enabled = true;
Any idea? Thanks.
Comment