A Unity UI object set to 1920×1080, that contains the UI Text and Image components to be used by the NPC Chat object. Duplicate or Customize this UI object however you like with your own sprite images or UI components to create your own unique chat box prefabs.

Prefab Location:

Assets\TurnTheGameOn\NPC Chat\Resources\Default Chat Box.prefab

You’re going to want to customize and create your own chat box prefabs, to get started add a Default Chat Box object to your scene. This can be done in any of 3 ways:

  1. Drag and drop the prefab from the Project window into the Hierarchy
  2. Right Click in Hierarchy, select “UI > NPC Chat > Default Chat Box”
  3. Select “GameObject > UI > NPC Chat > Default Chat Box” from the Unity Menu Bar

Inspector Variables:

Variable Description
Use Render Texture Toggle to enable/disable use of render texture camera on this chat box.
Chat Box Components References to the UI components used by NPC Chat.
Title Text Use this text field for the NPC Name.
Dialogue Text Use this text field for NPC dialogue.
Render Texture Camera Camera used for NPC Portrait Raw Image.
Button Components 6 Button references used by NPC Chat.
Event System Navigation References for the Event System to allow Input driven UI Button selection
Use Event System Navigation Toggle to enable/disable use of Event System Navigation on this chat box.
Event System Event System used for UI navigation events.
First Selection Default first selected UI object when using Event System Navigation.
Selected Current selected UI object when using Event System Navigation.
Lerp Settings Allow the chat box to animate on/off based on a curve when a chat conversation starts or stops.
Use Lerp In Toggle to enable/disable use of Lerp In on this chat box when a conversation is started.
Use Lerp Out Toggle to enable/disable use of Lerp Out on this chat box when a conversation is finished.
Lerp Curve Animation curve used to tween the lerp in/out animation.
Start Position Start position when using lerp in. End position when using lerp out.
End Position End position when using lerp in. Start position when using lerp out.
Lerp Duration Duration of lerp in/out animation.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
For customer support, please contact us here.

Post Comment