Log in or register to post comments

UI Button to change textures

October 17, 2016 - 11:53am #1

I'm VERY new to all of this (as in about 1 month new), so please pardon my ignorance. Is it possible to have a UI button change textures on an object when clicked? For example, I have a car in my scene with "Texture A". What I'm hoping to accomplish is that the model will change to "Texture B" when the user clicks a button, and then "Texture C" when they click it again. I'm hoping someone can give me a solution as a "yes, that's possible" won't be very beneficial since I wouldn't even know where to begin.

 

Thanks!

UI Button to change textures

October 18, 2016 - 1:20am #2

I am not sure wether vuforia would be super happy with changing colour as the image targets are kinda paired to a certain marker in unity or what you are using. (I assume Unity).

 

In just a scene to change the texture with the button shouldn't be much of a hassle as long as you know the textures and so on. In order to do it with a button it should just be able to be done with a script. If you have a button on your UI, you then attached said script and select "On click" and in the list go for the variable you have put together. The script itself shouldn't be too hard to put together (have a look at the Unity 3D forum).

Log in or register to post comments