InvalidOperationException: Prefab <id> has not been added to the ObjectTable

Options

I'm getting the above error when starting a networked game on a client that was built using Jenkins. I don't get this exception when running a game in the Unity Editor. Can this be resolved by forcing the Jenkins build to rebuild the prefab table, or is there some way to debug why this is happening?

Best Answer

  • Rafalfaro
    Rafalfaro
    Answer ✓
    Options

    I fixed it by removing the NetworkObject component from the prefab that can't be spawned and adding a new one back to it. Then Re-import the prefab, and fix any broken references to the prefab due to removing the NetworkObject.

Answers

  • OdoVR
    Options

    @TSorrells did you manage to resolve this? I'm suddenly experiencing the same issue on a build using Jenkins, which hasn't happened previously.

    Jenkins was updated, wondering if this might be causing a conflict?

  • Rafalfaro
    Rafalfaro
    Answer ✓
    Options

    I fixed it by removing the NetworkObject component from the prefab that can't be spawned and adding a new one back to it. Then Re-import the prefab, and fix any broken references to the prefab due to removing the NetworkObject.

  • OdoVR
    Options

    Thank you @Rafalfaro.

  • TSorrells
    Options

    Not sure what I did, but the problem eventually went away after reworking some things *shrug*