Unity prefab changes in play mode according to a scene

Hi Guys,

I have a question. I have a prefab that has some components (other gameobjects as children). Then, I have two scenes: MainScene and EnemyScene. If I hit play in MainScene and drag the prefab into the scene, the prefab is highlighted blue and is comlete - I mean it is exactly the same as in the prefab folder. But as soon as I drag the same prefab in play mode in EnemyScene, the prefeb is now not highlighted blue and some gameobjects with scripts are missing! I also get an error of NullReferenceException because of that. I do not get it! I thing everything was fine before I installed a new version of unity 5.5.1

Any ideas?

You are pointing with your code to the scenes dynamically. For example,

SceneManager.GetActiveScene().buildIndex + 1

this will work fine for the first scene, but will give you errors if you put this code into last scene in your project.