I’ve been trying out Niagara and for the most part it works great! However, whenever I launch the editor, it has to recompile all my systems, even if they have not changed and the game source code has not changed. That means I have to run through whatever I’m trying to test twice, once to trigger everything to compile and then once after the VFX are ready.
It looks like it’s trying to compare things against a cache, but never gets a hit. In the debugger, NiagaraScript::AreScriptAndSourceSynchronized() is returning false for everything.
We’ve fixed these recompile issues, but unfortunately these fixes didn’t make the 4.22 release and will be in 4.23. If you’d like these changes sooner you can download the most recent changes from our Dev-Niagara development stream if you’re building from source.
There are actually several changes which are necessary to fix this completely, they are 4898277, 4974092, 4977660, 5271690, 5748275, 6087261, 6093788, and 6452690. These changes will all be available in 4.23 which will go into preview builds soon, so it might be better to wait for that.
So I ended-up cherry-picking these 8 changes. Then I also had to checkout and resave all the Niagara Systems assets.
After that, we now have most of the NiagaraScript displaying some nice is in-sync skipping compile..
But we still have some dependencies that are seen has changed, and requires some recompiling at each editor startup:
[2019.07.18-11.50.16:620][526]LogNiagara: Emitter /Game/FX/Weapon/Reload/NS_ReloadRifle_01.NS_ReloadRifle_01:P_MuzzleFlashBase_01_0-P_MuzzleFlashBase_01 is merging changes from source /Game/FX/Weapon/Shooting_Muzzles/P_MuzzleFlashBase_01.P_MuzzleFlashBase_01 because its Change ID was updated.
[2019.07.18-11.50.16:657][526]LogNiagara: Emitter /Game/FX/Weapon/Reload/NS_ReloadRifle_01.NS_ReloadRifle_01:P_SingleFlash_01_3-P_SingleFlash_01 is merging changes from source /Game/FX/Weapon/Reload/P_SingleFlash_01.P_SingleFlash_01 because its Change ID was updated.
[2019.07.18-11.50.16:703][526]LogNiagara: System /Game/FX/Weapon/Reload/NS_ReloadRifle_01.NS_ReloadRifle_01 being compiled because graph changes were merged for a base emitter.
[2019.07.18-11.50.16:771][526]LogNiagaraEditor: '/Game/FX/Weapon/Reload/NS_ReloadRifle_01' Precompile took 0.067589 sec.
Could it be some Engine Content assets dependencies I would need to resave?
It’s a lot better though, so thank you for your answers.
sorry, yes these changelist numbers are from Perforce, and it’s not easy to match them to github since a few of them are in fact only visible squashed into a merge commit (from a non public dev branch)