I’m assuming that Interface is a UObject casted to the type of interface? That’s kinda defeats the purpose of what I was trying to do.
IE what you have is
void Save(UObject* Object) //This function is just in some class somewhere
{
if(ISomeInterface* Interface = Cast<ISomeInterface>(Object))
{
Interface->Save(Interface->GetOuter());
// Interface->Save(Object); //The exact same thing as above
}
}
And the function is the interface looks like this
void ISomeInterface::Save(UObject* Object)
{
//Do save logic
}
But really I’d like the interface to be able to do this so I can always ensure I’m using the owner of the interface as the object being saved, but I don’t think that’s possible.
void ISomeInterface::Save()
{
if(UObject* ObjectToSave = GetOuter())
{
//Do save logic
}
}
Just to clarify to, these are not blueprint visible functions in the interface.