Exemplo n.º 1
0
    public UnityViewService(Contexts contexts)
    {
        context    = contexts.game;
        gameEntity = context.CreateEntity();

        gameEntity.AddAssetListener(this);


        //创建所有view的根目录
        if (viewObjectRoot == null)
        {
            GameObject go = null;
            go = GameObject.Find("Game");
            if (go == null)
            {
                go = new GameObject("Game");
            }

            viewObjectRoot = go.transform;
            GameObject.DontDestroyOnLoad(viewObjectRoot);
        }
    }