I found two omissions when converting the PlayerController
to the new way to be a Singleton<T>
.
The obvious one that is missing in the video is that previously we had this singleton hack in Awake()
where we assigned Instance = this;
which gets replaced by base.Awake();
now.
The second one further up would be that previously we had this definition to turn it into a pseude-Singleton before:
public static PlayerController Instance;
This line has to go as well, since the Instance
property is now definied in the Singleton<T>
base class.