Invalid Type Error on Opening Project

I have been working on a project now for weeks that uses two custom USTRUCT that have BlueprintType attribute set to share data between blueprints and C++ code.

I have had two variables of these types in my blueprint no problem, opened and closed the project many times, integrated them into my blueprint flows.

I open my project this morning and get the following error

12636-unknowntype.error.png

My variables now have a warning that the type cannot be found and any links from them have been removed … awesome

I haven’t modified these USTRUCTs for some time only the code and blueprint that leverages them.

I’m really hoping that this doesn’t mean I have to start from scratch again

Any help gratefully received

Hi SolarVelocity,

Could you provide the code where you are setting up your USTRUCTs? Also, what version of the Engine are you using, and are you using a version installed by the Launcher or did you build it from source code?

Hi,

I am using 4.3.1 engine installed by the launcher.

It is ThirdPersonCode based project

The USTRUCT for DateTimeInstance is defined as follows

/**
* Blueprint Integration Data Structure
*/
USTRUCT(BlueprintType)
struct FDateTimeState
{
    GENERATED_USTRUCT_BODY()

    /** Specifies the current cycle of the day */
    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Time)
    TEnumAsByte<EDayCycle::Type> DayCycle;

    /** Specifies current in game date and time */
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Time)
    FDateTime GameDateTime;

    /** Specifies the current position for the moon */
    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Time)
    FRotator MoonDirection;

    /** Specifies the current position for the sun */
    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Time)
    FRotator SunDirection;
};

And as I mentioned … these USTRUCTs have been working correctly for some time.

The only code change recently to this structure was all properties were EditAnywhere, BlueprintReadWrite which I recently changed to make only the GameDateTime property editable as the others are calculated fields, and made the GameDateTime editable in the blueprint so that it could be modified in the blueprint details panel.

*EDIT: I have tried changing those properties back to be EditAnywhere, BlueprintReadWrite but it doesn’t make a difference

Yes this same code was working for me too.

Just started showing that dialog when I try to start the editor from Visual Studio.

If I open the project in the Editor directly (i.e. not from Visual Studio) my variables are still there and correctly linked in my blueprint … just not much use if I can have the Visual Studio environment linked to my Editor project

I tried to reproduce this issue today, and unfortunately I was not able to do so. I created a struct using the code you provided and a generic enum that I created, and was able to build the project and open it in the Editor. Does the error message that you are seeing provide any context for where this error is being triggered?

So you are running the project using the Visual Studio debugger? What is your Visual Studio Solution Configuration?

Are you able to reproduce this issue in a brand new project from one of the templates using your Struct?

Im working with 4.4 engine now, I will reopen if this happens there