Search Unity

Isssues With C# Objects and GameObjects

Discussion in 'Editor & General Support' started by RandomProductYT, Oct 7, 2020.

  1. RandomProductYT

    RandomProductYT

    Joined:
    Oct 3, 2012
    Posts:
    7
    Hello!

    I'm working in 2019.4.4f1, and I've imported a couple Asset Store assets (both updated this year for >=2019 projects), but both have imported with separate but similar errors.

    In one imported asset, I get "Cannot convert from Object to GameObject" errors. These appear in Editor scripts. This seems like a fairly standard operation, especially for Editor scripts, but I'm getting this error everywhere it appears.

    In the other imported asset, I'm getting "Namespace '<global namespace>' contains a definition conflicting with alias 'Object'" in classes where they have "Using Object = UnityEngine.Object;" at the top of the screen. It seems like this developer found this error and tried to avoid it with explicit aliasing, but the issue is appearing on my machine.

    Because this is affecting multiple, separate imported assets, I'm concerned that it's an issue specific to me and not to the developers of these assets, and I have no idea how to solve it.

    Does anyone have any ideas? Has anyone had this weird issue before?

    Thanks
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Did you create your own script/class named "Object"?
     
    Kurt-Dekker likes this.