why are we using PrintLine() function and not std::cout to print the introduction message like we did in triplex?
if we can use PrintLine() to display text, why didnt we use that in the triple x game?
why are we using PrintLine() function and not std::cout to print the introduction message like we did in triplex?
if we can use PrintLine() to display text, why didnt we use that in the triple x game?
You can use whatever you want. You could write your own function with std::cout in it to print a string passed in badly called PToCL31039(“A text to print”) and use that if you want.
You can also choose to replace PrintLine() with whatever you want as well if it helps you to learn faster. But for sure you should know the differences either way even if its just a custom function doing the same thing or whatever.
Also to add, UE4/UE5 verses actual terminal will both do things different so how you print is based much on what you’re designing for. Those both will be different from eg Windows UI.
std::cout
prints to stdout
(Standard streams - Wikipedia) which is part of your operating system. It has no knowledge of the game world that is created in Unreal.
PrintLine was developed by Sam and just adds text to a Text Render component on the terminal.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.