public override void LoadTestPage() { UIElement.DisposeAll(); HCanvas.RegCanvas(GUIRender); UISystem.PhysicalScale = 1f; font.RequestCharactersInTexture("ABCDEF", 512);//OPQUVWXYZ HTextLoader.fonts.Clear(); HTextLoader.fonts.Add(font); //HCanvas can = new HCanvas(); //can.DesignSize = GUIRender.DesignSize; //can.SizeDelta = GUIRender.DesignSize; //can.name = GUIRender.name; //GUIRender.canvas = can; HCanvas.CurrentCanvas = GUIRender.canvas; App.Initial(GUIRender.canvas); Application.targetFrameRate = 1000; #if UNITY_IPHONE || UNITY_ANDROID //Scale.DpiScale = true; #endif #if UNITY_EDITOR UIPage.LoadPage <StartPage>(); #else //ElementAsset.LoadAssetsAsync("base.unity3d",(o,e)=> { UIPage.LoadPage<ChatPage>(); }); #endif DataGrid.CursorX = DockPanelLine.CursorX = Resources.Load <Texture2D>("StretchWX"); DataGrid.CursorY = DockPanelLine.CursorY = Resources.Load <Texture2D>("StretchWY"); }
void Refresh(HCanvas canvas) { if (canvas == null) { return; } canvas.Refresh(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); EditorGUILayout.Space(); serializedObject.Update(); HCanvas ele = target as HCanvas; if (GUILayout.Button("Clear All AssetBundle")) { AssetBundle.UnloadAllAssetBundles(true); ElementAsset.bundles.Clear(); } if (GUILayout.Button("Create New")) { Create(ele.AssetName + ".bytes", ele.dicpath, ele.gameObject); AssetDatabase.Refresh(); } if (GUILayout.Button("Clone New")) { if (ele.NewBytesUI != null) { CloneNew(ele.CloneName, ele.NewBytesUI.bytes, ele.transform); } } if (GUILayout.Button("Clone New All")) { if (ele.NewBytesUI != null) { CloneNewAll(ele.NewBytesUI.bytes, ele.transform); } } if (GUILayout.Button("Clone Old")) { if (ele.OldBytesUI != null) { Clone(ele.CloneName, ele.OldBytesUI.bytes, ele.transform); } } if (GUILayout.Button("Clone Old All")) { if (ele.OldBytesUI != null) { CloneAll(ele.OldBytesUI.bytes, ele.transform); } } serializedObject.ApplyModifiedProperties(); }
public static void LoadCanvas(HCanvas canvas) { //HistoryManager.AddNewRecord(); }