Unity-Technologies / EditorXR

Author XR in XR
Other
930 stars 167 forks source link

Error importing Editor VR #465

Closed SoundGuy closed 6 years ago

SoundGuy commented 6 years ago

I'm using Unity 2017.2.0p3 Imported Package 0.1.1 and i'm getting these errors:

Assets/EditorVR/Scripts/Core/EditorVR.Tools.cs(130,42): error CS0311: The type MainMenu' cannot be used as type parameterT' in the generic type or method UnityEditor.Experimental.EditorVR.Core.EditorVR.Menus.SpawnMenu<T>(UnityEngine.Transform)'. There is no implicit reference conversion fromMainMenu' to `UnityEditor.Experimental.EditorVR.IMenu'

Assets/EditorVR/Scripts/Core/EditorVR.Tools.cs(131,43): error CS0266: Cannot implicitly convert type MainMenu' toUnityEditor.Experimental.EditorVR.IMainMenu'. An explicit conversion exists (are you missing a cast?)

Assets/EditorVR/Scripts/Core/EditorVR.Tools.cs(132,33): error CS1502: The best overloaded method match for `System.Collections.Generic.Dictionary<UnityEditor.Experimental.EditorVR.IMenu,UnityEditor.Experimental.EditorVR.Core.EditorVR.Menus.MenuHideData>.this[UnityEditor.Experimental.EditorVR.IMenu]' has some invalid arguments

Assets/EditorVR/Scripts/Core/EditorVR.Tools.cs(132,34): error CS1503: Argument #1' cannot convertMainMenu' expression to type `UnityEditor.Experimental.EditorVR.IMenu'

SoundGuy commented 6 years ago

Neverting it turns out that it is because i had a MainMenu class in my game :/

mtschoen-unity commented 6 years ago

Well that's odd! Did you somehow add a using for your namespace to Tools.cs? I was under the impression that as long as we had it in our own namespace we would avoid this issue. I hope you are able to still use EditorXR in your project?

SoundGuy commented 6 years ago

this is my entire code for that file (that was empty)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MainMenu : MonoBehaviour {

    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {

    }
}

EditorXR is running - but very poorly. with 10 FPS or less, i can't do anything in it i get motion sickness as soon as i put Oculus on.