Michsky – Docs Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 
Michsky – Docs Michsky – Docs
Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 

Hex UI

  • Quick Start
  • Animations
  • Controller & Input
    • Controller Manager
    • Controller Presets
    • Hotkey Event
    • UI Navigation
  • Handlers & Managers
    • Audio
    • Chapters
    • Credits
    • Effects
    • In-Game
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Dropdown
    • Modal Window
    • Notifications
    • Panel Manager
    • Progress Bar
    • Selectors
    • Slider
    • Switch
    • Timer
    • Widgets
    • Others
  • UI Manager
  • Others & Add-ons
  • FAQs
  1. Home
  2. Hex UI
  3. Handlers & Managers
  4. Chapters
Updated on May 19, 2024

Hex UI

  • Quick Start
  • Animations
  • Controller & Input
    • Controller Manager
    • Controller Presets
    • Hotkey Event
    • UI Navigation
  • Handlers & Managers
    • Audio
    • Chapters
    • Credits
    • Effects
    • In-Game
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Dropdown
    • Modal Window
    • Notifications
    • Panel Manager
    • Progress Bar
    • Selectors
    • Slider
    • Switch
    • Timer
    • Widgets
    • Others
  • UI Manager
  • Others & Add-ons
  • FAQs

Chapters

Author: admin 56 views

Workflow

Chapters are entirely managed by the ‘Chapter Manager’ component, which is attached to the Main Content > Story Mode object in the demo scene. Here you can add new chapters and modify existing items. If you need to localize the content, you can fill in the key parameters.

There are four types of chapter states.

  • Locked: Can’t be played, not unlocked yet.
  • Unlocked: Can be played, not yet completed.
  • Completed: Can be re-played, completed.
  • Current: Can be played, not completed but started.

Scripting

				
					using UnityEngine;
using Michsky.UI.Hex; // Namespace

public class SampleClass : MonoBehaviour
{
    [SerializeField] private ChapterManager chapterManager;

    void Start()
    {
        // Re-initialize chapters
        chapterManager.InitializeChapters();

        // Change chapter page
        chapterManager.NextChapter();
        chapterManager.PrevChapter();

        // Set chapter states
        // No reference required for this call as it's static
        ChapterManager.SetLocked("ChapterID");
        ChapterManager.SetUnlocked("ChapterID");
        ChapterManager.SetCurrent("ChapterID");
        ChapterManager.SetCompleted("ChapterID");
    }
}
				
			

How can we help?

A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.

© 2024 Michsky