change getTexUnitType assertion to warnOnce