Search Unity

Crash: Loading scene in editor that uses a prefab that has a MonoBehaviour that uses native code.

Discussion in 'Prefabs' started by trenskow, Aug 27, 2020.

  1. trenskow

    trenskow

    Joined:
    Feb 24, 2019
    Posts:
    12
    Platform: macOS

    I have a prefab that uses a MonoBehaviour that calls some native plugin. It is set to run in the editor, so the plugin is always loaded.

    When I load a scene that uses this prefab, the editor crashes. If I remove the MonoBehaviour in question it loads just fine. If I unwrap the prefab, and just include it in the scene not as a prefab reference, it also works just fine.

    Does anyone know why this is a problem for the editor, when the MonoBehaviour in question is used in a prefab?
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    I have not heard of this problem before. How can I reproduce it?