1
NGUI 3 Support / Dynamically creating a UIButton throws an exception
« on: May 19, 2014, 10:21:28 PM »
I'm trying to create a UIButton at runtime:
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.
- 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.

