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