Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't change viewmodes in packaged build (not allowed on consoles by default)

I'm using UE 4.14.1 (source) and can't seem to use the any of the viewmodes in a packaged build (Unlit, Wireframe, Shadercomplexity, etc...). All the Viewmodes work in the editor but in a packaged build when I type in the command "viewmode Unlit" I get the console message:

"Debug viewmodes not allowed on consoles by default. See AllowDebugViewmodes()."

Unfortunately there isn't any documentation for AllowDebugViewmodes() and there isn't any options to change it in the Project Settings or Editor Preferences. I've tried it with Build Configuration set to Debug, Development, and Shipping. I've also enable "Include Debug Files" in the Projects Settings.

I'm trying to use the viewmodes to troubleshoot some frame drops for Linux build. Any help would be greatly appreciated.

Product Version: UE 4.14
more ▼

asked Jan 05 '17 at 03:18 PM in Packaging & Deployment

avatar image

51 8 10 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello sanford87,

From looking up the function itself in my source build, which can be found in ShaderCore.cpp, it seems that you need to set something in an .ini file for this to work. The following comment is in that function's code:

 // To use debug viewmodes on consoles, r.ForceDebugViewModes must be set to 2 in ConsoleVariables.ini

Are you packaging for Linux when you get this message or are you trying to package to a console? If it's for Linux then this may be a bug but I'll need to ask someone about the intended functionality.

more ▼

answered Jan 06 '17 at 03:51 PM

avatar image sanford87 Jan 06 '17 at 04:49 PM

Thanks for the response. Wow, I never would have found this.

I think it is a bug because I've only been packaging to Windows and Linux. I've been reading through the ConsoleVariables.ini but I'm a little confused on how it works. I've tried adding "r.ForceDebugViewModes 2" uncommented to the ConsolesVariables.ini with no luck. I've also tried running the command "r.ForceDebugViewModes 2" in the console but I get the error:

Error: r.ForceDebugViewModes is read only!

Thanks again for the quick response.

avatar image sanford87 Jan 06 '17 at 05:42 PM

I got it fixed and found the answer in this forum post thank you so much for the help. Just pointing to the ShaderCore.cpp gave me something more to look into.

I simply added: r.ForceDebugViewModes=1

to the DefaultEngine.ini under the [RenderSettings]

avatar image olim_simon Dec 14 '17 at 01:42 AM

Really helped, works perfectly. Thanks for the solution!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question