Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

updated Netcode from 1.0.2 to 1.1.0 - nasty error

Discussion in 'Multiplayer' started by VKyuzel, Nov 22, 2022.

  1. VKyuzel

    VKyuzel

    Joined:
    Mar 6, 2022
    Posts:
    4
    Hello, I get a funny and horrible error after I updated Netcode from 1.0.2 to 1.1.0 --> When I start the server, every object is scaled well, but when I start the client, every NetworkObject gets a scaling automatically like 0.009259259 for x,y,z , anyone encountered the same problem? (the server has the correct scale, the client no!)
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    114
    Hi @VKyuzel , that's pretty weird! Is the NGO update the only thing you changed before finding this issue? Is there anything else changing the scale of your objects in your game?
     
  3. VKyuzel

    VKyuzel

    Joined:
    Mar 6, 2022
    Posts:
    4
    Before to update the library, I pushed everything and I tried again to see if everything was fine.
    About the scaling, I searched into the code every method with "scale" and I have only one but it's working only when I play a card from hand.
    I did a little workaround in this way: every components that are scaled in automatic, I call the method OnNetworkSpawn and I resize them as I found before, not very clean but it is working
     
  4. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    114
    Thanks for the answer @VKyuzel , but I'm not sure i understood: are you saying that everything worked fine right before the update to NGO 1.1.0, and that you didn't change anything else before the scaling issues started apearing?

    Can you try adding a log there, to see if the method is called when the object spawns?
     
  5. VKyuzel

    VKyuzel

    Joined:
    Mar 6, 2022
    Posts:
    4
    1. I didn't change anything before the update.
    2. What and how I should log inside the method "OnNetworkSpawn"? I know how to log with Debug.Log() a variable that I already know, but nothing more
     
  6. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    114
    Sorry, maybe I didn't express myself properly. What I meant was "can you add a log to the method you use to scale objects, so we can be 100% sure that it is not the cause of the scaling at spawn time?"
     
  7. VKyuzel

    VKyuzel

    Joined:
    Mar 6, 2022
    Posts:
    4
    I had only one method that scale but it is never called at the spawn, I debugged it by server and client and I never access (Before update).
    I added the methods to scale at the spawn time after I updated the library, not before. (After update).
     
  8. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    114
    @VKyuzel thanks for checking! I just came across this, is it the same issue you're facing?