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
    At the moment you can't. But as a quick fix you can open the ObjectTriggererBase script and change the inRange property. Line 48:

    public virtual bool inRange
    {
    get
    {
    if(InventoryPlayerManager.instance.currentPlayer == null)
    {
    Debug.Log("Player not found, can't determine distance to trigger. - Considered always in range when no player is present.");
    return true;
    }

    // Assert.IsNotNull(InventoryPlayerManager.instance.currentPlayer, "No player found, can't determine distance to objects.");
    Assert.IsNotNull(InventoryPlayerManager.instance.currentPlayer.rangeHelper, "No range helper found on player!");
    return InventoryPlayerManager.instance.currentPlayer.rangeHelper.triggerersInRange.Contains(this);
    }
    }


    Change this to:

    public virtual bool inRange
    {
    get
    {
    return true;
    }
    }

    Which will consider all triggers in range by default.
     
  2. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    I get this when I open the inventory window.
     
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Does the currency in the editor have a valid currency selected? Have a look at the setup wizard, it scans your project for mis-configured elements.
     
  4. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Do you mean the editor here?
    upload_2016-6-10_1-26-48.png
     
  5. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    I disabled those two objects, so the exception is gone.
    upload_2016-6-10_1-43-48.png

    But I still get this error
     
  6. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    OK, I mixed up the two parameters for AddCurrency, so I put ID, then amount. I fixed it like this and it was fixed where 0 is the currency ID.
    Code (CSharp):
    1. InventoryManager.AddCurrency(100, 0);
    But the reason I did the mix up is because InventoryManagerDialogueSystem.cs contains the following code which should be fixed by swapping the parameters. I am using the dialog system integration, that's why I used InventoryManagerDialogueSystem.cs as reference.

    Code (CSharp):
    1. private static void AddCurrency(string currencyID, float amount)
    2.         {
    3.             InventoryManager.AddCurrency(GetCurrencyFromID(currencyID).ID, (uint) amount);
    4.         }
     
    jorisshh likes this.
  7. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Yep I know, fixed that; Will be available in the next update :p
     
    Stranger-Games likes this.
  8. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Getting this err on importing Inventory Pro even on empty scene start

    NullReferenceException: (null)
    UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs) (at C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:74)
    UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:154)
    UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:147)
    Devdog.InventorySystem.Editors.InventoryEditorBase.OnEnable () (at Assets/InventorySystem/Scripts/Other/Editor/InventoryEditorBase.cs:18)
    Devdog.InventorySystem.Editors.InventoryItemBaseEditor.OnEnable () (at Assets/InventorySystem/Scripts/Items/Editor/InventoryItemBaseEditor.cs:47)
    Devdog.InventorySystem.Editors.EquippableInventoryItemEditor.OnEnable () (at Assets/InventorySystem/Scripts/Items/Editor/EquippableInventoryItemEditor.cs:25)
     
  9. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    This is a Unity editor thing; Restarting Unity should fix the issue :)
     
  10. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Tryed, worked, thanks:)
     
  11. mrdl2010

    mrdl2010

    Joined:
    Jun 1, 2016
    Posts:
    23
    Is there any way to use a mycraft crafting without orders? The 3x3 grid is still there. However if users put in 3 apples, it will generate 1 sword regardless of position of the apples?
     
  12. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Integrating this gem of an UI with TPC, so need a little assistance on both sides:)
    Can you give me a hint why TPC character ignores inventory panels? And can`t move or interact with those.
    Looks like raycasting issue, and it does work in integration demo. but i can`t figure out what am i missing(
     
  13. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Not at the moment; You could of course implement it yourself by creating a new script, inheriting from the CraftingWindowLayoutUI and override the GetBlueprintFromCurrentLayout(), which searches for craftable blueprints in the set layout :)
     
  14. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Have you got the InventoryControllerBridge on your managers? The controller bridge grabs all windows in the Start method and counts which are open; Based on the open windows it will either enable or disable the controller input.

    Each window has a field 'blockThirdPersonControllerInput' which defines if showing the window should block the controller movement.
     
  15. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Yep) Was a raycast problem. Something from native TPC UI blocks raycasts to IPro panels) Now will need to delete one by one to find what was it
     
  16. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Another tip please)
    If i need an equipable slot to be allweys-equipped how can i do it?
    I mean like if armor is a part of a model, and i don`t want "hands and legs" to walk around if armor is unequipped:)
    So need a kind of restriction so that equippable item can only be replaced, not removed)

    And another thing - is there a way to add pre-defined equipment at the start of the scene?
    Mean to add something to inventory or equipped slots in inspector)
     
    Last edited: Jun 15, 2016
  17. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    In the InventoryPlayer component the bindings are defined. You choose Make Child it will move the visual item to the player's hand. If you choose replace it will replace the referenced transform for the visual item, and re-enable it once the item is un-equipped.



    To set items in a collection at start you can use a CollectionPopulator component (attach it to the Character collection gameObject)
     
  18. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi, does anyone know a youtube video showing how to configure InventoryPro with UMA2?

    I thought I saw one, but I might have just been thinking of UFPS as I cannot find a UMA video anywhere.
    Thanks
     
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
  20. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
  21. Ridgerunner

    Ridgerunner

    Joined:
    May 31, 2014
    Posts:
    34
    I'm working with Inventory Pro I'm trying to access the database (speed) for reference, I have manager gameobject with the inventory item script on it, I have another gameobject that has a script with a float value (Speed) on it, I need to access the database on start/awake and make it change the other gameobject float value (Speed) by reference manager gameobject Inventory Pro database.
    can some one show me how to script this the reference value database from the manager gameobject.
    Thanks
     
  22. Ridgerunner

    Ridgerunner

    Joined:
    May 31, 2014
    Posts:
    34
    In the Quest System Pro can you pot audio clips in each nod? That would be cool. It would be nice that every time a talking bubble pops up it plays a audio clip...
    Thanks
     
  23. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Yep :)
     
  24. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Do you mean modify the item's properties or is it in a custom component?
    Either way, you can grab the items through the database: ItemManager.database.items; << And modify the items to your liking (you'll likely want to do this in the awake before the deserialization happens).
     
  25. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Yep, you sure can :D

    Each node can have it's own audio and motion (animation) data. Of course the nodes are also partial classes, so you can add info to the built-in nodes without having to modify the core files. Additionally you can also create your own nodes :)
     
  26. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi ,

    can skillbar slots get added (or unlocked) when i equip items into slots?

    thanks
     
  27. Ridgerunner

    Ridgerunner

    Joined:
    May 31, 2014
    Posts:
    34
    I mean I need to access the date base stats, In order for my game object to update its stats. So if the inventory Pro item date base script update speed to 80, Then on anther game object script the CARS need the Script to update the float speed on the car Script to 80, The Car Script float/int needs to access inventory Pro date base In order to update speed on the car script...
     
  28. Ridgerunner

    Ridgerunner

    Joined:
    May 31, 2014
    Posts:
    34
    I need the car script to access Inventory Pro date base stats (Speed 60 tire pressure 45 Oil pressure 68 ) order to update the stats on the car (Speed 60 tire pressure 45 Oil pressure 68 ) so I can use the stat in the car script to make the car go faster and so on...
     
  29. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Yep of course, you can add slots by calling the collection's AddSlots method. For example mySkillbar.AddSlots(4); // to add 4 slots.
     
  30. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    great thanks man.

    I was looking in the documentation and the code reference and could not find it. Only could see BankUI.AddSlots and RemoveSlots.

    Thinking about it more, I will need to be save what object was in the skillbar slot before I remove the slot. then return the item back to inventory and if the skillbar slot is created again to put back the object in to skillbar slot from inventory (if exists).

    For example:
    skillbar slots set to keys: 1. 2. 3. 4 at start.
    then I equip shoes and 2 more slots added with keys 5 and 6.
    drop object 'turbo roller skate blades' on to the skillbar slot 5. object is moved from inventory collection to skillbar.
    then I equip gloves and 2 more slots added with keys 7 and 8.
    but if i unequip the shoes, i remove slots 5 and 6, the 'turbo skates' object are returned to the inventory collection and the 2 slots with 7 and 8 remain.
    then if the user equips the shoes again, add the slots 5 and 6 and automatically move the 'turbo skates' object from the inventory collection back to skillbar slot 5.
     
  31. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    Does the car have the Player script in this case? If so, you can directly grab them from the CharacterUI collection's StatsContainer. If you use a custom collection you can grab it's items by grabbing the myCollection.items[n].item (where N is the index of course).
     
  32. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    In this case you may want to create a custom item type that handles this in it's Use method:
    http://devdog.io/unity-assets/inventory-pro/documentation/api/creating-a-new-item-type

    You can grab the current player's skillbar through InventoryPlayerManager.instance.currentPlayer.skillbar
     
  33. Deleted User

    Deleted User

    Guest

    There does not appear to be a forum for the Quest System Pro beta. Where would you like us to post for that?

    It appears that importing the Quest System on top of the Inventory System does not work properly. If the Inventory System is installed, the Quest System menu options will not appear. (And if the Quest System is installed, the Inventory System menu options will not appear.)

    Is there a way I can create an inventory item from an existing prefab?

    Also, I am getting a 404 on devdog.io (sometimes).
     
    Last edited by a moderator: Jun 30, 2016
  34. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    The devdog.io site just went offline, for some reason it got 20k+ hits in a few minutes; Odd, but it's back online now :)

    You can find the quest system forums at:

    http://forum.unity3d.com/threads/wi...ate-quests-achievements-and-dialogues.401846/
    http://forum.devdog.io/viewforum.php?f=48

    The Tools / Inventory Pro / Setup wizard should be there, do you have any warnings or errors in your console?
     
  35. Deleted User

    Deleted User

    Guest

    No errors anymore. I had a bunch after importing, but they went away when I restart Unity. The cause is if I have Inventory Pro and Quest System in my project at the same time. Otherwise, it works perfectly.
     
  36. Deleted User

    Deleted User

    Guest

    You advertise controller support in the Unity Asset store, yet I don't see it, and your poll asks if you should add it. Has it been implemented? Or have I not made it far enough through your video tutorials?

    Is there a way I can create an inventory item from an existing prefab?
     
  37. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    It's a known issue; The Unity importer tries to be smart and overwrite files it really shouldn't. A work around is to create a new empty project, import one, copy over the your original project, and then import the 2nd asset in an empty project, and move that over.

    Fixed for the next release :)
     
  38. Deleted User

    Deleted User

    Guest

    Awesome thanks! I will do that.

    And I keep editing my questions after you read them :p sorry.

    Is there controller support yet? Can I create an inventory item out of an existing prefab? (I am still going through your tutorials, so feel free to tell me its in there if so.)
     
  39. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    There is controller support in Inventory Pro, but not yet in the quest system (planned for the next release).

    When creating an item in the editor you can select a prefab or model to base the item on (this is in step 2, after you've selected the item type).
     
  40. Deleted User

    Deleted User

    Guest

    Gotcha. Perfect, thanks! I misunderstood step 2. I thought it was asking me if the item used a 2D sprite or 3D model.

    This looks like a great tool, and I think it will really improve my workflow. Thanks!!
     
  41. Deleted User

    Deleted User

    Guest

    When I use a prefab as a model when creating an item, it will not let me use a prefab with an existing BoxCollider2D. Is there a way around this?

    Am I able to sort where the items are stored? So that weapons go in the weapons folder, and armor goes in the armor folder. Or does all inventory have to share a single folder?

    Do UIWindowPage.Show() and UIWindowPage.Show(bool) not work? If I use UIWindowPage.Show(0.5), it shows it in one half second. But nothing happens with the other two. UIWindowPage.Show(0) also does not work.

    Do you have a tutorial for controller support? I looked at your controller support demo scene, but that is a massive scene. There is no way to make sense of it without some guidance. How can I set the initial inventory slot to be active? I have spent the entire day on this, but have not made any progress. I hope you can help. Thanks!
     
    Last edited by a moderator: Jul 1, 2016
  42. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    I'll look into the 2D box collider issue.

    All items are stored in the same folder, there's currently no way around this. In the next version of Inventory Pro I've updated the item picker, this will sort items based on type (+ other filters).

    UIWindowPage.Show should most certainly work, in fact they both use the same code execution path, so it's rather weird they don't. Do the windows have any animations on them that might interfere?

    The controller support boils down to this http://devdog.io/unity-assets/inventory-pro/documentation/components/controller-support -
     
  43. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    A little sneak peek :)

    Item properties (now named item stats), will get levels :D
     
    cygnusprojects and hopeful like this.
  44. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @jorisshh

    I am returning to a project of mine that I haven't touched in a few months. How can I tell what version of Inventory Pro I have installed in that project?
     
  45. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    If it's 2.3.2+ it's visible in the getting started window :)
     
    Tinjaw likes this.
  46. DecayGame

    DecayGame

    Joined:
    May 15, 2016
    Posts:
    86
    Someone please help me want to make it so that when you equip an item it enables an object in the character hierarchy so that I can equip the meshes that are attached to the player. Like pants, shirt and ect. Please I spent alot of money of this Asset It would be very appreciated for some help ps : im kind of new to coding . :/
     
  47. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Hello. I am thinking about buying your asset due to the amount of positive feedback It has. I just want to know if it yet has support for Unity UNET Networking or not. If not would that be hard to implement?
     
  48. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    There's currently no support for UNet or any other networking library for that matter. Implementing this CAN be difficult, depending on the setup you're aiming for. If you're adding client-sided authority (cheatable) it's fairly simple and straight forward (all you'd have to sync is item pickup, drop and some visuals like the opening of, for example, the treasure chest).

    Server sided authority on the other hand is quite difficult and time consuming.
     
  49. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Alright. Thanks for the reply. I might still buy it since it looks awesome.
     
  50. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi mate.
    The poll on the thread shows that you will make a lot of people very excited and happy when you add this functionality :)
     
    jorisshh likes this.