Fix "not all control paths return a value" warning
Texture2d de/serialization rework