Как уменьшить отставание в VR игры в единстве


March 2019


1.6k раз


Я строил игру для VR с использованием Unity3D. Она имеет только низкие модели поли и размер файла меньше 40 мб еще игра тормозит, когда играл на мобильный .. Просьба предложить, как улучшить производительность ..

Заранее спасибо..

2 ответы


What I found from developing and launching a vr game is some of the issues below

  • Number of polygons is usually your first to check even though your models are low poly. For example, I looked at Synty models in the unity store and some of them were over 1k for a bag and 7k for a character model. This seriously reduce the amount of objects you can if you want to target a max of 50000 per eyes.

With some models, you can use blender and the decimate tool to reduce the polygon count pretty easily. From there I would use LOD's to reduce their count further based on distance.

  • Use occlusion culling (pro version only)
  • Set your camera distance to maybe a 100 instead of the default
  • Use mobile shaders and careful using some of the standard shaders as they are expensive. Also transparent shaders will becomes expensive cause overdraw.
  • Batch your textures and make them static if possible
  • Don't use dynamic shadows on lighting but instead bake your lights
  • Try to avoid using physics as this becomes expensive and instead raycast to trigger events or shooting weapons.
  • Run profiler often and check for any bottlenecks (pro version only)
  • Reduce the count of Particles effects and their values
  • Character bones can also cause issue so remove as many as possible
  • There is also your code to look at as mentioned by Manujamming
  • Set quality setting to low in the inspector to gain best performance.

Could you provide a screenshot of your game scene?

I hope this makes sense. Best of luck!


In order to improve performance in VR for mobile you have to optimize everything as best as you can, you should keep some of these variables in mind:

Graphics Side - Number of polygons in the scene - How many source of lighting do you have

Programming Side - How much work is taking your code, is doing it efficiently?

The programming part can include problems within the physics system, also some logic problems that can probably decrease the overall performance because of higher computation.

My advice is to learn about the Profiler that unity offers, actually you can observe how much work is taking your code and where exactly it is your bottle-neck. This video also can be useful.

Of course a solution could be implement your code following design standards, like design patterns and software architecture (depending on the size of the project).

I hope it can be useful for you!