I have just recently installed U4 version 4.7.2 and I have been watching tutorials.
I am trying to make a c++ class and make a blueprint with that class and have access to some of it’s variables and functions. I did google search for the answer and found many yet none of them worked.
is there currently a problem with U4? not even the examples are working for me?
the only thing I have managed to do is make a variable appear in the details tab in the blueprint editor.
Hot Reload should work with most of the UFUNCTION /UPROPETY Macros.
It was improved the last few versions. I only got problems with hotreloading contructors.
Also for a basic c++ class you don’t need to make the function static.
If he just extends his PlayerCharacter or something, he can use a normal function.
The most important thing is the "UFUNCTION(BlueprintClassable, Category=“Test”) part. (You need a category if you have a Function/Variable exposed to BPs)
This is the least thing he needs to create a function that is callable in BPs. There are alot more ways to create functions for BPs. Look up the UFUNCTION properties. You could, for example, create a function that you need to define in BP and that has no implementation in c++, etc.
UPROPERTY(BlueprintReadwrite, Category = MyCategory)
int myVar;
These are the most basic forms of accessing c++ code from Blueprints though, you might want to take a look at shadowmint’s / eXi’s answer/comment for more in-depth ideas
thanks to everyone who responded, you have no idea how much you have helped me!
I was not closing the editor to update changes, that could be the mayor source of my confusion. I suspected I needed to re compile but closing the editor seemed a little execive.
I also did not make my function static. and I did manage to make a variable appear in the detail tab, witch confused me as to why I was not able to modify it from the blueprint.
I will try out everything you have told me very soon.