1
腳本通常是這樣編寫的,以便在檢查器中公開字段;有沒有辦法使用屬性來代替?在Unity中,我可以在檢查器窗口中公開C#*屬性*嗎?
// instead of this
public GameObject wrongBall;
// is there some way to do this (to trigger an event in the setter, for instance)
// and have it show up in the inspector window?
public GameObject WrongBallProperty
{
get;
set;
}
有點令人難以置信的Unity如何在這麼多版本之後仍然不支持這個。 –
@RayKoopa問題是序列化。在字段上進行序列化比在沒有任何問題出現的情況下更容易。 –