-
Notifications
You must be signed in to change notification settings - Fork 6
Performance
Reading and applying the texture rendered by Chromium to an Unity texture can be a resource intensive ordeal.
To deal with this, I have off-loaded the actual reading and writing to memory to a thread. It's important to keep in mind that each CefInstance will have a seperate thread in Unity.
If you are still experiencing issues with performance, you can tweak the CefInstance.TargetFPS
property to determine at which rate the thread runs. For smooth interaction you should not set this lower than 24. Usually a value between 24 and 30 works best.
You can of course turn this into a configurable option in your game's settings menu, be careful to limit the user in what value they can set though as changes to this value are immediately picked up by the thread and can slow your game to a halt if it's set too high (or it may render your UI useless if set too low.)
If this does not have a desirable effect, you can also experiment with CefInstance.ApplyMipMaps
(default true
.)