Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Tutorial] Creating an Inventory with Scriptable Objects

Discussion in 'Community Learning & Teaching' started by sniffle63, Sep 27, 2019.

  1. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    Hey guys!
    Im working on a series to show how to make an Inventory using scriptable objects. Just released the second video today showing how to save and load your inventory!

     
  2. CatrinMariachi

    CatrinMariachi

    Joined:
    Nov 24, 2015
    Posts:
    20
    NICE!
    This is a life saver, I just waste more than 100 bucks on broken assets promising "cool" inventories.
     
    sniffle63 likes this.
  3. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    Awesome! I hope it helps!
     
  4. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    Next video is out, in this one i add random item stats/buffs!

     
    kufra1 likes this.
  5. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    This video we go over item swapping!

     
    kufra1 likes this.
  6. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    Started working on the equipment system part of the series!

     
    kufra1 likes this.
  7. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    The next video in my inventory system series is out!

    This one is a code review video to make our code easier to use and read

     
    kufra1 and NateReese77 like this.
  8. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    In this video, we update the display of our inventory to only updating when a slot changes instead of updating every frame, and we also pass the stats from our items to our player

     
    kufra1 and NateReese77 like this.
  9. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    363
    Heres my next video if anyone is interested haha

     
    kufra1 likes this.
  10. dannyryba

    dannyryba

    Joined:
    Jun 22, 2020
    Posts:
    45
    Hey just discovered this series on Youtube! Thank you so much for your work on putting this together, it's a great guide for the ins and outs of how an inventory is constructed!
     
    sniffle63 likes this.
  11. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    Do you have a tutorial for auctioneer(by silvermat) and does anyone know what inventory that system connects to?
     
  12. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    My inventory works fine its javascript and i have a C# one too so do i need a different one for auctioneer(by silvermat)?
     
  13. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
  14. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    All of my triggers are working at some point or another on any given project. from JS and C#
     
  15. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    Also do you know how to connect a Quest system to make it trigger, because its the only thing to not trigger i think thats becase its not compatible withh the scenes, i have 3 working ASSETS but none work on the scenes cause the triggers dont trigger.
     
  16. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    they work fine on their own scenes though, but my scene is massive
     
  17. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    my main project every asset i put in works so its not as if i cant do that...
     
  18. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    by the way im not using this inventory at all.
     
  19. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    everything about the auction system works(on my project) accept the connection to the inventory.
     
  20. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    i also need drops to be triggered from the chests package(i will be here all day if i mention these) i have.
     
  21. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    i have the asset for that too, possibly this one ICWM which could potentially do everything itself considered a modding system.
     
  22. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    the fact that i can add any asset off the store is endless possiblieies.
     
  23. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    do you know how to call JS from a C# script and vice versa, what would you type.
     
  24. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    i mean sure yours might be better but mine is working better i think.
     
  25. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    yours like everything you get you finish up with nothing(fact of life), if you type it all in.
     
    Last edited: Aug 7, 2020
  26. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    like wow i need to get a boat to have a object on it i can move over and pick up to make the boat load a scene, application.loadlevel(1); etc. if i get the inventory pro triggers working everywhere, i got it working on it a while ago.
     
  27. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    on my project you can manually pick up and object and trigger something, how could i trigger C# from JS, if i could have e.g a bottle on a boat and trigger application.loadlevel(1) scene(JS inventory). this works but i need to see if it will work from C# where only some assets triggers work. not all. from Inventory system i have.
     
    Last edited: Aug 7, 2020
  28. munkeyart

    munkeyart

    Joined:
    Dec 9, 2017
    Posts:
    24
    i will make my project better with the JS i have, sometimes simpler is better. (it triggers))
     
  29. Dorscherl

    Dorscherl

    Joined:
    May 29, 2017
    Posts:
    26
    You're better off switching to a single language. I would use C# since Unity is strongly based on it. Doing this will save you headaches in the long run but either way, find a way to convert one language to the other. Its not too difficult personally