This member has provided no bio about themself...

Comment History
TimeJockey
TimeJockey - - 1 comments @ Delegates, Events and Singletons with Unity3D – C#

There are a couple issues you're going to run into with this solution

The singleton doesn't clean up after itself - you need to make sure to clear the static variable on destroy of the singleton. If you reload the scene with this singleton in it, you're going to be attempting to access a destroyed version of it.

You'll run into init order problems. You're accessing the singleton instance in awake. Awake should only be used for accessing things to do with yourself, you can't rely on the awake of your singleton to be called before GoldPile awake.

I normally use static events when dealing with singletons. You just need to be careful any anyone attached to a static event is detached on destroy, or you can end up keeping GOs alive much longer than you expect them to be.

Good karma+1 vote