I was trying to create a puzzle where a box when moved onto a pressure plate opens a gate. When I get the box onto the pressure plate I was trying to pass a Boolean to the gate telling it to open. Is this the correct way of achieving my goals?
I have unity version 3.4 it is not pro and i’m coding in C#.
Any help appreciated as I have just started trying to learn unity.
Let’s say your gate game object has the name MagicGate in your hierarchy view and has a script component assigned of type GateController containing the following code:
There is another class maybe GameStatusController where you detect that the box is at the magic pressure plate (Colliders are useful for this). There you do: