The above is fixed if I move ANY include. Just the order in any class. Then after a few hours it comes back. What can I do here?
Do you have include for IGridOccupantInterface among includes visible in this file? If no - add it.
The possible reason is that due to unity building some includes may be visible to your code even if not included explicitely. But sometimes they can go out of scope and you unexpectedly have a code that use classes that are not included.
Also, i don’t see any mentions of IGridOccupantInterface in documentation, so it’s probably your local code, hence it’s hard to help more than that
Are you using Windows API somewhere ?
GetObject is a default function in UE interfaces, but windows API rewrites GetObject to GetObjectW.
To avoid this you are never supposed to include windows.h, but use other wrappers provided by UE instead, such as WindowsHWrapper.h or wrap the relevant code between AllowWindowsPlatformTypes.h and HideWindowsPlatformTypes.h.
See this for reference Integrating Third-Party Libraries into Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community