Execute Console Command not working in Construction Script
Hello everyone, thanks for your attention.
I am currently writing a blueprint only graphic settings menu (hopefully to be submitted to the marketplace in a few days) in which I would like to be able to execute console commands in the constructor graph which doesn't seem to work.
The reasoning is that I want to give an option that lets people tweak their graphic settings inside of the editor and assign them to certain save files just like my menu currently allows for in PIE in case they wanted different settings for different scenes while working on their levels. This will not only help people with graphics profiling but also give more control over graphics settings inside of the editor than the engine scalability settings allow for.
My analysis is that, since command lines are routed through player controllers (even if a certain reference is not specified) executing them in a construction script doesn't work since the constructor script fails to find the necessary controller reference given that a player doesn't exist in the construction phase inside the editor. However I keep thinking that there should be a workaround for it since it is basically the same thing as actually writing the commands in the console when in the editor. Maybe I'm overseeing something very simple here, such as a reference to plug to the execute node's "specific player" pin.
To sum up I would like to find a way of executing console commands in construction scripts if it can be done; and if it can't be done I would like to be sure so I try implementing the same functionality by other means.
You can check this behavior easily by creating an actor blueprint, assigning an "execute console command" node to its construction script, entering in a command line (naturally I'm working with the r. commands but any other won't work either), dropping this actor in your level and doing anything that fires its constructor such as moving it around. This is present in both 4.6.1 and 4.7 preview. Sorry for the long wall of text, wanted to be specific : ) Thanks in advance !
I don't believe the construction script of an object would be the best place to implement this feature. A construction script is only updated on move, rotate, and scale while in the editor, not during play. The only time it fires during play is when the object is spawned in. Both of these methods are working correctly in 4.6.1 & 4.7.0.
To test this:
I suggest creating this functionality in a level, widget, or game mode blueprint.
answered Jan 20 '15 at 09:34 PM
TJ V ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here