private static void SetupSphereEntity(SphereEntity sphereEntity, BaseEntity scaledEntity) { // SphereEntity has enableSaving off by default, so enable it if the child has saving enabled. // This fixes an issue where the resized child gets orphaned on restart and spams console errors every 2 seconds. sphereEntity.EnableSaving(scaledEntity.enableSaving); // SphereEntity has globalBroadcast on by default, but it should generally be off for scaled entities. // This fixes an issue where clients who resubscribe do not recreate the sphere or its children. EnableGlobalBroadcastFixed(sphereEntity, scaledEntity.globalBroadcast); }
private static void SetupSphereEntity(SphereEntity sphereEntity) { sphereEntity.EnableSaving(true); // Fix the issue where leaving the area and returning would not recreate the sphere and its children on clients. sphereEntity.EnableGlobalBroadcast(false); // Needs to be called since we aren't using server side lerping. sphereEntity.transform.localScale = SphereTransformScale; }