NPC Chat
  • NPC Chat
  • Tutorials
    • Quick Start Guide
    • Video Tutorials
      • 1. Getting Started
      • 2. Timeline and LipSync Pro
      • 3. Quick Outline Integration
  • Documentation
    • API
      • NPCChat
  • Integrations
    • Lip Sync Pro
    • Quick Outline
  • DEMOS
  • WebGL
  • Links
  • Asset Store
  • Email
  • Unity Discussion Forum
  • YouTube
Powered by GitBook
On this page

Was this helpful?

  1. Tutorials

Quick Start Guide

PreviousNPC ChatNextVideo Tutorials

Last updated 4 years ago

Was this helpful?

Performing these steps creates an NPC Chat object that is triggered by left-mouse clicking over the box collider. This object was positioned to be around a stationary NPC object, but you can also attach it to the NPC so if the NPC moves, the dialogue goes with it.

  1. Open the Tutorial scene:

    Assets\TurnTheGameOn\NPCChat\Tutorial

  2. Add an NPCChat prefab to the scene:

    Assets\TurnTheGameOn\NPCChat\Prefabs\NPCChat\

  3. Add a ChatBox prefab to the scene:

    Assets\TurnTheGameOn\NPCChat\Prefabs\ChatBox\

  4. Select the NPCChat prefab in the scene.

  5. Assign the ChatBox prefab to the NPC Chat - Chat Box inspector field.

  6. Type some text in the NPC Chat Text inspector field.

  7. Press the Add Component button and type TriggerChatOnMouseDown in the search field and select it, enable the option Mouse Over To Start.

  8. Press the Add Component button and type Box Collider in the search field and select it, change the Box Collider Size Y to 2.

  9. Set the Transform Position to -0.85 X 1 Y 0 Z

  10. Press play, mouse-over the NPC in the scene and click the left mouse button.

This workflow is the core idea of NPC Chat, it will allow you to place NPC Chat objects anywhere in your scenes to create reusable, interactive prefabs, and use it in an object oriented way.