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 ...

Get Augmented Reality Game Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.