「Unity/実機/共通」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→実機とpreviewの縮尺を統一) |
(→アプリ名変更) |
||
| 行18: | 行18: | ||
ProjectSettings/ProjectSettings.assetのproductNameを直編集でも大丈夫 | ProjectSettings/ProjectSettings.assetのproductNameを直編集でも大丈夫 | ||
| + | |||
| + | ==開発ビルド環境切り替え== | ||
| + | PlayerSettingsのDevelopmentBuildにチェックをつけて、ビルドすると、 | ||
| + | 環境変数のDEVELOPMENT_BUILDが、trueになる | ||
| + | <pre> | ||
| + | #if DEVELOPMENT_BUILD | ||
| + | Debug.Log("DEVELOPMENT_BUILD on"); | ||
| + | #else | ||
| + | Debug.Log("DEVELOPMENT_BUILD off"); | ||
| + | #endif | ||
| + | </pre> | ||
2023年10月20日 (金) 15:06時点における版
目次
The maximum number of apps for free development profiles has been reached.エラー
3つ以上開発用アプリを実機に入れるとエラーとなるので、何個か開発用アプリを削除すればよい。
プロジェクトを変更したときのファイル
AndroidのpackageNameなどは ProjectSettings/ProjectSettings.asset の applicationIdentifier に入ってる
icon変更
android
- BuildSettings/android/PlayerSettings/icon
- api26,api25,legacyをすべて変える
アプリ名変更
- BuildSettings/PlayerSettings/ProductNameを変更
ProjectSettings/ProjectSettings.assetのproductNameを直編集でも大丈夫
開発ビルド環境切り替え
PlayerSettingsのDevelopmentBuildにチェックをつけて、ビルドすると、 環境変数のDEVELOPMENT_BUILDが、trueになる
#if DEVELOPMENT_BUILD
Debug.Log("DEVELOPMENT_BUILD on");
#else
Debug.Log("DEVELOPMENT_BUILD off");
#endif
