天天看點

unity3d:子類父類共用同個public變量,多次序列化報錯

The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(MonoBehaviour) txtTitle

UnityEditor.HostView:OnGUI()

工程中搜尋txtTitle

可以看到

父類

public abstract class UILoading
    {
        public Text txtTitle;
        public Text txtTips;      
public class UISimpleLoading:UILoading
    {
        public Text txtTitle;
        public Text txtTips;      

繼續閱讀