Prevent non-spawnable objects to be included in DefaultPrefabObjects #518
FREEZX
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Continuing on the discussion on discord
NetworkObjects that exist solely as scene objects or that are part of other spawnable prefabs should not be included in the DefaultPrefabObjects, as all references to GameObject assets force unity to store the prefab and all related data in memory for fast instantiation when needed. An easy solution to this would be to add an "IsSpawnable" field to the NetworkObject script, and only take objects with this field set to true when building the DefaultPrefabObjects script. Optionally, for backwards compatibility, this feature should be a checkbox in the FishNet settings.
Beta Was this translation helpful? Give feedback.
All reactions