public void Setup()
    {
        rootObj = new GameObject();
        var rectTrans = rootObj.AddComponent <RectTransform>();

        rectTrans.anchorMin = new Vector2(0, 1);
        rectTrans.anchorMax = new Vector2(0, 1);
        rectTrans.pivot     = new Vector2(0, 1);

        view = rootObj.AddComponent <UUebViewComponent>();
        core = new UUebView.UUebViewCore(view);
        view.SetCore(core);

        var canvas = GameObject.Find("Canvas/MaterializeTestPlace");

        if (canvas == null)
        {
            var prefab     = Resources.Load <GameObject>("TestPrefabs/Canvas");
            var canvasBase = GameObject.Instantiate(prefab);
            canvasBase.name = "Canvas";
            canvas          = GameObject.Find("Canvas/MaterializeTestPlace");
        }


        rootObj.transform.SetParent(canvas.transform, false);

        rectTrans.anchoredPosition = new Vector2(100 * index, 0);
        index++;

        parser = new HTMLParser(core.resLoader, core.defaultImageDownloader);
    }
Beispiel #2
0
    public void Setup()
    {
        executor = new GameObject("htmlParserTest").AddComponent <UUebViewComponent>();
        var core = new UUebView.UUebViewCore(executor);

        executor.SetCore(core);
        loader = new ResourceLoader(executor.Core.CoroutineExecutor);

        parser = new HTMLParser(loader);
    }
    public void Setup()
    {
        executor = new GameObject("layoutMachineTest").AddComponent <UUebViewComponent>();
        var core = new UUebView.UUebViewCore(executor);

        executor.SetCore(core);

        loader = new ResourceLoader(executor.Core.CoroutineExecutor);
        defaultImageDownloader = new DefaultImageDownloader(executor.Core.CoroutineExecutor, loader);

        parser = new HTMLParser(loader, defaultImageDownloader);
    }