Vadus said:But, when I say, that we found out, that the UnitInfos Class has no getUnitType( ) method were back on topic
with my code I want to display the units on a panel, like in the civliopedia. And with a drop down box (containing all unit descriptions) I can change this unitgraphic.
But I didn't find a sample code for this in the CvPediaUnit.py. The CvMainInterface.py ( there is a unit graphic in the left bottom corner of the city screen) uses
but I want to get a unit from a self defined variable (so by description or id )Code:screen.addUnitGraphicGFC( "InterfaceUnitModel", CyInterface().getHeadSelectedUnit().getUnitType() ... )
So I tried a bit on my own and have now this problem, that I only can use the getUnitClassType() from gc.getUnitInfo( ) .. but maybe I need a CyUnit instance .. only this class has the needed getUnitType( ) method
Oh, sorry, my bad. For a unitInfo it's just getType().