Exemplo n.º 1
0
    public void Agree()
    {
        modalUI.destroyMe();
        modalUI = null;

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