Forum rules - please read before posting.

Switching players on the fly via a downloaded prefab?

I'm wondering if there is a way to put a number of player prefabs on a cloud service then allow players to choose on of them to use when they start a game. ie: Can I display some player icons, then user click on one, download a prefab and then do a player switch?

Any comments?

Thanks in advance.

Comments

  • The downloading and assigning would naturally be handled via custom scripting, and you can modify Manager fields at runtime (in this case, the Player prefab slots). For example, to assign the prefab in slot "2":

    KickStarter.settingsManager.players[2].playerOb = myPlayerPrefab;
    

    However, my understanding is that prefabs are an "Editor only" concept - you can't create new player prefabs at runtime, at least so far as I'm aware.

    The better approach may be to just rely on one Player prefab, and modify it instead of swapping it. On a basic level this could be as simple as changing e.g. their Material's Texture, but a dedicated system could add/remove accessories etc. AC wouldn't be involved what that, however.

  • Okay thanks for the info.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.