I am using latest unity engine and I am having a scripting issue.
I create a prefab , added a few scripts to it and I am trying to instantiate a few of those objects like this :
GameObject go = Instantiate(Prefab) as GameObject; var co = go.GetComponent<MyScriptA>();
Issue here is co is always null, this means that MyScriptA is no on the go instance. Accessing the prefab.GetComponent also returns null, but the prefab has the scripts in the editor and its assigned also in the editor to the Prefab variable (drag dropping). So I am not sure what might be wrong. For example if I Debug.Log(prefab) its not null.
So what am I doing wrong here?