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. Dismiss Notice

[Netcode] What's the meaning of GhostDefaultFieldAttribute.Interpolate?

Discussion in 'NetCode for ECS' started by cdm456852, Aug 11, 2020.

  1. cdm456852

    cdm456852

    Joined:
    Nov 21, 2017
    Posts:
    33
    I just set this value to true and false, And then generate the code, and there is nothing that has changed? So I want to know the meaning of this value.
     
    bb8_1 likes this.
  2. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    It means that when applying the snapshot values to the component side we interpolate between the snapshot before and the snapshot after if we don't have the exact snapshot we are trying to apply. Without it we just apply the snapshot before the one we wanted.
    Not all value types support interpolation though, which could be why you are not seeing any changes. It is only supported on float, float2, float3, float4 and quaternions right now
     
    florianhanke, cdm456852 and bb8_1 like this.
  3. cdm456852

    cdm456852

    Joined:
    Nov 21, 2017
    Posts:
    33
    Got it, Thank you so much.