Cannot implement an interface in class A if it contains a function parameter of class A

I attempted to create a blueprint interface to create a linked list i.e. each object of class A has a next pointer to another object of class A. A manager object wires everything up.

The only way I could do it was to create an interface with ‘next’ as an actor and then my SetNext event does a cast to make it the proper type!

It seems that if an interface has an object of class A then an object of class A cannot implement that interface.

In my specific example I had a

CheckpointInterface which implements SetNext
Checkpoint implements this interface
If SetNext takes Checkpoint_C as an input then on compiling Checkpoint I get

“Event node Event Set Next” is out-of-date. Please refresh it"

The workaround is to change the interface so that SetNext takes an actor and then cast it to a Checkpoint in the implementation of SetNext.

Hi simonbrislin,

Could you provide us with some screenshots so we can better understand your setup?

I’ve attached two images pairing it right back.

  1. An interface with a SetNext function that takes an object of class Checkpoint
  2. The checkpoint blueprint that implements that interface.

The blueprint will not compile.

alt text

And the interface

Hi simonbrislin,

I’m sorry it’s been a few days. I attempted to reproduce what you are seeing but so far I can’t get the same error.

Which version of the editor are you currently using?

Also, could you post the .uassets for these blueprints? The interface, blueprint, and any other blueprints they touch.

Hi simonbrislin,

We haven’t heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you’re still experiencing this issue, please feel free to post back here with additional information.

Thanks,
TJ