Search Unity

Inventory Pro - uGUI - Performance - Mobile support & More

Discussion in 'Assets and Asset Store' started by jorisshh, Mar 8, 2015.

?

What should I build next?

  1. New currency system

    14.1%
  2. Improved serialization / saving for web

    10.8%
  3. Better properties for items (percentages, base values, etc)

    27.2%
  4. Controller support

    15.4%
  5. Unity 5.1 networking (multiplayer)

    36.9%
  6. More modular build to simplify extending

    25.1%
  7. UFPS Multiplayer (Asset integration)

    11.5%
  8. Core GameKit (Asset integration)

    4.1%
  9. Dialogue system (Asset integration)

    21.3%
  10. Wordpress integration (Asset integration)

    4.1%
Multiple votes are allowed.
  1. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    That is a great use-case, however UFPS doesn't allow different ammo types for the same weapon, at least as far as I am aware. In UFPS a weapon only has one ammo type - "UnitBanks" consume "Units", in their terminology.

    Since this is the case I think it would still make the most sense to consume ammo straight from the inventory. That way if the developer creates a workaround for different ammo types in UFPS (i.e. create new UnitBank with a new Unit type with the same weapon model), the system would still pick up the ammo types properly.
     
  2. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Fixed in upcoming release :)

    Fixed in upcoming release :)

    Fixed in upcoming release :) (kinda starting to get the hang of this)

    Fixed in upcoming release :)

    Hm.. I can image not everyone would want this, especially survival games that are quite popular at the moment usually have very "strict" item usage. But I could certainly make an option that auto. equips the items or an option that scans the inventories for ammo. (Put it on my list)
     
    boysenberry likes this.
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Equipment workflow

    First hit the Position now button.


    The item will be equipped to it's associated spot (see image below how this works), position the weapon the way you want, when done hit Save state, and voila, equipment position and rotation is saved.


    Associate the equipment fields with equipment locations on your character. A character window / collection is now associated with a character. So multiple character support is now also supported :)





    Got to have dual wield ^^
     
    twobob, JMyerscough and boysenberry like this.
  4. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    good to play
     
  5. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    plyGame integration update

    I've rerouted all internal Inventory Pro events to plyBlox, so they're now available from within blyBlox (see images below).







    Didn't stop there though ^^

    DiaQ is now also supported, select the provider from the dropdown, and select Inventory Pro items ^^


    Now, if you'll gents excuse me, I need a short break... badly...
     
  6. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    A bathroom break? I guess we can allow that. ;)

    Inventory Pro is looking better and better. With a few more features, it ought to be hands down the dominant inventory system in the store.
     
  7. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hehe, yep we're getting there, I couldn't have done it without the community << insert Academy award speech here <<
    I think on extensibility and performance we're already close to the top, and I've got something fun planned to hit it out of the park ^^
     
    boysenberry and hopeful like this.
  8. JMyerscough

    JMyerscough

    Joined:
    Jul 12, 2012
    Posts:
    117
    Perhaps have two separate types? One that's
    This is gonna be so awesome in UFPS/MP! It's just awesome in general, nice job!!
     
  9. TimeCastle

    TimeCastle

    Joined:
    Jan 12, 2015
    Posts:
    32
    Quick question; How do I make it so when the player scrolls through their hot bar, they equip whatever thing they're hovering over? I've figured out how to make items equippable and all that, I just can't seem to figure out the hot bar.
     
  10. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Actually easy as pie, it will require a bit of custom code, but no worries it's simple.
    You can grab the current UI item that's below the cursor by calling InventoryUIUtility.hoveringItem. Then when you're ready to use it, simply call InventoryUIUtility.hoveringItem.TriggerUse(); That's it :), all restrictions and what not will be handled by the system.
     
  11. Delmars

    Delmars

    Joined:
    May 15, 2015
    Posts:
    2
    When you receive the update to 2.1.3?
     
  12. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    In the upcoming week, currently writing documentation, testing & polishing :)
     
  13. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    The last feature of this sprint

    You can now sync collections, why is this useful you ask? Well assume you want to create a inventory view inside the vendor UI, like a shared window. Simply call the myCollection.SyncActions(toCollection, true); // 2nd param for 2 way binding
    And voila :)


    This also simplifies creating custom object based item containers (like treasure chests), again, simply call the myCollection.SyncActions(myArray); and the system will handle the rest :)

    For collections you can simply add the sync component
     
    boysenberry likes this.
  14. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Amazing work so far, I hope you give yourself the break you mentioned.
    That being said (hehe), any chance you've thought/worked on being able to turn descriptions on or off per item so I can check to see if a player can view the description? Also, if you can open it up enough for me to tweak the description (that alone would do the trick) when viewed I'd be able to show some or all, or even swap parts of the description out based on other factors, like intelligence, or alignment, e.g. a sword with an evil alignment would seem different to an evil character than a good one, another example would be common items, like mushrooms, that look similar, but have subtle differences, differences that only a skilled herbalist might detect, like which are safe to eat.

    PS I can send you my registration so you know you're not wasting your time on me if I haven't already.
     
    twobob likes this.
  15. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Yep, sure thing :), in the upcoming update you have an event called OnRepainted(item, info) that you can hook onto from anywhere and modify the infobox / tooltip.

    .. Registration??
     
    boysenberry likes this.
  16. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Awesome! Thank you. By registration I meant my invoice #/order # from when I purchased Inventory Pro
     
  17. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Ah no worries, I trust ya :p
     
    boysenberry likes this.
  18. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Who said programmers can't design :) ?

    (The new demo level)
     
    boysenberry likes this.
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Also, I've modeled the perfect potato
     
    Last edited: May 17, 2015
    SIV, DMeville, TonyLi and 8 others like this.
  20. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
  21. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Ever mentioned I have a terrible sense of humor :)? Well you can try out the new demo at http://devdog.nl/unity/demo/ if you like ^^
     
  22. Delmars

    Delmars

    Joined:
    May 15, 2015
    Posts:
    2
    Excellent potatoes.:)
     
  23. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Good afternoon . How are things going with the integration UFPS Multieplayer? When the integration is completed ? Already very hunt to add your inventory) )))
     
  24. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I'll do UFPS Multiplayer in the upcoming cycle, it already works for 90%, so, extrapolating on the previous release cycle times, I'd say ultimately 2-3 weeks from now :)
     
  25. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    I'd like to get back to the potato... Is it a multiplayer potato? Or just a singleplayer potato? I need to know. And will we be able to use it in our own games? And when will it be available? And is there a mashed version, and/or a chip version? Is a french fried version in the works?
     
    TimeCastle and boysenberry like this.
  26. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Oh certainly sir, the potato is very, very multiplayer ready, enjoy hours and hours of fun, throwing potato's at your friends. Want a mashed version? No problem, just throw harder :)

    French fried version in development, dropping all previous features for this, I'm sure everyone will understand... ^^
     
  27. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    It's gorgeous, it is necessary to wait for long. My question is as follows. The integration will be available functions that are made for inventory? Or what some features are not working. For example kraft or bank. Hopefully I understand what I mean. By the way the potatoes cool !!! )))
     
  28. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I'm not entirely sure I'm following, but to sum up, V2.1.3 will be released somewhere between the 18th and 25th (depends on unity's asset store team), which will contain the following

    • UFPS updated
    • plyGame updated
    • Equipment binding + editors
    • Improved workflow
    • Editor improvements
    • Syncing collections (move in collection a, sync to collection b)
    • Cleanup & Refactoring
    • Bugfixes and improvements
    • Multi character support
     
    thenamesace likes this.
  29. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    You had me at "Potato"
     
    jorisshh likes this.
  30. TimeCastle

    TimeCastle

    Joined:
    Jan 12, 2015
    Posts:
    32
    I've tried it out a few ways, but I can't seem to figure it out D:
    Do I just make a new script and call those two things, and then attach it to the buttons?
     
  31. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    You can grab the current item like so:
    Code (CSharp):
    1.         public void Update()
    2.         {
    3.             if (InventoryUIUtility.hoveringItem != null && InventoryUIUtility.hoveringItem.item != null)
    4.             {
    5. var equipable = InventoryUIUtility.hoveringItem.item as EquippableInventoryItem;
    6. //equippable.Equip(); // Or Unequip
    7.                 //Debug.Log("Currently hovering: " + InventoryUIUtility.hoveringItem.item.name);
    8.             }
    9.         }
    Then, what you do with it is completely up to you :)
     
  32. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hope for vendor fix
     
  33. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hm... could you be a bit more specific please, what's going wrong? A use case always helps :)
     
  34. TimeCastle

    TimeCastle

    Joined:
    Jan 12, 2015
    Posts:
    32
    I'm getting errors that InventoryUIUtility.Hoveringitem doesn't exist.
    I'm kinda a beginner coder, actually I'm not even a coder xD so I'm a little lost. Would I just put something like;
    If GetKeyDown K -> GameObject = true?
     
  35. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Ah, no problem, let's break it down :)

    Code (CSharp):
    1. public void Update()
    2. {
    3.     // Check if the user pressed G (fires only once, untill the button is completely released and pressed again)
    4.     if(Input.GetKeyDown(KeyCode.G))
    5.     {
    6.         // Check if we're currently hovering over an item
    7.         if (InventoryUIUtility.hoveringItem != null && InventoryUIUtility.hoveringItem.item != null)
    8.         {
    9.             // Check if the item we're hovering over is actually of type equippable
    10.             var equipable = InventoryUIUtility.hoveringItem.item as EquippableInventoryItem;
    11.             if(equippable != null)
    12.             {
    13.                 // Ok it's equippable, let's do it.
    14.              
    15.                 // Get the character equip collection from the current player
    16.                 var characterUI = InventoryManager.currentPlayer.associatedCharacterUI;
    17.  
    18.                 // Finds the best (empty) slot to equip the item to.
    19.                 var bestEquipLocation = equippable.FindBestEquipSlot(characterUI);
    20.  
    21.                 // Actually equip the item to the character.
    22.                 equippable.Equip(bestEquipLocation, characterUI);
    23.             }
    24.         }    
    25.     }
    26. }
    I've written the following code for V2.1.3 (which is currently pending in the asset store), to future proof the code, so it won't work until the update is live. But it should be live any moment now :)
     
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    It is live. :)
     
    twobob likes this.
  37. Mark Henderson

    Mark Henderson

    Joined:
    Oct 25, 2013
    Posts:
    41
    Is there a built in way to automatically unequip / disable / remove from skill bar items when they are moved from the player inventory into a bank?

    Realized that I can just drop all my stuff off into a chest and still use the references on my skill bar.
     
  38. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    So i hope that now after all the other nice things and your break that you find the time for including support for the dialogue system.

    Nice "coder" potato by the way.
    I do not want to show you my "designer" code ;)
     
  39. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    hehe, I'm trying although I don't think it will be in the upcoming release, the main reason is that I want to clean up some code, handle bug fixes and do UFPS Multiplayer, improved currency system & a serialization upgrade, to allow networking saving / loading, etc. Once all of that is in (roughly 2 weeks I guess), I'll look into new possible integration options / new features.
     
  40. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Ah of course, hadn't even thought about testing that, I'm on it :)
     
  41. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Anyway to disable item pickup on walk over

    Also on InventoryProSave scene the inventory is full it says
     
  42. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Sure you can change the behavior of item pickup in the ShowObjectTriggerer:


    The InventoryProSave scene works fine for me? Could you check the restrictions on the inventory collection please?
     
  43. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    A little upgrade guide to V2.1.3

    Player Inventories

    The new InventoryPlayer component now has references to this player's specific inventories, bank, and skillbar. This has been added to simplify multi character support.



    I'll be recording a tutorial on this today, it's just a heads up, in case you're running into some walls.


    Visual item equipment

    The default character controller uses raycasting to check ground distance, etc. However this interferes with the weapon's triggers. Inside your physics settings, be sure to disable the Raycast hits triggers.


    In on of the upcoming releases I'll likely create a custom controller, to add support for layers (which would remove the problem all together).
     
  44. TimeCastle

    TimeCastle

    Joined:
    Jan 12, 2015
    Posts:
    32
    Yeah I can second this
     
  45. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    219
    A POTATO !!
     
    jorisshh likes this.
  46. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hm.. Perhaps something went wrong with the prefab, could you check the InventoryPlayer Component on the player and check if the inventories are set? If none are set, it won't be able to find any, and assume they're all full or unavailable.

     
  47. TimeCastle

    TimeCastle

    Joined:
    Jan 12, 2015
    Posts:
    32
    That did the trick, thanks.
     
  48. Mark Henderson

    Mark Henderson

    Joined:
    Oct 25, 2013
    Posts:
    41
    When you come up with a solution, mind posting or PMing the code? I'd like to get this bug fixed in the next few days
     
  49. Mark Henderson

    Mark Henderson

    Joined:
    Oct 25, 2013
    Posts:
    41
    Sorry for the double post, tho this is on a different topic.

    I haven't been using the character inventory, since I'm not really doing equipable gear aside from weapons. After updating I had to add an InventoryPlayer component to avoid errors.

    I'm also now getting an error trying to display a message in the NoticeMessageUI - specifically the item pool is failing.
    NullReferenceException: Object reference not set to an instance of an object
    Devdog.InventorySystem.InventoryPool`1[Devdog.InventorySystem.UI.Models.NoticeMessageUI].Get (Boolean createWhenNoneLeft) (at Assets/InventorySystem/Scripts/Other/InventoryPool.cs:54)
    Devdog.InventorySystem.NoticeUI.AddMessage (Devdog.InventorySystem.Models.InventoryNoticeMessage message) (at Assets/InventorySystem/Scripts/UI/WindowsOther/NoticeUI.cs:125)
    Devdog.InventorySystem.Models.InventoryNoticeMessage.Show (System.Object[] param) (at Assets/InventorySystem/Scripts/Other/Models/InventoryNoticeMessage.cs:47)
    Trader.OnEnable () (at Assets/Game/Scripts/Trader.cs:40)
    In monodevelop's debugger, I see that itemPool is null, which doesn't make much sense since it's created in the constructor. It does seem to only happen the first time it is called, which does happen from an object's onEnable function.


    *EDIT*
    you're also missing a null check on line 549 of InventoryItemBase - you check itemCollection.canDropFromCollection without checking if itemCollection is set.

    fixed code:
    Code (CSharp):
    1.             if(isDroppable == false || (itemCollection != null && itemCollection.canDropFromCollection == false))
    *Edit2* Further down in the same function, you access itemCollection a couple more times without null checking.
     
    Last edited: May 20, 2015
  50. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    The pooling error comes from your own file Trader.cs, are you showing a notification in the Awake() perhaps? If so, you might consider switching it to Start().

    Items can only be dropped directly from a collection, therefore the null check is not necessary. When does the problem occur, on what action?