protected override void OnDestroy()
    {
        if (m_GraphSystem == null)
            return;

        m_GraphSystem.RemoveRef();
        base.OnDestroy();
    }
Ejemplo n.º 2
0
    protected override void OnDestroy()
    {
        Entities
        .WithName("DestroyGraph")
        .WithoutBurst()
        .WithStructuralChanges()
        .ForEach((Entity e, ref RigRemapKernelRuntime nodeHandles)
                 => DestroyGraph(e, ref nodeHandles)).Run();

        if (GraphSystem.RefCount > 0)
        {
            GraphSystem.RemoveRef();
        }

        base.OnDestroy();
    }
Ejemplo n.º 3
0
    protected override void OnDestroy()
    {
        if (GraphSystem == null)
        {
            return;
        }

        Entities
        .WithoutBurst()
        .WithStructuralChanges()
        .ForEach((Entity e, ref BlendTree1DKernelRuntime nodeHandle)
                 => DestroyGraph(e, ref nodeHandle))
        .Run();

        GraphSystem.RemoveRef();
        base.OnDestroy();
    }
Ejemplo n.º 4
0
    protected override void OnDestroy()
    {
        //Call Entity Foreach and Destroy Node in graph.

        Entities
        .WithName("DestroyGraph")
        .WithoutBurst()
        .WithStructuralChanges()
        .ForEach((Entity entity, ref BlendTree2DKernelRuntime nodeHandle)
                 => DestroyGraph(entity, ref nodeHandle)).Run();

        if (GraphSystem.RefCount > 0)
        {
            GraphSystem.RemoveRef();
        }

        base.OnDestroy();
    }
Ejemplo n.º 5
0
    protected sealed override void OnDestroy()
    {
        if (GraphSystem == null)
        {
            return;
        }

        Entities
        .WithoutBurst()
        .WithStructuralChanges()
        .ForEach((Entity e, ref PlayerBlendDataRuntime playerBlendData) => DestroyGraph(e, ref playerBlendData))
        .Run();

        if (GraphSystem.RefCount > 0)
        {
            GraphSystem.RemoveRef();
        }

        base.OnDestroy();
    }
    protected override void OnDestroy()
    {
        if (_animationGraphSystem == null)
        {
            return;
        }

        Entities
        .WithoutBurst()
        .WithStructuralChanges()
        .ForEach((Entity entity, ref RotateCube_PlayStateRuntime animationState) =>
                 DestroyGraph(entity, ref animationState)).Run();

        //Remove ref count on animation graph system to signify the we are done using it.
        if (_animationGraphSystem.RefCount > 0)
        {
            _animationGraphSystem.RemoveRef();
        }

        base.OnDestroy();
    }
Ejemplo n.º 7
0
    protected override void OnDestroy()
    {
        if (_graphSystem == null)
        {
            return;
        }

        Entities
        .WithName("DestroyGraph")
        .WithoutBurst()
        .WithStructuralChanges()
        .ForEach((Entity e, ref PlayerDeath_PlayStateRuntime data) => DestroyGraph(e, _graphSystem, ref data))
        .Run();

        if (_graphSystem.RefCount > 0)
        {
            _graphSystem.RemoveRef();
        }

        base.OnDestroy();
    }
Ejemplo n.º 8
0
    protected override void OnDestroy()
    {
        if (_processDefaultAnimationGraphSystem == null)
        {
            return;
        }

        EntityQuery          graphsQuery   = GetEntityQuery(typeof(SimpleAnimationGraphData), typeof(SimpleAnimationClipData));
        NativeArray <Entity> graphEntities = graphsQuery.ToEntityArray(Allocator.Temp);

        for (int i = 0; i < graphEntities.Length; i++)
        {
            Entity graphEntity = graphEntities[i];
            SimpleAnimationGraphData simpleAnimationGraphData = EntityManager.GetComponentData <SimpleAnimationGraphData>(graphEntity);
            DynamicBuffer <SimpleAnimationClipData> clipDatas = EntityManager.GetBuffer <SimpleAnimationClipData>(graphEntity);
            DestroyGraph(_processDefaultAnimationGraphSystem, ref simpleAnimationGraphData, ref clipDatas);
        }
        graphEntities.Dispose();

        _processDefaultAnimationGraphSystem.RemoveRef();

        base.OnDestroy();
    }