cancel
Showing results for 
Search instead for 
Did you mean: 

Platform SDK for unity cause many GC

chesstar
Explorer
I used the platform sdk for unity.I found this sdk callback will cause a large of GC amount.I tested this,when I comment out my specific callback functionality,the large GC still existed.Actually,this situation will happen after the oculus server return me the successful result,about 0.5MB GC.When the request errored,it will return me 340B GC.So,I think this is an oculus issue.
4 REPLIES 4

romrador
Honored Guest
Hi chesstar, thanks for reporting this! Can you give any detail as to which calls are causing the allocations you're seeing?

romrador
Honored Guest
So I dug into this a little bit, and I found that one of our print statements that runs whenever a messages comes back from the server was generating substantial amounts of garbage.

I've removed it, so this particular issue should be much improved in the next version of the Unity integration.

In the mean time, you can patch it yourself. Just remove the two `Debug.Log` statements in Unity/Assets/OculusPlatform/Scripts/Message.cs

chesstar
Explorer
Thanks for your reply.I will try it.Thank you very much again.

romrador
Honored Guest
You bet! Please let me know if you're still seeing problems.