Skip to content

Prefabs lose property references in components and/or duplicate when placed inside .vmaps #140

@erikSaandy

Description

@erikSaandy

Describe the bug

Prefabs inside .vmaps break after editing the prefab. This occurs if a scene with a MapInstance .vmap referencing that prefab is open.
This bug mainly disturbs workflow, as you have to close any scenes referencing the prefab in order for it not to break after editing the prefab. Accidentally saving the scene while the map instance is broken will mean you have to delete the map instance and create a new one.

Depending on the network mode, you get different problems.

  1. If the network mode is "Network Snapshot", any components in the prefab lose property references to objects
  2. If the network mode is "Network Object", every prefab instance will duplicate, and any property references will point to one of the duplicates (presumably the "original")

To resolve this problem after encountering it, it is possible to reopen the scene without saving and it should work correctly again.

To Reproduce

  1. Compile a map containing at least one prefab and place a map instance referencing this map in a scene
  2. With that scene open, open the prefab and save it (CTRL+S)
  3. Start the scene and notice the prefab breaking.

Expected behavior

I expect prefabs inside map instances to reflect the changes made to the prefabs, without breaking when starting the game

Media/Files

repro project:
prefab_test.zip

example video:

Untitled.video.-.Made.with.Clipchamp.15.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions