Display
Derived from
MonoBehaviour
Abstract base class for all the display types (3D, sprite based and UI). Display script is attached to DotMatrix prefabs and is defining how actual, visible display looks like.
Note that many fields in this class are public so they can be changed in Unity Editor inspector. Changing values on runtime may case errors or unexpected or delayed results.
Enums
public enum ContentsInEditor | Different types of content to display when showing dots in Unity Editor. | public enum DotLayers | Different selections how dots' layers are set. |
Properties
public int BorderDots | Easy and quick way to add borders around display. | public int BrokenAlwaysOffDots | Set some of the dots on display to be broken in the way that they are always off. | public int BrokenAlwaysOnDots | Set some of the dots on display to be broken in the way that they are always on. | public float ChangeDelaySeconds | Set or get delay (in seconds) when dot is changing state from on one state to another on state. | public ContentsInEditor ContentInEditor | Set or get what kind of content is shown in display in Unity Editor. | public bool CreateDotsInEditor | Set whatever display dots should be created and shown also in edit mode in Unity Editor. | public Vector2 DotGroupRelativeSpacing | Set or get relative spacing between dot groups. | public int DotGroupSizeHorizontal | Set or get how many dots are in each group horizontally. | public int DotGroupSizeVertical | Set or get how many dots are in each group vertically. | public bool DotGroupingEnabled | Set or get the setting whatever dots are grouped, ie there is extra space after certain amount of dots. | public DotLayers DotLayer | Set or get selection how each dot layer is set when they are created runtime or in editor. | public GameObject DotPrefab | Prefab for a single dot in display. | public Vector2 DotSpacing | Spacing between dots. | public int HeightInDots | Height of the display in dots. | public float OffDelaySeconds | Set or get delay (in seconds) when dot is turning from any on-state to off-state. | public float OnDelaySeconds | Set or get delay (in seconds) when dot is turning from off-state to any on-state. | public TextCommand.Fonts TextInEditorFont | Set or get font that is used when showing text in display in Unity Editor. | public string TextInEditorText | Set or get text that is shown in display in Unity Editor. | public int WidthInDots | Width of the display in dots. |
Enums
public enum ContentsInEditor Different types of content to display when showing dots in Unity Editor. Items | Empty | Totally empty display. | | Filled | Display with all dots in on state. | | Borders | Empty display with borders. | | Ruler | Display with borders and ruler. | | Text | Show any wanted text in display. |
public enum DotLayers Different selections how dots' layers are set. Items | KeepDotPrefabLayer | Keep dots layer same as prefab layer. | | CopyDotMatrixDisplayLayer | Set dots layer same as DotMatrix display layer. |
Properties
public int BorderDots Easy and quick way to add borders around display. Border dots go around the display, they are always off and can't be accessed in any way. Set 0 for no borders. Value | Amount of dots that act as border around the active display area. |
public int BrokenAlwaysOffDots Set some of the dots on display to be broken in the way that they are always off. Value | Amount of dots that always remain off. |
public int BrokenAlwaysOnDots Set some of the dots on display to be broken in the way that they are always on. Value | Amount of dots that always remain on. |
public float ChangeDelaySeconds Set or get delay (in seconds) when dot is changing state from on one state to another on state. This have effect only in displays that are using more than 2 colors. Note that 'enableDelays' have to be set true already before DotMatrix initializes. Value | Seconds how long it takes to dot to turn from one on state to another. |
public ContentsInEditor ContentInEditor Set or get what kind of content is shown in display in Unity Editor.
This setting is normally used only through Unity Inspector window and have no effect when application is playing. Value | One of the choices from enum ContentsInEditor |
public bool CreateDotsInEditor Set whatever display dots should be created and shown also in edit mode in Unity Editor.
This setting is normally used only through Unity Inspector window and have no effect when application is playing. Value | Boolean value, true to show display dots in editor, false to not. |
public Vector2 DotGroupRelativeSpacing Set or get relative spacing between dot groups. 1.0 means space is equal to one dot. 0.0 means no space at all which equals to not having dot grouping enabled at all. This setting have no effect if 'DotGroupingEnabled' is false. Value | Relative spacing between dot groups. |
public int DotGroupSizeHorizontal Set or get how many dots are in each group horizontally. This setting have no effect if 'DotGroupingEnabled' is false. Value | Number of dots in each group horizontally. |
public int DotGroupSizeVertical Set or get how many dots are in each group vertically. This setting have no effect if 'DotGroupingEnabled' is false. Value | Number of dots in each group vertically. |
public bool DotGroupingEnabled Set or get the setting whatever dots are grouped, ie there is extra space after certain amount of dots. Typically this is used to create visual effect that display is actually made of multiple smaller displays, for example each letter in is in its own dot group. This is special mode of display, there are several things to note when using this: - When adding text to display and you want each letter to be in its own dot group, make sure font size matches the dot group size and character/line spacing in TextCommand is set to 0. - Scrolling text may look broken since scrolling still happens dot by dot. Value | Dot grouping enabled setting. |
public DotLayers DotLayer Set or get selection how each dot layer is set when they are created runtime or in editor.
By default this is DotLayers.KeepPrefabLayer which means that dots' layers are not changed after they are created from dot prefab. When setting this to DotLayers.CopyDotMatrixLayer, each dot layer is set same as actual DotMatrix gameobject layer. Value | One of the choices from enum DotLayers |
public GameObject DotPrefab Prefab for a single dot in display.
public Vector2 DotSpacing Spacing between dots. 0 means no spacing. Negative values will cause dots to overlap each other but may result undesired visual glitches. Value | Spacing between dots as Vector2 |
public int HeightInDots Height of the display in dots. Usually set through inspector in Unity editor or by another script if this DotMatrix was created from prefab during runtime. Value | Display height in dots. |
public float OffDelaySeconds Set or get delay (in seconds) when dot is turning from any on-state to off-state. Especially in 3D-object based display (where each dot rotates when turning off) this adds realism but can be also used to simulate lagging display. Value | Seconds how long it takes to dot to turn off. |
public float OnDelaySeconds Set or get delay (in seconds) when dot is turning from off-state to any on-state. Especially in 3D-object based display (where each dot rotates when turning on) this adds realism but can be also used to simulate lagging display. Value | Seconds how long it takes to dot to turn on. |
public TextCommand.Fonts TextInEditorFont Set or get font that is used when showing text in display in Unity Editor.
This setting is normally used only through Unity Inspector window and have no effect when application is playing. Value | One of the choices from enum TextCommand.Fonts |
public string TextInEditorText Set or get text that is shown in display in Unity Editor.
This setting is normally used only through Unity Inspector window and have no effect when application is playing. Value | Text to be shown in display when in editor. |
public int WidthInDots Width of the display in dots. Usually set through inspector in Unity editor or by another script if this DotMatrix was created from prefab during runtime. Value | Display width in dots. |
|