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
🤔 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 🤔🤔
@@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 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
@@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
@@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
Thanks for your tutorials! been a lot of help
@@ChaimLev-Ari no problem glad I could help!
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
🤔 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 🤔🤔
@@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.
@spacemarine658 why don't you just pass the "Key" type? why pass string and then type all the different options for key name?
@@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
@@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
Hey, I don't see that Set Texture 2D Object Reference, I tried looking everywhere, is this some custom made node?
@@IcrapOnU2be it only appears if you drag off of a pass by reference variable I believe
@@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
@@IcrapOnU2be I'll take look here in second and get back to ya 👍
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
@@Spacemarine658 Oh man, thanks a lot! I will try to get it working now :)