I want to enalbe / disable a box. If I only endable/disable the renderer, the code works. I need to enable/disable the collider, too. But when I add this line to the code, it is bugged. Can somebody explain why?
((( I also tryed gameObject. active = true/false, but if once deactivated, I cant reactiveate it again. )))
you forgot to put both enabled statements into parentheses. If you want to execute more than one statement in an if clause you have to put all statemnes between { } parentheses.
In your code only the first statement after the if and else was executed depending on the value of blackScreen. The last statement