Note Scriptable Setup
Last updated
Last updated
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