O'Reilly logo

Mastering Unity 2D Game Development - Second Edition by Simon Jackson, Ashley Godbold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding NPCs and a conversation system to our game

Right, after all of that brain input, let's start applying it to our game. In this chapter, we are aiming to add an NPC to our scene that will interact with the player.

Before moving forward, we should also do with a little tidying up of our Scripts folder, since we are generating a lot more content now. To do this, perform the following steps:

  • Under Assets\Scripts, create three new folders: Classes, Messaging, and Navigation.
  • Copy the Entity and Player scripts to the new Classes folder or create them if you haven't already.
  • You may delete all of the files created in this chapter (or place them in an Examples folder) except MessagingManager.cs, MessagingClientBroadcast.cs, and MessagingClientReceiver.cs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required