O'Reilly logo

Augmented Reality Game Development by Micheal Lanham

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

Reviewing code

As you can see from the previous setup exercise and through testing, the Inventory service we imported already has the database wrapper attached. Let's review some of the script changes we imported and also get into details of the InventoryService script:

  1. Double-click on the CatchSceneController located in the Assets/FoodyGo/Scripts/Controllers folder in the Project window to open the script in the editor of your choice.
  2. The only thing that has thus far changed in the CatchSceneController is a new Start method calling our Inventory service. Perform the following reviewing method:
            void Start() 
            { 
                 var monster = InventoryService.Instance.CreateMonster(); 
                 print(monster); 
            }   
    
  3. Inside the Start method, the InventoryService is being called as ...

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