Gothic-UnZENity-Project / Gothic-UnZENity

Fan project recreating Piranha Bytes' evergreens Gothic I and Gothic II in Unity Engine. Currently focussing on VR.
GNU General Public License v3.0
6 stars 1 forks source link

Check proper usage of _new Material()_ and Renderer.material.Set*() #60

Open JaXt0r opened 1 week ago

JaXt0r commented 1 week ago

When the main game is loaded (world.zen; without NPCs), we have over 1.2k Materials initialized. When looked at our mesh creation logic, we always create new Material(...) when creating a mesh or calling Renderer.mesh.Set*() when altering data which creates a clone of the Material.

TODOs:

Hints:

Image