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:
- Double-click on the
CatchSceneController
located in theAssets/FoodyGo/Scripts/Controllers
folder in the Project window to open the script in the editor of your choice. - The only thing that has thus far changed in the
CatchSceneController
is a new Start method calling ourInventory
service. Perform the following reviewing method:void Start() { var monster = InventoryService.Instance.CreateMonster(); print(monster); }
- Inside the
Start
method, theInventoryService
is being called as ...
Get Augmented Reality Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.