Class NPCMessaging
Provides conversation state, events, and messaging helpers for an NPC.
public sealed class NPCMessaging
- Inheritance
-
NPCMessaging
- Inherited Members
- Extension Methods
Properties
HasUnreadMessages
Gets whether the NPC's conversation is currently marked as unread.
public bool HasUnreadMessages { get; }
Property Value
Remarks
This reflects the game's conversation-level state, not per-message read receipts.
IsOpen
Gets whether the NPC's conversation is currently open in the phone's Messages app.
public bool IsOpen { get; }
Property Value
IsRead
Gets whether the NPC's conversation is currently marked as read.
public bool IsRead { get; }
Property Value
Remarks
A conversation that has not been created yet is treated as read.
Methods
SendTextMessage(string, Response[]?, float, bool)
Sends a text message from this NPC to the players.
public void SendTextMessage(string message, Response[]? responses = null, float responseDelay = 1, bool network = true)
Parameters
messagestringThe message to display. Unity rich text is allowed.
responsesResponse[]Optional responses to display after the message.
responseDelayfloatThe delay before the player can select a response.
networkboolWhether the message should propagate to all players.
Events
OnConversationOpened
Occurs when the player opens the NPC's conversation in the phone's Messages app.
public event Action OnConversationOpened
Event Type
Remarks
The event is raised again each time the conversation is closed and reopened.