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

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Thank you kind sir, always appreciated :D
     
  2. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Sounds good, I've only played with UMA for a few hours but I really like it, simple to use and it seems really powerful. Do you maybe have some reference to the switching of slots? Maybe some documentation / video, etc. Just a frame of reference to work from.
     
    Richardm1985 likes this.
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    We'll I guess you could make it work with UFPS but it would probably be a bumpy ride. I've got to say, after playing with it for a few hours, I really like it :)
     
  4. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Last edited: Jul 29, 2015
  5. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    I recommend this playlist https://www.youtube.com/playlist?list=PLkDHFObfS19wRJ9vvaDTwCe-zRPv9jI25

    It's a tutorial made already with UMA 2 and Unity 5 and covers the most important aspects of the framework and the basics of the coding needed to integrate UMA.

    EDIT: Ooops @Richardm1985 You've got it first. Well done haha :)
     
    Last edited: Jul 29, 2015
  6. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    lol @TRoNDaNeflin.

    How would you locate the "CharacterUI" during runtime? I get errors that I can't convert it from a GameObject (using GameObject.Find). I might not need it as I might have solved the slot data problem, I have to work on it tomorrow and I'll post the solution if my theory is correct lol
     
  7. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    You can refer each slot and assign an object to it with equipLocations[n].equipTransform

    Here's how I did it (I use slots 10 and 11 to the weapons):

    Code (csharp):
    1.  
    2.            if (equipLocations[10].equipTransform == null && equipLocations[11].equipTransform == null)
    3.            {
    4.                Transform[] bones = GetComponentsInChildren <Transform>() as Transform[];
    5.                 foreach (Transform t in bones) {
    6.                     if (t.name == "EquipToLeft") {
    7.                        equipLocations[10].equipTransform = t;
    8.                     }
    9.                     if (t.name == "EquipToRight") {
    10.                        equipLocations[11].equipTransform = t;
    11.                     }
    12.                 }
    13.             }
    14.  
     
  8. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    About the slots thing... It should be easy to handle UMA slots because they are just skinned meshes and the slot contains a prefab we can use. So, Inventory should be able to deal with it as any other visually equipped item.

    On this pic I've dragged two UMA slot prefabs to the scene - they are just meshes. I didn't test it but I'm quite sure if you create an equipable item and assign a UMA prefab it will handle it like any other non-UMA equippable piece of armor or weapon. Then, we only need to assign the overlay (or overlays) over it. And I think that is what Jorisshh is implementing.

     
  9. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    UMA slots replace the body parts, so it is a bit more complicated than that. Also, to get the full use of UMA, they have to work with the system, meaning that UMA rebuilds the entire character every time he changes clothes. It becomes one mesh, very optimized, allowing you to have multiple ones per game.

    Also, you want to keep the structure of that slot or you will lose the skinning and animation properties. It is not just as easy as dragging them into the scene. I wish it was. :)
     
  10. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    If UMA is created, adding or removing slots is just a function call, like this:

    Code (csharp):
    1.  
    2.     void SetSlot(int slot, string slotName) {
    3.         umaData.umaRecipe.slotDataList[slot] = slotLibrary.InstantiateSlot(slotName);
    4.     }
    5.     void RemoveSlot(int slot) {
    6.         umaData.umaRecipe.slotDataList[slot] = null;
    7.     }
    8.  
    From my point of view the Inventory, if the equippable item is a UMA slot, it should just substitute the already built equip routine by that function call.

    And it doesn't replace the body parts. It just can overlap them. I don't replace a torso skin with a harness - I just add an additional slot over it.

    What you call 'rebuilding the entire character every time he changes clothes' is this:

    Code (csharp):
    1.  
    2.     void RefreshUMA() {
    3.         umaData.isMeshDirty = true;
    4.         umaData.isShapeDirty = true;
    5.         umaData.isTextureDirty = true;
    6.         umaData.Dirty();
    7.     }
    8.  
    Hope it helps.
     
    hopeful likes this.
  11. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Good. I am so used to people having no idea what UMA is that I just assumed.Looks like you did your homework.

    Slots do replace body parts though, in most cases. Some slots are additional, such as shoulder pads and hair, but torso is replaced by armor and feet are replaced by shoes/boots. If you don't do that, the skin will poke through. :) That is not a pretty sight. Some items, such as a bag that goes over the shoulder or a backpack would not replace the body mesh but just add to it.

    But hopefully, the inventory system can do more than just add slots to the body but can be used to entire change slots and clothing. That would be cool.
     
  12. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Yeah. That will be an awesome feature :)

    I've already integrated UMA with InventoryPro but I had to make my own equip/unequip script and so I have two systems controlling half part of the process: inv handles the collection and properties aspects and my script the equip/unequip stuff. So I'm very very interested on that part and just like you, I guess UMA integration will make this asset even more precious among the community.

     
    hopeful and Teila like this.
  13. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I think so too. UMA is very hard to use and this would simplify the process immensely.
     
    hopeful likes this.
  14. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    UMA isn't really that hard to understand or use, and it's well-designed, it just hasn't been marketed properly. As UMA gets adopted more by other plugin authors - like Inventory System Pro - and as UMA art continues to appear in the store, people will get used to it and understand that UMA is a super flexible and efficient way to generate characters.

    UMA is a project that was funded by Unity and made free to all Unity users. So let's use it. :)
     
    TRoNDaNeflin and Teila like this.
  15. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    It is hard to use because it is very poorly documented. :) So people skip it for easier solutions. It is very well done, imho. Great for multiplayer solutions or when you want a lot of NPCs in your game.
     
  16. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Damn. I think I'm in need of some help...

    Suddently, all the text color of all my UI turned green. I know this happened before once or twice and I got it fixed (don't remember how or why this happens). The true is it happens from time to time.

    Look here. It seems jorisshh had the same problem ;p
    Any tip, please?

    EDIT: Fixed it, restarting Unity LOL :)
     
    hopeful likes this.
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    If jorissh is inclined to get the Inventory System working with UMA out of the box, that would be absolutely wonderful, and a big help to many Unity users. :)
     
  18. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Not sure what caused it, it happened after I played with UMA. But like you said, it's quite innocent, a quick restart fixes the problem :)
     
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I just might be ^^, just look at that sexy mesh hair
     
    TRoNDaNeflin, Teila and hopeful like this.
  20. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    I've remade my char controller and now I'm in the process of adding InventoryPro components. The mouse triggered objects are working properly (vendors, boxes, even the pouches on the floor) and the proximity ranger helper too. But the auto-loot objects I have on the floor (pouches and other objects) don't.

    My old char with the old controller don't have such issue. So there's should be a problem related to the components of my new guy. What exactly triggers the pouches on the character side?

    I'm on this for the past 4 hours, trying to figure what's missing... Do you have any tip, please?
     
  21. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    I am trying to get Inventory Pro to work with UMA and UMAzing Character creation system. And on top of it I am trying to build a system that will be able to save everything to a string on quitting and starting up to save to a MySQL database for a mmo I am trying to make.
     
  22. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Hm.. what exactly do you mean by auto-loot system? In the last version I did unify the range and FPS based pickups. In your settings (Pickup & Usage > Triggerer handler type) you'll find the handler type which defines the way the "best" triggerer in your player's range is defined. Perhaps this is it?
     
  23. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Well than maybe this helps :D


    You can equip meshes like hair on top of the head without replacing it.
    You can equip shoes that replace the feet.
    You can equip texture based objects like the shirt.

    And finally, you can override the color of the UMA model, just in case you want to use the same mesh multiple times with different colors :)
     
  24. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    mm? I mean when I walk over a pouch, it's supposed to loot it. My new char with the new controller doesn't loot it. The old one does (same scene, same everything), so I think it has nothing to do with the settings, right? I must be something that the new char has or doesn't have that don't trigger the little pouch sphere colider. But what?

    This new controller is wonderful but is full of stuff: coliders on feet, hands, and raycasting all around all the time. The PlayerCharacter has more then a dozen Playmaker FSMs attached and a lot of child objects and it's all set at runtime...

    Just tell me please what component, on the Player, will trigger the pouch colliders? Or could it be a Layer or Tag problem?

    PS: Your UMAs are getting sexier each new WIP update ;)
     
  25. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522

    Just tell me please what component, on the Player, will trigger the pouch colliders? Or could it be a Layer or Tag problem?

    The InventoryPlayer component handles the collisions with objects, and tries to loot them. It could be a layers problems, check the PhysicsManager (Editor > Project settings > Physics) and make sure the collision matrix doesn't exclude the player's layer.

    Other than that I'm not entirely sure what could prevent it from working :(
     
  26. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Oh Jorisshh, you make things sound so simple... :)

    This is not a settings problem because, as I said, all other characters I have on the same scene don't have any problem looting the little pouches.

    When you say Players layer... wait, let me show you something...

    All this inside the orange box is my Char :) So, it's not just a matter of a root object with a model inside... it's something much more complex. So, when you say Player Layer I would love to know exactly what InventoryPro considers 'Tthe Player'. Is it the root object? Is it where the InventoryPlayer is? Bacause I just cant recursivelly attach everything to Player layer because I'm using other layers to acomplish all the needed mechanics.



    But I'll keep digging it ;)
     
  27. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Does the UMAGuy object have a capsule collider or any other form of collider? The InventoryPlayer is the "root" of the player, which should contain a collider and a range helper (which you seem to have).

    Forget what I said about the player's layer, I've added it a few days ago and it isn't yet live in the store so :p
     
  28. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Now, we're getting somewhere. :)

    No, there isn't any colider on UMAGuy (just the UMAMaker which creates and handles the uma stuff and the pseudo-InventoryPlayer MyUMAPlayer).

    The character capsule colider, rigidbody and animator are attached to the model root - Hero - which is created on runtime.

    UMAGuy object doesn't even move. Just Hero moves. That's why I relocated the _Col inside it so it could move along with the char model.
     
  29. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Ah that's where the problem is at than :), the Unity's MonoBehaviour calls (OnCollisionEnter and such), only fire on the object with the collider (or any child collider that don't have a RigidBody component attached). So because your collider is on the parent, it won't register the calls :).

    You could add a collider to the InventoryPlayer, or move the InventoryPlayer to the root (not sure if this causes problems with your setup).
     
  30. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Assigning a colider to UMAGuy will not work because its transform never changes and so it will never collide with anything :)

    So, the option is move the Inventory Player to Hero but there's a huge huge problem. I don't have a clue how to add a script (and fill those needed properties) to an object that doesn't exist yet :p Haha LOL

    I could move it from some temporary object - I don't know if that's even possible. I don't think so :\

    EDIT: Mmm, maybe I can. I think I can do it...
     
  31. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    In my setup I've simply attached the Capsule collider to the root of the UMA object. UMA will auto. detect the already existing capsule collider and resize it.


    Of course you could also wait a few days and use the UMA integration that I just wrote ^^
     
    Richardm1985 likes this.
  32. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Oh yeah! That's good talking! Sure I will :D

    But I'll keep trying. I'm loving it ;)
     
  33. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Fabulous, Jorisshh! It all looks wonderful. :)
     
  34. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Why UMA? Why not focus on something more helpful to everyone?
     
  35. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    well if you know another free character system of that quality just let us know?
     
    Snownebula likes this.
  36. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    lol ya. Does anyone know how to fix something like this:

     
  37. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Before anyone asks, yes that is a curvature of a planet. I think that may have something to do with my problem. The mesh isn't aligning up to the physics collider.
     
  38. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Alrighty gents, I've pushed the new version. No need to do a fresh import, you can simply import this update on top of 2.2.1 :).
    And of course the changelog:

    New:
    • Editor tabs now wrap when there are to many to display.
    • UFPS Multiplayer singelton checks (allows using singleplayer while having multilpayer enabled).
    • Updated UFPS Multiplayer to 0.6
    • UMA 2 integration (BETA)

    Fixes:
    • UFPS Namespace fixed
    • Equippable inventory item dropped removes 2x stats fixed
    • Currency single and plural name are now required.
    • Code cleanup
    • plyGame events on InventoryPlayer fixed.
    • Crafting editor bugfix
     
  39. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Offset the colliders :p ? Quite hard to come up with a solution with this little information ^^
     
  40. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    I love the way empty public InventoryItemBase fields in any class when clicked in the editor open up a window for selecting any item in the current db. Very slick. Where is that coded? I wanted to do the same thing for a derived class so it only opened up a list of the derived class items in the db.
     
  41. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Sweet I fixed it. If anyone else has this problem when making larger planets remove the Sphere collider and add a Mesh Collider.
     
  42. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    You can find the editor in "\InventorySystem\Scripts\Other\Editor\ObjectPickers\InventoryItemPicker.cs". It implements from a generic base class so you can very easily create your own :)
     
  43. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    Importing 2.2.2 in a new project give 11 errors:
    Assets/InventorySystem/Scripts/Modules/Bank/BankUI.cs(29,17): error CS0104: `UIWindow' is an ambiguous reference between `UnityEngine.UI.UIWindow' and `Devdog.InventorySystem.UI.UIWindow'
    ...they are all the same about UIWindow

    because it didnt know what UIWindow to use i added "Devdog.InventorySystem.UI." in front of UIWindow
    i changed it anytime the error show, its a tempory solution while Jorissh update this.
    Code (CSharp):
    1. private Devdog.InventorySystem.UI.UIWindow _window;
    2.         public Devdog.InventorySystem.UI.UIWindow window
    3.         {
    4.             get
    5.             {
    6.                 if (_window == null)
    7.                     _window = GetComponent<Devdog.InventorySystem.UI.UIWindow>();
    8.  
    9.                 return _window;
    10.             }
    11.             protected set { _window = value; }
    12.         }
     
  44. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,191
    Hi, great package!

    I had a quick question. I am trying to add a display window to my inventory that shows the name of the item and description that the player is hovering over. It's a static window shown at the top of the inventory window, as can be seen in the attached picture. What would be the best way to achieve this? I've tried a host of different components but they don't seem right for the job. I feel the most likely suspect is the UIInfoBox (or is it InfoBoxUI?), but that's asking for a InfoBoxRowUI prefab and two others that I don't think I need. After all, I will only be displaying the info for one item at a time.

    Edit: I figured this out myself. I just created a new class based on the UIInfoBox class and removed the row stuff. Works perfectly!

    PS: I'm not sure if you know, but all the scenes appear to be screwed up. Most still work, but null reference exceptions are thrown like crazy. The majority of the errors seem to center around a lack of a Player Manager and language database.
     

    Attached Files:

    • Inv.png
      Inv.png
      File size:
      99.2 KB
      Views:
      821
    Last edited: Aug 5, 2015
  45. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Good to see the beginnings for UMA and Dialogue System support. :)
     
    Teila likes this.
  46. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    I'm testing the new update...

    Is the UMA scene supposed to work out of the box? Because it doesn't!
    The UMA dude just runs around (and fast ;)) but he doesn't give a damn for anything placed on he scene. No loot, no interaction, just runnnnnning :p

    No errors, no warnings. Well, the UMAInventory player scripts, on the Inspector shows a message: 'The associated scripts cannot be loaded...' but the script is assigned.

    I will not try to update the asset in my project until I find out what's going on.

    EDIT: Solution: we need to enable UMA2 Integration (@InventorySystem menu)
     
    Last edited: Aug 5, 2015
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I'm not sure what to expect from the "beta" but I do get basically the same thing. I guess it's not entirely hooked up, but we do at least get a semi-nude UMA guy running around. ;)
     
    TRoNDaNeflin likes this.
  48. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Haha :)

    EDIT: LOL, just found what was missing. We need to enable UMA2 Integration (@InventorySystem menu) :p
     
    Last edited: Aug 5, 2015
    hopeful likes this.
  49. TRoNDaNeflin

    TRoNDaNeflin

    Joined:
    Mar 26, 2014
    Posts:
    67
    Hey jorisshh, well done with this update! The UMA stuff works great. I'm very happy with it.

    Now, there's an issue not really related with the new updated version. It's kind a buggy situation. Tbh, I'd noticed it on the same day I bought the asset but at that time it didn't harmed much. Now it really does because I have a considerable big database and lots of items that need to be changed from EquippableItem to UMAEquippableItem...

    The problem is:

    a) If I replace the EquippableItem script with the UMAEquippableItem one, in the Inspector, InventorySystem delete the item from the database and shift all the IDs down by one to fill the gap. This creates an inconsistency with the prefabs automatic generated names (I mean the #nn part). I think it doesn't create errors or misbehaviours but having that correspondence between the name and the ID helps a lot when you have lots of items to manage. The delete thing is bad - very bad...

    b) If you do it in the Manager, well, it crashes the plugin and we need to restart Unity. And the item is deleted aswel. Again, not good at all...

    It would be nice if you check this up and find a way to fix it. Because if there's no solution I'll have to start over again and that means creating and setting up 83 items from scratch :\

    Anyway, to the community: If you're working with UMAs and if you need an Inventory System, get this asset now!
     
    jorisshh likes this.
  50. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,191
    One thing I'd love to see is the ability to override some of the default methods of various classes without having to edit the source code. Yes, a lot of classes are marked as partial, but that just allows you to add to them, not change their core behaviour.

    As an example, take the InventoryItemProperty class. I have a time property (time remaining) that I want to format a special way. As far as I can see, I can't do that without editing the InventoryItemProperty code directly. Or am I mistaken? Great package by the way!