Menu. Understand order execution

Hi, two cameras. One point to a cube. It have a onmousedown event that set enable to camera 2.

It work right.

But attached in camera 2, i have some script, that i need to avoid execution, until button on camera 1 is pressed.

How can avoid script on camera 2?

If i disable camera2 in screen view, it can be activate at run time?:cry:

Kind of hard to follow exactly what you’re talking about without seeing some code, but it sounds like something that could be easily done with a public boolean on the script on camera 2 that doesn’t get set to true until the button on camera 1 is pressed.

I think that i was confused.

“All scripts attached to a Gameobject executed AWAKE event at run time.”

In order to execute a desired procedure, OnMouseDown event must to call it when event is fired.

That’s not really clear, posting your code could help. Every scripts execute awake first, in any case, you can’t avoid that, if you want something to happen when you want, put that thing in the update function, with an “if” statement, don’t put it in the awake or start function. Or put what you want to be triggered by event in a static function and call that function when the event occur.