public static Beat CreateBeat(int exit, PanelType panel, Color?c = null, int perfectScore = 20, int goodScore = 10, int badScore = 0) { var ret = Instantiate(Resources.Load <GameObject>("Beat"), ins.parentNode).GetComponent <Beat>().Initialize(exit, panel, c == null ? Color.white : c.GetValueOrDefault(), perfectScore, goodScore, badScore); ret.fallingTime = 1f; ((Beat)ret).lifetime = 1f; var pos = (ret.transform as RectTransform).anchoredPosition; pos.y = Harp.GetHeight(); (ret.transform as RectTransform).anchoredPosition = pos; return((Beat)ret); }