將按鈕cross拖入Prefab做預制件出錯
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類應該和老師寫的一毛一樣,所以就不清楚到底是什么問題了。
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類應該和老師寫的一毛一樣,所以就不清楚到底是什么問題了。
2019-05-05
舉報
2020-05-19
你看一下是不是類名和cs文件名不一致,我剛剛也查了一會兒問題,發現就是這么簡單的錯誤。。初學者常常不注意就會這樣