Awesome UNIQUE Crafting System! (Max Immersion, No Inventory, Hydroneer, Unity Tutorial)

Поділитися
Вставка
  • Опубліковано 20 сер 2024
  • 🌍 Get the Polygon Fantasy Pack cmonkey.co/syn...
    🌍 Get my Complete Courses! ✅ unitycodemonke...
    👍 Learn to make awesome games step-by-step from start to finish.
    👇 Click on Show More
    🎮 Get my Steam Games unitycodemonke...
    🔴 RELATED VIDEOS 🔴
    How to Pick up and Drop Objects/Items! (First and Third Person) • How to Pick up and Dro...
    How it's Made: How Mechanics and System from various Games work • How it's Made: How Mec...
    Remaking 3 Great Mechanics from Cyberpunk 2077! • Remaking Cyberpunk 207...
    Kickstart your game with First and Third Person Controllers! (FREE Unity Starter Assets) • Kickstart your game wi...
    Crafting Items with Scriptable Objects! • How to Craft Items wit...
    Make your Games Designer Friendly! (Scriptable Objects) • What are Scriptable Ob...
    Place UI Elements in your World! (Health Bar, Overlays, Timers) • Place UI Elements in y...
    💬 Here's a pretty interesting very unique crafting system.
    There's no menus, no virtual inventory, it's all based on placing objects on certain positions and crafting them into other objects.
    This is pretty easy to do, just requires some Physics queries, so if you want to give a shot at making a game with no Inventory and no UI then it's actually pretty easy.
    📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
    🌍 Get Code Monkey on Steam!
    👍 Interactive Tutorials, Complete Games and More!
    ✅ store.steampow...
    If you have any questions post them in the comments and I'll do my best to answer them.
    🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
    See you next time!
    📍 Support on Patreon / unitycodemonkey
    🎮 Grab the Game Bundle at unitycodemonke...
    📝 Get the Code Monkey Utilities at unitycodemonke...
    #unitytutorial #unity3d #gamedev
    --------------------------------------------------------------------
    Hello and Welcome!
    I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
    I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
    I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
    You can see my games at www.endlessloopstudios.com
    --------------------------------------------------------------------
    - Other great Unity channels:
    Unity - / unity3d
    Brackeys - / brackeys
    Dani - / @danidev
    Jabrils - / @jabrils
    BlackthornProd - / @blackthornprod
    Sykoo - / sykootv
    Jason Weimann - / @unity3dcollege
    Jonas Tyroller - / @jonastyroller
    --------------------------------------------------------------------
    - Website: unitycodemonke...
    - Twitter: / unitycodemonkey
    - Steam: store.steampow...

