Search Unity

[RELEASED] Ultimate Inventory System

Discussion in 'Assets and Asset Store' started by opsive, May 19, 2020.

  1. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi @Roger_Odonnell Thank you for sending this to me. But this is not the forum I was talking about.
    In the future please use the Opsive forum:
    https://opsive.com/forum/index.php?forums/questions.33/

    The ItemPickupBag prefab you set in that field does not have the ItemPickup script on it. It's probably just a 3D model with a material on it.
    Make sure you are using a prefab that has the Item Pickup script like this
    upload_2021-4-22_15-46-38.png
     
  2. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.1.7 of the Ultimate Inventory System has been released. You can see what has changed on this page.

    Version 2.0.2 of the Character controller Integration is now available too see the documentation here
     
  3. yannickgervais88

    yannickgervais88

    Joined:
    Sep 8, 2020
    Posts:
    6
    Hey, I am using Version 1.1.7 of the Ultimate Inventory System in unity 2019.4 and we were about to switch to unity 2020.3. I saw the UI system has evolved and was wondering if it was compatible with the current version of the UI designer?
     
  4. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    @yannickgervais88 Are you referring the the new runtime UIElements package?
    If that's the case, no, our Inventory UI does not support it. We've built it our UI on top of UGUI and we won't be jumping onto UIElements until it is stable and adopted by most users.
    UGUI will still be the main way to make UI in Unity for a while and I believe you can use both UIElements and UGUI at the same time if you really want to.
    You can switch to 2020.3 without any issues.
     
  5. yannickgervais88

    yannickgervais88

    Joined:
    Sep 8, 2020
    Posts:
    6
  6. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    305
    Is anyone else having issues with the latest update of UCC thowing errors for agility and swimming add-on packs (When Ultimate Inventory is installed)?

    Assets\Opsive\UltimateCharacterController\Add-Ons\Agility\Editor\Inspectors\HangInspectorDrawer.cs(20,26): error CS0246: The type or namespace name 'Hang' could not be found (are you missing a using directive or an assembly reference?)

    Assets\Opsive\UltimateCharacterController\Add-Ons\Agility\Editor\Inspectors\BalanceInspectorDrawer.cs(19,26): error CS0246: The type or namespace name 'Balance' could not be found (are you missing a using directive or an assembly reference?)

    Assets\Opsive\UltimateCharacterController\Add-Ons\Swimming\Editor\SwimInspectorDrawer.cs(21,26): error CS0246: The type or namespace name 'Swim' could not be found (are you missing a using directive or an assembly reference?)


    etc. Been wrestling with this for quite some time and it all worked perfectly before I updated to latest UCC. I also tried on a fresh project. Been dealing with this for days. Thanks in advance.

    EDIT: Using 2019 LTS
     
  7. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi @ron-bohn
    I haven't seen anyone complain about this issue before. For these sorts of questions please use the Opsive forum:
    https://opsive.com/forum/index.php

    My guess is that there is something wrong either with you assembly definitions, or the Add-ons are not updated to match your UCC version.
    If updating the add-ons does not work, please make a forum post in the Opsive forum under the UCC category, mentioning the errors you are getting.
     
  8. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    305
    Updating the add-ons is actually what caused the problem...if this doesn't get passed on, then well honestly not even going to opinion that. It probably hasn't been seen before because they were just updated on June 17. I really prefer not to use a separate forum unless I need some serious help for something I can't figure out...rather keep in on neutral territory. Thank you for your response.
     
  9. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125
    These errors are not related to the inventory system but make sure you remove the add-on before installing. The release notes for each add-on gives a breakdown on how to ensure you are running the correct version without any errors:

    https://opsive.com/forum/index.php?threads/version-2-3-3-and-add-on-updates.5893/
     
  10. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    305
    Hi again, I hear you, however if you read my original message you can see that I had these problems on a FRESH INSTALL. Pretty frustrating response honestly.
     
  11. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125
    With a fresh install it will work out of the box as long as you are running version 2.3.3. Based on the errors that you are receiving it indicates that you have an old assembly definition hanging around. I have double checked by installing in a fresh project and it worked without any compiler errors.

    If you continue to hit issues feel free to post on our forum as it doesn't look like the error is related to the inventory system. Definitely want to help you get it working!
     
    Last edited: Jun 24, 2021
  12. ron-bohn

    ron-bohn

    Joined:
    Oct 5, 2015
    Posts:
    305
    No it's cool, I'm done with you. I will not be talked to like a child.

    EDIT: By the way, if you try to delete my reviews I'll take my ball to your competitors.

    EDIT #2: So, I according to you, I am a liar? You just called me a liar. Better hope your code can back up your mouth.
     
    socialtrens likes this.
  13. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    163
    Hey there,
    I have a question:
    Is it possible to create items from playmaker actions so they can be dragn droped and used into the action bar ?

    So at the moment I have a bunch of spells for an RPG, that are a set of single playmaker actions. I want to create a spellbook so players can choose the spells to use and drag them into the action bar.
     
  14. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi @secondsight_

    In the playmaker integration there should be a "AddItem" action or something similar I believe.

    Dragging and Dropping is built-in the system so you won't be a special playmaker action for that as long as you are using an ItemViewSlotContainer for your spellbook, whether that's an InventoryGrid or an ItemHotbar.

    The part that is missing is a way for you to link the item you added to the playmaker action you have for each spell.
    You could link them by name perhaps, or you could make an item attribute with a custom type that points to the playmaker action.
    There are a few different solutions, but I'm afraid all would require at least a little bit of custom code.

    I'm happy to help though,
    so if you have issues implementing this yourself I can try to point ou in the right direction.
     
    secondsight_ likes this.
  15. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    163
    Thanks for the fast reply and the offer to help ! I´m stuck with that problem quit some time now and not beeing a coder doesn´t help either.Will give it a try then because I need a inventory system anyways and will try the solutions you´ve mentioned.
    Cheers !
     
  16. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.1.8 of the Ultimate Inventory System has been released. You can see what has changed on this page.

    A new Integration with the Character controller Version 2.0.3 is now available too, see the documentation here
     
  17. nicolasleroynovoa

    nicolasleroynovoa

    Joined:
    Sep 30, 2020
    Posts:
    1
    Hello I have a big problem
    I need to create a system within the ultimate inventory system that the moment one picks up an item that is a food (I made a category called food), a timer starts, when the timer runs out the food will disappear from the inventory and a rotten version will appear
    the problem is, i´m trying to make a script for this and i dont know how to access to the codes to add and remove item (this codes appear in the documentation in the item section) and how to start a timer in each item separetly
    i tried to use Item actions but i didn't quite understand them, so i don´t if the item action works for me or not because in the video in the page shows that item actions are used for options inside the object like equip it or heal you with it.

    the tutorials use this to remove or create an item (inside of the CanInvokeInternal/InvokeActionInternal of the item action)
    itemInfo.Inventory.RemoveItem((1, itemInfo));
    but the only thing i can do is remove or add the same item instead of remove the item and add a new one

    I tried to use this
    var Apple = InventorySystemManager.CreateItem("Apple");
    Inventory.RemoveItem(("Apple", 1));
    but it say me Inventory doest exist
    What could I do?
     
  18. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    HI @nicolasleroynovoa for specific question like that, next time please use the Opsive:
    forum: https://opsive.com/forum/index.php
    This Unity forum thread is used more for general questions usually related to pre-purchasing the asset.

    The way I would do that is making sure your items are unique, this will give each item a different ID such that you can then create a dictionary of ID->time to track how long its been since you added that specific item.
    You can set an Item to be Unique from the ItemCategory Editor.

    Then to know when an item has been added to your inventory you would use an event. This page explains how our custom event system works:
    https://opsive.com/support/documentation/ultimate-inventory-system/events/
    Plus it gives an example for listening to an item being added to the inventory which is exactly what you need.

    Then simply remove the apple item and add the rotten apple item. You can find the API examples on this page:
    https://opsive.com/support/documentation/ultimate-inventory-system/inventory/

    You'll need a way to link the food to its rooten version. It's up to you how you go about it. You could use a ScriptableObject ItemDefinition Attribute or you could have a custom scriptable object with a serialized dictionary of food->rooten.

    I hope that helps.
    And I want to reming you, next time you have a question like this please do create a new thread in the Opsive forum, thank you.
     
  19. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2 of the Ultimate Inventory System has been released. You can see what has changed on this page.

    A new Integration with the Character controller Version 2.0.4 is now available too, see the documentation here
     
    TonyLi likes this.
  20. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.1 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
  21. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.2 of the Ultimate Inventory System has been released. You can see what has changed on this page.

    A new Integration with the Character controller Version 2.0.5 is now available too, see the documentation here
     
  22. AFarrell

    AFarrell

    Joined:
    Apr 24, 2016
    Posts:
    18
    I am considering switching over to the ultimate inventory system from my built from scratch version. The big thing for me is that I have 2 player local splitscreen in our game so each player can manage their own inventory system. I am currently using rewired to assist with that, and I see that there is some integration with rewired, but I was wondering if this inventory system can account for multiple inventories/players? Is the system reliant on the unity event system for UI selection/mouse clicks/drags or could 2 players each have different selections?
     
  23. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi @AFarrell

    Our system allows any number of inventories. Inventories can be used for players, enemies, chest, shops, etc...

    We use the Event System for all UI navigation, but we made it such that we can have multiple Event Systems. One for each DisplayPanelManager (a component that sits next to the Canvas and manages all the UI panels).

    In a local split screen scenario you would have two canvases, each with their own DisplayPanelManager each bound to a player inventory, using an ID.

    You can learn more on how this is setup, and the limitations of the split screen setup UI on this documentation page:
    https://opsive.com/support/documentation/ultimate-inventory-system/input/split-screen-co-op-ui/
     
  24. AFarrell

    AFarrell

    Joined:
    Apr 24, 2016
    Posts:
    18
    Thanks for the reply! This looks like a solid asset for my needs:)
     
  25. Jakuri_F

    Jakuri_F

    Joined:
    Mar 9, 2020
    Posts:
    23
    Hi opsive,
    I'm developing a game which has multiple playable characters, something like Divinity:Original Sin. Did you reserved a solution for multiple playable characters?
    Thank you!
     
  26. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi @Jakuri_F
    Our Inventory System allows for any number of inventories. Inventories are just containers for Items, neatly organised into ItemCollections. We use Inventories for players, NPCs, Enemies, Chests, Loot Tables, etc...

    The only thing that requires a bit mroe thought is for the UI which usually references the Players Inventory using a unique ID. If you are making a local multiplayer game then you can have a different UI/canvas for each player. Here is the documentation on how to set that up:
    https://opsive.com/support/documentation/ultimate-inventory-system/input/split-screen-co-op-ui/

    You can also watch our video tutorials to see how the system works in action:
    https://opsive.com/videos/?pid=22330

    Note that we do not yet support online multiplayer officially, but some of our community members have made it work for their particular needs with some custom extensions.
     
    Jakuri_F likes this.
  27. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.4 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
    opsive likes this.
  28. DavidLe360

    DavidLe360

    Joined:
    Dec 24, 2018
    Posts:
    127
    1. Any one else having Unity freeze, or been in an infinite loop, with the dialog "Inpecotr.InitOrrebuild", after mofidying a prefab with a GameObject having the Inventory component?? It happen when you save to prefab, then exit the prefab editing mode, then clicking on the prefab in the hierachy panel, and that popup dialog appear indefinitely (edited)

      January 1, 2022
    Today, it happens. I have a base prefab, then a a variant of that base prefab, when i modify the variant one by adjusting some values of item's attributes of an Inventory component, save the modification, then when i click on the variable prefab in the Project window/panel that popup dialog appear indefinitely.

    I can no longer click on that prefab, that means I can not use that prefab anymore!

    Help please
     
  29. DavidLe360

    DavidLe360

    Joined:
    Dec 24, 2018
    Posts:
    127
    Have also the follow error, witch make the inspector show only the transform component:


    Code (CSharp):
    1. ArgumentException: An item with the same key has already been added. Key: -2126892874
    2. System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    3. System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    4. Opsive.Shared.Utility.Serialization.DeserializeFields (Opsive.Shared.Utility.MemberVisibility visibility, System.Func`3[T1,T2,TResult] onValidateCallback) (at <8b66d642e6184751975ce4ed54a07594>:0)
    5. Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory.Deserialize () (at C:/_ToBurn/_ProjMy/Unity/3DNotes_2020_266b774ae2a1b40bb5d566f2d2f755434a19bfae/Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:147)
    6. Opsive.UltimateInventorySystem.Core.InventoryCollections.Inventory.Initialize (System.Boolean force) (at C:/_ToBurn/_ProjMy/Unity/3DNotes_2020_266b774ae2a1b40bb5d566f2d2f755434a19bfae/Assets/Opsive/UltimateInventorySystem/Scripts/Core/InventoryCollections/Inventory.cs:85)
    7. Opsive.UltimateInventorySystem.Editor.Inspectors.InventoryInspector.InitializeInspector () (at C:/_ToBurn/_ProjMy/Unity/3DNotes_2020_266b774ae2a1b40bb5d566f2d2f755434a19bfae/Assets/Opsive/UltimateInventorySystem/Editor/Inspectors/InventoryInspector.cs:45)
    8. Opsive.UltimateInventorySystem.Editor.Inspectors.DatabaseInspectorBase.DrawInOrder (UnityEngine.UIElements.VisualElement parent, System.Boolean nested) (at C:/_ToBurn/_ProjMy/Unity/3DNotes_2020_266b774ae2a1b40bb5d566f2d2f755434a19bfae/Assets/Opsive/UltimateInventorySystem/Editor/Inspectors/DatabaseInspectorBase.cs:55)
    9. Opsive.UltimateInventorySystem.Editor.Inspectors.InspectorBase.CreateInspectorGUI () (at C:/_ToBurn/_ProjMy/Unity/3DNotes_2020_266b774ae2a1b40bb5d566f2d2f755434a19bfae/Assets/Opsive/UltimateInventorySystem/Editor/Inspectors/InspectorBase.cs:33)
    10. Opsive.UltimateInventorySystem.Editor.Inspectors.DatabaseInspectorBase.CreateInspectorGUI () (at C:/_ToBurn/_ProjMy/Unity/3DNotes_2020_266b774ae2a1b40bb5d566f2d2f755434a19bfae/Assets/Opsive/UltimateInventorySystem/Editor/Inspectors/DatabaseInspectorBase.cs:35)
    11. UnityEditor.UIElements.InspectorElement.CreateInspectorElementFromEditor (UnityEditor.Editor editor, System.Boolean reuseIMGUIContainer) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    12. UnityEditor.UIElements.InspectorElement.Reset (UnityEditor.SerializedObject bindObject) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    13. UnityEditor.UIElements.InspectorElement.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    14. UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <fc2718cc4daa4b4594bbc4096172ae90>:0)
    15. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <fc2718cc4daa4b4594bbc4096172ae90>:0)
    16. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.SendBindingEvent[TEventType] (TEventType evt, UnityEngine.UIElements.VisualElement target) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    17. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.BindTree (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    18. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.ContinueBinding (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedProperty parentProperty) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    19. UnityEditor.UIElements.Bindings.SerializedObjectBindingContext.Bind (UnityEngine.UIElements.VisualElement element) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    20. UnityEditor.UIElements.Bindings.DefaultSerializedObjectBindingImplementation.Bind (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedObject obj) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    21. UnityEditor.UIElements.BindingExtensions.Bind (UnityEngine.UIElements.VisualElement element, UnityEditor.SerializedObject obj) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    22. UnityEditor.UIElements.InspectorElement..ctor (UnityEditor.Editor editor, UnityEditor.UIElements.InspectorElement+Mode mode) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    23. UnityEditor.UIElements.EditorElement.Init () (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    24. UnityEditor.UIElements.EditorElement..ctor (System.Int32 editorIndex, UnityEditor.IPropertyView iw, System.Boolean isCulled) (at <2758fd44916644e3a3b65c9d4809b7f9>:0)
    25. UnityEditor.EditorUIServiceImpl.CreateEditorElement (System.Int32 editorIndex, UnityEditor.IPropertyView iw, System.String title) (at <9af8e5decc4c450b8ffc01e131c71aae>:0)
    26. UnityEditor.PropertyEditor.DrawEditors (UnityEditor.Editor[] editors) (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    27. UnityEditor.PropertyEditor.RebuildContentsContainers () (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    28. UnityEditor.InspectorWindow.RedrawFromNative () (at <7ac35247888b44f4a7e290f1f6bb33f3>:0)
    29.  
     
  30. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125
    Can you please create a post on the opsive forum with the steps to reproduce that error?
     
  31. DavidLe360

    DavidLe360

    Joined:
    Dec 24, 2018
    Posts:
    127
    hmm, i dont remember the exact steps. Is some where when i modify the category or the item definition. I will try to record the steps next time it will happen again.

    For work around, i just remove the Inventory in the prefabs that cause problem, then re-add it (the invenotry component), and redo the settup for the attribute's values.

    thanks for reply
     
  32. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.5 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
  33. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.6 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
  34. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.7 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
    DavidLe360 likes this.
  35. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.8 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
    DavidLe360 likes this.
  36. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.9 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
    opsive likes this.
  37. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Version 1.2.10 of the Ultimate Inventory System has been released. You can see what has changed on this page.
     
  38. DavidLe360

    DavidLe360

    Joined:
    Dec 24, 2018
    Posts:
    127
    (This is a duplicated question asked on Discord https://discord.com/channels/476506682382483456/621790973495607297/1018791241921605652)
    Hi, I have issue creating 'CategoryItemActionSet': It keep deleting the asset when i try to create new one, by click on the button 'Create a CategoryItemActionSet', then given an asset name, then click on Save button on the dialog file, and after a short processing time, it delete the new asset!?
     
  39. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125
    Hello,

    For support can you please post on the Opsive Forums at https://opsive.com/forum? This allows us to track each request better.

    Thank you,
    Justin
     
  40. fajigajiga

    fajigajiga

    Joined:
    Feb 6, 2018
    Posts:
    3
    I'm thinking of buying the ultimate inventory system, but my one questions is how customizable it is visually? I've looked pretty extensively (but not exhaustively) and couldn't find out if I would be constrained to pre-existing visuals for the menu. The game I'm building has very distinct visuals and this solution wouldn't work for me if it's not customizable. Other than that, it looks great, and I love that it has playmaker integration.
     
  41. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi @fajigajiga
    Everything in the UI can be changed visually and funtionally.

    The UI for the Inventory is made entierly using the Unity UGUI system. So if you are familiar with Unity and know how to customize your UI you'll be right at home.

    The Inventory system comes with two UI "schemas" built-in, but those are simply there to get you started quickly. It is assumed you will use your own art once you've setup your initial layout.

    In this video, I show how easy it is to customize the look of the UI
    https://opsive.com/videos/?pid=22330&video=22931
     
  42. AticAtac

    AticAtac

    Joined:
    Feb 26, 2014
    Posts:
    25
    Hi,
    before purchasing i would like to know if UIS also handles saving and loading of items, not only thoses in the inventories but also the items in the scene. E.g. if a scene already include 5 items (e.g. on the ground) and one is picked up or destroyed, after saving and loading i would expect the the destroyed item in the scene is also destroyed after loading.
     
  43. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    The save system of the Inventory is tasked to save contents of Inventories and item states (for mutable items).
    Everything else is out of scope for the Inventory save system.

    That being said it is easily extendable by creating custom Saver components.

    Making sure to remove items if they had been previously destroyed in the last save file is fairly easy and I believe the Inventory system saver can do that on its own without any custom code.
    The thing that would require some additional code is spawning objects that were in the dynamically spawned previous save file that do not exist in the scene by default.

    Ah thing to take into account, if you own the Dialogue System by PixelCrushers. They have a save sytem that integrates very well with the Inventory system save system. And they have save components to keep track of gameobjects states in the scene. You can contact them for more information on their asset
     
    TonyLi likes this.
  44. AticAtac

    AticAtac

    Joined:
    Feb 26, 2014
    Posts:
    25
    Thanks for your fast answer!

    Saving and loading objects (items, etc.) in the scene(s) vs dynamically instantiated ones is one thing that currently giving me headaches besides the need for a good inventory system.I was hoping to get both with UIS :)
     
  45. unity_OITuiZ9sdZf6cQ

    unity_OITuiZ9sdZf6cQ

    Joined:
    Jan 10, 2023
    Posts:
    3
    I am using ability and combat toolkit. Will this cause any issues if I were to use it in my project?
     
  46. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125
    We don't have any integration with Ability & Combat Toolkit but I can't see a reason why you wouldn't be able to use the two together. In order for them to be aware of each other you'd need to write an integration script though.
     
  47. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125
  48. kapik255

    kapik255

    Joined:
    Sep 13, 2021
    Posts:
    1
    Hi. I cant find any information about it so i'll ask here. Does your UIC have a feature that creates new chests when player spawns them in a world? I'm talking of a way of handling chests like minecraft. So if player puts down a chest it has empty inventory and things can be stored inside or i would have to put each chest myself and set it up individually?
     
  49. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hey @kapik255
    There is no out of the box solution to droping chests you can interact with. But with a little code it should be fairly easy for you to implement it.

    The chest script in UIS only allows you to retrieve items.
    But we have a Storage script that allows you to add or retrieve items from an inventory (I'm guessing that's what you want).

    So the way you would set that up is create a prefab with a 3D chest and an Inventory component in addition to an interactable that opense the Storage UI panel.

    Then you can make a custom ItemAction script that drops the prefab in the scene differently then using the usual pickup drop ItemAction.

    The last step would be to set an ItemAttribute of type ItemAmounts so that when you pickup the chest back into your Inventory you can serialize you chest content inside the item data. So that it can be loaded again when spawned.

    I hope all that makes sense. In total it might require 2-3 custom scripts to implement it the way you want in your game but nothing overly complicated or impossible.
     
  50. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,125