コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Script 'CharacterController' has the same name as built-in Unity component.

Script 'CharacterController' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.

「CharacterController.cs」というスクリプトを作成すると
上記の警告が出力されます

これはUnityが標準で「CharacterController」というコンポーネントを用意しており
名前が競合してしまうためです