/*** * OnEnable * set the MeshCreator when component is added to the object ***/ private void OnEnable() { mcd = target as MeshCreatorData; if (mcd == null) { Debug.LogError("MeshCreatorInspector::OnEnable(): couldn't find a MeshCreatorData.cs component. Is the file in your project?"); } mcud = new MeshCreatorUndoManager(mcd, "Mesh Creator"); }