Landscape grass causes map to be marked dirty every time it's loaded

After upgrading to 4.15.1 (from 4.13.2), I noticed that every time I opened a level in the editor, it’d be immediately marked as having unsaved changes (and require checkout from Perforce). This is an unfortunate workflow issue, because typically my team doesn’t want to check out map files unless they’re needed for getting work done (due to exclusive checkout).

After some debugging I narrowed this down to the landscape grass. ALandscapeProxy::UpdateGrass always creates a new UHierarchicalInstancedStaticMeshComponent which ultimately leads to Modify() being called on the Landscape actor.

I attached a super quick and dirty project [(link)][2] that demonstrates the issue. I started with an empty project and added a landscape with some grass.

The only workarounds I’ve found are to disable grass via the console (grass.Enable 0), or to set the start and end cull distances on the grass type to 0 (which effectively disables the grass as well). If I use either workaround, I can load up my levels without being prompted to save them.

Any help would be much appreciated, thanks!

Oh, I don’t think I made it clear: to repro the issue, load up the GrassTest project I attached, and then load TestMap. Notice that the map gets flagged as dirty immediately. This doesn’t happen if you disable grass before loading the map.

I suspect this is an engine bug since I was able to easily reproduce it in an isolated test project.

Thank you for the report, I will investigate soon and return once I have entered the bug, or if I need additional information.



This bug manifest itself in other complex ways. Loading another Sequence, then clicking on any actor from a sub level with grass will mark that level dirty, even though the level is Locked! “grass.Enable 0” indeed fixes the problem.

This is a serious quality issues triggering Save nags on some large committed levels that should not be touched… The Save system in Unreal is already fragile and hacky.

Rinbi found the exact programming error and practically solved the problem… Save the dirty state before Modify() with “auto Package = Actor.GetOutermost(); bool PackageChanged = Package->IsDirty();” and restore with “Package->SetDirtyFlag(PackageChanged);”

Can we please at least have a bug report entered we can vote on?


This bug was fixed in version 4.16. If you need more info to track down the changes, let me know!

Hi Michel,

We’re still seeing this behaviour in 4.17.2 - the sublevel containing our landscape with a grasstype on it is marked dirty as soon as you move the camera into a new area of the map.

I’ve verified that grass.Enable 0 stops this happening.

Is there anything we need to do to levels/landscapes/materials/grasstypes created before 4.16 for this to be fixed?

I can confirm it cause issues in 4.17.2 with source control etc.

The grass i setup in 4.17.2 for the first time, i don’t think it has anything to do with setups coming from older versions.

I’m having this on 4.22

not sure if related, but I use World Composition

any news about this issue? is there a bug reported? (I couldn’t find it on the public ‘Issues’ bug tracker)

Yea, I’m having this too in 4.24.3.
Good luck hoping they will fix this :slight_smile: