Search Unity

Unet Sync player prefabs childs

Discussion in 'UNet' started by Cafn, Feb 1, 2016.

  1. Cafn

    Cafn

    Joined:
    Jan 8, 2015
    Posts:
    19
    Hi there.

    So i'm starting to imeplement my RTS game, but never worked with networking before. I've set up everything just like I saw on some tutorials, and right now i have the following prefab:



    so PlayerNetwork is the prefab that it is instanciazed every time a client joins in. It has a Units Empty gameobject which all player units will go into there. Same thing happens to buildings. Other two doesn't matter for these, as they wont be sync.

    Basicly, I got my Userinput function in PlayerNetwork. It has all the mouseclick methods. All I wanted to do right now was to select the worker and send it to another position.

    I've tried network identity on worker, on playernetwork, on both, and can't get them to be sync.

    Is there anything on code that must be done, or for now, can it be easly done by this?

    Thanks for your help