Blueprint Function Library: Difference between revisions

From Unreal Wiki
Jump to navigation Jump to search
Created page with "Category:Blueprints Category:CPP ==Blueprint Function Libraries== Blueprint Function Libraries(BPL) are static libraries that can be used over and over, the word static in this context means, that only<br? one instance of the object/library/class exists.<p> Take Components for example, for a while I was using Components as function libraries and would attach them to a Actor if I needed those functions<br> however this would take up unnecessary memory and space..."
 
No edit summary
Line 18: Line 18:
Right click the content drawer and select Blueprint->Blueprint Function library<p>
Right click the content drawer and select Blueprint->Blueprint Function library<p>
[[File:Blueprint_function_library_menu.png]]<P>
[[File:Blueprint_function_library_menu.png]]<P>
When you make a function in the library you can then call it from any class globally.<br>
For example if a I make a function "Print String Test"
<P>
[[File:Bpl_print_string_test.png]]
<p>
I can then use it in my BP_ThirdPersonCharacter blueprint by right clicking the event graph
(or in any graph) In selecting Print String Test
<p>
[[File:Implement_print_string_test.png]]
<P>

Revision as of 17:05, 20 March 2025


Blueprint Function Libraries

Blueprint Function Libraries(BPL) are static libraries that can be used over and over, the word static in this context means, that only<br?

one instance of the object/library/class exists.

Take Components for example, for a while I was using Components as function libraries and would attach them to a Actor if I needed those functions
however this would take up unnecessary memory and space as each instance of the Component would need to exist.
This is also not optimal or correct usage, Components should be used when you need to store specific information such as Inventory
Whereas a function library should be used when no storage or specific identity is needed (such as string handling functions or mathematic operations)

Blueprint Blueprint Function Libraries

Right click the content drawer and select Blueprint->Blueprint Function library

When you make a function in the library you can then call it from any class globally.
For example if a I make a function "Print String Test"

I can then use it in my BP_ThirdPersonCharacter blueprint by right clicking the event graph (or in any graph) In selecting Print String Test