Skip to main content

Class MsgPanelPresenter

Controls the presentation and animation of the message panel UI. This component is responsible for displaying messages, handling notification indicators, and managing smooth open/close animations using DOTween. It also exposes methods to instantiate message presenters, integrate with pooling, and handle message expiration behavior.

public class MsgPanelPresenter : MonoBehaviour

Inheritance​

Extension Methods​

EntryResponserUtility.ObjectPoolFactory(MsgPanelPresenter, MsgPresenter, int, int)

Methods​

AddMessageFromPool(MsgPresenter)​

Adds an existing message presenter instance to the panel and prepares it for display.

public MsgPresenter AddMessageFromPool(MsgPresenter msg)

Parameters​

NameTypeDescription
msgMsgPresenterThe message presenter to add.

Returns​

MsgPresenter — The prepared MsgPresenter.

ClosePanel()​

Closes the panel, playing the closing animation or instantly hiding it if animations are skipped.

public void ClosePanel()

DestoryMessage(MsgPresenter)​

Destroys/removes a message.

public void DestoryMessage(MsgPresenter msg)

Parameters​

NameTypeDescription
msgMsgPresenterThe message to destroy.

InstantiateMessage(MsgPresenter)​

Instantiates a new message prefab and adds it to the panel content.

public MsgPresenter InstantiateMessage(MsgPresenter Prefab)

Parameters​

NameTypeDescription
PrefabMsgPresenterThe message presenter prefab to instantiate.

Returns​

MsgPresenter — The instantiated MsgPresenter.

OpenPanel()​

Opens the panel, playing the opening animation or instantly showing it if animations are skipped.

public void OpenPanel()

ReleaseMessage(MsgPresenter)​

Releases a message back to its pool (disabling its GameObject).

public void ReleaseMessage(MsgPresenter msg)

Parameters​

NameTypeDescription
msgMsgPresenterThe message to release.
  • Methods
    • AddMessageFromPool(MsgPresenter)
    • ClosePanel()
    • DestoryMessage(MsgPresenter)
    • InstantiateMessage(MsgPresenter)
    • OpenPanel()
    • ReleaseMessage(MsgPresenter)