Jump to content

error CS0117: 'Display' does not contain a definition for 'main'


hydrazkiller

Recommended Posts

SpawnerEditor.cs


Hello I have current unity 2022.3.4f1 version. I have the latest Gaia Pro version 2021. However, I have this issue and I have no idea how to fix it

Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs(2721,125): error CS0117: 'Display' does not contain a definition for 'main'

Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs(2721,155): error CS0117: 'Display' does not contain a definition for 'main'

Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs(2725,127): error CS0117: 'Display' does not contain a definition for 'main'

Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs(2725,157): error CS0117: 'Display' does not contain a definition for 'main'

Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs(2733,130): error CS0117: 'Display' does not contain a definition for 'main'

Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs(2733,160): error CS0117: 'Display' does not contain a definition for 'main'
 

Link to comment
Share on other sites

Hi @hydrazkiller, this kind of error is usually caused by another asset or one of your own scripts overriding classes in the common namespace. In this case, it looks like something is overriding the unity class "Display". Gaia tries to access this class to figure out your screen resolution, since the class is ovrerridden with something else the code does not compile anymore.

To find out what it could be that overrides the class, please double click on one of the error messages so that your code editor opens up, and hover over the term "Display". It should normally point to "UnityEngine.Display", but I assume in your case it points to a different definition. If you right-click on Display, and select "Go To Definition" it should open the code file where the overriding definition is being made.

If it is another asset, you would need to contact the developer of that asset, as this could cause issues in other projects as well, not only with Gaia.

If it is your own code, you would need to wrap it into a namespace to ensure it does not cause issues with 3rd party assets.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...