public void Agree() { modalUI.destroyMe(); modalUI = null; callbackHandler?.Invoke(VRMpath, VRMdata); }
public void LoadRequest(string path, Action <string, byte[]> callback) { byte[] bytes = File.ReadAllBytes(path); var context = new VRMImporterContext(); context.ParseGlb(bytes); var meta = context.ReadMeta(true); GameObject modalObject = Instantiate(m_modalWindowPrefab, m_canvas.transform) as GameObject; var modalLocale = modalObject.GetComponentInChildren <VRMPreviewLocale>(); modalLocale.SetLocale("ja"); if (modalUI != null) { modalUI.destroyMe(); modalUI = null; } modalUI = modalObject.GetComponentInChildren <VRMPreviewUI>(); modalUI.setMeta(meta); modalUI.setLoadable(true); callbackHandler = callback; VRMdata = bytes; VRMpath = path; }
public void DisAgree() { modalUI.destroyMe(); modalUI = null; }