I wanted to add Game game to the script globals but it only accepts PixelGameObject which class Game is not.
I thought I could just inherit a base class PixelObject, but I forgot that inherited Monobehaviour will not work with the messaging system (e.g Awake, OnEnable, Start, Update, etc.)
To fix it I could have used dynamics but I wanted to control which classes could be added so I made a Interface IPixelObject that can be added.
I fixed the bug.
I wanted to add Game game to the script globals but it only accepts PixelGameObject which class Game is not.
I thought I could just inherit a base class PixelObject, but I forgot that inherited Monobehaviour will not work with the messaging system (e.g Awake, OnEnable, Start, Update, etc.)
To fix it I could have used dynamics but I wanted to control which classes could be added so I made a Interface IPixelObject that can be added.