Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question How to sync object position

Discussion in 'Netcode for GameObjects' started by xtdiwd, Mar 24, 2024.

  1. xtdiwd

    xtdiwd

    Joined:
    Jul 25, 2020
    Posts:
    141

    Sorry, but that's how I feel

    I'm following


    At one point it says to install https://github.com/Unity-Technologi...kages/com.unity.multiplayer.samples.coop#main only I get error because I don't have git installed.
    I DON'T WANT TO INSTALL GIT BECAUSE I WOULD ONLY USE IT FOR THIS PROJECT.
    So I downloaded the project and got a zipper, I extract it, following the instructions, copy Utilities to my asset folder and manually edit manifest.json, yet I still get numerous errors that I didn't get in time to copy. Thinking it was an import problem, I reimport everything. On reopening I get:

    Code (CSharp):
    1. An error occurred while resolving packages:
    2.   Project has invalid dependencies:
    3.     com.unity.multiplayer.samples.coop: No 'git' executable was found. Please install Git on your system then restart Unity and Unity Hub
    4.  
    5. Click on Retry to relaunch Unity and reopen your project.
    6.  
    7. Click on Continue to launch Unity.  Some or all packages may not be imported which may cause compilation errors.
    How do I fix this?


    This is due to the fact that the location of my capsules is not automatically reported.
    • Why is it not automatically reported by NetworkTransform?
    • Why do I have to instal an additional package?
    • Why does the tutorial say to do one thing and then delete it?
    • Wasn't Netcode supposed to be more powerful than the previous multiplayer technique? It doesn't look like it to me.

    Udemy proved impossible to contact.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,909
    Download the multiplayer samples, unpack it in a directory and open it as a unity project (Hub: add project). Do not try to open it in your existing project.

    Then use the samples project that you opened and extract the content that you're supposed to merge. Right click => export package.

    What do you mean by "reported"? You mean the positions don't sync?

    Ask the tutorial author. This should have been a preparation step, not somewhere in between. And if this is only to get some files, those files should be provided to match what was done in the tutorial because the repositories continue to be updated.

    This repo likely no longer matches the tutorial. The tutorial is almost 1.5 years old, it's probably based on Netcode v1.0 or v1.1 but we're currently at 1.8.

    Again, ask the author.

    Don't judge it by the experience from a crappy tutorial.

    Find a more up-to-date tutorial. ;)
     
  3. xtdiwd

    xtdiwd

    Joined:
    Jul 25, 2020
    Posts:
    141
    Theoretically good. Although inelegant. But...
    Trying to open it from the Hub gives the same error about no git, but I went ahead.
    I should extract the Utilities folder from Packages, but it doesn't show up in Unity! How can I export package?

    Yes, "sync" is a better word. :)

    Wait, isn't that standard procedure? This is at least the second tutorial that tells me to do that.

    :confused: This is the most up-to-date tutorial I could find. And I no longer count how many tutorials I have tried. This explains the opening image.

    Well... it's not the first word that comes to mind but it's the first elegant one
    1. What is the standard procedure that requires fewer unofficial components?
    2. Is there an official Netcode tutorial?
    I saw https://docs-multiplayer.unity3d.com/netcode/current/tutorials/helloworld/ but, quote