Exemplo n.º 1
0
    protected override void OnCreate()
    {
        base.OnCreate();
        m_GraphSystem = World.GetOrCreateSystem <AnimationGraphSystem>();
        m_GraphSystem.AddRef();

        if (m_GraphSystem.Set.RendererModel != RenderExecutionModel.Islands)
        {
            m_GraphSystem.Set.RendererModel = RenderExecutionModel.Islands;
        }

        m_CreateLambda = (Entity e, ref TSampleSetup setup) =>
        {
            var data = CreateGraph(e, m_GraphSystem.Set, ref setup);
            PostUpdateCommands.AddComponent(e, data);
        };

        m_DestroyLambda = (Entity e, ref TSampleData data) =>
        {
            DestroyGraph(e, m_GraphSystem.Set, ref data);
            PostUpdateCommands.RemoveComponent(e, typeof(TSampleData));
        };

        m_UpdateLambda = (Entity e, ref TSampleData data) =>
        {
            UpdateGraph(e, m_GraphSystem.Set, ref data);
        };
    }
Exemplo n.º 2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            OutgoingGroup = GetEntityQuery(typeof(LOD), ComponentType.Exclude <Settings>());

            m_AnimationGraphSystem = World.GetExistingSystem <AnimationGraphSystem>();
            m_AnimationGraphSystem.AddRef();
            m_AnimationGraphSystem.Set.RendererModel = RenderExecutionModel.Islands;
        }
Exemplo n.º 3
0
 protected override void OnCreate()
 {
     base.OnCreate();
     m_AnimationGraphSystem = World.GetExistingSystem <AnimationGraphSystem>();
     m_AnimationGraphSystem.AddRef();
 }