Example #1
0
    public void Agree()
    {
        modalUI.destroyMe();
        modalUI = null;

        callbackHandler?.Invoke(VRMpath, VRMdata);
    }
Example #2
0
    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;
    }
Example #3
0
 public void DisAgree()
 {
     modalUI.destroyMe();
     modalUI = null;
 }