I'm trying to create a UIButton at runtime:
NGUITools.AddChild<UIButton>(parentObject);
This throws an exception, as the TweenTarget is not set. I don't see a way to set it, though, as the AddChild call itself throws the exception.
Is there a way to create a new UIButton in a script without causing an exception?
Thank you.