public void SetLayer(int newVal) { if (lineObj != null) lineObj.layer = newVal; if (hatObj != null) hatObj.layer = newVal; if (labelObj != null) labelObj.layer = newVal; }