Updating the PlayerController for the Singleton<T>

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.

2 Likes

This one is a little ahead as to where i am for this so i will ping @Stephen_Hubbard on this one for now.
If i get to the lecture before he has chance to address it i will add this to my notes :slight_smile:

Edit :- I see what you mean now the code has been removed off camera.
I will get this one added to my notes for Stephen.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms