Unity-Technologies / UIElementsExamples

Unity project containing examples to use UIElements in the Editor
435 stars 66 forks source link

Missing type or namespace in Unity 2017.3 #16

Closed IsaiahKelly closed 6 years ago

IsaiahKelly commented 6 years ago

The documentation states:

This project is compatible with Unity 2017.3 (currently in alpha).

However, after importing this project into Unity 2017.3.0f3 I receive the following errors:

error CS0246: The type or namespace name `IControl' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `ChangeEvent' could not be found. Are you missing an assembly reference?
Assertion failed: Assertion failed on expression: 'm_CurrentEntriesPtr != NULL && m_IsGettingEntries'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Scorr commented 6 years ago

Can we get some more info on this? Will it be added later?

IsaiahKelly commented 6 years ago

The documentation also says:

Please use the 2017.2 branch for this project to work with the previous Unity release.

But using that branch with Unity 2017.3.0f3 produces a new error:

Assets/Editor/E04_Events.cs(45,31): error CS0305: Using the generic type `UnityEngine.Experimental.UIElements.MouseEventBase<T>' requires `1' type argument(s)

Upon further investigation I've also noticed that the latest master branch ProjectVersion.txt file says

m_EditorVersion: 2018.1.0a1

I was also able to find a download link to 2018.1.0b1, but opening the latest branch in that version still gives the IControl missing type or namespace error. I'm guessing this is because of changes since the alpha.

This all leads me to the conclusion that it's probably best to say far away from this experimental feature until it becomes somewhat stable, since it appears that every minor Unity update breaks it!

Antoine-Lassauzay commented 6 years ago

I've made the necessary fixes for this compile with both Unity 2017.3 and 2018.1 branches.