void BtnMissionEditorOnClick(PointerEventData eventData, UI_Event ev) { Mission mis = ev.GetData <Mission>("d"); UIMissionEditor ui_editor = MenuManager.instance.CreateMenu <UIMissionEditor>(); ui_editor.OpenScreen(); ui_editor.mIsEdit = true; ui_editor.SetEditMission(mis); }
static void OnImageLoad(string imgPath, Texture2D tex, ImageAndVideoPicker.ImageOrientation orientation) { PickerEventListener.onImageLoad -= OnImageLoad; // imgPath : browsed image path // tex : image texture UIMissionEditor uiMissionedit = MenuManager.instance.FindMenu <UIMissionEditor>(); Mission mis = uiMissionedit.mMission; mis.mTextureName = ""; mis.texture = tex; uiMissionedit.mImagePic.texture = tex; }
void BtnAddNewOnClick(PointerEventData eventData, UI_Event ev) { //CloseScreen(); UIMissionEditor ui_editor = MenuManager.instance.CreateMenu <UIMissionEditor>(); ui_editor.mIsEdit = false; ui_editor.OpenScreen(); Mission mis = new Mission(); mis.mDesc = "test"; ui_editor.SetEditMission(mis); }