Moonflow-Studio/Moonflow-Lensflare-System

edit mode?

Closed this issue · 3 comments

is there a way to make this run during edit mode?
i added [ExecuteAlways] in URPLensFlare which didn't do anything.

I think I'm not recommended you to run this plugin during edit mode. It may cause some error, I had just removed attribute [ExecuteInEditMode] before. For it has been some times after my last update, I forget the reason. Give me some time and I'll reply you tomorrow

is there a way to make this run during edit mode?
i added [ExecuteAlways] in URPLensFlare which didn't do anything.

Hey bro. I have already explored the whole solution, it's not good to run in edit mode. Because it need to find the number of light source which have flare launcher in the scene. And the launcher will be registered to URPLensFlare on Start(). If not, it will cause some null pointer exception because we can't know when Start() will run in edit mode exactly.

If you really want it run during edit mode, you should add the same attribute to URPFlareLauncher at the same time. But you can find the null pointer exception caused.

I recommended you to edit the final effects in playing mode. The FlareAsset is a standalone typed resource, and it will not be restored when you exit from playing mode. Therefore, every changes during playing mode will be saved correctly. I have not found a better solution, I'm so sorry for that.

I see, I'll look into it.