'UnityGenerated' does not exist in the namespace 'Unity'

I have been scanning the general Net for answers to this:- Error CS0234. I really think it must be something extremely obvious or my set up is not correct. I recently updated and downloaded some stuff. I am using Unity version 5.5.0b-7 (Personal) to get the use of 'WorldAnchorStore' features. I just downloaded the latest HoloToolkit-Unity and reimported it also. The problem comes when Unity creates an App.cs script which it seems to automatically generate or modify when it launches from Unity using the 'Build Settings/Build' key. This is the problematical code which it creates:-

        private void SetupOrientation()

What am I doing incorrectly here?


Best Answer


  • UnityGenerated.cs is a class that Unity will create for you under UWP\ProjectName

  • Looks like this error is back again.
    You can update App.cs to have a:
    using Unity;
    and then remove Unity as qualification level on the SetupDisplay() statement:

    private void SetupOrientation()

  • it happens when you Project end with "Unity" then your root namespace will be a distraction to compiler

    for example your root namespace is "FPMV.Unity" (my case now) , compiler cannot find "UnityGenerated" in "FPMV.Unity"

Sign In or Register to comment.