Hi again. We bumped into the issue when it is VEERY hard to edit large graphs. Every moving a block, even panning takes very long. Something like 1 FPS.
I’ve profiled the editor and found that it serializes the graph each redraw.
Developer at Lazy Bear Games
http://www.lazybeargames.com
This can happen only in the case when a gameobject with the FlowScriptController component is selected and currently in the Unity inspector.
This is basically due to the fact that Unity calls “OnBeforeSerialize” on every editor frame when an object is in the inspector. (I never understood why).
The graph editor itself on the other hand should not serialize per frame by any means. Thus, if you deselect the gameobject from the Unity inspector (select something else) and keep editing your graph, things should go back to normal.
I think the fact that Unity calls OnBeforeSerialize per frame is very weird, but maybe I can come up with a hacky workaround solution to not let that happen.
This can happen only in the case when a gameobject with the FlowScriptController component is selected and currently in the Unity inspector.
This is basically due to the fact that Unity calls “OnBeforeSerialize” on every editor frame when an object is in the inspector. (I never
understood why).
That is definately not the case. I have none gameobjects with attached flowscripts (I load all flow scripts in runtime from resources).
The graph editor itself on the other hand should not serialize per frame by any means. Thus, if you deselect the gameobject from the Unity inspector (select something else) and keep editing your graph, things should go back to normal.
I think the fact that Unity calls OnBeforeSerialize per frame is very weird, but maybe I can come up with a hacky workaround solution to not let that happen.
Thanks for reminding me of this!
By the way, if I run the application (Unity is in a play mode), the graph editor works smoothly.
PS: I found that! You don’t need to select the gameobject with attached script on the scene. Selecting the script asset in the project is enough to make it work very slow. So, for now, I can select for example a folder after opening a script from the project. Thanks! That will help me a LOT.
Developer at Lazy Bear Games
http://www.lazybeargames.com
Sorry for the very late reply (I was on a small vacation) and thanks for the follow up!
Indeed, even having the asset itself selected does produce this same problem. Once again it is due to how Unity calls OnAfterDeserialize on every frame when a “Unity Object” is selected and currently in the inspector, something that I will have to possibly hack-around to avoid.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.