- Home /
Change objects using script
Hi! I am a beginner at scripting, and i am starting to learn C# and Javascript, but i want to make a script and i don't know how.
I have a "Character selection" scene for my game, and i have a few models and two arrows. I want to do something that changes some prefabs in the game when i press the right arrow.
Example:
There's a guy with red shirt and blue jeans in the scene, and there is a image on canvas written "Guy 1". I want to make something that when the player clicks on the right arrow, the guy changes to another one, with another image. Can someone help me? I would really appreciate if anyone could :D
Answer by Dinosaurs · Aug 05, 2016 at 04:29 AM
This is an incredibly vague question; rather than asking this sort of thing Unity Answers, which basically amounts to "please write this script for me" you should review the Unity UI documentation which will provide all the information necessary to implement this.
https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/the-new-ui