Sometimes, when you add Flexbox4Unity to an existing project, Unity will generate this error in your console:

error CS0234: The type or namespace name ‘EventSystems’ does not exist in the namespace

This is caused by a small bug in Unity itself: they keep changing their internal UI classes in incompatible ways (in 2020 Unity is now onto the third complete rewrite for the Unity UI system, each time they give it a new name and make it incompatible with what they provided before).

Fortunately this is usually easy to fix – you just need to re-import Unity’s own UnityUI library (it’s unfortunate that they didn’t fix this themselves, and do the import automatically).

  1. In the Project view, open the Packages section
  2. Find the “Unity UI” folder
  3. Right click “Unity UI” folder and select “Re-import”

Re-importing should take 5-10 seconds, after which your compiler error should have disappeared.