Execution Sequence

I see that scripts are executed in the sequence of game objects from the top of the hierarchy down.

For example, if a script that turns off visibility for all objects except its parent is added to three cubes it will always be the last cube in the hierarchy that is visible.

A similar situation occurs with multiple event listeners.

It would be useful to know if:

a) Will this always be the case?

b) Is there a way prioritise a script's position in the sequence?

Short answer:
Not guaranteed in some cases.

Long answer:
It should be fairly consistent for same context scripts (and objects). Meaning that if you have scripts in the client context, then they will execute in the order they appear in the Hierarchy. But for anything networked, then it is not guaranteed, because they need to be replicated to the client. Though, decendants of the networked object should be in the expected order.

In reply to your other question. If replication order can't be guaranteed, then no. But you can write a system to make sure scripts run in the order you want by simply waiting until the script is available (i.e. checking if it's registered in the global table).