Version 1.1 comes with many improvements with a focus on the user interface. The goal was to make a modular and flexible system that allows users to mix and match features available to create there very own Inventory UI. Unfortunately this meant rewriting the entire UI system and all of its components. Therefore the UI from version 1.0.x is incompatible with the new system. As a result of these changes, there are few steps required in order to update to version 1.1 from a prior version.
If you believe some information is missing, please ask us in the forum and we will review the upgrade steps.
Important: Make a backup of your project before updating!
Updating to version 1.1 can be accomplished by performing the following:
Remove version 1.0.x
Many scripts were renamed or removed and Unity Packages do not handle these changes very well. After version 1.0 has been removed version 1.1 can be imported.
Check your scene and prefabs for Missing Components
As mentioned previously many scripts were renamed, replaced or simply removed. Therefore some of you game objects or prefabs may need fixing.
Menus & Panels
If you have any menus or panels which was taken from the demo scene it is highly recommend it to remove it and rename it from scratch using the UI Designer. Unfortunately this is due to the amount of changes which were required to make the UI system more extensible. Learn more about UI Designer here.
Item Box -> Item View | Attribute Box -> Attribute View
Item Boxes, Attribute Boxes, etc. are now called Item Views, Attribute Views, etc. Views are used to display a certain object, it is usually, but not required, to be within a View Slot (i.e Item View Slot) which is a custom selectable that detects clicks, drag, select and more.
Components serializing Item Categories, Currency, and more
We now use some very handy structs to serialized objects from the database which allows the system to replace them if they are not part of the correct database. The structs are Dynamic Item Category, Dynamic Currency, Dynamic Crafting Recipe, etc.
Due to this change all categories which were set in the inspector must be re-assigned: Item Slot Set, Category Item Actions, Category Item View Set, etc.
Main inventory (used by the character)
A few changes have been made to the components that surround the main inventory.
A typical character Inventory also has the following components:
- Inventory: The component which holds the items.
- Currency Owner: holds the character currency.
- Item User: the component that lets you use items in Item Actions.
- Inventory Standard Input: The new input component that handles input for using items and interacting with the UI.
- Inventory Interactor: Allows components that are interacted with to get a reference to the inventory.
- Inventory Identifier: Allows you to register your inventory game object in the Inventory System Manager singleton such that it can be accessed from anywhere.
Category Item Actions -> Item Action Set
There was some confusion between Category Item Actions and Category Item Action Sets. Therefore Category Item Actions was renamed to Item Action Set.
Tip: Use Item Action Set as an attribute to an Item if you wish to have different Item Actions per Item(Definition) instead of per ItemCategory.
Equipper & Usable Equipped Items Handler
The Equipper no longer uses the items, it simply visually equips them.
The Usable Equipped Items Handler is the component that listens to the Inventory Input event to use Item Object Behaviors.
Simply add this component next to the Equipper and reference the Item User to get started.
Item Object Action -> Item Object Behaviour
A simple name change to reduce confusion with Item Actions, as you may wish to have an Item Object Action which inherits Item Action instead of MonoBehaviour.
Usable Item Object -> Item Object Behaviour Handler
The usable Item Object component was replace by the Item Object Behaviour Handler such that the inheritance of Item Object could be removed, and instead use a composite relationship.
Item Pickup Visual Listener -> Item Object View
The Item Pickup Visual Listener was used to change the model of the pickup object by getting a prefab from an Item Attribute.
The Item Object View does the same, but insteado of being dependent on the ItemPickup events, it is dependent on the Item Object events.
It also allows you to specify an Item View for World Canvas UI on the Item Object.
Take advantage of the new features
Version 1.1 comes with a ton of new features and API improvements. So make sure to read through the documentation to learn more about all the features.
Here are some of the new API which allows you to use the Inventory System Manager singleton to get very useful things like the Inventory and Display Panel Manager:
// Get your inventory, Item User and more from the Inventory Identifier which can be fetched from anywhere in the code. var inventory = InventorySystemManager.GetInventoryIdentifier(1).Inventory; // Add Items by name. inventory.AddItem("potion", 3); // Get the panel manager. var displayPanelManager = InventorySystemManager.GetDisplayPanelManager(1); // Open a Display Panel by name. displayPanelManager.OpenPanel("Main Menu");