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. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Doubtless Jorishh will tackle the selfy issue in due course.
    the other thing: http://kaycare.co.uk/games/Inventory/Docs/extending.html#items-architecture pretty much that and the next 3 sections cover it with a plumb example in http://kaycare.co.uk/games/Inventory/Docs/extending.html#indepth
     
  2. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Items' are currently dropped at the mouse position or using an offset relative to the character. But because all items are serialized inside unity as prefabs, you can add your own custom components, and for example raycast down, to place the item on the ground. I can image this is a commonly requested feature, so I'll see if I add a little demo script for this.
     
    twobob likes this.
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    According to Sellfy's blog pages updates can be pushed to users directly. You'll receive an email with a new download link, where you'll be able to download the update. If it however for some reason does not work, I'll send those who bought it at Sellfy a voucher for the asset store and close the Sellfy page. So don't worry :)

    As for removing an item, you can directly remove the item you're using for example

    myItem.itemCollection.SetItem(null, myItem.index); // Removes the item completely, and won't be recoverable.

    // Or you can add the item to another collection

    myCustomCollection.AddItemAndRemove(myItem); // Adds the item to "myCustomCollection" and removes it from the previous collection.

    // Alternatively if you don't know "what" item to remove you can find one using the unique item ID, also useful when you want to remove several of an ID, in which case use FindAll()

    myCollection.Find(myItemID);

    // Or, search all inventory bags

    InventoryManager.Find(myItemID, false); // The 2nd parameter allows you to search through your bank(s) as well.
     
  4. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    John-G, twobob and Luschie like this.
  5. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Nice package. Some pre-buy questions.

    Does this work on mobile?

    Also is there a Crafting system ?

    Cheers.
     
  6. Luschie

    Luschie

    Joined:
    Apr 19, 2014
    Posts:
    14
    Yes and yes.
     
  7. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    As luschie said, yup it works very well on mobile, I've optimized it for drawcalls as well as repaints ( the system only repaints when absolutely necessary), and Yup 2 crafting systems actually, 1 using blueprints (minecraft style) & a more traditional RPG style like WoW.

    Check page 1 post 1 for a graphic of all the features :)
     
  8. akhil96

    akhil96

    Joined:
    Oct 12, 2014
    Posts:
    32
    hi,
    any plans of making it supported with *icode* and *GameDataEditor*
     
  9. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I've contacted the iCode creator and he send me a copy to work with, so iCode is very likely, GameDataEditor is one I wasn't familiar with, but I'll have a peek at it once I finish this release cycle.
     
  10. akhil96

    akhil96

    Joined:
    Oct 12, 2014
    Posts:
    32
    GameDataEditor is also a very good extension like easy save 2 and it auto saves the changes made to Gamedata at runtime.
    so try to consider about it also.
     
    Last edited: Apr 5, 2015
  11. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Might indeed be a nice addon, given it's popularity I think it's best if I start with the most used packages. plyGames & Dialogue system seem to have gotten a lot of attention lately, so these will likely be my next integrations.
    But I certainly won't rule out GameDataEditor, just don't expect it integrated next week :)
     
  12. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I guess dropping an item (raycasting to the ground) is a common feature, so I thought, what the hell, and build it directly into the system :). So, next update, you can drop items directly to the ground.
     
  13. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    +1 for GameDataEditor integration, it would be a perfect combo :)
     
  14. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    If possible about dialogue integration, there is function to receive reward, would like the possibility to receive object or add blueprint with quest reward, also considering using ufps, your inventory and dialogue how would you manage the 3 different inventories?
     
  15. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    The creator of the dialogue system suggested the same, I've put it on my list :). So.. So close to wrapping up this cycle, I'll submit it to the asset store tonight, and then I'll start on the next batch of features
     
  16. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    what integration have you planned for dialogue system ? it will be possible to make a quest "craft item xx" ? or i guess its same to check if item xx inventory, any has item Equiped?
     
    Last edited: Apr 6, 2015
  17. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I honestly haven't invested much time in the Dialogue system yet, I just finished wrapping up the code and documentation, which I am submitting right now.
    So, tomorrow I'll start looking into possibilities for the Dialogue system integration :)
     
  18. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    Just purchased! Going to mod this to be a space-fleet "inventory" instead of a character inventory... :) One really cool integration: MyBadStudio's WordPress system -- hook this into his UserData plugin -- and store inventories online via WordPress site database! MrDude has a VERY clean, sensible, POWERFUL system using WordPress as login, storage, score-keeping -- payment system! Hook this in-game inventory system into storing data online, and it would be insanely powerful! Check it out:
    http://forum.unity3d.com/threads/th...w-ui-system-ugui-extremely-extensible.308505/
     
    Iron-Oxide likes this.
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I'll be sure to look into it :), and I think you pasted the wrong URL, unless you want me to create integration's with my own system ^^?
     
    Iron-Oxide likes this.
  20. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    I would be very interested in this too!

    [edit] oh and just purchased your asset now
     
    Last edited: Apr 6, 2015
  21. superwendel

    superwendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    +1 for integration with your system. ;)
     
    jorisshh likes this.
  22. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    Oops! LOL! Was "multi-tasking" -- I'm obviously not good at that... :) I guess it would be pretty easy to integrate your product with your own product, though, eh? LOL!!!

    Here's the actual URL to MrDude's (MyBadStudio's) WordPress plugin - I really think if you could sync this inventory with saving/retrieving data from WordPress using his Login and Data plugins... It's really slick! You can administer user accounts and set up payments for "creds" right from your own WordPress site too.

    Imagine: users pay for in-game creds to buy things in the in-game inventory with tried-and-true PayPal or other online payment systems. Imagine the possibilities! I'm really surprised you haven't seen that asset yet. Tell MrDude that "danreid70" pointed you there... :)

    http://forum.unity3d.com/threads/use-wordpress-as-your-games-database.228877/
     
    jorisshh likes this.
  23. truschr

    truschr

    Joined:
    Dec 25, 2014
    Posts:
    1
    +1 for plyGame Integration. Looks awesome and would love to use it soon :)
     
  24. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Maybe they want to send to a web service. ;). If you have any questions or need assistance integrating with my asset let me know and I'd be more than happy to help.
     
    jorisshh likes this.
  25. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Installed the sellfy update (email notification worked perfectly)

    Few breaking changes to note I suppose:
    The old databases in a gameobject are now more properly stored in ScriptableObjects, if you were using the demo one it will need relinking.

    Upon installation it won't work OOTB unless you have playmaker installed.

    we need to comment out
    //using HutongGames.PlayMakerEditor;​
    in
    \Assets\InventorySystem\Scripts\Other\Editor\IntegrationHelperEditor.cs​
    For it to run without errors (as far as I can see)

    There are a few other changes that may or may not affect current work, UI windows are now in the relevant Triggerer scripts

    upload_2015-4-7_13-27-7.png

    Which I think is new?

    The overall file structure is new enough that it would make sense to utterly delete the old install too... (It's pain not to, I initially gave it a go, just so I knew)


    However, that one edit should get you going.

    Cheers
     
  26. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    In my case this was extra painful as I spent all of yesterday rebuilding the system from scratch to get rid of an error that I could not find...

    (From yesterday)
    http://forum.unity3d.com/threads/re...iven-relationship-system.313218/#post-2054849



    After the upgrade today I now get...

    upload_2015-4-7_14-14-12.png

    again.
    (the actual reported error there is spurious, that is the default "Oh dang what is wrong?, let's come up with something to say" message)

    Sigh. It's going to get tiring rebuilding the project from scratch every upgrade.... Really need to figure out what the underlying problem is... Looks like it must be related to this system then...

    Hey ho, another fun day ;)

    This is not your error.
     
    Last edited: Apr 7, 2015
  27. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Not sure how the PlayMaker namespace got in there, but I've fixed the problem and re-uploaded / submitted it to the asset store & Sellfy, so that should be fixed now.

    As for the serialization bug, it's common in WP8 / mobile SDK's, I noticed the Unity asset plugin also uploads the PlayMaker WP8 plugin (/Assets/PlayMaker/Plugins/*), I can't do a damn thing about this, the asset store tool just uploads it... So you might want to try and remove it, see if it resolves your problem.
     
  28. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    ooh that would be awesome.

    *goes to check*

    This is still the most awesome system mate ;)

    Teething troubles is all...

    EDIT: Wait.. just to confirm I don't actually /use/ playmaker. not sure I have that file/folder. will go search. I will have to go check the installer again since I may have chosen to elide that on reflex.

    EDIT:

    So I built and ran your demo - inside that project -

    upload_2015-4-7_14-58-39.png

    no error.

    thus the bug - w/e it is - only affects the scene. not the whole project.

    I will mess around making a new scene instead - this at least is much faster than an entire project :)
    If I do ever figure out what is going on I will mention it.

    Since I am the only person reporting this it could be the interaction of something else - plus this - that is causing the problem, hey ho, It will all work out

    this is not your error
     
    Last edited: Apr 7, 2015
  29. Luschie

    Luschie

    Joined:
    Apr 19, 2014
    Posts:
    14
    Is there a way that people who bought it through the assetstore can download it before it gets approved? I am so eager to give the new version a go.
     
  30. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Nope :) You'll have to wait ** sadistic laugh **
     
  31. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Bit of gratuitous prefabbing got the bulk into a new scene
    upload_2015-4-7_15-36-52.png

    I tried running it and received the error.

    Stripped out all references to things that were /not/ the inventory manager

    upload_2015-4-7_15-43-40.png
    no errors.

    Conclusion: The error is not in your stuff.

    Will keep digging, thanks it was in Horizon[on], he is sorting it out.
     
    Last edited: Apr 8, 2015
  32. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    upload_2015-4-8_18-42-11.png

    Does the new ObjectTriggerer work in a new way, or is it not new at all and I am senile.
    Also I note a little intermittent Heap drift is this expected? Much obliged.
     
  33. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    The ObjectTriggerer is indeed new, previously I had some duplicate code handling the distance to objects, which was rather ugly, now all distance checking and window triggering is done using the ObjectTriggerer.

    Just ran the profiler once more to verify, but I have no GC alloc whatsoever, also no heavy allocations.
     
  34. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I will go check but I think that 37b per vendor is the co-routine. doing a "move next." during the distance check. Thus is intermittent.

    Will make a simple test case but it would have occurred in the ObjectTriggerer.DistanceCheck() not in the ShowObjectTriggerer.Update()

    Sort your profiler results by GC and you'll see it pop up.

    I wouldn't gripe about it but I was planning to -reactively - spawn non-animate vendor objects (buildings say) and they might number in the hundreds (since they will be so simple) thus even a tiny bit is a pain. Heck you know this, it's why I chose your excellent - best in class - system.


    Which I am otherwise 150% happy with. 200% if that sounds more meaningful.

    EDIT: This is now fixed
     
    Last edited: Apr 8, 2015
  35. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Awww... :)

    For those following along, the problem has been resolved :), now only allocating 17 bytes (unity allocates this internally) for any number of ObjectTriggers.

    And of course some proof:
     
  36. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Seems my moment of sadism came to an end, the asset has been approved and is now live on the asset store :), Unity is on a roll ^^
     
  37. Luschie

    Luschie

    Joined:
    Apr 19, 2014
    Posts:
    14
    Finally! Will give it a go tomorrow. And thanks for your tremendous efforts. This asset simply rocks.
     
  38. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Superb amendment to the distance handling. 17b (per bazillion) every few seconds I can handle ;)

    Total respect
     
    hopeful likes this.
  39. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Anything for the customer ^^, well.. almost anything :)
     
  40. Hans

    Hans

    Joined:
    Feb 20, 2007
    Posts:
    422
    I dont see the New docs for the "HOW to setup a new scene" in the crafting release or the videos on how to use and setup your new projects

    And i don't wont to use your scene that have already been setup and butcher them....just courses problems down the line

    Thanks
     
  41. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hey Hans, the new documentation is in the /InventorySystem/MainDocs.pdf There is also sandcastle reference, for which you have to unzip the ScriptReference.zip file.

    The MainDocs.pdf has some global explanation on how the system works, on page 6 the integration tutorial starts.
     
    Last edited: Apr 8, 2015
  42. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Update V2.1.2 (currently in development)

    Saving and loading is a commonly requested feature, so I decided to come up with a solution that could put a smile on everyone's face.

    Collection serializer
    Code (CSharp):
    1.  
    2.     public interface ICollectionSerializer
    3.     {
    4.         byte[] SerializeItems(IList<InventoryItemSaveLookup> toSerialize);
    5.         byte[] SerializeItemReferences(IList<InventoryItemReferenceSaveLookup> toSerialize);
    6.  
    7.         IList<InventoryItemSaveLookup> DeserializeItems(byte[] data);
    8.         IList<InventoryItemReferenceSaveLookup> DeserializeItemReferences(byte[] data);
    9.     }
    10.  
    The collection serializer allows you to create any form of serialization for your collection, the default will use JSON, after all it's the most commonly used.

    Collection saver & loader
    Using the saver & loader you can make your own (async) mechanism. By default data will be stored in PlayerPrefs (on the machine itself), however because of the async callback web based saving & loading is also an option.

    Code (CSharp):
    1.  
    2.     public interface ICollectionSaver
    3.     {
    4.         /// <summary>
    5.         /// Save the item data
    6.         /// </summary>
    7.         /// <param name="collection">Collection to save</param>
    8.         /// <param name="serializedData">Serialized item data</param>
    9.         /// <param name="callback">The callback when saving is either failed or completed, can by async.</param>
    10.         void SaveItems(ItemCollectionBase collection, Uri saveLocation, byte[] serializedData, Action<bool> callback);
    11.     }
    12.  

    Of course this mechanism is compatible with EasySave2, which I would still recommend over PlayerPrefs, but that's up to you :)

     
    Luschie and twobob like this.
  43. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I think this might make some people happy :)

    You can search on item ID, name, description, type, category and rarity :)
     
    twobob likes this.
  44. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Error on playing (clean project --- asset in project Inventory System)

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.EditorStyles.get_toolbarButton () (at C:/buildslave/unity/build/Editor/Mono/GUI/EditorStyles.cs:165)
    Devdog.InventorySystem.Editors.InventoryEditorUtil.Update () (at Assets/InventorySystem/Scripts/Other/Editor/InventoryEditorUtil.cs:40)
    Devdog.InventorySystem.Editors.InventoryEditorUtil.Init () (at Assets/InventorySystem/Scripts/Other/Editor/InventoryEditorUtil.cs:32)
    Devdog.InventorySystem.Editors.SettingsManagerEditor.OnEnable () (at Assets/InventorySystem/Scripts/Managers/Editor/SettingsManagerEditor.cs:28)
     
  45. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    This is actually an editor bug, but doesn't seem to affect anything directly, I've but it on my list to fix. Does it affect anything directly?
     
  46. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Not really just thought I would let you know.

    Also I would like to have on the hot bar what weapon I have in my hand. How can I do this?
     
  47. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
  48. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    my vendors do close when I walk away? I think? will go check

    Hmm - or maybe they timeout.. Will look at code

    \Assets\InventorySystem\Scripts\Managers\InventorySettingsManager.cs

    ///<summary>
    /// The distance items can be used, and windows should be auto closed.
    ///</summary>
    public float useObjectDistance = 10.0f;

    so here

    upload_2015-4-10_1-26-21.png

    Top Menu

    TOOLS: => INVENTORYSYSTEM : => TOOLS: => SETTINGS
     
    Last edited: Apr 10, 2015
  49. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    was not working but works now lol
     
  50. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    perhaps you were 9.9 away ;)
     
    Sphelps likes this.