1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【UnityC#】自分用の.editorconfigメモ

Last updated at Posted at 2025-08-20

はじめに

プロジェクトでコード規約などがあり慣れていなくても従う必要があります。
仕事をしていれば当たり前ですね。

自分用の.editorconfig

C#ファイルの作成設定

.editorconfigであるように改行コードはLFにしたいためUnityからのC#ファイル作成時にデフォルトでLFにする設定をします。

手順

EditProject SettingsEditorLine Endings For New ScriptsModeUnix
スクリーンショット 2025-08-20.png

補足

今回の.editorconfigはこうしたほうがいいとかではなく個人的にこんな書き方やルールが自分の癖になってしまっているというものをまとめたものです。

また、
外部アセットまで含めないようにする必要があります。
そのため今回は対象をAssets/Application/Program/**/*.csとしてそこに自作ファイルを追加していく前提となります。
※.editorconfigの12行目あたり

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?