「Unity/開発環境/UnityEditor」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→UnityEditorを実行しなくても実行するパラメータ) |
(→define判定) |
||
| 行17: | 行17: | ||
==define判定== | ==define判定== | ||
| − | #define APP_LOG_TRUE | + | <pre> |
| + | #define APP_LOG_TRUE // これをコメントアウトするとログが出なくなる | ||
#if APP_LOG_TRUE | #if APP_LOG_TRUE | ||
Debug.Log("hoge"); | Debug.Log("hoge"); | ||
#endif | #endif | ||
| + | </pre> | ||
2024年10月29日 (火) 02:53時点における版
UnityEditorのPlayボタンのビルドが遅い場合
ProjectSettings/ProjectSettings.assetの productName:の文字列を変更すると、30秒→5秒に縮まったことがある。
UnityEditorを実行しなくても実行するパラメータ
[ExecuteAlways]
[ExecuteAlways]
public class SafeArea : MonoBehaviour
{
public void Update() {
Debug.Log("update");
}
}
define判定
#define APP_LOG_TRUE // これをコメントアウトするとログが出なくなる
#if APP_LOG_TRUE
Debug.Log("hoge");
#endif
