Unity Input System: SendMessage and C# Events

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 17

  • @jedoncarter8570
    @jedoncarter8570 3 ปีที่แล้ว +6

    Thank you! You have no idea how much of a headache figuring this out has been for me. Everybody and their mom is going over the event section but no one is discussing the c# section. Looking forward to the next video

  • @Sledge_Warrior
    @Sledge_Warrior 2 ปีที่แล้ว +1

    Holy- thank you, you made it so easy to use this method!

  • @samarthdhroov
    @samarthdhroov 3 ปีที่แล้ว +1

    @stevens ... Please start a youtube series on Unity essentials asap. Thank you for the content here. really appreciate the key insights that are hard to find in one place.

    • @stevensrmiller
      @stevensrmiller  3 ปีที่แล้ว +1

      That's definitely in the works! Have a look at "Professor_Stevens," where my new videos on Unity will be released. It would probably upset Justin Geis if I called it "Unity essentials," but that's basically the idea. Thanks for dropping by!

  • @Fokinhaas
    @Fokinhaas 2 ปีที่แล้ว

    HOLY SHIT YOU ARE AMAZING

  • @Whitecroc
    @Whitecroc 2 ปีที่แล้ว

    Sorry if this is covered in the video (don't have time to watch it right now), but are there any practical differences between using Messages or Events to handle input?

  • @vick3554
    @vick3554 3 ปีที่แล้ว

    Please how will I use send messages and button for a shooting animation without holding e mouse. I want it in a mouse click...

  • @jedoncarter8570
    @jedoncarter8570 3 ปีที่แล้ว

    Also you can do ctx.started in the callback and that is a bool. A little easier than checking the string with ctx.phase
    Also should you do clickPoint.DefaultMap.Enabled() instead of enabling the entire thing? (in the case of having multiple action maps). On that point, I have a player action map for normal controls and a car action map for car controls on different scripts. Using your method they would both be listening for similiar action events (lets say the thumbstick) but I want the player map to not function while the car map is on and vice versa. How should I accomplish this?

    • @stevensrmiller
      @stevensrmiller  3 ปีที่แล้ว

      So glad this was helpful to you! Yes, the documentation on the Input System is a bit scattershot. I haven't looked yet at multiple action maps, at least not at code that controls them. Will put it on my short list! My Unity / C# videos will be on th-cam.com/channels/GlaTsARzq7JA5cCuGjYkxA.html from now on. Hope you'll have a look and subscribe, Jedon.

    • @jedoncarter8570
      @jedoncarter8570 3 ปีที่แล้ว

      @@stevensrmiller Will do!

  • @araeswhiteflag
    @araeswhiteflag 3 ปีที่แล้ว +1

    "scripts sounds so lightweight and meaningless" - bahahahahhahahahhaha

    • @stevensrmiller
      @stevensrmiller  3 ปีที่แล้ว

      We used to use that word strictly for shell (or other command-level) scripts. I think database administrators felt intimidated by "code," so they started calling our programs "scripts," to make them less threatening. Just a guess.

    • @araeswhiteflag
      @araeswhiteflag 3 ปีที่แล้ว

      ​@@stevensrmiller that's too funny. aside from an actual .sh file, when i hear "script", i think of scripting languages, and while they can be useful, i am generally not a fan. i dont like magic (i'm looking at you, interpreters and basically forced frameworks). that's not to say that compiled langs dont have magic, it's just that i feel like i have a better understanding of what's going on
      it's too bad DBAs might feel intimidated by code. i hate having to deal with queries and try to do as much in code as i can due to being rather intimidated by database system design and queries. set notation was always a weakness for me, and is basically how i see queries. db systems are quite complex to me in how they handle everything from locks and mutexes, to generating their various ids, to how they handle "inheritance". so i see the DBA world as quite intimidating
      tldr; i lack the knowledge to feel as comfortable using interpreted langs, despite both compiled and interpreted eventually popping off CPU registers the same way anyways