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 :smile:

Store a reference in a script to an array of the currently active and deactivated instances of your prefabs. Create two methods in the script to disable the currently active instance and enable the next or previous deactivated instance based on which button is clicked. You can then assign your button’s OnClick event to the relevant method.

might be of interest, upcoming live training: http://unity3d.com/learn/live-training/session/character-select-system-scriptable-objects