BoltEntity newEntity = BoltNetwork.Instantiate(prefab, position, Quaternion.identity);
BoltNetwork.Destroy(entity);
entity.SetCustomState(new MyCustomState());This code sets a custom network state for a Bolt entity, which can be used to synchronize arbitrary data across the network. The BoltEntity class is provided by the Bolt package library, which is a networking solution for Unity game development.