Search Unity

  1. Engage, network and learn at Unite Austin 2017, Oct 3 - 5. Get your ticket today!
    Dismiss Notice
  2. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  3. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  6. Unity 2017.2 beta is now available for download.
    Dismiss Notice

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

    12.4%
  2. Improved serialization / saving for web

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

    29.1%
  4. Controller support

    13.4%
  5. Unity 5.1 networking (multiplayer)

    41.1%
  6. More modular build to simplify extending

    25.4%
  7. UFPS Multiplayer (Asset integration)

    10.7%
  8. Core GameKit (Asset integration)

    4.0%
  9. Dialogue system (Asset integration)

    22.1%
  10. Wordpress integration (Asset integration)

    3.7%
Multiple votes are allowed.
  1. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Sure thing here you go:

    • Removed plyGame namespace from UFPSEquippable item
    • Photon component fix, already in Photon.MonoBehaviour
    • Allow LINQ to be used on collections.
    • Updated to Unity 5.1 + updated the scriptable object creation (unity 5.1 feature)
    • Improved character stats (properties are now used in stats calculations)
    • Character stats data providers
    • plyGame casted the uints to ints, uints aren't compatible with plyGame.
      + Added plyGame check (compare itemID's)
    • plyGame comments for plyBlox actions ( temp variables )
    • ObjectTriggererHandler, hide cursor for UFPS
    • Drag accepters, added to CharacterUI and Vendor
    • Extra plyGame actions plyBlox (GetItemID, GetItemCategoryName, GetItemCategoryID, GetItemTypeName)
    • Extra PlayMaker actions (GetItemID, GetItemCategoryName, GetItemCategoryID, GetItemTypeName)
    • Added manual raycasting for items instead of OnPointerEnter to fix mobile builds ( standard unity approach doesn't work )
    • News editor window
    • Refactoring and cleanup + started on modularity
     
    Last edited: Jun 15, 2015
    Damien-Delmarle likes this.
  2. decerto

    decerto

    Joined:
    Jun 1, 2012
    Posts:
    126
    The pro demo is bugged, you can't craft anything in it (the R window). You can't split inside it, it uses all the stack item. Is this fixed or?
     
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Not so much a bug as it is a configuration choice, the slots inside the layout crafting are summed. Assume you have 5x1 stack of apples, and you drag a single apple into the layout crafting window, it won't actually remove the object from the inventory as it creates a reference. Inside this reference it will grab the sum of items in the inventories, 5 in this case.

    Of course you can disable this behavior by changing the wrapper and / or disabling the references :)
     
  4. decerto

    decerto

    Joined:
    Jun 1, 2012
    Posts:
    126
    The demo said to put 3 grapes along the middle, inside of the crafting menu. I had a total of 5 grapes. I split 3 individual grapes. I drag the newly created grape inside of the crafting menu (R window) and it says 5 grapes but I only dragged 1. Seems odd.

    How do I go about splitting the new 5 grapes inside of the crafting menu to split along the middle row (like it says in the demo)? Shift clicking doesn't split.
     
  5. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    34
    Found quite a few bugs in the UFPS integration :

    1. Null reference on TreasureChest in file BasicItemGenerator.cs on line 108

    Code (CSharp):
    1.  
    2. // Check all other values
    3. if (item.requiredLevel < minRequiredLevel || item.requiredLevel > maxRequiredLevel)
    4.     continue;
    5.  
    The next few if / continue checks error out as well if I comment the 2 lines above.

    2. The item "Item_machinegun_#4_UFPSItemDatabase_PFB" falls through the floor on start. This item has a rigibody, and the collider is set to Trigger so it just falls through anything.

    3. If I remove the rigidbody from the machinegun (above) then I can make the item stay stationary and pick it up. However, the bullets for the machinegun do not work. Run over the other machinegun to pick up 30 machinegun bullets, then right click them in the inventory, and get a message ("No suitable equip slot found for item machinegun bullet")

    4. Missing a prefab in UFPS example scene (directly underneath exploding cube)

    5. Hovering over the treasure chest or crafting box with the crosshair causes the mouse cursor to appear.

    6. Tooltips don't always disappear. Start game, pick up mace, then press 'i' and hover over the newl acquired mace. Tooltip no longer disappears after hovering out or closing the inventory. If you hover over a usable item in game, or pickup another item (such as machinegun), the tooltip resets as it should.


    Additional Notes / Questions :
    1. Might as well add the pistol pickup if you're going to have pistol ammo in your demo.
    2. Might as well add a crafting component to the demo if you're going to have a crafting box in there. Right now the crafting box doesn't do anything which doesn't really help testing. Maybe add a bullet recipe?
    3. Should we be able to drop / destroy items by dragging them onto the game world?
    4. Should we be able to drop items back into containers? For example, in the demo there is a "TreasureChest". If I take the items out of it, seems like I should be able to put the item back in.
    5. Would be nice to have the Escape key work. Pressing escape should close out the last opened inventory gui.
    6. In the demo it says the controls are "C to open character, R to craft layouts". These two keys don't do anything in the demo, most likely due to UFPS button keybinding to crouch and reload, respectively. Either rebind to working controls or change demo messaging.

    There may be more, but the above probably need to be fixed first before they are surfaced. Please let me know if you have any questions.
     
    Last edited: Jun 16, 2015
    jorisshh likes this.
  6. Mark Henderson

    Mark Henderson

    Joined:
    Oct 25, 2013
    Posts:
    41
    Bug report:

    The cursor locking can get a little broken with UFPS input. It looks like the root cause is that I have a UIWindow that auto shows at the start of the level, which blocks UFPS input. (a loading screen)

    That window is showing before the InventoryUFPSInputController's Start method, which means that it never calls the anonymous callback to block UFPS input. However, when it hides, it does call the OnHide callback.

    The result is that windowCounter starts at -1, and the first window to show won't unlock the cursor properly.

    My temporary fix was to make the below change to InventoryUFPSInputController, but I would recommend a more thorough solution that involves accounting for already active windows in the Start method.
    Code (CSharp):
    1.  
    2.                     window.OnHide += () =>
    3.                     {
    4.                         windowCounter--;
    5.  
    6.                         //ADDED CODE
    7.                         if(windowCounter < 0) {
    8.                             windowCounter = 0;
    9.                         }
    10.                         //END ADDED CODE
    11.  
    12.                         if (windowCounter == 0 && registered == false)
    13.                             RegisterUFPSEvents();
    14.                     };
     
    jorisshh likes this.
  7. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    The demo scene uses references for the layout crafting, in this case the reference sums the total amount of items in the inventory, so if you have 5 stacks each 2 in size, the reference will show 10, as the total sum of this specific item is 10. Of course you can change this by swapping out the wrapper prefab, as well as disabling the references on the container.

    Also, you can't split them, simply because they're references, which cannot be split.
     
  8. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451

    The null reference exception has been fixed (which went live like 5 minutes ago).

    2. The item "Item_machinegun_#4_UFPSItemDatabase_PFB" falls through the floor on start. This item has a rigibody, and the collider is set to Trigger so it just falls through anything.
    Yep, fixed this.

    3. If I remove the rigidbody from the machinegun (above) then I can make the item stay stationary and pick it up. However, the bullets for the machinegun do not work. Run over the other machinegun to pick up 30 machinegun bullets, then right click them in the inventory, and get a message ("No suitable equip slot found for item machinegun bullet")
    Also fixed.

    4. Missing a prefab in UFPS example scene (directly underneath exploding cube)
    Should also be fixed.

    5. Hovering over the treasure chest or crafting box with the crosshair causes the mouse cursor to appear.
    Also fixed, added a configuration option for this.

    6. Tooltips don't always disappear. Start game, pick up mace, then press 'i' and hover over the newl acquired mace. Tooltip no longer disappears after hovering out or closing the inventory. If you hover over a usable item in game, or pickup another item (such as machinegun), the tooltip resets as it should.
    Still an issue, will address in the next update.


    1. Might as well add the pistol pickup if you're going to have pistol ammo in your demo.
    There's a revolver weapon?

    2. Might as well add a crafting component to the demo if you're going to have a crafting box in there. Right now the crafting box doesn't do anything which doesn't really help testing. Maybe add a bullet recipe?
    Will do :)

    3. Should we be able to drop / destroy items by dragging them onto the game world?
    Items should be dropped onto the floor, doesn't this work for you?

    4. Should we be able to drop items back into containers? For example, in the demo there is a "TreasureChest". If I take the items out of it, seems like I should be able to put the item back in.
    Possible by enabling the "Can put items in collection" option on the loot window. (would require a small UI change though)

    5. Would be nice to have the Escape key work. Pressing escape should close out the last opened inventory gui.
    A feature that has been requested, which I'll create soon ( https://bitbucket.org/jjahuijbregts/inventorypro/issue/20/pressing-escape-to-close-dialogs-and )

    6. In the demo it says the controls are "C to open character, R to craft layouts". These two keys don't do anything in the demo, most likely due to UFPS button keybinding to crouch and reload, respectively. Either rebind to working controls or change demo messaging.
    Will fix
     
    nuonical and hopeful like this.
  9. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    And consider this fixed as well, as a quick fix you can remove the windowsVisibleStartCount and replace all occurances with windowCounter (so add (++) to windowCounter). Then at the bottom of the start method there's now

    if(windowCounter > 0)
    Cursor.visible = true;

    Replace Cursor.visible = true;

    with

    UnRegisterUFPSEvents();

    And done :)
     
  10. JesseAlexander

    JesseAlexander

    Joined:
    Nov 22, 2009
    Posts:
    286

    We're doing a survival game (like Rust but top-down). We're going with a secure (or "Authoritative") approach for ours, however I'm a bit confused with the above terminology. I think Master Server is for matchmaking and populating the sever selection screen, handling SteamID issues (VAC Bans etc), but not managing inventory - that job would fall to the Dedicated Server which hosts just one of the many game worlds - (which would either be the host players machine "Listen Server", or a headless Unity server hosting the game). At least in the Rust example, where there is 1 MasterServer, and ~200 or so dedicated servers which each host ~100CCU.

    So its Authoritative in that logic is decided on the Dedicated Server level and not the clients. Never trust the client :)

    We have a grid based inventory (diablo-like) setup and working in an Authoritative way like above, but using Bolt Networking. Eventually we want to migrate to UNET as it gets more mature, but don't want to completely tear ours apart right now as UNET is very early and might not have all the features needed (like syncing arrays, which I didn't see a way to do but then this came up like a couple days ago: http://docs.unity3d.com/ScriptReference/Networking.SyncListStruct_1.html )

    Shamelessly, if other people can battle test it, it saves us time and it's well worth the price of an asset store package to just see the code as a reference :)

    Here's someone doing a bunch of tutorials on UNET seems like a good reference if you're curious :)

    http://forum.unity3d.com/threads/un...g-a-basic-survival-co-op.325692/#post-2159937
     
    hopeful and Teila like this.
  11. Damien-Delmarle

    Damien-Delmarle

    Joined:
    Dec 26, 2012
    Posts:
    1,094
    I want to do the following: when i drop Item A from inventory collection to equip slot[1] collection, i want it to be replicated into skillbar slot [1], i have same amount of slots defined in editor. is there a way to do this ?
     
    Last edited: Jun 17, 2015
  12. MIK3K

    MIK3K

    Joined:
    Sep 10, 2014
    Posts:
    144
    Hey, love this inventory system. I installed the latest update in Unity 5.0.2.f1 (one existing project and same result in a brand new project) and is giving me the following 4 errors -

    Assets/InventorySystem/Scripts/Managers/InventoryItemDatabase.cs(15,6): error CS0246: The type or namespace name `CreateAssetMenuAttribute' could not be found. Are you missing a using directive or an assembly reference?

    A similar error with "CreateAssetMenu" instead of "CreateAssetMenuAttribute"

    Another 2 errors same as the two above but for "InventoryLangDatabase.cs" instead of "InventoryItemDatabase.cs"
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    3,747
    Seeing as you are using U5.0.2, I wonder if you accidentally got the U4 version of the inventory. The asset store is prone to do that to users of early U5 versions.
     
    MIK3K likes this.
  14. Damien-Delmarle

    Damien-Delmarle

    Joined:
    Dec 26, 2012
    Posts:
    1,094
    its probably because of this:
    • Updated to Unity 5.1 + updated the scriptable object creation (unity 5.1 feature)
    so you need unity 5.1.
     
    MIK3K likes this.
  15. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    423
    Hi Joris,

    Sorry to bother you again but I'm having some questions.
    1. When I open up the inventory window (pressing I) the scrollbar of the window is not correctly positioned (centered iso on the top). Anything I can do to fix this? When I ingame position the scrollbar it stays where I left it (so must be an initialisation issue)
    ScreenHunter_207 Jun. 17 09.59.jpg
    2. I want to reserve my inventory bags to specific items. For instance one for quest related items, one for crafting materials etc... what would be the best approach, I'm thinking of creating a specific targetbag property I add as custom property but how to go from there? Or is there a better approach?

    Kind regards,

    Wim
     
  16. MIK3K

    MIK3K

    Joined:
    Sep 10, 2014
    Posts:
    144
    Thanks, updating to 5.1 now. Weird how when I check for updates inside Unity it tells me that Unity is up to date.
     
  17. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    717
    MissingReferenceException: The object of type 'InventoryDragAccepter' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    Devdog.InventorySystem.UI.InventoryDragAccepter.OnEndDragging (Devdog.InventorySystem.UI.InventoryUIDragLookup dragLookup, Devdog.InventorySystem.InventoryUIItemWrapperBase dragging, UnityEngine.EventSystems.PointerEventData eventData) (at Assets/InventorySystem/Scripts/UI/HelperComponents/InventoryDragAccepter.cs:122)
    Devdog.InventorySystem.UI.InventoryUIDragUtility.OnEndDrag (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/InventorySystem/Scripts/UI/Utilities/InventoryUIDragUtility.cs:152)
    Devdog.InventorySystem.InventoryUIItemWrapper.OnEndDrag (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/InventorySystem/Scripts/UI/UIItemWrappers/InventoryUIItemWrapper.cs:162)
    UnityEngine.EventSystems.ExecuteEvents.Execute (IEndDragHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:80)
    UnityEngine.EventSystems.ExecuteEvents.Execute[IEndDragHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:269)
    UnityEngine.EventSystems.EventSystem:Update()
    after change scene
     
  18. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Use the SyncCollection component :) Attach the syncer to your skillbar for example, tell it to sync from the character and whenever an object is removed from the character it will also be removed from the skillbar.
     
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    I'ts positioned exactly in the center? Maybe the starting value of the slider is 0.5? (inside the inspector?).

    I've been thinking about adding more restrictions per collection, allowing to filter on categories, maybe properties, etc. That way you could add a category to an item, like "Quest item", and restrict a collection to only allow quest items. You could even combine the 2 and do Only consumable quest items (if you wan't to go all out :)).

    Right now there isn't such a filter option, however it's quite simple to add. Each collection has a virtual method called VerifyItemType(System.Typet type), which verifies if the item of that specific type (consumable, equippable, etc) is allowed in the collection. You could add a 2nd check here, to verify if the item contains a property you defined.
     
  20. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    I actually had a headless authoritative standalone master server in mind, Unity created a separate assembly for the networking namespace, so it would be quite simple to develop a master server on this, that isn't directly inside unity.

    On a 2nd note, this would cost quite a bit more development time, but would in the end allow more CCU, as it's way easier to run a headless master server somewhere in the cloud as opposed to a unity build (hope this makes sense).

    Larger games use these principles as well, even Minecraft does this (without the area-zones, etc).

    Thanks for the tutorials, they're nice :), haven't looked a lot into UNet yet, just skimmed the surface, will keep you posted.
     
  21. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    423
    The starting values are set to 0 for Value and 1 for size. However when I press the 'I' button the value gets 0.5 and the Size 0.75. I have no clue what is setting those values though as searching for references to the scrollbar doesn't show me much.

    That would be nice!
     
  22. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Fixed it, will be available in the next update :)
     
  23. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    An updated )))
     
  24. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    2 errors
    Assets / InventorySystem / Scripts / Managers / InventoryItemDatabase.cs (15,6): error CS0246: The type or namespace name `CreateAssetMenu 'could not be found. Are you missing a using directive or an assembly reference?
    Assets / InventorySystem / Scripts / Managers / InventoryLangDatabase.cs (14,6): error CS0246: The type or namespace name `CreateAssetMenu 'could not be found. Are you missing a using directive or an assembly reference?
     
  25. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    Another 2 errors . How to fix it?
    Assets / InventorySystem / Scripts / Managers / InventoryItemDatabase.cs (15,6): error CS0246: The type or namespace name `CreateAssetMenuAttribute 'could not be found. Are you missing a using directive or an assembly reference?
    Assets / InventorySystem / Scripts / Managers / InventoryLangDatabase.cs (14,6): error CS0246: The type or namespace name `CreateAssetMenuAttribute 'could not be found. Are you missing a using directive or an assembly reference?
     
  26. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Please make sure you've upgraded to Unity 5.1 :)
     
  27. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    I understood. Thanks for the quick response)))
     
  28. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    Maybe what I'm doing wrong? I went to the scene and launched a demo. The new update came out? I just have the same mistakes there. NullReferenceException: Object reference not set to an instance of the object
    Devdog.InventorySystem.BasicItemGenerator.Generate (Int32 minAmount, Int32 maxAmount, logical createInstances) (assets / InventorySystem / Scripts / Other / BasicInterfaceImplementations / BasicItemGenerator.cs: 140)
    Devdog.InventorySystem.LootableObject.GenerateItems (Int32 min, max Int32) (assets / InventorySystem / Scripts / Other / Triggerers / LootableObject.cs: 127)
    Devdog.InventorySystem.LootableObject.CreateGenerator () (when assets / InventorySystem / Scripts / Other / Triggerers / LootableObject.cs: 122)
    Devdog.InventorySystem.LootableObject.Awake () (when assets / InventorySystem / Scripts / Other / Triggerers / LootableObject.cs: 71)
    I updated to 5.1
    ERROR You have missing MonoBehaviours on your gameobjects!
    UnityEngine.Debug: LogError (Object)
    NetworkingPeer: ExecuteRPC (Hashtable, PhotonPlayer) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / NetworkingPeer.cs: 2082)
    NetworkingPeer: RPC (PhotonView, String, PhotonTargets, Boolean, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / NetworkingPeer.cs: 2955)
    PhotonNetwork: RPC (PhotonView, String, PhotonTargets, Boolean, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonNetwork.cs: 2496)
    PhotonView: RpcSecure (String, PhotonTargets, Boolean, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonView.cs: 589)
    PhotonView: RPC (String, PhotonTargets, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonView.cs: 557)
    vp_MPMaster: RequestInitialSpawnInfo (PhotonPlayer, Int32, String) (at Assets / UFPS / Multiplayer / Scripts / Master / vp_MPMaster.cs: 505)
    System.Reflection.MethodBase: Invoke (Object, Object [])
    NetworkingPeer: ExecuteRPC (Hashtable, PhotonPlayer) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / NetworkingPeer.cs: 2122)
    NetworkingPeer: RPC (PhotonView, String, PhotonTargets, Boolean, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / NetworkingPeer.cs: 2979)
    PhotonNetwork: RPC (PhotonView, String, PhotonTargets, Boolean, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonNetwork.cs: 2496)
    PhotonView: RpcSecure (String, PhotonTargets, Boolean, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonView.cs: 589)
    PhotonView: RPC (String, PhotonTargets, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonView.cs: 557)
    vp_MPConnection: OnJoinedRoom () (at Assets / UFPS / Multiplayer / Scripts / Master / vp_MPConnection.cs: 275)
    UnityEngine.GameObject: SendMessage (String, Object, SendMessageOptions)
    NetworkingPeer: SendMonoMessage (PhotonNetworkingMessage, Object []) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / NetworkingPeer.cs: 1955)
    NetworkingPeer: OnEvent (EventData) (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / NetworkingPeer.cs: 1791)
    ExitGames.Client.Photon.PeerBase: DeserializeMessageAndCallback (Byte [])
    ExitGames.Client.Photon.EnetPeer: DispatchIncomingCommands ()
    ExitGames.Client.Photon.PhotonPeer: DispatchIncomingCommands ()
    PhotonHandler: Update () (at Assets / Photon Unity Networking / Plugins / PhotonNetwork / PhotonHandler.cs: 83)
     
  29. Damien-Delmarle

    Damien-Delmarle

    Joined:
    Dec 26, 2012
    Posts:
    1,094
    this look like you have activated ufps multiplayer integration but you dont have multiplayer integration in your project?
     
  30. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    When I put a tick in the integration , I have lost these mistakes and there is one on the selection of weapons. what should be a sequence of actions . Just documentation about this yet. Tell me if you know .
     
  31. Damien-Delmarle

    Damien-Delmarle

    Joined:
    Dec 26, 2012
    Posts:
    1,094
    • how do we unstack item? i dont see anything in docs
    • with LootableObject.cs: with generate items = false, it works perfectly. but with generate items = true we have no control over items as it do not use the List of items on the chest but it pickup a range of item from the whole list of items. it would be great if it also use the list of items on the prefabs
    • when i updated to last version, the items converted to world loot, magically started to display their tooltip when i mouse over it, now it dont display anymore, i just checked and it need to have the first bool on Behaviour category to true (the one to pickup on click) but there is no way to display tooltip when we dont want pickup on click action?
     
    Last edited: Jun 18, 2015
  32. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,578
    Bought this a few weeks ago at the sales, and today I import it into the project and bunch of warnings came up:

    Asset/InventorySystem/Scripts/managers/InventoryItemDatabase.cs(15,6):error CS0246: The type or namespace name 'CreateAssetMenu' could not be found. Are you missing a using directive or an assembly reference?

    Asset/InventorySystem/Scripts/managers/InventoryItemDatabase.cs(15,6):error CS0246: The type or namespace name 'CreateAssetMenuAttribute' could not be found. Are you missing a using directive or an assembly reference?

    Asset/InventorySystem/Scripts/managers/InventoryItemDatabase.cs(14,6):error CS0246: The type or namespace name 'CreateAssetMenu' could not be found. Are you missing a using directive or an assembly reference?

    Asset/InventorySystem/Scripts/managers/InventoryItemDatabase.cs(14,6):error CS0246: The type or namespace name 'CreateAssetMenuAttribute' could not be found. Are you missing a using directive or an assembly reference?
     
  33. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Make sure you upgrade to Unity 5.1 :), checking for updates in the editor will tell you there are none, but trust me, there's an update :p
     
  34. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    Read the above post. It helped me. It is necessary to update to version 5.1
     
  35. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,578
    Ah LOL, I didn't even read the above posts u guys made LOL!!.
    Problem is Unity 5.1 gave me a lot of grief. I might have to hold off until 5.1.1 or 5.2 until I finally upgrade.
     
  36. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    237
    I have not raised and does not appear in the inventory of weapons. As I have not locked in the error is one HoverItemObjectTrigger - UnassignedReferenceException: The variable <animator> k__BackingField of UIWindow has not been assigned.
    You probably need to assign the <animator> k__BackingField variable of the UIWindow script in the inspector.
    Devdog.InventorySystem.UIWindow.Show () (at Assets / InventorySystem / Scripts / UI / WindowHelpers / UIWindow.cs: 236)
    Devdog.InventorySystem.SelectableObjectInfoUI.Repaint () (at Assets / InventorySystem / Scripts / UI / WindowsOther / SelectableObjectInfoUI.cs: 41)
    Devdog.InventorySystem.SelectableObjectInfoUI.set_currentSelectableObject (ISelectableObjectInfo value) (at Assets / InventorySystem / Scripts / UI / WindowsOther / SelectableObjectInfoUI.cs: 28)
    Devdog.InventorySystem.SelectableObjectInfo.Select () (at Assets / InventorySystem / Scripts / Other / Other / SelectableObjectInfo.cs: 77)
    Devdog.InventorySystem.ObjectTriggerer.Use (Boolean fireEvents) (at Assets / InventorySystem / Scripts / Other / Triggerers / ObjectTriggerer.cs: 205)
    Devdog.InventorySystem.ObjectTriggerer.Toggle () (at Assets / InventorySystem / Scripts / Other / Triggerers / ObjectTriggerer.cs: 157)
    Devdog.InventorySystem.ObjectTriggererHandler.Update () (at Assets / InventorySystem / Scripts / Other / Triggerers / ObjectTriggererHandler.cs: 202)
     
  37. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    The unstacking is triggered through the collection (myCollection.UnstackSlot()), I've also added methods in the item, that essentially just call the collection, but it might be a bit cleaner / easier to use.

    I'm not following? The BasicItemGenerator's instantiate simply creates instance objects of the generates items, they're no different from the non-instantiated ones.

    Fixed this in the upcoming version :) there was no technical reason for it not to allow this.
     
  38. Malchior865

    Malchior865

    Joined:
    May 27, 2015
    Posts:
    2
    why isn't this working now?
    upload_2015-6-18_19-42-2.png
     

    Attached Files:

  39. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Be sure to upgrade to Unity 5.1, make sure you check the unity website, and not the check for updates inside the editor :)
     
  40. Malchior865

    Malchior865

    Joined:
    May 27, 2015
    Posts:
    2
    .. Thanks, I Just found at like 1min after I posted, Should have read the other posts..
     
  41. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,578

    LOL, that's 3 people doing the same thing now... (including me) :p

    Jorisshh should just pin this on his signature LOL!
     
  42. Damien-Delmarle

    Damien-Delmarle

    Joined:
    Dec 26, 2012
    Posts:
    1,094
    I found for unstacking it was IntValDialog prefab to drop inside the inventory manager

    Concerning Generate items: i take a chest set item[5] with item A and B only, set GenerateItems = true, min =2, max =5. when i open the chest i have items that are not in the list, so we have no control over what we spawn, it would be better if it generate a random list from the item we allowed in the list
     
    Last edited: Jun 19, 2015
  43. takapi

    takapi

    Joined:
    Jun 8, 2013
    Posts:
    79
    After upgrading to Unity5.1.1f1, no sound is produced.
    This disaster has happened only to me?
     
  44. Damien-Delmarle

    Damien-Delmarle

    Joined:
    Dec 26, 2012
    Posts:
    1,094
    im using stacked items in my skillbar from an equip slot reference, so if i have to item and use them i cant delete the item from inventory, it unequip and re add it into inventory with stack size of 0

    Tried to remove 1 items, only 0 items available, check with FindAll().Count first.
    UnityEngine.Debug:LogWarningFormat(String, Object[])
    Devdog.InventorySystem.InventoryManager:RemoveItem(UInt32, UInt32, Boolean) (at Assets/InventorySystem/Scripts/Managers/InventoryManager.cs:395)
    EquipableNodeItem_Active:Use() (at Assets/[Content]/Inventory/EquipableNodeItem_Active.cs:95)
    Devdog.InventorySystem.InventoryUIItemWrapper:TriggerUse() (at Assets/InventorySystem/Scripts/UI/UIItemWrappers/InventoryUIItemWrapper.cs:451)
    Devdog.InventorySystem.InventoryUIItemWrapperKeyTrigger:TriggerUse() (at Assets/InventorySystem/Scripts/UI/UIItemWrappers/InventoryUIItemWrapperKeyTrigger.cs:32)
    Devdog.InventorySystem.SkillbarUI:Update() (at Assets/InventorySystem/Scripts/UI/Windows/SkillbarUI.cs:80)

    in my item use im currently using this solution:

    Code (CSharp):
    1. currentStackSize--;
    2.         skillControl.skills [skillID].TrySkill ();
    3.         if (currentStackSize == 0)
    4.         {
    5.             currentStackSize++;
    6.  
    7.             UnEquip(true);
    8.             InventoryManager.RemoveItem(ID,1,false);
    9.  
    10.         }
     
  45. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    Ah understandable, it wasn't my original intention, as the items array is actually the set of generated items / or manually defined items. I've got better item generators on my todo list ( https://bitbucket.org/jjahuijbregts/inventorypro/issue/31/better-item-generator ), so I'll look into this as well (Serialized elements / serializing interfaces to simplify this )
     
  46. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    In all of Unity or Inventory Pro only? I've check the bug reports on Unity 5.1.1 but couldn't find any direct issues
     
  47. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    You're reducing the stack size by 1, so at which point there are 0 items of that type in the collection, so you won't be able to remove it. Are you sure you want to remove the item when you're using the skill? You don't have to decrease / increase the stack size, it's optional.

    Alternatively you could do currentStackSize = Mathf.Max(1, currentStackSize--); // Avoid it going below 1
     
  48. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    I think it's important to celebrate the little things, so here goes:

    Inventory Pro is currently the best and most rated inventory system on the asset store (to my knowledge that is...) :D, let's see if we can reach a 100 this year :)

    [​IMG]
     
  49. matteo-piccioni

    matteo-piccioni

    Joined:
    Jul 4, 2014
    Posts:
    47
    Hello,
    I am using Unity 5.1.1f1 Personal with last version of Inventory Pro

    I create a new project and I import your asset, then I am looking into your demo scene
    but if I start 8.1.2DGame scene I have an exception:
    IndexOutOfRangeException: Array index is out of range.
    Devdog.InventorySystem.CraftingWindowBase.get_craftingCategory () (at Assets/InventorySystem/Scripts/UI/Windows/CraftingWindowBase.cs:33)
    Devdog.InventorySystem.CraftingWindowLayoutUI.Awake () (at Assets/InventorySystem/Scripts/UI/Windows/CraftingWindowLayoutUI.cs:55)

    In witch way I could fix this issue to be able to play your demo scene ?

    Thanks
     
  50. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,451
    I've added a crafting window, etc to the scene, but there aren't actually any crafting categories. So to fix, you can either remove the CraftingWindowLayout, or add a crafting category, and select it in the CraftingLayoutUI window.

    I've added some extra checks to catch the errors and give some more meaningful errors :)
     
    matteo-piccioni likes this.