SegmentDisplay is classic display where each digit is made of segments that turn on and off, forming numbers or letters.
This package contains multiple different type (7, 14 and 16 segment) and style displays that can be embedded to your game objects or UI. Content of the display can be then changed from code during runtime.
In package folder SegmentDisplay/Prefabs/ there is 2 different prefabs:
Simply drag wanted prefab to your Scene view or Hierarchy window. Display will appear in scene or UI immediately.
Select just added SegmentDisplay object from hierarchy. Inspector window will show you controls to personalize the display for your needs.
You can choose display type, style, number of digits, digit spacing, colors etc.
Create new script and make sure it is
You can then change text of display simply by saying:
This will cause text "42" to appear on display immediately.
If you need more complex and automated control, you can use SDController class. For example adding scrolling text:
SDController sdController = mySegmentDisplay.GetSDController();
ScrollTextCommand scrollCommand = new ScrollTextCommand("Hello World", ScrollTextCommand.Methods.StartOutsideMoveLeftUntilOut, 3f);
This will scroll text "Hello World" from right to left, 3 characters per second.
If you need more exact control of display you can access single digits of display:
SingleDigit displayDigit = mySegmentDisplay;
This will set number 8 to leftmost digit of display without changing any other digits.
Full API documentation
Download from Unity Asset Store