Unreal engine 5.4 Tutorial: Creating Key Icons (Enhanced Input)

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии •

  • @ChaimLev-Ari
    @ChaimLev-Ari 4 месяца назад +1

    Thanks for your tutorials! been a lot of help

    • @Spacemarine658
      @Spacemarine658  4 месяца назад

      @@ChaimLev-Ari no problem glad I could help!

  • @ryanjdevlin87
    @ryanjdevlin87 7 месяцев назад +1

    I have a possible optimization to this I think. In set key texture with the way its written both all gamepad textures and keyboard textures will be in memory at all times ... what if these references where soft object paths ? then you could name them all accordingly and build the resolving path as a string using the "Key" or corresponding gamepad "Key" . this would also eliminate the switch statements. So basically dynamically setting the soft object path based on the "Key" your already passing into the switch because this "Key" is the only thing that is changing in the soft object path's resolved filepath

    • @Spacemarine658
      @Spacemarine658  7 месяцев назад +1

      🤔 interesting idea I'll have to look into it I don't think the key textures take up much memory especially as I remove them once the UI is hidden but it wouldn't hurt to reduce it further 🤔🤔

    • @Suthriel
      @Suthriel Месяц назад

      @@Spacemarine658 Great video :) and i really would love for you to look into that comment, because while trying to make this work (i haven´t used soft references, so i failed at that part), i found the event AnyKey, which interestingly returns any key, that you pressed. Really ANY key, from mouse keys, keyboard keys and gamepad keys. From there you can get the names of each key, and since i failed at soft references, i used the Import File as Texture2D instead for my tests to import files from my harddrive and display them in the widgets. That worked. So with that event and with those soft paths, it should be simpler to get any texture, as long as its name matches the Keys name.

  • @ChaimLev-Ari
    @ChaimLev-Ari 4 месяца назад

    @spacemarine658 why don't you just pass the "Key" type? why pass string and then type all the different options for key name?

    • @Spacemarine658
      @Spacemarine658  4 месяца назад

      @@ChaimLev-Ari because you'd still be stuck you can't switch on the key in UE5 it definitely should be an option but for now you have to convert it to a string or some other variable to get the correct icon

    • @ChaimLev-Ari
      @ChaimLev-Ari 4 месяца назад

      @@Spacemarine658 I understand. Anyway, I think it's better to accept the key as a parameter and cast inside your function to string. this way you know for sure you've received a key

  • @IcrapOnU2be
    @IcrapOnU2be 3 месяца назад

    Hey, I don't see that Set Texture 2D Object Reference, I tried looking everywhere, is this some custom made node?

    • @Spacemarine658
      @Spacemarine658  3 месяца назад

      @@IcrapOnU2be it only appears if you drag off of a pass by reference variable I believe

    • @IcrapOnU2be
      @IcrapOnU2be 3 месяца назад

      @@Spacemarine658 Can the inputs actually be made to be reference? I don't see that option in the Macro library, I see it only in normal functions. Even in your input it looks like a normal 2D texture input, so I have no clue where that function comes from

    • @Spacemarine658
      @Spacemarine658  3 месяца назад +1

      @@IcrapOnU2be I'll take look here in second and get back to ya 👍

    • @Spacemarine658
      @Spacemarine658  3 месяца назад +1

      found it search "set by ref var" then once you plugin the texture to the target it will look like mine xD that took too long to find lol

    • @IcrapOnU2be
      @IcrapOnU2be 3 месяца назад

      @@Spacemarine658 Oh man, thanks a lot! I will try to get it working now :)