Unity-Technologies / BoatAttack

Demo Project using the Universal RP from Unity3D
Other
2.54k stars 954 forks source link

Unnecessary 28B GC.Alloc every frame #137

Open JonathanIlk opened 3 years ago

JonathanIlk commented 3 years ago

Creating a new PlanarReflectionSettingData every frame allocates 28B on the heap.

Making the PlanarReflectionSettingData a struct would be a simple fix for this issue.

https://github.com/Unity-Technologies/BoatAttack/blob/fdd4ba7dc6a6fabd561ea186b4453735ac9103eb/Packages/com.verasl.water-system/Scripts/Rendering/PlanarReflections.cs#L248