Unlock Event

How to change the unlock event code when the door opens

  1. In the PadlockController script object - In the Unlock Events section towards the bottom.

    1. This uses UnityEvents which allows you to click the + icon in the bottom right

    2. You can add any GameObject into the appropriate slot and any script which has a public method, will allow this to be run.

Example in the Demo Scene

  1. I have an example in the demo scene, which references the Door Object, which has the script STDoorController

  2. Within this controller there is a method called OpenDoor - Which just activates either an animation or door rotation on an axis

Last updated

Was this helpful?