Hi there,
I’ve learned how to log into to the Unreal’s output log. I haven’t made any changes in the Building Escape files and the WorldPosition header file, I’ve made changes only in the WorldPosition c++ file.
We need to log in to the output log because we can’t see anything on our terminal ( like we used to do in Bulls & Cows game so we log in the output log.
Syntax-
UE_LOG(LogTemp, Verbosity, TEXT(“Some text here.”);
Verbosity can be three keywords here-
- Error - outputs the text in red,
- Warning - outputs the text in yellow, and
- Display - outputs the text in grey.
BE VERY CAREFUL WHILE USING THESE KEYWORDS!!
Correct-
UE_LOG(LogTemp, Warning, TEXT("This is a Warning message!!");
// Note how Warning starts with an uppercase W. This'll compile and work.
Wrong-
UE_LOG(LogTemp, warning, TEXT("This is a Warning message!!");
// Note how Warning starts with an lowercase. This'll not compile and won't work.
I’m mentioning this because this a real hard error to catch, at least for me though. Don’t make the same mistake I made.
Here are the screenshots of my UE editor and VS code-
UE Editor (observe the output log in both screenshots)-
Before pressing play-
After pressing play-
It’s giving the output twice because the WorldPosition component is added on the sphere and the cube too.
VS code (I’ve only made changes in my WorldPosition c++ file) -
Another thing I would like to get your attention on is this-
If you see in the first picture showing my output log before I press play, you’ll notice there is a sphere.
When I press play I 'am not able to see the sphere.
UE editor before pressing play button-
UE editor after pressing play button-
under the floor-
Any way’s, if you know the solution to this then please let me know.
I’m posting this to keep a track of my progress. I’ll compare my VS code and UE editor with the end result to see what I come up with.
Please like my post, reply, and answer the sphere disappearing problem.
Previous post: My Building Escape progress after Unreal’s Classes and Components
Thanks for reading,
BYE!!