Example #1
0
        public async UniTask InitializeContextAsync(IContext context)
        {
            _context.Reset();
            _context.Connect(context);

            await OnInitializeContext(_context);
        }
Example #2
0
        protected override async UniTask OnContextActivate(IContext context)
        {
            var graphAsset = await subGraph.LoadAssetTaskAsync(LifeTime);

            var parent = GraphData.Root;
            var graph  = Object.Instantiate(graphAsset.gameObject, parent)
                         .DestroyWith(LifeTime)
                         .GetComponent <UniGraph>();

            var connection = new ContextConnection();

            connection.Connect(context).AddTo(LifeTime);

            await LaunchGraph(graph, connection);

            Complete();
        }