Search Results for

    Show / Hide Table of Contents

    Class LogUIHandler

    Controls the log panel.

    Inheritance
    object
    LogUIHandler
    Namespace: AS2.UI
    Assembly: .dll
    Syntax
    public class LogUIHandler : MonoBehaviour

    Fields

    | Edit this page View Source

    color_debug

    Declaration
    public Color color_debug
    Field Value
    Type Description
    Color
    | Edit this page View Source

    color_error

    Declaration
    public Color color_error
    Field Value
    Type Description
    Color
    | Edit this page View Source

    color_log

    Declaration
    public Color color_log
    Field Value
    Type Description
    Color
    | Edit this page View Source

    color_warning

    Declaration
    public Color color_warning
    Field Value
    Type Description
    Color
    | Edit this page View Source

    go_elementParent

    Declaration
    public GameObject go_elementParent
    Field Value
    Type Description
    GameObject
    | Edit this page View Source

    go_expand

    Declaration
    public GameObject go_expand
    Field Value
    Type Description
    GameObject
    | Edit this page View Source

    go_log

    Declaration
    public GameObject go_log
    Field Value
    Type Description
    GameObject
    | Edit this page View Source

    instance

    Declaration
    public static LogUIHandler instance
    Field Value
    Type Description
    LogUIHandler
    | Edit this page View Source

    keepVisible

    Declaration
    private bool keepVisible
    Field Value
    Type Description
    bool
    | Edit this page View Source

    logElementList

    Declaration
    public List<GameObject> logElementList
    Field Value
    Type Description
    List<GameObject>
    | Edit this page View Source

    logEntryID

    Declaration
    private int logEntryID
    Field Value
    Type Description
    int
    | Edit this page View Source

    maxLogEntries

    Declaration
    private int maxLogEntries
    Field Value
    Type Description
    int
    | Edit this page View Source

    scrollBar

    Declaration
    public Scrollbar scrollBar
    Field Value
    Type Description
    Scrollbar
    | Edit this page View Source

    scrollRect

    Declaration
    public ScrollRect scrollRect
    Field Value
    Type Description
    ScrollRect
    | Edit this page View Source

    scrollToBottomInAmountOfFrames

    Declaration
    private int scrollToBottomInAmountOfFrames
    Field Value
    Type Description
    int
    | Edit this page View Source

    timeVisible

    Declaration
    private float timeVisible
    Field Value
    Type Description
    float
    | Edit this page View Source

    timeVisibleInitial

    Declaration
    private float timeVisibleInitial
    Field Value
    Type Description
    float
    | Edit this page View Source

    timestampLastInteraction

    Declaration
    private float timestampLastInteraction
    Field Value
    Type Description
    float

    Methods

    | Edit this page View Source

    AddLogEntry(string, EntryType)

    Adds a log entry to the log.

    Declaration
    public void AddLogEntry(string text, LogUIHandler.EntryType type)
    Parameters
    Type Name Description
    string text

    The text to log.

    LogUIHandler.EntryType type

    The type of the log entry.

    | Edit this page View Source

    AddLogEntry(string, EntryType, bool, bool)

    Adds a log entry to the log.

    Declaration
    protected void AddLogEntry(string text, LogUIHandler.EntryType type, bool showNumberOfEntry, bool useOldPrefab = false)
    Parameters
    Type Name Description
    string text

    The text to log.

    LogUIHandler.EntryType type

    The type of the log entry.

    bool showNumberOfEntry

    True if the number of the entry should be shown.

    bool useOldPrefab

    True if the old prefab which does not support multiline should be used. Recommendation: Keep this at false.

    | Edit this page View Source

    AddWelcomeMessage()

    Adds the log entries making up the welcome message so that the log is not empty.

    Declaration
    private void AddWelcomeMessage()
    | Edit this page View Source

    ButtonPressed_ClearLog()

    The user pressed the clear log button. Delete all log entries.

    Declaration
    public void ButtonPressed_ClearLog()
    | Edit this page View Source

    ButtonPressed_CollapseLog()

    The user pressed the collapse log button. Hide the log panel.

    Declaration
    public void ButtonPressed_CollapseLog()
    | Edit this page View Source

    ButtonPressed_ExpandLog()

    The user pressed the expand log button. Show the log panel.

    Declaration
    public void ButtonPressed_ExpandLog()
    | Edit this page View Source

    GetLogElementTMPHeader(GameObject)

    Returns the TMP UGUI for the header.

    Declaration
    private TextMeshProUGUI GetLogElementTMPHeader(GameObject logElement)
    Parameters
    Type Name Description
    GameObject logElement
    Returns
    Type Description
    TextMeshProUGUI
    | Edit this page View Source

    GetLogElementTMPText(GameObject)

    Returns the TMP UGUI for the text.

    Declaration
    private TextMeshProUGUI GetLogElementTMPText(GameObject logElement)
    Parameters
    Type Name Description
    GameObject logElement
    Returns
    Type Description
    TextMeshProUGUI
    | Edit this page View Source

    GetLogElementTextMeshProUGUI(GameObject, int)

    Returns the first/second/third/etc... found TMP UGUI in the child elements of the log element. Index starting at 1.

    Declaration
    private TextMeshProUGUI GetLogElementTextMeshProUGUI(GameObject logElement, int firstSecondEtc)
    Parameters
    Type Name Description
    GameObject logElement
    int firstSecondEtc
    Returns
    Type Description
    TextMeshProUGUI
    | Edit this page View Source

    Hide()

    Hides the log.

    Declaration
    public void Hide()
    | Edit this page View Source

    InitLog()

    Initializes the log and writes some welcome message.

    Declaration
    private void InitLog()
    | Edit this page View Source

    ScrollToBottom()

    Scrolls to the bottom of the log. We call this method after some very small number of frames because Unity needs to update some internal UI stuff before the sizes of the UI elements are in the system.

    Declaration
    public void ScrollToBottom()
    | Edit this page View Source

    Show(bool, bool)

    Shows the log.

    Declaration
    public void Show(bool scrollDown, bool keepVisible)
    Parameters
    Type Name Description
    bool scrollDown

    True if the log should scroll down.

    bool keepVisible

    True if the log should be kept visible, false if it should disappear automatically after some time.

    | Edit this page View Source

    Start()

    Declaration
    public void Start()
    | Edit this page View Source

    Update()

    Update loop for the log UI, called each frame.

    Declaration
    public void Update()
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX