I think I've seen the same behavior and agree that it's a problem. As far as I can tell, the issue arises from scene objects being dragged onto prefabs. You can drag project assets onto prefabs and it works smoothly, including dragging those prefabs into scenes and having everything "as designed". But when you drag objects from the scenes onto the prefabs (which there are obviously quite a few use cases for), the behavior you experienced seems to sometimes occur.
I'll just test if I can reproduce this in Unity 3 beta 5 ... and if so, will file a bug report. I'll also post a comment to your question with a question ;-)
EDIT: Ok, I did some extensive testing in the current Unity 3 beta and wasn't able to reproduce this issue. So, either it has been fixed somewhere along the way - or I'll need some more detailed steps of what you're doing. So here's what I did, and what works without any problem:
Created a little script for testing which should do what you are doing (more or less):
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class SlotScript : MonoBehaviour {
private static readonly JCsLogger log = new JCsLogger(typeof(SlotScript));
public int myInt;
public float myFloat;
public Transform transformX;
public Transform[] transformArray;
public List<Transform> tranformList;
public string mySeparator;
public GameObject gameObjectX;
public GameObject[] gameObjectArray;
public List<GameObject> gameObjectList;
}
Attached this to a game object and created a prefab from it.
Pulled a whole bunch of scene objects (from the hierarchy) on the slots (I had 5 slots for each list/array). I also added some random project objects (as this is a test-project, I simply used my prefab itself).
Applied the prefab. Obviously, it can't store the references to the scene objects to the prefab, so those remain null in the prefab.
Now, I "messed around" quite a bit: Created another instance of the prefab, changed everything, applied. Changed the prefab itself. Even changed the number of slots for my lists and arrays. Even added some extra public member variables to my class; some in-between the lists. Changed those values, too. Applied; changed in the prefab itself.
Also, I created another scene in which I applied similar changes (to see if this happens when a scene is currently not loaded).
My prefab with the scene objects still is exactly the same as it was.
So ... unless you're using some fancy editor scripting or have something weird in your project, this problem shouldn't occur for you in Unity 3.
Oh, one final note: Sometimes people stay in play mode and don't notice it. When you're in play, any changes you apply to prefabs actually remain, while any changes you apply to scene objects get lost as soon as you stop playing. It may be unlikely but I thought I should mention that this could be the problem ;-)
Just checking: Which version of Unity are you using? As mentioned in my answer, I've seen this in earlier versions of Unity (not sure if I've still seen it in 2.6 but probably I did).
– jashanversion 2.6.1f3
– Goody