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

Bug Predicted spawn classification failing in Editor

Discussion in 'NetCode for ECS' started by ts_headfirst, Oct 3, 2023 at 2:42 PM.

  1. ts_headfirst

    ts_headfirst

    Joined:
    Aug 1, 2023
    Posts:
    3
    I have spent an awful lot of hours trying to figure out why predicted spawns were not properly classified.
    It appears the sole reason is that this does not work consistently in the Editor, once compiled there are seemingly no issues.

    Attached is a project with a simple setup a spawner that shoots out spheres.
    Th sample will predict one sphere but also shoot a purely interpolated version to make it obvious where the client predicted sphere is in relation to the actual sphere on the server.

    When run in the editor with the Entities Hierarchy tab active, the prediction classification will fail most of the time, as can be seen in the console.
    The reason being that the list of predicted spawns is empty even though it clearly shouldn't be.

    If the Entities Hierarchy is deselected, classification completes successfully.
    The issue is clearer if the latency is set to something like 40ms.
     

    Attached Files:

  2. NikiWalker

    NikiWalker

    Unity Technologies

    Joined:
    May 18, 2021
    Posts:
    209
    Hey! Thanks for the detailed report and repro.
    Can you file this as a Unity bug report (via the Editor) and link that IN-XXXX here, please?
    Please make the title include both "Entities Hierarchy" and "Netcode". Thanks!
     
  3. ts_headfirst

    ts_headfirst

    Joined:
    Aug 1, 2023
    Posts:
    3
    Done, the id is IN-56679 :)
     
    Last edited: Oct 4, 2023 at 9:42 AM
    NikiWalker likes this.