Talk:JukeboxController

From Unify Community Wiki
Jump to: navigation, search

Hey Can anyone tell me what I apply this script 2? Ta Targos



It looks like it should be attached to an empry game object... although that conflicts with the usage: comment at the top of the class, which tells that you should use the new operator to create a new instance. This can not be true, as one should never call new to create MonoBehaviour objects. (Either the comment is wrong, or the class should not inherit from MonoBehaviour)

Maybe the original author might add a description and a usage example at the top of the article?

--Keli

Keli is correct -- this class was not supposed to extend MonoBehavior. It should be instantiated and carried in a main game controller object. I have removed the reference to MonoBehavior and am working on description text. -Tom

You still have an Awake method. Wouldn't it be better to place the code inside the Awake method into a constructor, since Awake is no longer invoked automatically when the class does not inherit from MonoBehaviour? --KeliHlodversson 07:27, 26 September 2006 (GMT)

Details, details. ;-) -Tom

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox