public int Add(object obj) { GameViewSize gameViewSize = CastToGameViewSize(obj); if (gameViewSize == null) { return(-1); } m_GameViewSizeGroup.AddCustomSize(gameViewSize); GameViewSizes.instance.SaveToHDD(); return(Count() - 1); // assumes that custom sizes is after builtin sizes }