Skip to main content

StaticPageProvider

A class in Root.Township, the global namespace.

Page provider (identifier 1) for hand-made Page assets. Get it through Instance.

Constructors​

MemberWhat it is
StaticPageProvider()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private Page pagePage shown by Test.

Properties​

MemberWhat it is
override int Identifier { get; }Always 1.
static StaticPageProvider Instance { get; }The registered provider with identifier 1.

Methods​

MemberWhat it is
override PageData GetRandom()Picks a random Page (the simple list on a simple server) and returns its data, or null if the player already has that page.
override PageData Load(PageInstanceSaveData saveData)Looks the page up by the hash in the save data.
override void Save(PageInstanceSaveData saveData, PageData page)Writes this provider's identifier and the page's hash into the save data.
override void Serialize(Stream stream, ref PageData page)Sends the page as a hashed Page reference.
protected override void Test()Editor test: shows page on the test renderer.