Hi, I find a strange behaviour of Unity when re-loading prefab from assetbundle. Say I have a assetbundle A, which contains a prefab with a BoxCollider and a CharacterController attached. Then I execute following codes:
GameObject m_prefab = A.Load ("prefab") as GameObject;
Collider collider = m_prefab.GetComponent<BoxCollider> ();
Debug.Log (collider);
CharacterController cc = m_prefab.GetComponent<CharacterController> ();
Debug.Log (cc);
...
GameObject.DestroyImmediate (m_prefab, true);
I repeat above codes in somewhere else, but it turns out that BoxCollider and CharacterController are all missing in the re-loaded prefab, while the first loaded one is correct.
WHY?