예제 #1
0
        /// <summary>
        /// ロードする
        /// </summary>
        /// <param name="pdfName"></param>
        void Load(string pdfName)
        {
            isPDFLoadedProperty.Value = false;

            gen.PDFGenerateObservable(pdfName)
            .Subscribe(n =>
            {
                info = new PDFImageDirInfo(n);
                isPDFLoadedProperty.Value = true;
            });
        }
예제 #2
0
        void Start()
        {
            gen      = new PDFGenerator();
            rawImage = GetComponent <RawImage>();
            Load("samplePDF");

            isPDFLoadedProperty.ObserveOnMainThread().Subscribe(loaded =>
            {
                if (loaded)
                {
                    //PDFロードが完了した時
                    StartCoroutine(LoadPage(0));
                    loadingObject.SetActive(false);
                }
                else
                {
                    //初期化された時
                    currentPage = 0;
                    loadingObject.SetActive(true);
                    info = null;
                }
            });
        }