No error feedback if you add Create operation to an interface

I know improving UX for interfaces is a future topic but I thought I would add this one in case someone stumbles across it:

If you create an interface ‘iBlaBla’ and then add an operation called ‘Create’ the interface definition will be in error with a red outline and a message ‘this patch has errors, right click to see more’

Inside the interface there is no obvious error, including on any inputs or outputs assigned to Create.

The error is correct because an instance of an interface shouldn’t be able to be created as its own object. It’s just the error feedback is not there.

You can stumble onto this error if you copy and paste the entire contents of a class definition into an interface to use as a starting point. If you select all and copy also the create operation than you will end up with this error and it can be tricky to work out what’s wrong.

Seeing this on 2021.4.12 stable.

To be honest doesn’t have to be an error, could be a warning or nothing. As long as the editor UI blocks you from actually instantiating an ‘interface.create’ than your application will run.

In yesterdays 2022.5 preview there was at least an improvement to this situation that you can now see the actual error (telling you that Create makes no sense on an interface) in the patch explorer to the left.

Update: Ah the build didn’t go through, well then let’s say it will be available in the next preview.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.