Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
chesstar's avatar
chesstar
Explorer
10 years ago

Platform SDK for unity cause many GC

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

Replies have been turned off for this discussion
  • Hi chesstar, thanks for reporting this! Can you give any detail as to which calls are causing the allocations you're seeing?
  • 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
  • Thanks for your reply.I will try it.Thank you very much again.
  • You bet! Please let me know if you're still seeing problems.