Search Unity

Resolved [1.0.0-pre.15] Ghost component data not sync to client properly

Discussion in 'NetCode for ECS' started by optimise, Nov 4, 2022.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    It seems like sometimes ghost component that the data field has [GhostField] attribute will sync weird data at client side. Currently I changed 4 regular components to become enablable components at child ghost entity then the ghost component at parent entity I start getting weird data at client side.
     
  2. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    895
    There is an issue with IEnableable component in some cases, but it never affected other components, for what I'm aware of.
    Can you describe what it the ghost setup?
     
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Maybe it's not caused by IEnableable component. The issues of ghost component that the data field has [GhostField] attribute will sync weird data at client side most likely is already exists long time ago before IEnableable component. If u still can't reproduce the issue maybe I can pm my project for u to look at it.
     
  4. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    895
    We have test that validate many of these condition (components on childs, enableable or not). And because we didn't experience any problem with ghost filed replication (well, we had in the past, but they manifest usually in a completely different way, usually deserialisation errors).
    Probably, worth checking the project or snippets of the ghost that is causing that issue
     
  5. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Now at latest 1.0.0-pre.15, it's still have the issue. You can check my project to see issue. If u still can't see the issue I will provide u new update. And also at 1.0.0-pre.15, there's funny issue that when didn't put [GhostEnabledBit] tag at EnableableComponent it's still working that able to sync ghost component data to client but buggy. If I remember correctly, changelog mention that without [GhostEnabledBit] tag it won't sync ghost component data to client. I believe this unexpected behavior also trigger other new potential bug.