Hi
Is there a way to create a global blueprint function that I can access from any other blueprints ?
Hi
Is there a way to create a global blueprint function that I can access from any other blueprints ?
Hello,
All blueprint functions (except level blueprints) can be global. You just need to cast to them.
Not sure what you’re trying to do, so maybe I’m mistaking what you mean.
Create a Blueprint Function Library in Content Browser for this.
Thanks to all
I created one now but then I try to drag this function library into another blueprint I get this error
Can not create a node from this type of asset
Hm, never used this before.
Does it basically behave as a cast/get actor or is it something completely different?
Unlike actors, you cannot instantiate a library yourself. In the project, it exists in a single copy, and it is within it that the function is called.
This is an analogue of static functions in C++.
Helpful and understood.
To call a function in any blueprint library:
Note that you can also give your function a category by:
Got it thanks. BluePrint is fun compared to C++
I have mixed feelings. Yes, Blueprint is more fun, but it’s also less powerful, slower, and even more “fiddley”. You can spend hours trying to make your blueprint look good, then find somewhere else to tweak the wires so it’s a bit clearer/cleaner than it was.
Plus, after 20+ years, I’m pretty ■■■■good at C++.
Life is short this is why I wish I make a small fun game as indie
I found also if I have a variable in actor blueprint , I can get/set that variable in widget blueprint
Are you talking about this?
You can do this from any object, you just need to have a reference to the desired actor.
No, you definitely need a link, otherwise your blueprint will not compile…
If you remove the Context Sensitive flag, you will be able to see the COMPLETE list of nodes that can be added to this graph, but for some to work correctly (such as getting a variable), you must connect certain pins.
Therefore, with the Context Sensitive flag enabled, you would see the variable getting node only if you pulled out a pin with the type of the corresponding class within which the variable is located.
I see thanks. How I can get reference to Actor without cast ?
Yes I did that . I created an object reference in actor blueprint 1 but when I tried to use that reference variable in the widget blueprint I get error