MonoBehaviour extended nasted class does not show up in inspector?

Hi,

I have a nasted class which extends MonoBehaviour as well. However, it does not show up in inspector. Here is the code,

public class MonsterController : MonoBehaviour {
	
	[System.Serializable]
	public class HitPoint : MonoBehaviour
	{	
		public Transform   parentBone;
		public Vector   offset;
		public float   hitPointValue;		
		public int   hitRadius;		
		public bool   isRenderable;
		public bool   pointEnabled;
		public bool   avoidHitPoint;	
		
	}

///.. some other codes
}

Actually, the reason behind why i want to extend it from MonoBehaviour is just to use GetInstanceID() in order to obtain a unique id for each hit point. Otherwise, if i do not extend it, it shows up in inspector perfectly.

Thank you all for your time
Any idea?

You’ve defined a class, but you don’t have any instance of it. You need

[SerializeField] HitPoint hitPoint;

If you’re talking about having the variables of HitPoint show up, then no, that doesn’t work. Just define HitPoint in an external class if that’s what you want; with my code there, the variable hitPoint is a reference to a HitPoint instance, which is the best you can do with nested classes.