Detailed Setup
NOTE: You can get a quick start using the β€œEntire_Fusebox_DemoScene” prefab object and drag that straight into your scene. This will everyone to be already setup, you can delete the art assets as required but checkout the demo scene if you’re confused!
Player:
  • Layer of: "Ignore Raycast"
Any Interactable Object:
  • Tag "InteractiveObject" or as per the raycast script on the main camera, it will have the tag you need!
  1. 1.
    Add an β€œFPSController” to your scene. (Unless you’re using the demo which will already have one added, but the package will be required to be imported before use). Please navigate to the scripts folder in the fuse box package and add the β€œFBRaycast” script to your β€œMainCamera”.
2. Now drag the managers from the β€œPrefabs” folder into the hierarchy. NOTE: Only drag this prefab into the hierarchy, not the scene.
3. Add the crosshair image from the β€œCanvasContainer” -> β€œCrosshairCanvas” components to the β€œFBUIManager” crosshair slot in the inspector.
4. Add the β€œFusesText_UI” from the β€œCanvasContainer” -> β€œFuseboxCanvas” -> β€œFusesText_BG” to the β€œFuseUI” slot in the β€œFBUIManager”. Keep Inventory fuses at 0.
5. Make sure the β€œFBAudioManager” has the sounds you require in the appropriate slots, see example. NOTE: Keep volume and pitch at a maximum of 1 and give them the names as seen in the screenshot below.
6. Place a β€œCollectable_Fuse” into your scene from the prefabs folder. Make sure it has the tag of β€œInteractiveObject” NOTE: You can duplicate these later if you need as many fuses as you require to complete the puzzle.
7. Make sure the collectable fuse has a script of β€œFBItem” and set this to β€œFuse”.
8. Add the β€œFuseBox_Parent” to your scene and place it where you want. Make sure this has a tag of β€œInteractiveObject”
9. It will need a β€œFBItem” script set to β€œFusebox”
10. It will also need a β€œFBController” script as well.
11. Look at the β€œFBController” in the inspector on the β€œFuseBox_Parent” you just added. NOTE: Read through the information below and attach the correct GameObjects in the β€œFBController” script in the inspector. See the image on the next page for more details!
Fuse Inserted?: Tick these boxes to specify if any fuses should be in the puzzle at the start of the game. You can leave them all at false if you need to find 4 fuses to complete the puzzle. Individual Fuses: Add the fuse object that exist within this parent object. As seen in the image below. Fuse Lights: Add the β€œFuseBox_Light_x” to the slots from this parent object. Materials: Add the two materials that exist in the materials folder of the asset, β€œM_Fuse_Box_Light_Green” Power up – UnityEvents: You can create different events based on getting the puzzle correct, so add the β€œ+” and add custom events you want!
12. You might want to increment the β€œFuseBox_Parent” with a β€œ#1” and β€œ#2” if you have more than one fuse box in each scene to make linking up the scripts easier. For example: β€œFuseBox_Parent_1” and β€œFuseBox_Parent_2”
Copy link