Right as we start the debug line in lecture 73, a constructor is used for FColor to make it red.
FColor(255, 0, 0)
But, the IDE shows a fourth parameter for alpha. If the alpha is missing, the constructor still works!
FColor::FColor(uint8 InR, uint8 InG, uint8 InB, uint8 InA = (uint8)’’)
This constructor definition raises many questions, and none of them are answered on the official API doc: https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Math/FColor/index.html
- If you didn’t know already, how would you know that A is alpha? I could only find this by going into Color.h and finding a few references to the word “alpha”. It’s not obvious from the resources I’ve used so far.
- How would you know that InA isn’t required?
- What does the syntax InA = (uint8)’’ mean? Why are there two quotes there?
I’m trying to understand how I could figure these things out on my own. I know it’s going to get more confusing, so I want to lock it down on a simple example.