Accessing Enumeration from another script issue

Hello! Im trying to read enum type from another script but im getting this error

Type `Mob.Defence' does not contain a definition for `defenceType' and no extension method `defenceType' of type `Mob.Defence' could be found (are you missing a using directive or an assembly reference?)

First Script.

using UnityEngine;
using System.Collections;

public class Mob : MonoBehaviour {
	
[System.Serializable]
	public class Defence
	{
		public float DefenceCount;
		public DefenceType defenceType;

		public enum DefenceType
		{
			Armor,
			EnergyShield,
		}
	}


	public Defence defence;
}

Second Script.

 using UnityEngine;
    using System.Collections;
    
    public class Weapon : MonoBehaviour {
    
    // Update is called once per frame
    	void Update ()
    	{
    		switch(target.gameObject.GetComponent<Mob>().defence.defenceType)
    		{
  		    case Mob.Defence.DefenceType.Armor:
    	      Debug.Log("Mob DefenceType is Armor");
    		  break;
    		}
            }
    }

Looks fine to me. I guess you either haven’t saved your last change or Unity didn’t saw that change / update of the script. Make sure it’s saved and try right-click → reimport on the script in Unity.