Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to have different characters in unity

Discussion in 'Editor & General Support' started by engelcj, Jun 4, 2015.

  1. engelcj

    engelcj

    Joined:
    May 20, 2014
    Posts:
    122
    I want to make a menu where I can select the character I want to use , such as Crossy Road.
     
  2. Gardes

    Gardes

    Joined:
    Apr 7, 2015
    Posts:
    46
    I want to can fly! :>

    Seriously now, can you explain us where you stucking on?
     
  3. engelcj

    engelcj

    Joined:
    May 20, 2014
    Posts:
    122
    What I want to do is have a menu where you can select my character and call to the scene. I plan to use a list of prefaps and call to the scene with instantiate prefaps, but I think there is a better way to do it.
     
  4. Gardes

    Gardes

    Joined:
    Apr 7, 2015
    Posts:
    46
    In my opinion, your way sounds ok.

    A another way would be to just have ONE character for all the different models.
    You may could script them all into one and just change the animation model by selection.

    Just to clarify, I mean something like this:

    Code (CSharp):
    1.         if (bunnySelected) {
    2.             moveSpeed = 100;
    3.             anim.SetBool ("bunny", true);
    4.         } else if (duckSelected) {
    5.             moveSpeed = 10;
    6.             anim.SetBool ("duck", true);
    7.         } else if (roadrunnerSelected) {
    8.             moveSpeed = 1000;
    9.             anim.SetBool ("roadrunner", true);
    10.         }
     
    theANMATOR2b likes this.
  5. engelcj

    engelcj

    Joined:
    May 20, 2014
    Posts:
    122
    It looks great, I will try, thank you very much.