FColor probs

Instead of constructing a parameter as ben did in the lecture, that is
He constructed FColor(255,0,0) straight into the parameter list of DrawDebugLine()

Why Cant we do it like this,

In the header file
FColor LineColor(255,0,0);

And then pass in LineColor as a parameter for the DrawDebugLine function

He probably did that for simplicity since it is a debug line that will probably get removed in the future anyway. There’s nothing stopping you from declaring LineColor beforehand although I wouldn’t recommend doing that in the header file. I would declare it right above the DrawDebugLine function to keep things tidy.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms