viewmode unlit command not working on packaged project

It’s pretty much all in the title. When I execute the console command “viewmode unlit” whether it’s on event begin play or on a keypress it works just fine when I’m in the editor but when I package my project it doesn’t work at all.

Since it’s working when I’m in the editor I just can’t find any explanation other than having to change something in the project settings which is unlikely so anyone has any ideas?

Hey MuFeR,

The viewmodes are in Editor tools that are meant to debug your game/project so when you go to package, it runs as expected and is optimized. This is why we suggest you test in standalone mode and disable ‘Realtime’ in viewport when debugging for performance in order to closely resemble the final environment.

If you have further questions, please let me know.


Thanks for the clarification. So is there any other way for everything to look like the “unlit” viewmode? I tried setting all the materials to unlit and connecting the textures to Emissive Color which is close but I still see a small difference between lit and unlit. Same thing as the person reported in this link in his second image.

No problem. The hard part about matching the Unlit mode is going to be getting all of your post processing and shadows disabled. Anything that has to do with lighting is going to need to be removed, so all you have are the Base/Diffuse Color contributions from your materials.

You will essentially need to disable your post processing, set all of your materials to Unlit mode, and disable shadow casting. This is going to get you as close to the Unlit mode that I know how to do.


but unlit mode has ambient occlusion right?
anyways there inst a easier way to do that? I mean… its so easy on editor.
Its kind of strange to have to change all materials, post effects and everything on a higher level when would make so much sense to disable lighting on the render engine at a lower level like the editor do.

I’m in a similar position but with detail lighting. Is there definitely no way to force the view mode in the packaged game? I’ve tried to match detail lighting for a bit now and it’s never quite the same.

Hey CaptParis000,

Unfortunately the viewmodes are specific to the editor tools and it is going to take some custom setup within your materials and scene to replicate these viewmodes. They are still accessible if you launch using Standalone, PIE, or Play in New Editor Window.

Viewmodes are used as a sort of debugging tool so you can fix things before you package your project. They can also be used to help increase performance when doing things like painting or sculpting a landscape.


The answer is to go to your projects Config Folder and open up DefaultEngine.ini
Under the [RenderSettings] or [/Script/Engine.RendererSettings] add the following:

Now your viewmode console commands will work in a packaged game.