Changing a Mesh (C#)

I’m trying to have this script load Body from the top of a Resources folder and place it on the GameObject it’s attached to.

this.gameObject.GetComponent().mesh = Resources.Load("Body");

But the error I’m getting is:

error CS0266: Cannot implicitly convert type UnityEngine.Object’ to UnityEngine.Mesh'. An explicit conversion exists (are you missing a cast?)

you need to explicitly tell unity the type of resource to load…




... Resources.Load("Body", typeof(Mesh));