Detailed Setup
Last updated
Last updated
NOTE: You can get a quick start using the Entire_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!
The system can work without the NoteInventory if you're not adding notes to inventory after first interacting
I would recommend using the NoteScene demo scene from the package as a start to your main project but if not we’ll go through the basic setup, please refer to that scene it you’re ever stuck for the way it is setup
Add the FPSController from the Prefabs folder to the Hierarchy or scene. (If not already available, if you're using the prefab)
Make sure your character controller (If it has a collider) has the layer of Ignore Raycast (This will stop the Raycast being interrupted when looking at lower objects)
On your Main Camera: Make sure you have the NotesInteractor script added
You can set the Ray Length to the distance you wish to detect the note from
Now add a (from the “Prefabs > Managers” folder to your Hierarchy or scene)
Disable Manager
Audio Manager
InputManager
NoteController
NoteUIManager
NoteInventory (If you're using this)
On the Disable Manager (Make sure to add the inspector slots)
Player: FPSController object
Note Interactor Script: Add the Main Camera here (Or the object the NotesInteractor script is located)
On the Audio Manager - Make sure you add your audio clip ScriptableObjects to the sounds array. (Get these from the ScriptableObjects > Sounds folder). More information about audio clips on the page below.
On the Input Manager - Make sure to set the input buttons you'd like to use
The note controller doesn't need any setup, other than existing in the scene by adding the prefab
This doesn't need any setup other than existing in the scene by adding the prefab and this now includes a JSON save system which you can see on the page below if you need more information
Add each canvas to control the notes, inventory, interact prompts, crosshair and note help (All can be found in the prefabs folder)
Add the NoteUIManager script or prefab to the scene so you can control all the cavnas and UI actions
Note that some UI canvas elements use the CanvasGroup component because this allows us to keep the GameObjects active but show and hide panels within code, so we don't get as easily confused on what needs to be enabled or disabled at the start of the game.
Creating a Note or Letter in the scene requires your GameObjects to have:
Box Collider
NoteInteractable script
Add the NoteData (ScriptableObject you've created for your note, see details below)
Create a new ScriptableObject by duplicating the notes that already exist or by Right Clicking > Create > ScriptableObject > NoteData
Note ID: This is the ID for the note to make sure it is unique, this is so the note is not duplicated in the inventory
Note Name: This is the name of the note which will appear in the inventory
Note Icon: This is the sprite used as the icon for the inventory
Add To Inventory: This is a boolean to tick if you want to add the note to your inventory when first read
Page Scale: This is the scale of the note that is on the screen and this default value is usually 900x900
Page Images: Here you can set the value to one and add a blank style sprite or set this to multiple if you have already created your note page in photoshop
Page Text: This MUST have 1 in the size and have some text for basic usage of the note, even if you're not needing page text but you can incriment this to match the pages in the Page Images
Show Navigation Buttons: Enable this checkbox if you have multiple pages and want to enable the buttons to navigation between them
Show Text On Main Page: Enable this to allow text to be show on the note pages, if you have 1 single page image as above with a blank sprite
Main Text Area Scale: This is the scale of the area that will show your text on the note, adjust this setting to position the text more to your liking.
Main Note Font Settings: This is the size, font, style and colour of the text
Enable Overlay Text: Enable this to show the overlay option on the note
Show Overlay On Open: Enable this to show the overlay as soon as you open the note
Overlay Text Area Scale: This is the scale of the area the text will be added and can be adjusted if the text isn't fitting properly
Overlay Text BG Scale: This is the background that the text will overlay over
Overlay BG Color: The colour of the background, so you can see the text
Overlay Font Settings: Size, font, style and text colour options in here
Allow Audio Playback: This will enable the ability to play an audio clip with additional settings
Show Playback Buttons: Enable this to show buttons for playing, pausing and resetting the audio
Play on open: This means the audio will play as soon as the note is opened
Note Read Audio: The ScriptableObject from the SO folder can be added here
Note Page Audio - Add the SO from the folder as above
NOTE: The audio is programmed to STOP when you close the note, could be changed within code if you wish for another option. The two checkboxes, can be used together or independently
Is Note Trigger: Tick this if you're wanting to use the trigger event without the raycast