Check if end of object reached.

How can I need to constrain movement of character to a 2dplane that changes size. In order to constrain my character inside I believe I need to get the current size of the prefab. I tried adding a Meshrenderer component to it but the size I retrieve is always 0. I should mention that the plane is imported as a fbx file.

you could place box colliders just on the edges of the 2dplane as children, so whenever you change the size of the parent object the colliders also resize accordingly.

this could work with regular colliders or triggers, depending on your need.