將按鈕cross拖入Prefab做預(yù)制件出錯(cuò)
You are trying to replace or create a prefab from the instance 'cross' that contains the script 'Cross', which is does not derive from MonoBehavior. This is not allowed.
Cross類(lèi)應(yīng)該和老師寫(xiě)的一毛一樣,所以就不清楚到底是什么問(wèn)題了。
2020-05-19
你看一下是不是類(lèi)名和cs文件名不一致,我剛剛也查了一會(huì)兒?jiǎn)栴},發(fā)現(xiàn)就是這么簡(jiǎn)單的錯(cuò)誤。。初學(xué)者常常不注意就會(huì)這樣