Devices are multi purposed interactable object prefabs. For now, there are only two, but I might add more as necessities emerge.
I've modified my level a bit. I added a wall with a whole for a door, and there's also little pedestal that I want to put a button in so that a health pack is spawn whenever I press it.
You will find the SimpleButton prefab in Prefabs > Devices. Bring it to the scene. I'm going to rotate it with the rotation tool (hotkey E) so that it fits better with my pedestal. You can rotate by increments if you hold Ctrl while rotating. Don't forget that you can switch between Local and World spaces for your transform tools (Move, Rotate and Scale). That will be useful to move the button here now that it's rotated. There's also a handy button that turns illumination off. It sometimes help you see you level better before you bake a lightmap.
The button prefab comes with some components already in place. Interactable Button and Button Sound Player are the required components the button should have. The button will function without a Trigger, but it wouldn't do anything.
I'll give my HealthSpawner a Pickup Spawn Receiver with the same Event Trigger Id, so that my button activates it and makes a health pack spawn.
I brought a Vertical Door prefab from the Devices folder into the scene.
Let's take a look inside the door and see how it works.
You will see that the door, and most of my Devices, have a similar structure. There's a GameObject that parents the skin model. this skin GameObject can be changed into whatever you want. The caveat is that you will need the new skin a Collider and a Nav Mesh Modifier with the same settings. The Interact Trigger component is optional. This component will make this door open when you interact with it, that's to the Animation Receiver component the Vertical Door has. Be sure to check that the Event Trigger Id in both components is the same, and at the same time different from all the other Triggers/Receivers in the map.
Nav Mesh Modifier will make this door not be taken into account when making a NavMesh. We want NPCs to be able to pass once the door is open. NavMeshes are not calculated when the game is running (normally), so this step is necessary.
Also, both Button and Door Sound Player components have a Sound Type field that defines what game pre-defined sound these devices will make when activated. If you want to override the sound with one(s) of your own, you can use the Clips property for that.
Don't forget to rebuild your NavMesh if you've made any changes to the environment and to save your scene before building and testing.
This type of door can be operated by an NPC. It will open automatically without the need to interact when either the player or an NPC gets close. Nested inside the prefab is a Door Script component that will allow you to configure who can use this door.