КОМЕНТАРІ • 136

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  2 роки тому +3

    🌍 Get the Polygon Fantasy Pack cmonkey.co/synty_fantasykindgom_hydroneer
    🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
    🔴 RELATED VIDEOS 🔴
    How to Pick up and Drop Objects/Items! (First and Third Person) ua-cam.com/video/2IhzPTS4av4/v-deo.html
    How it's Made: How Mechanics and System from various Games work ua-cam.com/play/PLzDRvYVwl53ttN_5uyfqs3nnOn0Jd4s92.html
    Remaking 3 Great Mechanics from Cyberpunk 2077! ua-cam.com/video/pIzWlfbVORU/v-deo.html
    Kickstart your game with First and Third Person Controllers! (FREE Unity Starter Assets) ua-cam.com/video/jXz5b_9z0Bc/v-deo.html
    Crafting Items with Scriptable Objects! ua-cam.com/video/E91NYvDqsy8/v-deo.html
    Make your Games Designer Friendly! (Scriptable Objects) ua-cam.com/video/7jxS8HIny3Q/v-deo.html
    Place UI Elements in your World! (Health Bar, Overlays, Timers) ua-cam.com/video/Zwgj3mwOVlg/v-deo.html

  • @FoulballHangover
    @FoulballHangover 2 роки тому +148

    Hydroneer dev here! Thanks for being inspired by our game to make a tutorial video on the crafting system :) Great video

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +27

      Hey! Thanks for making a great game, I really enjoyed playing it!
      And congrats on the massive success!

    • @Sodomantis
      @Sodomantis 2 роки тому +3

      Cool. Now when do we all get togeather and have a beer?

    • @CryoCyanide
      @CryoCyanide 2 роки тому

      Lets game it out Agrees

    • @aaronjenkins2225
      @aaronjenkins2225 Рік тому

      This crafting system is genius, I'm very tempted to use something similar in my game project too. ☺️

    • @MikeCroswell
      @MikeCroswell Рік тому

      @@aaronjenkins2225 I agree, Aaron. One of the tenants of accessibility is to create simpler interactions. This is great for that! Thanks Code Monkey and Hydroneer!

  • @TheOfficialPolo
    @TheOfficialPolo 2 роки тому +6

    I love this series - to see how someone would implement something and how different ideas one has for the architecture of the mechanic. Really refreshing after days spend in your own code
    One thing I suggest is avoiding nested ifs; as much as it's logical to have one condition after another it's way readable to invert the logic,
    Even if it's something simple, there's a chance it might grow; nesting layers and layers of ifs makes it problematic after time to know where you are; inversing the logic will simplify it, by letting you "forget" about certain conditions;
    fe. instead:
    if (foo)
    {
    if (bar)
    {
    // do something
    }
    }
    you can do:
    if (!foo)
    return;
    if (!bar)
    return;
    //do something
    The code works the same, but instead going deeper bracket after bracket, you eliminate the possibilities on your way down the code; this works esspecially well when you keep your code clean and make seperate methods for functionalities

    • @Soundy777
      @Soundy777 2 роки тому +3

      Great suggestion, these are referred to as "Guard Clauses" for anyone wanting to search for more information on this paradigm.

  • @hidsgi-games5369
    @hidsgi-games5369 2 роки тому +2

    If you found Hydroneer UX interesting, I suggest having a look at Astroneer.
    There's no on-screen UI (except for main menu, settings). There are only a few UI elements but they are all displayed on in-game objects. The resources aren't just a slot in an inventory with a number on it, but physical objects that can be moved around by the player. Every interaction from the player is done in the game world.

  • @lime_68
    @lime_68 2 роки тому +1

    CodeMonkey, I think you are reaching your highest potential so far. These videos are high quality and go beyond basics. Do more explanation in the future like climbing(or jumping over stuff), advanced cover system(like in GTA), simple procedural 2D dungeons and etc.

  • @r1pfake521
    @r1pfake521 2 роки тому +6

    List Remove returns a bool and true if the item was removed, so you can use that instead of the additional Contains check ;)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +5

      Oh I didn't actually know it returned a bool! I always used it as a statement, never in an if.
      Goes to show you learn something new every day!

    • @Hietakissa
      @Hietakissa 2 роки тому

      I didn't know it returned a bool either, thanks for sharing :P

  • @kuoyulu6714
    @kuoyulu6714 4 місяці тому +1

    I was going to do some morning study learning some web stuff, but then I ended up watching this whole video, great video lol 😀

  • @Nairistarcraft
    @Nairistarcraft 2 роки тому +1

    If you wanted to use the physics object, you can turn it off when its not needed and have the craft() turn it on.

  • @petipois28
    @petipois28 2 роки тому +1

    Thank you for your tutorial. I had to figure out the recipes and item scriptable objects but other than that it worked perfectly. thank you

  • @vo_sk
    @vo_sk 2 роки тому +2

    It's amazing, thanks! More about crafting, please! 😀

  • @JayadevHaddadi
    @JayadevHaddadi 2 роки тому +1

    super neat system! one tip: you can just have List.Remove as the conditional as it returns a bool if the remove was successful, instead of checking if it contains and then remove.. :)
    thanks for great content!

    • @BigDStudios
      @BigDStudios 7 місяців тому

      How do i work this Remove function into the scripts?

  • @redeamed19
    @redeamed19 Рік тому

    using the collider for the positions but disabling it is a neat little trick.

  • @pabloalves
    @pabloalves 2 роки тому

    Didn't know this game you were inspired by and this mechanic made me interested in try it.. thanks for teaching us

  • @markd774
    @markd774 2 роки тому +9

    The more I advance in programming, the more I feel like a beginner

    • @janikcodes
      @janikcodes 2 роки тому

      You never stop learning

    • @Hietakissa
      @Hietakissa 2 роки тому

      It really do be like that. At first I was intimidated by making an inventory or crafting etc. now all that is trivial to me and I should learn shaders soon, I thought it wouldn't be that hard and I could just use shader graph but then I watched a couple videos on video game grass and realized shader graph isn't even a viable option.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      There's always more to learn!

  • @mikelezhnin8601
    @mikelezhnin8601 7 місяців тому

    at 9:05 there is a mistake - it should be
    `placeItemsAreaBoxCollider.transform.position + placeItemsAreaBoxCollider.center`
    instead of
    `transform.position + placeItemsAreaBoxCollider.center`
    it doesn't matter if the pivot points of the anvil and the crafting area are the same, but if you move it for the crafting area, you'd be spending a bunch of time debugging trying to figure out why it no longer detects collisions.

  • @keithcollier4860
    @keithcollier4860 2 роки тому +1

    Cool series!

  • @harrogance3404
    @harrogance3404 Рік тому

    Super useful tutorial, love the series! Keep it up ❤
    Would you consider making a similar tutorial for an Overwatch-like character controller?

  • @davidwusoftdev
    @davidwusoftdev 2 роки тому

    Really nice tutorial! Thank you for sharing!

  • @canadianblitz3468
    @canadianblitz3468 Рік тому

    Love your content and the way you teach!

  • @SingularProgrammer
    @SingularProgrammer 2 роки тому +1

    nice work

  • @TheAdventuresofShujaaandRafiki

    ItemSO script:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [CreateAssetMenu()]
    public class ItemSO : ScriptableObject
    {
    public Sprite sprite;
    public string name;
    public Transform prefab;
    }

  • @ozgenaliekber
    @ozgenaliekber 9 місяців тому

    You are amazing

  • @あれくす
    @あれくす 2 роки тому

    You are awesome sir! Thank you!

  • @iampaullo2489
    @iampaullo2489 2 роки тому

    Amazing!

  • @troyna77
    @troyna77 Рік тому

    this is really good stuff.

  • @yahgamer7369
    @yahgamer7369 2 роки тому +1

    i got a code monkey ad in a code monkey vid
    XD

  • @TSC1390
    @TSC1390 Місяць тому

    what's code monkey great work , wanted to know if can do a How it's made on the reticle (crosshairs) / entire UI form armored core 6 , using cinemachine virtual cams and the new input system, the aiming target lock effects and so forth? Thanks keep up the great work!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Місяць тому +1

      I haven't played it yet so not sure but I have on my to-do list to make a video covering Cinemachine 3.0 which changed quite a lot of things

    • @TSC1390
      @TSC1390 Місяць тому

      @@CodeMonkeyUnity ok, yeah I'm trying to use it with this robot characters pack and both hands are weapons sort of like mega man but both hands, and thinking about how to make it mobile compatible as well using ultimate joystick asset ,.. but yeah looking forward to what's next

  • @Ceelgie
    @Ceelgie Рік тому

    Hi! where do u missed sth? Cuz while everything goin brilliant there's one issue.. even if in recipe it requires 2 stone to craft thing, it only takes one and still craft it

  • @darkflow5314
    @darkflow5314 2 роки тому

    Hey I want to know how it is made the disassembly and assembly in my summer car plz

  • @rrahll
    @rrahll 2 роки тому

    Thanks mr Code Monkey!

  • @HyperPlayz575
    @HyperPlayz575 2 роки тому

    Please make a tutorial for revive system like PUBG like teammate can revive the other teammates

  • @Norbingel
    @Norbingel 2 роки тому +2

    Still hoping for the Snake Pass snake movement that no UA-camr has dared do before...
    Perhaps a certain Monkey can show us how a snake can move..? :D

    • @snook5555
      @snook5555 2 роки тому +1

      ua-cam.com/video/4NNPr2Ay4OM/v-deo.html is a good starting point for now.

    • @Norbingel
      @Norbingel 2 роки тому

      @@snook5555that IS where I started. Actually, I think that might have been where I even heard of snake pass :D

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      I've heard great things about it but haven't played it yet, need to find the time!

    • @Norbingel
      @Norbingel 2 роки тому

      @@CodeMonkeyUnity I'm sure you can figure it out by watching Mark Brown's video on it BUT you take your time. I truly don't want to impose. Just hoping it's something that you think might be worth creating content for

  • @denisgoodman4492
    @denisgoodman4492 2 роки тому

    Good, but i think if you was made the special Physic Layer for collisions of Anvil and Items for making receipts, it can simplify the code?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      It wouldn't exactly simplify much since you still need to get the component. It would reduce the amount of colliders that it hits and improve performance slightly, however Layers are limited to only 32 so if you use the layer method you need to be careful to not have too many types of layers.

  • @afushta
    @afushta 2 роки тому

    Thanks for amazing tutorial!
    Have you played the very old game Arx Fatalis? There's an interesting magic system. Could you make a tutorial on how to make a similar system for drawing and recognizing runes?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      Haven't played it but apparently it's similar to Black and White where you draw the shape of the spells, that could be an interesting project to research, thanks for the suggestion!

  • @TheAdventuresofShujaaandRafiki
    @TheAdventuresofShujaaandRafiki 7 місяців тому

    help, the crafted Item Instatiates when the Items are placed on the Anvil but the Crafting Items wont destroy....

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  7 місяців тому

      Add some Debug.Log to see what your code is doing, are you cycling through all the items?

  • @lee1davis1
    @lee1davis1 2 роки тому +1

    Just an observation but the world canvas is still a UI element.

  • @iknowcturne7362
    @iknowcturne7362 Рік тому

    Can you please explain what to do in the class ItemSO ? And also do you attach a script to every object, and gather ItemSO variable from it ? Thanks you :)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      It's just a scriptable object holding data for that item, like the prefab and icon unitycodemonkey.com/video.php?v=7jxS8HIny3Q
      Yes usually the SO has a reference to the prefab and in the spawned object I usually have a reference to the SO where it came from

  • @RyanSmith-qb6dl
    @RyanSmith-qb6dl Рік тому

    First off Thanks for another awesome tutorial! I HAVE LEARNED SO MUCH FROM YOU! THANK YOU! But ive been trying to implement a functionality of zooming the item in and out. I could really use your help as IM stumped on how to get the item to UPDATE over the original position. I have been able to increment it and/or decrease it, but it always snaps back to the original position. AS well, depending on which direction one is looking, the X axis, Is now the wrong way.. If you could please do a video addon to this one? Showing how to zoom the item IN and OUT once grabbed? Or, any advice or help would be greatly appreciated! THANKS! :D

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      Zooming in or out would be a case of moving it closer or further from the camera.
      The item always goes to that position in front of the camera, so you just need to move that position closer/farther from the camera. You can move it using the mainCamera.transform.forward vector

  • @eecler
    @eecler 8 місяців тому

    Hi, I don't understand what RecipeSO objects consist of and what to put in the output.
    The script does not execute anything further than Debug.Log(Craft), and inputItemList is always 2

    • @eecler
      @eecler 8 місяців тому

      public void Craft() {
      Collider[] colliderArray = Physics.OverlapBox(
      transform.position + placeItemsAreaBoxCollider.center,
      placeItemsAreaBoxCollider.size,
      placeItemsAreaBoxCollider.transform.rotation);
      foreach (Collider collider in colliderArray) {
      Debug.Log(collider);
      }
      }
      }
      this dont work, but function correctly made

    • @eecler
      @eecler 8 місяців тому

      please, i need unity package for analiyze my code and CodeMonkey code and find the error

    • @eecler
      @eecler 8 місяців тому

      I FOUND THE ANSWER!! The collider of anvil nnot on a anvil

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  8 місяців тому

      That one is a scriptable object, it just holds data unitycodemonkey.com/video.php?v=7jxS8HIny3Q

  • @bendyzip9111
    @bendyzip9111 2 роки тому +1

    hey man i love your tutorials! but i have a question. i use the coding engine called scratch that uses block coding and puts it in a simple form. is there anything like that for unity. kinda like bolt on unity but simpler?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      Yes Unity has Visual Scripting unitycodemonkey.com/video.php?v=8y6akNTUt2Y
      I made a full course where I built 3 complete games all entirely with Visual Scripting without a single line of code unitycodemonkey.com/video.php?v=qAkeCDWgPVA

    • @bendyzip9111
      @bendyzip9111 2 роки тому

      @@CodeMonkeyUnity oh wow thank you so much man it helps alot :D

  • @MrMagicznyMAG
    @MrMagicznyMAG 2 роки тому

    Hey Code Monkey! Awesome tutorial. I just think you should stop using old input system and start using the new input system. Don't spread the deprecated approaches 😉

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      The legacy input manager is not deprecated, it's still excellent for its simplicity. If I were making a full game I would still use the legacy input manager during development and only refactor to the new input system in the end, just like I did in my TBS course.

  • @al9dama
    @al9dama 3 місяці тому

    From where I can get the ItemSO script

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 місяці тому

      All the code is shown in the video so you can just write it yourself, it's a simple scriptable object.

  • @manzell
    @manzell 2 роки тому +2

    7:45 Physics.OverlapBox ought to take a box collider as an argument. Why give the user the opportunity to get confused on world-vs-local positioning?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      That would be a nice addition! The function already has tons of versions so adding one more for a BoxCollider input would be a nice small improvement

  • @_SJ7_
    @_SJ7_ 2 роки тому

    Would you be able to place 4 iron ingots and craft 2 daggers with just one craft input?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      Hmm technically you could make the Craft function sort of recursive, so it calls the function, then if something is crafted it continues calling itself until there's nothing else to craft

  • @mateusz3707
    @mateusz3707 Рік тому

    Hello, what is the package of the environment from 17:03?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому +1

      That's the game Hydroneer, not sure if they used assets or if they are original

    • @mateusz3707
      @mateusz3707 Рік тому

      @@CodeMonkeyUnity thanks, its look like synty studio assets

  • @radiance_37k
    @radiance_37k 2 роки тому

    Would it be a viable option to use raycast, detect the anvil, activate the collider, craft item and then disable the collider. In order to skip the possible collisionbox calculation error? Or is that a worse approach?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      Technically that could work, not entirely sure if OnTriggerEnter would be called if you just enable a game object with objects already inside it
      However that sounds like a needlessly convoluted approach, sounds much simpler to do just a OverlapBox();

  • @imdublin4431
    @imdublin4431 Рік тому

    Hello again, the game gave me an error from this line of code:
    List ingredientsList = new List(recipeSO.ingredientsSO);

    • @conorasf3418
      @conorasf3418 Рік тому

      Same, did you ever find a fix to this?

    • @imdublin4431
      @imdublin4431 Рік тому

      @@conorasf3418 Nope

    • @conorasf3418
      @conorasf3418 Рік тому

      @@imdublin4431 I figured it out, it was because I did not implement the next recipe function . In that function is where he initializes the list

    • @conorasf3418
      @conorasf3418 Рік тому

      public void NextRecipe()
      {
      Debug.Log("nextRecipe called");
      if (craftingRecipeSO == null)
      {
      craftingRecipeSO = craftingRecipeSOList[0];
      }
      else
      {
      int index = craftingRecipeSOList.IndexOf(craftingRecipeSO);
      index = (index + 1) % craftingRecipeSOList.Count;
      craftingRecipeSO = craftingRecipeSOList[index];
      }

  • @Zippy_Zolton
    @Zippy_Zolton 2 роки тому

    moves like dagger

  • @petarnedeljkovic6507
    @petarnedeljkovic6507 Рік тому

    hi @Code Monkey! Amazing stuff here! Are there some project files for this tutorial? And if there are non, i would gladly pay for them on patreon or anywhere..

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      This one used tons of assets so I didn't make the project files for it, however the core of this system is just the picking up logic which I did make project files unitycodemonkey.com/video.php?v=2IhzPTS4av4
      You can see the code on screen in this video and add it onto that one

    • @petarnedeljkovic6507
      @petarnedeljkovic6507 8 місяців тому

      me again :) i was trying to recreate this system in the past monts but my lack of knowelege faild to do it. You explained stuff in the video but some of them are not explained and how to connect all of them. I reaaly like this tutorial, it will be really great to put another video about it with full tutorial or post a github repo without graphics. Tnx again for all of your work!@@CodeMonkeyUnity

  • @alec4388
    @alec4388 2 роки тому

    Hi I am currently making a mobile game and wanted to add levels using scriptable objects to change things like player position, how many coins they could collect etc… how would you go about this? Thanks

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      You can place the level environment in a prefab and instantiate that. Then maybe store a position for the player and list of positions for the coins, or include them as game objects in the level prefab

    • @alec4388
      @alec4388 2 роки тому

      Thanks will try

  • @Evelyn-dh4zp
    @Evelyn-dh4zp Рік тому

    I was wondering if you could tell me what scripts I need to have in my game before I follow this video, I have already added a pickup and drop objects system from your How to Pick up and Drop Objects/Items! video, I am wondering what else I need to have before I can follow your video. You show the Crafting Anvil script, Crafting Recipe SO Script, and Player Crafting Script which I was able to write from the few glimpses you show of them within the first few minutes, but you don't show the Item SO script or Item SO Holder script which is needed to have them all work. I also don't know what objects and other stuff I would need to add to be able to use this tutorial. If you can, please copy the scripts and let me know what stuff I need to add to my game to add the crafting system from this tutorial. Thank you, and sorry about the long comment. I just really like you tutorials and really want to implement this crafting system into my survival game that I have been making.

    • @Evelyn-dh4zp
      @Evelyn-dh4zp Рік тому

      Also I am getting the error "PlayerCrafting.cs(21,39): error CS0122:'CraftingAnvil.NextRecipe()' is inaccessible due to its protection level"
      My script is:
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class PlayerCrafting : MonoBehaviour
      {
      [SerializeField] private Transform playerCameraTransform;
      [SerializeField] private LayerMask interactLayerMask;
      private void Update()
      {
      if (Input.GetKeyDown(KeyCode.E) || Input.GetMouseButtonDown(0))
      {
      float interactDistance = 3f;
      if (Physics.Raycast(playerCameraTransform.position, playerCameraTransform.forward, out RaycastHit raycastHit, interactDistance, interactLayerMask))
      {
      if (raycastHit.transform.TryGetComponent(out CraftingAnvil craftingAnvil))
      { //Interacting with Crafting Anvil
      if (Input.GetKeyDown(KeyCode.E))
      {
      craftingAnvil.NextRecipe(); // This is the line that is giving me the error
      }
      if (Input.GetMouseButtonDown(0))
      {
      craftingAnvil.Craft();
      }
      }
      }
      }
      }
      }
      Please help!!!! Once again the line is:
      craftingAnvil.NextRecipe();

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      The ItemSO is just a scriptable Object definition, I did something like that in this video unitycodemonkey.com/video.php?v=E91NYvDqsy8
      And the ItemSOHolder just has a field of ItemSO, that component is attached to the item prefab so the prefab knows what item type it is.
      This is mostly a standalone tutorial, it's not part of a course so there's no step by step video on how every system was made unitycodemonkey.com/video.php?v=PcArjIC1QnQ
      What you should take away from this tutorial is how the physics functions works, not necessarily the specifics for how the demo is setup, it is very likely that your own game is set up in a very different way from the demo so you can't just copy paste code, you need to adapt it to match whatever item system you have in your game.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      You probably made NextRecipe(); private instead of public

    • @Evelyn-dh4zp
      @Evelyn-dh4zp Рік тому

      @@CodeMonkeyUnity Okay, Thank you

    • @Evelyn-dh4zp
      @Evelyn-dh4zp Рік тому

      @@CodeMonkeyUnity Thank you, that was the problem. I fixed that and the error went away.

  • @AhmedShokry-xy6bh
    @AhmedShokry-xy6bh 2 роки тому

    please can you make a full 3rd person shooter controller

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      I did unitycodemonkey.com/video.php?v=FbM4CkqtOuA

  • @Floripundo
    @Floripundo Рік тому

    Hi! Amazing video, but can you help me with this, please?
    I have a problem with the Place Items Area box collider, i setup everything exactly like you did, the code is the same and the empty object's box collider is the same. When i press the button to make the Craft code, the box collider of Place Items Area empy object detects EVERY object on the scene, everyone. By changing the ".size" to ".extents" or ".extents / 2", it detects everyobject directly touching my anvil, but it ignores every object inside the Place Items Area box collider. Its strange, it just seems to detect wherever he wants but not in the right area. I dont know what could be wrong, but if you can help me really thank you!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      Do your objects have a collider?
      Only thing I can think of is maybe you're using a weird position, add a Debug.Log to see what values you're using

    • @Floripundo
      @Floripundo Рік тому

      @@CodeMonkeyUnity All objects have colliders. I dont know if this may be the problem but your center of the Place Items Area box collider are values like “0.0018391” in x, y and z, while mine are 0 on every axis.

  • @imdublin4431
    @imdublin4431 Рік тому

    May I ask what is the code inside ItemSO?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      It's just a scriptable object unitycodemonkey.com/video.php?v=7jxS8HIny3Q
      It holds a Transform prefab, a Sprite and a string name

    • @imdublin4431
      @imdublin4431 Рік тому

      @@CodeMonkeyUnity Ahh okay, thank you so much

  • @oloy7038
    @oloy7038 2 роки тому

    do you have any comment about the gigaya?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      I covered it in this video unitycodemonkey.com/video.php?v=HobK9kug-Lo

  • @mrguwee9007
    @mrguwee9007 2 роки тому

    When will you do a multiplayer tutorial ? #1

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      The Netcode for Game Objects comes out of preview

  • @emberhydra7621
    @emberhydra7621 2 роки тому

    What happen to the gold? It turn into silver?

  • @roblucci253
    @roblucci253 2 роки тому

    hey,code monkey,went to your website to enroll but its confusing for me,which course is the first one to take for beginners? I'm just stupid

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому +1

      If you're looking for Visual Scripting then the VS course unitycodemonkey.com/video.php?v=qAkeCDWgPVA
      If you're looking for C# the Builder Defender course unitycodemonkey.com/video.php?v=cIuxrFYKZXI
      But for the absolute basics you can also just watch regular videos
      unitycodemonkey.com/video.php?v=E6A4WvsDeLE
      unitycodemonkey.com/video.php?v=IFayQioG71A
      unitycodemonkey.com/video.php?v=PcArjIC1QnQ

    • @roblucci253
      @roblucci253 2 роки тому

      @@CodeMonkeyUnity thank you so much

  • @zORg_alex
    @zORg_alex 2 роки тому

    7:56 Wow! This is sooooooo WRONG! transform.TransformPoint(center) will include rotations and scale, also size should be scaled, but I'm not sure how at the moment.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 роки тому

      Uh? What is wrong? I'm not using TransformPoint(); anywhere

    • @zORg_alex
      @zORg_alex 2 роки тому

      @@CodeMonkeyUnity I mean you should. If that script parent gameobject gets rotated those position/scale/rotation will be wrong. It doesn't matter that it shouldn't happen. It's easy to use that objects transform.TransformPoint and so on, just to be sure that they always are correct. When I saw that line it was like a red flag to me that it is wrong. I've been doing a lot of such conversions lately and learned that you shouldn't just add those positions, they may not work if an object is rotated, and it will happen some when and that person will be debugging it after following your tutorial.

  • @gamer2264
    @gamer2264 Рік тому

    The problem is... You say that for this we should have watched the crafting system videos and stuff... But most of those videos are working on those specific methods of crafting and not much of it is actually on what we need for this tutorial... This is way too hard to follow

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      You need to learn how to adapt what you see in a tutorial to fit your needs, you will never find a tutorial that perfectly does exactly the very specific game you have in your mind.
      Don't just blindly copy past, instead learn the concepts behind why the tutorial works and adapt it to your specific use case.

    • @gamer2264
      @gamer2264 Рік тому

      ​@@CodeMonkeyUnitysure.. but two things apply to some people. First, not everyone learns like that. I pearn by seeing a finished product and then finding out how that works. Like in maths, Ill often use some kind of online calculator to give me the answer then I can find the method.,. And two. I get that I have to adapt some tutorials for others, but, I do this for fun in whatever little time I have after school and whatever I can do weekends. And there is not always the time to look through one or more hours of code tutorials to nitpick specific parts.
      I like the tutorials from you and have used a fair few (and learned quite a lot) but this one it pushing the realm of easy to follow.
      (Don't get me wrong though, it is still an amazing tutorial for those who can figure out the last few videos of content.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      What you just described is the perfectly normal learning process. No one starts off with knowledge, you gain knowledge over time. Remember that I've been making games for 10 years and programming for 25. If you're a relative beginner then it's perfectly natural that it takes a while to learn something new. Just keep at it and over time you will learn more and more.

  • @aayush_australia5527
    @aayush_australia5527 2 роки тому

    First

  • @cosminmahalu9594
    @cosminmahalu9594 Рік тому

    Thanks for the great video CodeMonkey! I have an issue where I cannot access the prefab when instantiating the item that is to be crafted. Any ideea what I am missing or doing wrong? It is in this line: Transform spawnedItemTransform = Instantiate(
    craftingRecipeSO.outputItemSO.prefab,
    itemSpawnPoint.position,
    itemSpawnPoint.rotation); // prefab here is underlined with red and says it is missing a definition. I think something is missing in my ItemSO.cs script.

    • @cosminmahalu9594
      @cosminmahalu9594 Рік тому +2

      Ok my bad, I was missing my prefab definition in the ItemSO script. public Transform prefab; Thanks again for all the hard work and I wish you great success going forward!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  Рік тому

      I'm glad you found the solution, thanks for the kind words!

  • @MinexTheGameDev
    @MinexTheGameDev 5 місяців тому

    Hi there, I got 2 errors hope you could reply to me and tell me on how to fix these :)
    Assets\FPS_Movement_Rigidbody-master\CraftingRecipeSO.cs(9,17): error CS0246: The type or namespace name 'ItemSO' could not be found (are you missing a using directive or an assembly reference?)
    Assets\FPS_Movement_Rigidbody-master\CraftingRecipeSO.cs(10,12): error CS0246: The type or namespace name 'ItemSO' could not be found (are you missing a using directive or an assembly reference?)
    Script: using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [CreateAssetMenu(fileName = "NewCraftingRecipe", menuName = "CraftingRecipe")]
    public class CraftingRecipeSO : ScriptableObject
    {
    public Sprite sprite;
    public List inputItemSOList;
    public ItemSO outputItemSO; // Corrected typo here
    }

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 місяців тому

      That means you don't have any class named ItemSO

    • @MinexTheGameDev
      @MinexTheGameDev 5 місяців тому

      @@CodeMonkeyUnity TYSM! I never thought you would reply tho, also forgot to comment about this tutorial, it waas awesome!