C++ Header?

Where do i put my Variables, UFunctions, UProperty and etc in my header file. Is it in the Class(), Public, Protected or the Tick Public?

Is there a use for each of them? If so, i would love to know :slight_smile:

In general, all your variables and functions are going to be inside of a class. That’s just how Unreal works. There are reasons for them to be outside of them to be sure, but most of them will be inside.
Public just means that anyone with a reference to an instance of your class will be able to read & write to that property. Protected means only classes derived from yours will be able to read/write to them and Private means no one else can.
I don’t know what you’re referring to as Tick Public.

However, I would suggest that you do some independent research on the topic. There are tons and tons of C++ resources online that can explain how to organize header files. Some may even contradict each other, but you’ve got to find what works best for you. But none of the best practices for headers are Unreal specific, not really.

Please don’t take this as anything other than a way to push you to better resources than what someone could explain in a forum post. It is an incredibly broad topic with lots of options that the last thing you should do is take the advice of the first rando that comments on a forum post.

1 Like

I appricate it, and i will for sure into it more. Thanks :slight_smile: