public void Awake(Scene scene) { for (int i = 0; i < (int)UILayer.All; i++) { GComponent com = new GComponent(); com.name = ((UILayer)i).ToString(); com.SetSize(GRoot.inst.width, GRoot.inst.height); com.SetXY(0, 0); #if UNITY_EDITOR com.displayObject.gameObject.name = com.name; #endif FGUI layer = EntityFactory.Create <FGUI, GObject>(scene, com); Root.Add(layer, true); } //Root.GObject.asCom.AddChild(ui.GObject); }