0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CS0104のエラー解消について

Posted at

はじめに

Unityを触ってたら以下のエラーがでてきました。

Library\PackageCache\com.unity.recorder@4.0.2\Editor\Sources\Helpers\UnityHelpers.cs(155,115): error CS0104: 'Object' is an ambiguous reference between 'UnityEngine.Object' and 'object'

これについて調べたので自分なりの理解を書き留めておきます。

本編

どうやら、エラーの種類で行くと"CS0104"みたいです。

詳しくはこちら(https://learn.microsoft.com/ja-jp/dotnet/csharp/misc/cs0104)にかいてますが、簡単に言うと

お互いの名前空間に同等の指示があって、次それに似たものを参照するコードがあるとき、それはどれに由来する指示なのかということです。

ですが、こんかいunityディレクティブの問題でした。

結論

unity object = UnityEngine.Object; //修正前

unity object == UnityEngine.Object; //修正後

イコールが一本抜けてたみたいですね。

以上です。読んでいただきありがとうございました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?