From Unify Community Wiki
Revision as of 11:06, 12 April 2011 by Bunny83 (Talk | contribs)

Jump to: navigation, search

Why a new page? Couldn't you just have updated (and possibly renamed) the old AManagerClass page?--KeliHlodversson 05:58, 12 February 2009 (PST)

This isn't a singleton.

This isn't a singleton. It just provides a global access point to a particular instance. You can create several instances of the class. See for details.

"In computer engineering, the singleton pattern is a design pattern used to implement the mathematical concept of a singleton, by restricting the instantiation of a class to one object"

Well, the class constructor should be private. That way only the class itself could create another instance. Of course, component based manager are quite useful but you can't prevent that the user create more than one instance. What you can do is to destroy any additional instances in Awake() --Bunny83 04:06, 12 April 2011 (PDT)
Personal tools