Compiler errors after importing PUN 2

Options
I'm new to photon, unity, and c#, but not to programming in general. Though I've only done basic stuff before, I believe my programming logic is sound and pick up stuff about this quickly. I mostly just need to familiarize myself with some API involved with the three mentioned things.

I've attempted to start making the tutorial project to get myself introduced with some of the script in the photon asset, but I've got 75 compile errors (which is the same 3 errors actually), on a fresh project where I've done nothing else besides importing PUN 2, and I don't know how to fix those. I've never worked with some other guy's code before.

I use unity version 2019.3.0a5 personal and PUN 2 version 2.14. It mostly seems like it's an issue that has to do with compatibility, so as a last resort starting to use some other unity version that works with current PUN 2 would be fine.

The three errors are:
Assets\Photon\PhotonUnityNetworking\UtilityScripts\Debugging\PointedAtGameObjectInfo.cs(13,19): error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
- This CS0234 comes up with the following types or namespaces across the error messages: 'UI', 'EventSystems', both of which should exist in the namespace 'UnityEngine' according to the errors.
Assets\Photon\PhotonUnityNetworking\UtilityScripts\Debugging\PointedAtGameObjectInfo.cs(28,16): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
- This CS0246 comes up with the following types or namespaces across the error messages: 'Text', 'ToggleGroup', 'Toggle', 'IPointerClickHandler', 'IPointerEnterHandler', 'IPointerExitHandler', 'PointerEventData', 'IPointerDownHandler', 'IPointerUpHandler', 'Selectable', 'ScrollRect', 'Graphic'. All of these could not be found.
Assets\Photon\PhotonUnityNetworking\UtilityScripts\Prototyping\OnClickDestroy.cs(46,14): error CS0538: 'IPointerClickHandler' in explicit interface declaration is not an interface
- This CS0538 comes up with 'IPointerDownHandler', 'IPointerUpHandler', 'IPointerExitHandler', and 'IPointerEnterHandler'. Seems related to the CS0246 errors.

How do I deal with these? If I'm missing an assembly reference (doubt I would be missing a directive), how do I add that? If I need to switch to an earlier version of unity, which one should I switch to?

Comments

  • gbBaku
    Options
    Turns out the fault was unity version. It was an alpha version that didn't include UnityEngine.UI and UnityEngine.GameEvents for some reason. Getting the latest stable build fixed the issue for me.

    No compiler errors in unity 2019.2.5f1