Setting Custom Console Variables from Command Line
So I'm wondering if there's a way to do this that's simpler than my current method. Let's say I have two machines that are running from the same install of UE4 ( let's assume it's on a shared network drive that both have access to ). What I want to be able to do, is pass a command line argument to each instance when I start them to set a specific console variable to a value that's different per machine.
As a contrived example, let's say the variable is "r.ControllerType" and on one machine I want "Xbox360" and on the other I want "PS4". I know what I COULD do, is create two custom ini files for each machine and use a command line to load those custom ini files instead of the normal ones, or I could have a custom c++ function that can be used as a command line minus command to set the data.
I was hoping there's a simpler way to set these console variables, that could hopefully be as simple as adding "r.ControllerType="Type"" or something along those lines. I want to avoid editing INI files as much as humanly possible, and I'd also like to avoid writing custom c++ code to allow this type of workflow for every new console variable I create.
Thanks for any help!
asked Aug 25 '15 at 11:12 PM in Using UE4
To directly answer your question, the docs are here for adding your own variable like this:
But then you'd have to register for changes, or poll the variable. You could make a console function instead of a variable. There are a few classes where an
Then when you type in the console
Follow this question
Once you sign in you will be able to subscribe for any updates here