Marquee
Scrolling message across the bottom of the screen
CreateNewMarquee.cs
1 // Copyright 2019 (C) paul@marrington.net http://www.askowl.net/unity-packages
2 
3 using CustomAsset.Constant;
4 using CustomAsset.Mutable;
5 using UnityEditor;
6 using UnityEngine;
7 using Integer = CustomAsset.Mutable.Integer;
8 using String = CustomAsset.Mutable.String;
9 
10 namespace Askowl {
11  /// Wizard to create a new Marquee in the current scene
12  public class CreateNewMarquee : AssetWizard {
13  [MenuItem("Assets/Create/Marquee")] private static void CreateMarquee() =>
14  new CreateNewMarquee().CreateAssets("Marquee");
15 
16  protected override void OnScriptReload() {
17  CreateAssetDictionary(
18  ("Tickertape Manager", typeof(Tickertape))
19  , ("Characters per second", typeof(Integer))
20  , ("Contents", typeof(Quotes))
21  , ("Display complete", typeof(Trigger))
22  , ("Now showing", typeof(String))
23  , ("Repeats per message", typeof(Integer))
24  , ("Marquee Canvas", typeof(Marquee))
25  , ("quotes", typeof(TextAsset)));
26 
27  SetField("Tickertape Manager", "quotes", Asset("Contents"));
28  SetField("Tickertape Manager", "showing", Asset("Now showing"));
29  SetField("Tickertape Manager", "showingComplete", Asset("Display complete"));
30 
31  SetField("Marquee Canvas", "charactersPerSecond", Asset("Characters per second"));
32  SetField("Marquee Canvas", "repeats", Asset("Repeats per message"));
33  SetField("Marquee Canvas", "showing", Asset("Now showing"));
34  SetField("Marquee Canvas", "showingComplete", Asset("Display complete"));
35 
36  Field("Characters per second").intValue = 16;
37 
38  SetActiveObject("Contents");
39  }
40  }
41 }
Manager Custom Asset to serve messages to the marquee
Definition: Tickertape.cs:17
Wizard to create a new Marquee in the current scene.
Visual object to display a message scrolling across the screen
Definition: Marquee.cs:8