Skip to main content

205. Unity3d Tutorial - Creating A Player Singleton

See video

In this Unity3d game development video tutorial, we will go over the basics of a singleton class in Unity as we start to reconstruct our PlayerCharacter.cs script to be one.

Tags:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
StephanLome's picture
Offline
Joined: Sep 23 2011

:) This was the hardest video for me to get through so far.

I had two monster issue that I figured that I'd pass on just in case someone else runs into the same thing.

1) Rather then deleting __GameMaster like I should have, I disabled the scripts. This caused so many odd errors because of the script conflicts until I finally just did it. I spent HOURS trying to figure out why my scripts were borked before I traced it back to _GameMaster calling up a duplicate of the model I was using. My fault, lesson learned.

2) Near the end (14:30 or so), Petey declares a new function called Public Static DisplayWeaponMountName() or something simular. I kept getting a return type error that drove me nuts. For whatever reason, the compiler let Petey get away with one here and wasn't as kind to me. After spending a self depreciatingly long time trying to figure out what I had down worng, I finally resorted to dropping in a Void return type to get the compiler to let me see the Debug.Log message.

:) Then all of that was deleted 1 minute later.

Anyhow, I hope my pain saves someone else some time.

-S

-StephanLome