5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UE4 Build.cs機能メモ

Last updated at Posted at 2016-02-26

最適化を行う

Hoge.build.cs
public class HogeModule: ModuleRules
{
	public HogeModule(TargetInfo Target)
	{
        	this.OptimizeCode = CodeOptimization.Never; // 最適化を防ぐ

		.... (以下略
  • 最適化用の列挙値
列挙値 説明
CodeOptimization.Never 可能な場合は最適化しない
CodeOptimization.InNonDebugBuilds 非デバッグビルドでコードは最適化されるべきです
CodeOptimization.InShippingBuildsOnly シッピングビルドでは最適化されるべき
CodeOptimization.Always コードは常に可能な場合に最適化されるべきです
CodeOptimization.Default ゲームモジュール:InNonDebugBuild それ以外:Always

GithubのURL:RulesCompiler.cs

.Net機能を使う

.NetのConsole機能などを活用出来る為、ユーザー名を使ったりして特定のユーザーのみ最適化を防ぐ等が出来ます。

Hoge.build.cs

if( Environment.UserName == "山田太郎" )
{
	this.OptimizeCode = CodeOptimization.Never; // 指定のユーザーの時のみ最適化を防ぐ
}
	
Console.WriteLine("ログも出せます");
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?