NPC Chat
This documentation is currently a WIP, additional information is being added.
Last updated
This documentation is currently a WIP, additional information is being added.
Last updated
NPC Chat is a script that can be added to objects your scenes to display UI text and/or trigger custom events. The UI text is displayed through a configurable Chat Box prefab made of Unity UI components including Images(chat box frame and icon), Raw Image(animated portrait using render texture from camera), Text Mesh Pro UGUI Text(display name and text), Buttons(assign custom sequences through button events). The NPC Chat script allows you configure a number of settings via the inspector just like other common Unity components. NPC Chat Features: • API: StartChat, FinishPage, StopChat • Header Text (NPC Name) • Body Text (NPC Dialogue) • Audio Clip • Any Number of Pages • Use Unique Chat Boxes on each page • Chat Start Event • Chat Stop Event • Page Start Event • Page Stop Event • Page Buttons (up to 6) • Play On Awake option • Scrolling Text option Chat Box Features: • Made from Default Unity UI Components • Header Text (NPC Name) • Body Text (NPC Dialogue) • Preconfigured Render Texture Camera enabled/disabled with chat box Additional Components can be added to the NPC Chat object for added functionality and control: • DistanceCheck • MouseOverOutline • TriggerChatOnCollision • TriggerChatOnKeyDown • TriggerChatOnKeyUp • TriggerChatOnMouseDown • TriggerChatOnMouseUp