In this example code from the BossRoom sample, they have a NetworkVariable that is only there for the Editor, or if the DEVELOPMENT_BUILD flag is set (by checking that box on Build menu, presumably).
The pitfall associated with this, is if you ever have an Editor connecting with a built player without the “DEVELOPMENT_BUILD” flag, your serialization will fail because this entity existing on one and not the other creates an offset in the FastBufferReader / FastBufferWriter by the amount of bytes that it takes to serialize this.
And that… from my last few weeks experience… is a hard fucking bug to track down.