Announcement

Collapse
No announcement yet.

Explicitly Call Parent Class Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Explicitly Call Parent Class Functions

    Is there a way to override a function but still call the parent function similar to what we could do in unrealscript using the super keyword?

    Code:
    simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp)
    {
    	Super.PostInitAnimTree(SkelComp);
    
    	// Only refresh anim nodes if our main mesh was updated
    	if (SkelComp == Mesh)
    	{
    		ClearAnimNodes();
    		CacheAnimNodes();
    	}
    }
    If this isn't implemented would it be possible to add that functionality to blueprints?
    Or maybe there is just a different way of accomplishing the same thing.

    #2
    I believe that is possible, by right clicking on the function entry node and choosing to add a super call. I don't have the editor in front of me now though! We have it on our list to make it more discoverable.
    Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
    Twitter: @EpicJamesG

    Comment


      #3
      Thanks James I found it! The actual command after Right Clicking on the entry node is "Add Call to Parent Function".

      Come to think of it, I should have been able to figure that out as it seems like a pretty logical place to put the call.
      Maybe if it was also added in the right click menu of the Overridable Functions list or something. That's where I looked first I think.

      Just want to say that the blueprints system is super flexible and the best visual scripting system I have ever seen.

      Comment

      Working...
      X