beasty-visual-novel / reference / prefabs.md

Prefabs

Every prefab the package ships, and exactly which components it mounts. Use this page to find the prefab to open when you want to restyle a screen.

Everything the player sees is a uGUI prefab. Nothing is drawn from code, so you can restyle any screen without touching C#. How to restyle safely, and how to keep your changes when the package updates, is in UI prefabs.

The prefabs live in BeastyVN/Prefabs/, except VNMenuRoot and VNBacklogEntry, which live in BeastyVN/Runtime/UI/Prefabs/.

Lookup table

PrefabMountsWhat it is
VisualNovelSceneBeastyManager, VNGameController, VisualNovelController, StageController, FreeRoamController, FreeRoamScreenController, VNAudioManager, VNInputModuleInstaller, BeastyAspectRatioEnforcer, BeastyLoadingScreen, VNMenuManager, DialogueView, ChoiceView, FreeRoamScenarioA whole ready-made scene: drop it in and press Play.
VN_CanvasDialogueView, ChoiceView, ContinueIndicatorBlink, DialogueTextEffect, VNMenuManager, MainMenuScreen, GameMenuScreen, SaveLoadScreen, PreferencesScreen, HistoryScreen, CreditsScreen, HelpScreen, VNConfirmDialog, BeastyLoadingScreen, VNLocalizedTextThe entire UI in one prefab.
StageFreeRoamScenarioThe stage root and the free-roam scenario.
DialogPanelDialogueTextEffectThe dialogue box: name plate, text, continue indicator.
ChoiseRoot(uGUI only)The container the choice buttons are spawned into.
ChoiseBtn(uGUI only)One choice button, instantiated per option.
VNMenuRootVNMenuManager, MainMenuScreen, GameMenuScreen, SaveLoadScreen, PreferencesScreen, HistoryScreen, CreditsScreen, HelpScreen, VNConfirmDialog, VNLocalizedTextEvery menu screen under one root.
MainMenuScreenMainMenuScreenThe title screen.
GameMenuScreenGameMenuScreen, SaveLoadScreen, PreferencesScreen, HistoryScreen, CreditsScreen, HelpScreenThe in-game menu and the screens it opens.
VNSaveSlotSaveSlotViewOne save slot. Instantiated per slot.
VNBacklogEntry(uGUI only)One line in the history screen. Instantiated per line.
InventoryInventoryScreen, InventorySlot, InventoryDetailPopup, FlexibleGridLayoutThe inventory screen, its slots and the detail popup.
CharactersMenuCharacterListScreen, CharacterListRowThe cast list.
CharacterProfileCharacterProfileScreen, CharacterStatsScreen, CharacterStatRow, CharacterRoutineScreen, CharacterQuestsScreen, CharacterQuestRow, FreeRoamScreenElementOne character’s profile, with its tab bar and section panels.
CharacterStatsCharacterStatsScreen, CharacterStatRowThe stats panel on its own.
GridMenuFlexibleGridLayoutAn overlay screen laid out as a grid.
VerticalMenuFreeRoamScreenElementAn overlay screen laid out as a vertical list.
GridItemScreenElement, ItemScreenElement, VerticalItemScreenElementFreeRoamScreenElement, VariableBoundLabelThe element templates a screen’s items are built from.
BeastyVNMixer(AudioMixer)The mixer, with one group per channel: Music, Ambient, Sfx, Voice.

The scene prefabs

VisualNovelScene is a complete scene. It mounts the BeastyManager with every manager it owns, the Stage and the Canvas. Tools > Beasty VN > Setup > Create Scene builds the same rig into your own scene instead, which is what you want in a real project.

Stage carries the FreeRoamScenario component. That is where you assign your FreeRoamMapGraph.

The dialogue and choice prefabs

VN_Canvas holds the whole interface. DialogueView drives the dialogue box, ChoiceView drives the options.

  • To restyle the dialogue box, edit DialogPanel.
  • To restyle the choices, edit ChoiseBtn (one button) and ChoiseRoot (their container). ChoiceView instantiates ChoiseBtn once per option that passes its condition.

ChoiseRoot and ChoiseBtn mount no Beasty components at all. They are ordinary uGUI objects, which means you can rebuild them however you like as long as the parts the view looks for are still there.

See Dialogue and stage and Choices and decisions.

The menu prefabs

VNMenuRoot mounts VNMenuManager plus every screen it manages: main menu, game menu, save/load, preferences, history, credits, help, and the confirm dialog. It self-wires to the BeastyManager rig at runtime, so you can drop it under any Canvas.

MainMenuScreen and GameMenuScreen also exist as standalone prefabs, which is what you edit when you want to restyle one menu rather than the whole set.

VNSaveSlot and VNBacklogEntry are templates: one is instantiated per save slot, one per line of history. Restyle the template and every row follows.

Tools > Beasty VN > Setup > Build Default Menu Prefabs rebuilds these from scratch and warns you before it overwrites anything. Tools > Beasty VN > Setup > Upgrade UI Prefabs (keep customizations) updates them while keeping your restyling.

The gameplay screens

The inventory and the character screens are built by copying the shipped prefab into your project’s folder and registering the copy as a screen on the VNContext.

Note You restyle your copy, not the prefab in the package folder. Editing the shipped prefab has no effect on a screen that was already created, because the screen points at the copy.

You want to restyleOpen
The inventory grid, a slot, the item detail popupInventory
The cast listCharactersMenu
A character’s profile, its tab bar, its sectionsCharacterProfile
The stats panel aloneCharacterStats
An overlay screen laid out as a gridGridMenu plus GridItemScreenElement
An overlay screen laid out as a listVerticalMenu plus VerticalItemScreenElement

VariableBoundLabel on the element templates is what lets a HUD label show a live variable.

See Items and inventory, Character screens and Screens and HUD.

The mixer

BeastyVNMixer is a standard Unity AudioMixer with one group per channel: Music, Ambient, Sfx and Voice. The Preferences screen’s volume sliders write to it. Point the audio manager at your own mixer if you prefer, as long as it exposes the same four groups.

See Audio and music.

See also