- Home /
Question by
aurelag · Jun 14, 2021 at 10:45 AM ·
optimizationprofilerskinning
Why do I have a particularly long meshSkinning update (>0.5s), when I'm not doing anything special related to it ?
Hello everyone,
I have a weird issue with Unity right now. One of our functionnality is to change the material of an object, for it to look different. However, when we do this, we have a really long update, with Semaphore.WaitForSignal on the CPU taking a lot of time (generally taking more than a second), and a really long meshSkinning.Update on the GPU (generally ~half the CPU time in those instances).
From what I understood of Semaphore.WaitForSignal, it's a process that waits for something to happen on the GPU.
I have no idea where to look to find a solution for this, so any help is appreciated.
Comment
Answer by Patrickmol · Jun 14, 2021 at 11:35 AM
method
--Do stuff
finished = true;
Ienumerator
while (finished==false)
yield return new waitForSeconds(.25f); //To be more precise Time.fixedDeltaTime
--The method finished
Your answer
![](https://koobas.hobune.stream/wayback/20220613035004im_/https://answers.unity.com/themes/thub/images/avi.jpg)