Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast error in UArticyIncomingConnection::GetSourcePin() #88

Open
lukemols opened this issue May 24, 2024 · 0 comments
Open

Cast error in UArticyIncomingConnection::GetSourcePin() #88

lukemols opened this issue May 24, 2024 · 0 comments

Comments

@lukemols
Copy link

Hi, I'm upgrading my project from UE5.3 to UE5.4 and I'm experiencing compile errors.
I'm using the latest version of Articy Importer (1.8.0).

At row 91 of ArticyBuiltinTypes.cpp (LINK) there is a cast to a UArticyOutputPin from a UArticyObject (return value of GetObject function).

UArticyOutputPin* UArticyIncomingConnection::GetSourcePin() const
{
	if(!SourcePinObj)
	{
		auto db = UArticyDatabase::Get(this);
		SourcePinObj = db ? Cast<UArticyOutputPin>(db->GetObject(SourcePin)) : nullptr;
	}

	return SourcePinObj;
}

This cannot never be true, since UArticyOutputPin doesn't not inherit from UArticyObject but from UArticyBaseObject.

Full inheritance path here:
UArticyOutputPin > UArticyFlowPin > UArticyPrimitive > UArticyBaseObject
UArticyObject > UArticyPrimitive > UArticyBaseObject

In UE5.4 the Cast function changed and added a compile time check that ensures that the classes are related (Link to UE commit), so now the plugin is no more compiling.

Before changing anything in my side, I opened this issue to ask what is the expected output of the function.

Greetings, Luca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant