Link to home
Start Free TrialLog in
Avatar of xenonn
xenonn

asked on

Loading external textures to NGUI UI in Unity3D?

I'm using NGUI for my UI in a game that I'm buidling in Unity3D; I'm new to Unity3D. Currently, all my textures are packed into a giant sheet of texture atlas through NGUI's editor tool.

However, I'm starting to realise that in certain parts of the UI, I need the textures to be loaded externally so that when I want to add a new thing into the game, I don't have to recompile the whole game.

For example, I have a button on the UI that represents an in-game item. The button has an icon image of the in-game item on it. Chances are that along the way, I would add new items into the game which players will see on their inventory UI. Therefore, it will be great if I could add the icon image of the in-game item as a texture into the game without having to recompile the whole game, perhaps through an external png file which the game could load from. However, I cannot figure out how I could do this in Unity3D. How can I achieve this in Unity3D? Examples with codes to illustrate the solution will be good.
Avatar of Dan Violet Sagmiller (He/Him)
Dan Violet Sagmiller (He/Him)
Flag of United States of America image

Avatar of xenonn
xenonn

ASKER

This one looks like it is for loading textures remotely. I intend to load textures locally. I tried to change the address to a relative local address but it doesn't seem to work.
ASKER CERTIFIED SOLUTION
Avatar of Dan Violet Sagmiller (He/Him)
Dan Violet Sagmiller (He/Him)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial