Search Unity

Multiplayer using a custom character builder scene

Discussion in 'Multiplayer' started by Jschilz1, Mar 23, 2018.

  1. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    I created a custom character creator using UMA that allows the player to set different looks for their player. that being said i cant seem to get the custom player to load into a new scene, I am able to save it to a string and no matter how i try to save it weather to a file or a static object im having issues loading the custom player correctly it cont to load in a default prefab. I confess when it comes to networking i am new to learning and while i learn fast there doesn't seem to be a lot of documentation on custom players.


    now if i load in the same scene without multiplayer i can use _avatar.LoadFromRecipeString(myRecipe); to load my player. can someone please help me figure out what i am doing wrong using UNet. I am even willing to pay for a basic lesson on this issue to fully understand it. if that is what it will take just message me and we can figure out whats fair. otherwise Please Help me figure out the process


    Thank You in advance
     
  2. dasouth

    dasouth

    Joined:
    Nov 21, 2016
    Posts:
    10
    Ha, I'm in the same situation as you but been busy with some other stuff so haven't figured it out yet.

    I think we'll need a syncvar to sync the dna string to other clients.


    This is what Jamie replied to me in the UMA thread....

    dasouth said:
    Hi,

    I'm new to UMA & have been following Secret Anoraks awesome tutorials on YT & all is working well.
    My next step would be to save the dna to a mysql db, however there doesn't seem to be much info about this subject.
    Could anyone point me in the right direction (info/links or somethig)?
    My main question atm is in what format to save it, should it be done as text file, string, should I look into JSON?

    Thx in advance,
    Das


    If you're following Secret Anoraks latest tutorials, you'll be using a DynamicCharacterAvatar. You can save the avatar to a string with the GetCurrentRecipe() function. You can store that string in your DB as is. Then when you restore your avatar, use LoadFromRecipeString() (if you're using an avatar that is already created). If you're creating a new avatar in code, use SetLoadString().