Search Unity

Switching Between Characters

Discussion in 'Getting Started' started by unity_0D3xqHrJWNie6Q, Sep 24, 2018.

  1. unity_0D3xqHrJWNie6Q

    unity_0D3xqHrJWNie6Q

    Joined:
    Sep 24, 2018
    Posts:
    8
    I am new to unity and wanted to make a 2D game. I want to be able to switch between different characters. I was wondering is there a way to do this in unity if so how.
     
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,025
    Depends on how your game is set up. What does the player control script look like?

    Commonly, there is an input script (where you get all the inputs from the player) which holds a reference to a character script (which exposes methods that can be called to pass input values to the character). Then, by loading a different character script, the player can control a different character.

    If all of this sounds complex to you, I highly recommend checking out Unity's Learn section, and going through their tutorials and examples to see how they do things like controlling a character, and then modifying things to make the game do what you want it to.
     
    JoeStrout likes this.
  3. unity_0D3xqHrJWNie6Q

    unity_0D3xqHrJWNie6Q

    Joined:
    Sep 24, 2018
    Posts:
    8
    I also have Unity Playmaker installed.