Search Unity

  1. Unity 2019.1 is now released.
    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

    13.5%
  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)

    37.7%
  6. More modular build to simplify extending

    24.8%
  7. UFPS Multiplayer (Asset integration)

    11.6%
  8. Core GameKit (Asset integration)

    4.0%
  9. Dialogue system (Asset integration)

    21.3%
  10. Wordpress integration (Asset integration)

    4.3%
Multiple votes are allowed.
  1. Raptorixx

    Raptorixx

    Joined:
    Mar 4, 2015
    Posts:
    22
    Ok NOW I found the solution.... On the player and the Inventory player script I had to tick dynamically find UI Elements. Doing this he directly found the Character Collection name character and the inventory path. Seems like the tutorials are not completely up to day.. :p

    EDIT: Yes I am using InventoryUIItemWrapper
     
    Last edited: Jan 15, 2016
  2. Raptorixx

    Raptorixx

    Joined:
    Mar 4, 2015
    Posts:
    22
    Another question....

    If I am trying to change the color to grey instead of white on the Character_Status_row_PFB prefab on text and text1 and then start the game then it still has the clone as white colored :/ It works just fine with the category prefab it's just the Character_Status_row_PFB that causes problems for me. Any idea what can cause this?
     
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Right there ^^
     
  4. Raptorixx

    Raptorixx

    Joined:
    Mar 4, 2015
    Posts:
    22
    Well thats on the Item Properties :) That makes sense.... however what I am speaking of is the Weight value that shows on items when you equip them.

    Also I can't figure out why it makes a clone of the Character_Status_row_PFB and still don't take the changes to the text that I made to the prefab itself. :p

    Looking forward to your reply!
     
    Last edited: Jan 15, 2016
  5. Caffeen

    Caffeen

    Joined:
    Dec 25, 2013
    Posts:
    27
    This is great. You are great. No wonder your asset is swimming in a sea of 5 star ratings. Thanks!
     
    hopeful likes this.
  6. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Ah, the weight value. Well, the weight is handled in code, which is not considered a property (as well, it's just a regular old float). These can be configured in the equipment editor. Right now they don't support colors, but if you create a task at bitbucket I'll consider it for the next version :)

    There isn't much of a work around at the moment either I'm afraid.
     
  7. Raptorixx

    Raptorixx

    Joined:
    Mar 4, 2015
    Posts:
    22
    Thanks for the reply jorisshh!

    I will add that to bitbucket then :)

    First question: When I have a bank open and inventory open then if I right click on the item in the inventory then he still equips the item instead of moving it into the bank, but right clicking on an item in bank does what it should so it moves the item to inventory. Maybe I am doing something wrong or otherwiseit would be practical if the right click to equip function could be disabled as long the bank window is open.

    More questions... I get confused alot doing the video tutorials and finding that things doesn't behave as I want them too :p

    I am on the crafting now....

    In the tutorial I should create a text called CraftCost and then add that text to the crafting window craft cost. However in the version I am using (the newest) then here are no Craft Cost field in the crafting window.

    I am also told in the tutorial to add the UI_Item_Static_PFB to the Blueprint icon field (Craft blueprint UI references), but there are no Blueprint Icon field available. So don't get the sword to visually appear when choosing the blueprint, instead there are only the empty itembox.

    Then my version complains that I have not selected a Blueprint Item Result Container.... and there are no references to that in the video tutorial (since it doesn't show up on the version in the video). I have left it empty and the crafted item at least lands into my inventory. Still feels bad to have a red marked entry, since it surely have a purpose :p

    Then I have a question regarding the RequiredItemsContainer... I have set the Items available to white and the Items not available to red as it is default too. However when my 2 apples are showing up in the RequiredItemsContainer then I only see the icon of the apples and a white 2 on the top right corner of that apple icon. It's always white text even though I am not having any apples at all on me. So I can't really tell if I am able to craft the item or not, except the fact that nothing happens when clicking on craft button when I don't have the apples in inventory.

    That's the question for now (until I start the next video tutorial ;))

    EDIT: Another question... Is it possible to have different scan sets that I can use for different windows? Ie in one window I would just like to display the EquipableInventoryItem, and on another window I would just like to use another typ just for that window. Also I could see myself want a window to display just the one set of selected Item properties, but another window using a different set of Item Properties. I hope that explaination makes sense :p
     
    Last edited: Jan 16, 2016
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,330
    I took a few minutes to check out Inventory Pro with an Oculus DK2. All the data management (non-UI) stuff works fine, of course. The demo scenes don't work straight out of the box, but it's possible to get them working, with these notes:
    • Canvases must be in world space or screen space - camera. World space is better because the UIs are stationary; screen space - camera follows the player's head movement.
    • There's no mouse cursor in VR. You need to set up UI navigation using keyboard/gamepad or use a virtual world space cursor. The World Space Cursor asset on the Asset Store works, but you must set up the colliders manually for all interactable UI elements.
    You have to do this stuff for any UIs in VR; it's not specific to Inventory Pro. Once it's set up, though, it looks great in VR!
     
    jorisshh likes this.
  9. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Did you check the "Use item move to bank" on the inventory collections? Which moves the item to the bank if it's open instead of using the item. (there's a known bug with items that can't be stored (isStorable == false), which will be fixed in the next release).


    The craft cost text field has been replaced by a InventoryCurrencyUI group; This is a group of currency types that can display the amount with icons, colors, and all that. For now, please use the demo scenes as reference; I'll be adding the crafting queue to the next version, which will shuffle some things around; After that I'll record new video's :) (I promise :p)

    The required items container is used to display the required items wrappers. All this has to be is a rect transform (regular object in the canvas); Inside this container all the required item wrappers (the 'slots' that represent the required items) will be set. You'll likely want to add a layout group as well. I'll cover this in the next video tutorials as well.

    Do you mean like categories per craft? Certainly possible, but this would require some coding. A workaround to avoid using coding would be to create multiple categories and calling SetCraftingCategory(category) on each button click, effectively switching between crafting categories. (also covered here: http://forum.devdog.nl/viewtopic.php?f=4&t=281&p=1473&hilit=crafting+category#p1473 )
     
  10. YIsDaRumGone

    YIsDaRumGone

    Joined:
    Jan 8, 2016
    Posts:
    19
    I am following your youtube video for Item & Looting:

    At the 5:00 you mention adding a ShowObjectTriggerer script. I don't see that script. Did that get removed/replaced? If so, how do I set it up to loot items, and is there an updated video/page with new instructions?

    Thanks
     
    Last edited: Jan 16, 2016
  11. Raptorixx

    Raptorixx

    Joined:
    Mar 4, 2015
    Posts:
    22
    Once again thanks for the reply Jorisshh!

    You have noooooooo idea on how much I like the thought of new video tutorials ;) I feel I am struggling with half the time to find things that are in the video tutorials now vs the new version of Inventory Pro. Still I am so eager to get this going to I will continue to struggle.

    One more thing... I know you have mentioned somewhere about namespaces etc and when I am importing MMO RPG GUI then both your asset and theirs has a UIWindow script and I get the dreaded ambigious error. However when I am I look at the script from MMO RPG GUI it looks like it has a name space attached. So currently I deleted that asset to progress with the tutorials at least, but in the end I would like to have the MMO RPG GUI running along together with Inventory Pro. With my programmer being a bit afkish then I am trying to solve it myself, which isn't always that easy for a designer ;) Any ideas how to overcome this?
     
  12. Uto

    Uto

    Joined:
    Nov 10, 2014
    Posts:
    17
    New video tutorials....yes please, hopefully about character equipping and events. And events...more events please!
     
  13. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    To get everything to work together I'd suggest ditching the MMO RPG GUI scripts and switching to the Inventory Pro scripts. I know some others have integrated it as well, and to my knowledge the functionality overlaps, so you wouldn't lose out on any features :)

    But you're actually getting script compilation errors?
     
  14. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Programming tutorials on events you mean? I can do that, although they're fairly straight forward. I did a tutorial on using stats with the events; Once you know how to hook into 1 event the others are all the same really :p
     
  15. Uto

    Uto

    Joined:
    Nov 10, 2014
    Posts:
    17
    Yes, that tutorial was also very good and helpful, you have real talent to explain things by videos. I think documentation is bit lacking on the programming side.
     
  16. r3nrohan

    r3nrohan

    Joined:
    Sep 28, 2015
    Posts:
    33
    umm what parameter or function to use, to save current value and maxvalue.
     
  17. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Current value and max value off.... what exactly?
     
  18. r3nrohan

    r3nrohan

    Joined:
    Sep 28, 2015
    Posts:
    33
    currentvalue, it says read only property
     
  19. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    The 'currentValue' of a stat can't be changed. This is because it's the value after all calculations are done. The documentation on stats is here http://devdog.nl/documentation/changing-stats/

    (Assuming you were talking about stats, you should really mention that :p)
     
    hopeful likes this.
  20. r3nrohan

    r3nrohan

    Joined:
    Sep 28, 2015
    Posts:
    33
    ohh.... well didnt knew so i added a function in your script to handle it
     
  21. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Hello, I am making a FPS game and I want my character to not be able to move while in the inventory and for me to have a cursor appear when the inventory is open. How would I achieve this? Thank you!
     
  22. florianbepunkt

    florianbepunkt

    Joined:
    Nov 28, 2015
    Posts:
    45
    You can assign OnShow() and OnHide() functions for the Interactive UI Window and UI Window Components. Write a function that disables/enables your character controller (depends on your controller) and then assign it to OnShow() and OnHide().
     
    jorisshh likes this.
  23. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    I am new to game making and I do not know much about code, I am using Unity's FirstPersonController. Could you please let me know on how to make this happen in code?
     
  24. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Here's actually some documentation on how to use the UIWindow events: http://devdog.nl/documentation/uiwindow-events/ :)
     
  25. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Do you have a demo for a shooter inventory/equip window (pistols, rifles, etc) or just the medieval one? Thank you!
     
  26. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    There's a UFPS demo scene, but apart from that, nope only RPG weapons were used in the demos. Of course you could also equip weapons, I just didn't have the models :)
     
  27. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
  28. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Hey I am getting a ton of errors, can you help me out?

    https://gyazo.com/3c975f311b62832f5f467905150b27fa

    Here is my code, well not my code I found it on the devdog.nl forum but I can't seem to get it to work.
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. namespace Devdog.InventorySystem{
    4.     public partial class UIWindow
    5.     {
    6.         public bool blockInput = false;
    7. }
    8.     public class InventoryFPInputController : MonoBehaviour {
    9.     private static UIWindow[] windows;
    10.     private static int windowCounter;
    11.     private static float lastWindowShownTime = 0.0f;
    12.     public virtual void Start()
    13.     {
    14.         // Grab all of the windows in the scene.
    15.         windows = Resources.FindObjectsOfTypeAll<UIWindow>();
    16.         foreach (var w in windows)
    17.         {
    18.             // Technical gibberish, don't worry about this.
    19.             var window = w; // Capture list and all...
    20.             if (window.blockInput)
    21.             {
    22.                 // If we already have visible windows add 1 to the count ( in the end we want to have a numer that represents the number of visible blocking windows )
    23.                 if (window.isVisible)
    24.                     windowCounter++;
    25.  
    26.                 // Register a listener for the OnShow event. The lambda ( () => {} ) will be called whenever the window is shown.
    27.                 window.OnShow += () =>
    28.                 {
    29.                     lastWindowShownTime = Time.time;
    30.                     windowCounter++;
    31.  
    32.                     if (windowCounter > 0)
    33.                         SetActive(false);
    34.                 };
    35.  
    36.                 window.OnHide += () =>
    37.                 {
    38.                     windowCounter--;
    39.  
    40.                     if (windowCounter == 0)
    41.                         SetActive(true);
    42.                 };
    43.             }
    44.  
    45.         }
    46.  
    47.         if (windowCounter > 0)
    48.         {
    49.             SetActive(false);
    50.         }
    51.     }
    52.         private void SetActive(bool active)
    53.         {
    54.             // Set based on active variable
    55.             if (active) {
    56.                 Cursor.lockState = CursorLockMode.Locked;
    57.                 //Cursor.visible = true;
    58.                 Cursor.visible = false;
    59.             } else {
    60.                 Cursor.lockState = CursorLockMode.None;
    61.                 Cursor.visible = true;
    62.             }
    63.  
    64. }
    65. }
    66. }
     
  29. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Hm... it looks like you're missing the original UIWindow? What version of Inventory Pro are you using, and do all windows work in the demo scenes? It's also possible that you have a UIWindow class inside your project that is not namespaced and interferes
     
  30. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    2.3.1
    EDIT: Didn't realize there was another update. Will update thank you!
     
  31. YIsDaRumGone

    YIsDaRumGone

    Joined:
    Jan 8, 2016
    Posts:
    19
    @jorisshh , what is the best way to get updates for Inventory Pro? Do you only release through the asset store, or do you have a repository set up that people can pull from?

    The reason I ask is I added an enhancement to your Bitbucket site (#169, Independent crafting stations, with queues)
    and saw that you had added stations with their own queue. I was in the process of modifying your code to add that functionality myself, but I was curious to take a look at what you've done. Is it possible to get a preview/new download?

    Thanks!
     
  32. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Hi I updated my inventory pro to the latest version and it is still having the same issue, Can you look through the code for me and let me know what is the issue?
     
  33. tylerw-savatronix

    tylerw-savatronix

    Joined:
    Nov 10, 2013
    Posts:
    77
    Hey Joris,

    I just did the latest update, and it broke some stuff;



    I was a bit confused at first, so I re-imported the Unity Cameras package, then even more stuff broke. So I fully deleted and reimported Inventory Pro, and that brought me back to these errors. That's when I scanned more in depth and found that you're overwriting Unity Standard Assets.

    2 Questions:

    1) How can I un-break these?
    2) Why are you overwriting Unity's Standard Assets? I fear this might also cause us some headaches anywhere we are initially using standard assets that we haven't customized yet.

    In the short term I'm going to roll back everything in TFS, but until these issues can be resolved we're left with an asset (Inventory Pro) that we can no longer update...
     
  34. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    I have the same issue so I deleted the third person controller scripts since I am only using first person idk dude. It's only a work around for me.
     
  35. Brucas

    Brucas

    Joined:
    Jan 14, 2014
    Posts:
    17
    When can the new tutorial videos be expected? Was thinking about holding off till the new ones are released. Also will there be one for multiple different (player controlled) character inventories?
     
  36. tylerw-savatronix

    tylerw-savatronix

    Joined:
    Nov 10, 2013
    Posts:
    77
    That's a solution that won't work on our side, since I believe we're using the third person controller (don't recall if we cloned it and changed file names and namespaces yet). Not to mention that the Inventory Pro demos use the third person controller, and would also break and be rendered useless if we deleted the asset (we still need the demos at this point in development).

    That's part of why I asked Joris for the reason he chose to overwrite the standard assets. I need more details before I can comment and request a change on that approach :)
     
  37. Theekshana-A

    Theekshana-A

    Joined:
    Sep 27, 2014
    Posts:
    81
    Ah ok.
     
  38. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Ah, sorry for the delay, gmail decided to throw all Unity forum mails in my spam folder, so I didn't get notified >.>

    All standard assets used in Inventory Pro have their own namespace ( Devdog.InventorySystem.UnityStandardAssets ), so shouldn't interfere with other standard asset components.

    A missing IInventoryPlayerController sounds more like a failed import than anything else. Did you use the upgrade guide?

     
  39. tylerw-savatronix

    tylerw-savatronix

    Joined:
    Nov 10, 2013
    Posts:
    77
    Not yet, but I did do something similar (deleted InputManager folder and did a fresh import, but in the existing project).

    Also, as far as I can tell, all the errors in my screenshot a few posts back (not just IInventoryPlayerController) only happened when importing IPro (I assumed they were new assets you added and something bad happened >.> )

    Edit**

    I need to double check when I try to update again (next week probably), but I think because you named the files the same and they're in the same folder path, even though internally they have different namespaces, when doing an import the standard assets (cameras and third person controller) do get overwritten.

    When I was scanning the file structure after the (failed) update, I noticed there was only one ThirdPersonController prefab (yours) and that the Unity standard one was gone.
     
    Last edited: Feb 2, 2016
  40. YIsDaRumGone

    YIsDaRumGone

    Joined:
    Jan 8, 2016
    Posts:
    19
    Not sure if this is something anyone else is seeing, but I think there is a bug/issue in _CraftItem in the various crafting windows. Using yield return new WaitForSeconds(Tiome.deltaTime) makes the crafting time longer than it should. I did some testing, and in your 8.AllDone scene, crafting a pair of boots took 4.397 seconds, where it should take 3 seconds flat (roughly). Changing the yield to: yield return null brought it down to within a few milliseconds of 3 seconds.

    I did this testing by using a System.Diagnostics.Stopwatch, starting it right before the while(true) loop and stopping it right after the end of the while loop.
     
  41. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Fixed in the next version, redid a lot on the crafting side of things. Thanks for the detailed info :)
     
    YIsDaRumGone and hopeful like this.
  42. r3nrohan

    r3nrohan

    Joined:
    Sep 28, 2015
    Posts:
    33
    I have another question again, I have multiple animation for different item like sword, bow&arrow and axe. So how to check which item is equipped so I can put different animations
     
  43. YIsDaRumGone

    YIsDaRumGone

    Joined:
    Jan 8, 2016
    Posts:
    19
    Awesome, can't wait. I've been adding/modifying a few things to get a standalone crafting station. Interested to see what changes are being made!
     
  44. florianbepunkt

    florianbepunkt

    Joined:
    Nov 28, 2015
    Posts:
    45
    Cool, can you share some insight on that? Or this is a feature that come to IP in one of the next updates?
     
  45. likwid

    likwid

    Joined:
    Apr 24, 2013
    Posts:
    15
    Would this work for a game that has a global inventory, plus an inventory for several AI characters? The AI characters must be able to equip items from the global inventory.
     
  46. r3nrohan

    r3nrohan

    Joined:
    Sep 28, 2015
    Posts:
    33
    oh yeah btw, in android how to use consumable items, double tap or long tap or do i need to drag
     
  47. YIsDaRumGone

    YIsDaRumGone

    Joined:
    Jan 8, 2016
    Posts:
    19
    I think it is on his to-do list. I added a request to his bitbucket story board (https://bitbucket.org/jjahuijbregts...169/independent-crafting-stations-with-queues)

    Here is a quick run down of how I got a very simple iteration of stand alone crafting stations to work. It was quick and dirty and has a lot of room for improvement. I'm sure @jorisshh can do it way better ;)

    The main issue is that all of the crafting takes place in the windows. So I had to move the crafting functionality out of the windows and into a station script. To do this I added a few new scripts. CraftingStationTriggerer which inherits from CraftingTriggerer, and CraftingStationWindowUI, which inherits from CraftingWindowStandardUI.

    The station window is pretty much the same as the standard one. I think the main thing I added was an output window for the items to drop into once completed. On my to-do list is also add an input window and a queue window.

    For the station triggerer, I pulled out these functions from the crafting window: CraftItem, _CraftItem, and GiveCraftReward. There are a few more I need but haven't gotten to yet. The triggerer has a variable to hold the station window, which I set in SetWindow in the Start function. With that, I can still reference it to do all of the UI notifications for crafting progress whenever the window is open and it is crafting something.
    I added an option to output the crafted items to an output window, or to the player inventory. If it's the output window, i have an array of InventoryItemBase on the triggerer that I add them to. This array is also set to the output window of crafting window that I created in triggerer.OnTriggerUse (This whole piece may be re-done, I'm still not sure of the best way to store/share items and which is the correct class/collection to use considering that it really isn't UI dependent. I basically took this functionality from his storage triggerer).

    Attached is a screenshot. The top part is the inventory, the bottom part is a crafting station. The 6 slots in the craft station is the output. (Please ignore the S***ty UI layout, it's a WIP and a lot of it isn't the right size :) )
    Capture.PNG
     
    florianbepunkt likes this.
  48. florianbepunkt

    florianbepunkt

    Joined:
    Nov 28, 2015
    Posts:
    45
    Thanks so much. I'm not there yet but it's on my list as well… so I'll see if @jorisshh includes this in one of the updates. Otherwise I will follow your approach. Thanks for taking the time to lay out your steps.
     
  49. YIsDaRumGone

    YIsDaRumGone

    Joined:
    Jan 8, 2016
    Posts:
    19
    @jorisshh Is it possible to use an ItemCollectionBase without it being tied directly to the UI? For example for a standalone crafting station, I want an input and output. These will be tied to the UI, but not always as these stations can continue to do their crafting even when the window isn't open.

    I'd like to use the functionality of the ItemCollectionBase, since it already has the AddItems, Find, etc.I've tried to add one programmatically to my crafting station, but any time I add an item to it programmatically I get a bunch of errors. I'm working through the errors but I thought I'd shoot you a line and see if you can lend any quick assistance.

    I have it working using an InventoryItemBase[], but if possible the functionality of adding/combining/restacking/etc. items to the collection would be awesome.

    Any tips?

    Thanks!


    EDIT: I sort of have it working. What I did is each station has an ItemCollectionBase for the output items. This points to the output UI container. Then OnTriggerUse, I set the output UI window equal to the stations output item collection. This works just fine (except I had to manually define the collection and the UI elements in the container. If I don't, it continues to add UI buttons for how many stations I have in the scene)

    One problem though...anything I do at one crafting station happens on the other. The fixing continues...
     
    Last edited: Feb 3, 2016
  50. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,519
    Alrighty, so here's what I've done :)

    I've removed all of the crafting things from the window to a new separate CraftingProgressContainer class. This progress container handles the crafting progress and can be shared between crafting instances.

    Which works in 3 ways:
    Single instance - Only 1 craft can be active at a time (1 progress container for all)
    Single instance per category - Only 1 craft can be active at a time per category (1 progress container per crafting category).
    Default - Each crafting trigger gets it's own progress container allowing them all to work at the same time.

    The crafting progress container can also have a reference to the collection where the reward items should ultimately be stored. Because it's stored in a collection items are automatically stacked :)

    All items that were in the UI collections (when using layout crafting) are moved to the trigger's collection on trigger un-use and restored on trigger use (which fixes that duplication problem :p)

    Hope that answered some questions; And yep, available in the next update
     
    hopeful and florianbepunkt like this.