Closed QERT2002 closed 1 week ago
How many game objects are in your effect?
Admittedly not straightforward, but did you run the profiler suggesting this is a bottleneck?
Nowadays I would probably have the RPC provide the relative path e.g. "container/button/label" rather than just "label".
How many game objects are in your effect?
Admittedly not straightforward, but did you run the profiler suggesting this is a bottleneck?
Nowadays I would probably have the RPC provide the relative path e.g. "container/button/label" rather than just "label".
About 1000-1500 gameobjects. I didn’t run the profiler, but when updating tiles (with item names, pictures and prices) that are at the end of the hierarchy, the FPS drops by 50-65 at the moment the button is clicked. If you raise the panel with objects to the very top of the hierarchy, FPS drops by 5-10.
That's quite something.
For the next update I'll change childName
into childNameOrPath
so you can provide the path to the item you want to modify.
ReceiveUIEffectText - add new arg bool CheckOnlyEnabled = false ReceiveUIEffectImageURL - add new arg bool CheckOnlyEnabled = false ReceiveUIEffectVisibility - add new arg bool CheckOnlyDisabled = false
Currently, Transform transform = value.transform.FindChildRecursive(childName); -> this method check all transforms. And in very complex UI effects, where there is a complex hierarchy, this method iterates through absolutely all game objects. This causes a fairly noticeable drop in FPS in the moment.
I propose to add an additional parameter to the existing methods, with a preset value of false, so that plugin creators can optionally force the game code to check only active gameobjects. This small and non-global change will allow plugin developers to currently optimize work with large UI effects. Best regards, QERT2002.