Welcome,
Guest
. Please
login
or
register
.
June 14, 2026, 02:28:17 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to create Image buttton DYNAMICALLY
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to create Image buttton DYNAMICALLY (Read 4277 times)
basil_11
Guest
How to create Image buttton DYNAMICALLY
«
on:
October 16, 2012, 09:25:17 PM »
I'm new in NGUI and I want to create UIImageButton Dynamically after clicking a Button.
can you please give me some tips or sample codes on how to do it thanks!!!
Logged
Nicki
Global Moderator
Hero Member
Thank You
-Given: 33
-Receive: 141
Posts: 1,768
Re: How to create Image buttton DYNAMICALLY
«
Reply #1 on:
October 17, 2012, 02:11:53 AM »
You add the relevant components and collider to the gameobject you want to become a button.
Or you use NGUITools.AddChild with a reference to a prefab where you have designed the button already.
Logged
basil_11
Guest
Re: How to create Image buttton DYNAMICALLY
«
Reply #2 on:
October 17, 2012, 02:30:48 AM »
Thanks for the tips.. can you give me some Sample scripts? I'm just new in NGUI
Creating a UIImageButton using a program/Script
Logged
Nicki
Global Moderator
Hero Member
Thank You
-Given: 33
-Receive: 141
Posts: 1,768
Re: How to create Image buttton DYNAMICALLY
«
Reply #3 on:
October 17, 2012, 04:21:57 AM »
Make one with the widget tool (top menu: NGUI->Create a widget) and see what components it puts on it, then you can recreate the same in code with a helper script.
Or look at the examples provided with the package.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to create Image buttton DYNAMICALLY