Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphHubNode.cpp
void AnimGraphHubNode::OnRemoveNode(AnimGraph* animGraph, AnimGraphNode* nodeToRemove)
    {
        const size_t numAnimGraphInstances = animGraph->GetNumAnimGraphInstances();
        for (size_t i = 0; i < numAnimGraphInstances; ++i)
        {
            AnimGraphInstance* animGraphInstance = animGraph->GetAnimGraphInstance(i);
            
            UniqueData* uniqueData = static_cast<UniqueData*>(FindOrCreateUniqueNodeData(animGraphInstance));          
            if (uniqueData->m_sourceNode == nodeToRemove)
            {
                uniqueData->m_sourceNode = nullptr;
            }
        }
    }
// When a node is about to be removed, make sure we reset any pointers that point to it.
When a node is about to be removed, make sure we reset any pointers that point to it.
When a node is about to be removed make sure we reset any pointers that point to it .
void AnimGraphHubNode::OnRemoveNode(AnimGraph* animGraph, AnimGraphNode* nodeToRemove)
    {
        const size_t numAnimGraphInstances = animGraph->GetNumAnimGraphInstances();
        for (size_t i = 0; i < numAnimGraphInstances; ++i)
        {
            AnimGraphInstance* animGraphInstance = animGraph->GetAnimGraphInstance(i);
            UniqueData* uniqueData = static_cast<UniqueData*>(FindOrCreateUniqueNodeData(animGraphInstance));          
            if (uniqueData->m_sourceNode == nodeToRemove)
            {
                uniqueData->m_sourceNode = nullptr;
            }
        }
    }
void AnimGraphHubNode :: OnRemoveNode ( AnimGraph * animGraph , AnimGraphNode * nodeToRemove ) { const size_t numAnimGraphInstances = animGraph -> GetNumAnimGraphInstances ( ) ; for ( size_t i = 0 ; i < numAnimGraphInstances ; ++ i ) { AnimGraphInstance * animGraphInstance = animGraph -> GetAnimGraphInstance ( i ) ; UniqueData * uniqueData = static_cast < UniqueData * > ( FindOrCreateUniqueNodeData ( animGraphInstance ) ) ; if ( uniqueData -> m_sourceNode == nodeToRemove ) { uniqueData -> m_sourceNode = nullptr ; } } }
When a node is about to be removed, make sure we reset any pointers that point to it.
When a node is about to be removed make sure we reset any pointers that point to it .