Door System
  • 🏠Door System
  • General
    • 🚀Getting Started
      • Create Simple Door
      • Create Double Doors
    • ❔FAQ
    • ⛑️Troubleshooting
    • 👥Support
  • Advanced
    • Migration Tool
    • 📖Components
      • SmartDoor
      • SmartKeyHolder
      • SmartKey
    • 🔎Glossary
Powered by GitBook
On this page
  • Core Features
  • Usage

Was this helpful?

  1. Advanced
  2. Components

SmartKey

SmartKey is a Unity component that encapsulates the concept of a “key” in the game environment. It defines an object that holds the ability to unlock or interact with one or more SmartDoor objects.

PreviousSmartKeyHolderNextGlossary

Last updated 1 year ago

Was this helpful?

Core Features

Key Identification

Each instance of SmartKey can be uniquely identified or described through the keyName property. This could be used for various purposes like showcasing the name of the key to the player, or to determine game-rules based on the different keys.

Door Unlock Mapping

Each SmartKey object maintains a list of SmartDoor objects that it can unlock. This is maintained in the unlockDoors property. Assign SmartDoor objects to this array to establish doors that the key can interact with.

Usage

Attach the SmartKey component to any GameObject, ideally this would be a GameObject that visually represents a key in the game. The key can then be configured to dictate which SmartDoor objects it can interact with, through the unlockDoors property. This level of control in the hands of the developer allows for varied game mechanics and puzzles by determining the interaction between specific keys and doors.

Smart Key Component

Key Name

This is a string property where you can define the name of the key. This name might be used for display in a UI, or for debugging and identification purposes within the Unity Editor.

Unlock doors

This is an array of SmartDoor objects that represents specific doors this key can unlock or operate. By setting up different keys to interact with different sets of doors, you can manage access and player progression in your game.

📖