In Unity when I write Debug.Log(“ ”) it has an error saying that there is a difference between UnityEngine.Log and System.Log. How do I fix this?

最后都变了- 提交于 2021-02-11 15:19:02

问题


It says there is an ambiguous difference between UnityEngine.Log and System.Log and won't print anything. How do I fix it?

I am sorry that people didn't like my question. I am just a new game dev looking for help.


回答1:


Your simplest solution is just to always type, in that script:

        UnityEngine.Debug.Log("yo !!");

In general if it tells you "blah blah .. difference between AAA and BBB ..."

Simply add either AAA. or BBB. in front of the command in question!

(It is usually the "Unity" one you want.)

I wouldn't bother trying to understand it more than that for now, until you are more familiar with it.

It relates to the things you write up the top of the script with "Using...".



来源:https://stackoverflow.com/questions/63251834/in-unity-when-i-write-debug-log-it-has-an-error-saying-that-there-is-a-diff

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!