Size of the platform

platformEntity.getLocalScale().x

This actually shows the scale not the size, scale of different entity can be 1 but their size changes.

I have seen few post in forum where they use bounding box as in Calculate bounding box in a model.