Reply To: Super-slow editing large graphs

FlowCanvas Forums Support Super-slow editing large graphs Reply To: Super-slow editing large graphs

#1912
soulburner
Participant

Hello again,

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