Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

'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.