# Unlit Mode in packaged game

**URL:** <https://forums.unrealengine.com/t/unlit-mode-in-packaged-game/527900>\
**Category:** Rendering\
**Tags:** unreal-engine, Rendering\
**Created:** [April 14, 2022, 5:49am UTC](https://forums.unrealengine.com/t/unlit-mode-in-packaged-game/527900 "2022-04-14T05:49:02Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![hydr0k](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hydr0k/32/784603_2.png) [@hydr0k](https://forums.unrealengine.com/u/hydr0k)\
**Post date:** [April 17, 2022, 12:21am UTC](https://forums.unrealengine.com/t/unlit-mode-in-packaged-game/527900/8 "2022-04-17T00:21:51Z")

</div>

Hey guys, thought I’d pop in with an update and solution.

I found a solution here: [How to use viewmode unlit in a shipping build? - #5 by Shadowriver](https://forums.unrealengine.com/t/how-to-use-viewmode-unlit-in-a-shipping-build/307143/5) and then added a bit to meet my needs.

In my GameModeBase.cpp I set the ViewModeIndex of the GameViewport to Enum 2 (unlit). The post I linked above has more details on the different modes you can select.

In addition, I disabled tonemappers because they were causing my sprite colours to be too dark. Below is the final GameModebase.cpp:

```auto
#include "KioGameMode.h"
#include "Engine/World.h"
#include "Kismet/GameplayStatics.h"

// Called when the game starts or when spawned
void GameModeBase::BeginPlay()
{
	Super::BeginPlay();

	UGameViewportClient* GameViewport = GetWorld()->GetGameViewport();
	GameViewport->ViewModeIndex = 2;

	APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);

	// The command being executed.
	FString Command = "ShowFlag.Tonemapper 0";
	PlayerController->ConsoleCommand(*Command);

	// The below commands are for the shipping
	// build.
	Command = "r.TonemapperGamma 0";
	PlayerController->ConsoleCommand(*Command);

	Command = "r.TonemapperFilm 0";
	PlayerController->ConsoleCommand(*Command);

	Command = "r.Tonemapper.Sharpen 0";
	PlayerController->ConsoleCommand(*Command);

	Command = "r.Tonemapper.GrainQuantization 0";
	PlayerController->ConsoleCommand(*Command);

	Command = "r.Tonemapper.Quality 0";
	PlayerController->ConsoleCommand(*Command);

}

```

Thanks to those who commented and bumped my topic.

---

_[View the full topic](https://forums.unrealengine.com/t/unlit-mode-in-packaged-game/527900)._
