Char select / GUI button question.

Hey guys,

I've created a screen of character picture buttons

I want these buttons to correspond with a gameobject. Then I want said gameobject to be taken into the next scene on click.

I'm in a pretty big rush to get this finished, any help would be highly appreciated.


as i understand u basically have gui buttons with texture of character pictures and when you click on these pictures you want it to load next scene? if yes control of your gui button is as follows;

public Texture picturetexture;

void OnGUI(){

if(GUI.Button(new Rect(10, 10, 50, 50), picturetexture))
Application.LoadLevel(1); // in bracket you type your scene name or level number


Take a look at GameObject.Active

When you are showing your GUI buttons, deativate all your characters, and when you click on the relevant GUI button, simply activate the character/camera in your scene you want to play with.

I suggest that you look into key binders, like the one in the bootcamp demo for the gun manager. That way you could make a spot for the icon, and the gameObject. After that, use don't destroy on load. Recap: there is a key binder that has spots for a gameobject and an icon, and when the player presses the gui button, it adds a dontdestroyonload script. Good Luck :)

ps: when you are done with your immediate problem, you should edit you question so that it doesn't say "Urgent"