![]() ![]() can you have multiple items? Is there a limit? Just the design choices of an inventory system can have a lot of complicating confounding issues, such as: dependence on asset definition (images, etc.) for presentation interaction with the world to get items in and out interaction with items in the inventory or on the character or in the home base storage area presentation of the inventory to the user (may have to scale and grow, overlay parts, clothing, etc) persistence of this information to storage between game runs perhaps another database of your "storage" area at home base? a database of the items that you actually possess / equip currently a database of items that you may possibly possess / equip These things (character customization, inventories, shop systems) are fairly tricky hairy beasts, definitely deep in advanced coding territory. Regardless of your choice, keep this in mind with Inventories: But Addressables are an enormous subsystem that you must first get familiar with to use effectively. Others will suggest Addressables, which scale better to infinite future content delivery. Otherwise put references to the items you need in a Scene or Prefab. Resources.Load() or Resources.LoadAll() is the simplest fastest solution, requiring only that you put files in a specifically-named directory, with no extra code or package involved. Is there anything I can do differently? Or is there a solution I'm missing out? Therefore my only option right now is to load scriptable objects during runtime without using AssetDatabase since AssetDatabase is an Editor class. AssetDatabase works when you are able to store the references inside a serialized lookup, however in my case I'm using a static class. Now the hurdle I'm facing right now is to create some kind of a lookup table or dictionary which stores all the meta data, since all the meta data are scriptableobjects and they can be only loaded using AssetDatabase. Now the inventory system I'm designing involves a global static class (called InventorySystem) from which I should be able to pull out or add an inventory item when I provide appropriate parameters such as item id or a unique tag. ![]() So I've been designing an inventory system where you create meta data of an item which includes information such as item id, item information, max stack size etc., and these data are stored inside a scriptable object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |