Unlock Event

What happens when the code is valid?

  1. Click the + icon in the bottom right, it will add a new event and you can place any gameobject which may have a script with a public method you want to call.

  2. In this case I have added the door object, this has a script called DoorController which has a public method called OpenDoor

  3. You can then run this code each time you unlock something, this can be changed on each door, and multiple events can happen in each

Event Example

  • In the example below you can see the event opens from the script DoorController

  • The DoorController exists on the door object itself.

Stopping Keypad Interactions

I have also added a RemoveTag script in case you want to remove the tag to stop interaction with the keypad once you get a specific code. (This stops you from interacting with keypads after, if you wish)

  • See the Scripts > Event Examples folder

Stopping Interaction

Last updated

Was this helpful?