I would just like to render out some text in debug mode during the construction script, so I can preview my data the easy way. Why would it not work? Some topics mentioned that you need a valid HUD class. Odd. I have one but it still won’t work on the ConstructionScript.
Did you try
?
I tried Stat>Advanced>Text right now (there’s about a 100 stats) but it doesn’t make the strings pop up. The only difference I see is a new overlay:
The stat checkbox is missing within the actor editor.
I was actually hoping for something like DrawDebugSphere, which does work in construction script out of the box:
The idea is to render out text next to positions on a spline. Because there can be hundreds, I’d like them to render out a key to the data they are related to.
It’s in the main viewport
Yep I tried it in the main viewport for the previous post does yours work?
I want to get something like this (yellow text photoshopped):
Ah, sorry. For a lot of people, print string in construction doesn’t work, and that’s the solution. It’s off by default for some reason.
It just doesn’t work, does it?..
errrrr I want to have it working XD. I’m doing some digging in the meantime. I don’t get why it wouldn’t be working, I used to do this all the time in UE4 on an AI project to render out AI states and animation data in PIE simulation… not construction script. Can’t be that different. The editor itself has its own debugging systems.
Alright, I should have just opened my debugger in VS to set breakpoints and figure it out. Sorry for that. It’s about 30C temperature here, too hot to think .
DrawDebugString relies on a world containing playercontrollers, which don’t exist on ConstructionScript. from a playercontroller the HUD is retrieved and the HUD implements the logic to render debug strings. Pretty awful design.
// iterate through the player controller list
for( FConstPlayerControllerIterator Iterator = InWorld->GetPlayerControllerIterator(); Iterator; ++Iterator )
{
APlayerController* PlayerController = Iterator->Get();
if (PlayerController && PlayerController->MyHUD && PlayerController->Player)
{
PlayerController->MyHUD->AddDebugText(Text, BaseAct, Duration, TextLocation, TextLocation, TextColor, /*bSkipOverwriteCheck=*/ true, /*bAbsoluteLocation=*/ (TestBaseActor==nullptr), /*bKeepAttachedToActor=*/ false, nullptr, FontScale, bDrawShadow);
}
}
During AHUD::DrawDebugTextList all collected debug strings are drawn on a canvas held by the HUD.
Question is if we can skip all that nonsense and write straight to a canvas on some form of separate debugging utility. Then it would work.
Nice…
I’m dropping this debug feature for now, keeping the post up as a bug report. It wasn’t the only thing not working in construction script… I was using the construction script as a utility to validate and update properties on a class, then draw debug data, but properties won’t ever show their updated values on the editor panel. It was a waste of time on this engine, doing things differently now.
You seem to report a lot of bugs. Do you ever get a response?
From staff? Never ever. Not even when I tag them. The only response I got was when I deleted one post to merge it with another and the question from staff was why I deleted a post…
Figured it’s better to fill up the forums with honest reports than to use their bug report tool where I get no staff response and no community response. It’s sad. I’m a perfectionist so I run into a lot of broken things while I dig in their systems.
I think this “Issues and Bug Reporting” section I post in is quite new, or I did not notice it a year ago, but it makes one hope reports are actually read.