コード例 #1
0
    protected override void OnDestroy()
    {
        if (m_AnimGraphSystem != null)
        {
            m_AnimGraphSystem.RemoveRef();
        }

        base.OnDestroy();
    }
コード例 #2
0
        protected override void OnDestroy()
        {
            Entities
            .WithStructuralChanges()
            .WithAll <LOD>()
            .ForEach((Entity entity) =>
            {
                Deinitialize(EntityManager, entity, m_AnimationGraphSystem);
            }).Run();

            m_AnimationGraphSystem.RemoveRef();
        }
コード例 #3
0
        protected override void OnDestroy()
        {
            base.OnDestroy();

            var cmdBuffer = new EntityCommandBuffer(Allocator.Temp);
            var animationGraphSystem = m_AnimationGraphSystem;
            Entities
                .WithoutBurst() // Can be removed once NodeSets are Burst-friendly
                .ForEach((Entity entity, ref SystemState state) =>
            {
                Deinitialize(World, cmdBuffer, entity, animationGraphSystem, state);
            }).Run();

            cmdBuffer.Dispose();
            m_AnimationGraphSystem.RemoveRef();
        }
コード例 #4
0
        protected override void OnDestroy()
        {
            base.OnDestroy();

            var cmdBuffer = new EntityCommandBuffer(Allocator.TempJob);

            Entities
            .WithNativeDisableContainerSafetyRestriction(cmdBuffer)
            .WithoutBurst()
            .ForEach((Entity entity, ref SystemState state) =>
            {
                Deinitialize(cmdBuffer, entity, m_AnimationGraphSystem, state);
            }).Run();
            cmdBuffer.Playback(EntityManager);
            cmdBuffer.Dispose();

            m_AnimationGraphSystem.RemoveRef();
        }
コード例 #5
0
    protected override void OnDestroy()
    {
        if (m_GraphSystem == null)
        {
            return;
        }

        var cmdBuffer = new EntityCommandBuffer(Allocator.Temp);

        Entities.ForEach((Entity e, ref TSampleData data) =>
        {
            DestroyGraph(e, m_GraphSystem.Set, ref data);
            cmdBuffer.RemoveComponent(e, typeof(TSampleData));
        });

        cmdBuffer.Playback(EntityManager);
        cmdBuffer.Dispose();

        m_GraphSystem.RemoveRef();
        base.OnDestroy();
    }