Search Unity

Access Object Size Values

Discussion in 'World Building' started by EricArmitage, Mar 10, 2021.

  1. EricArmitage

    EricArmitage

    Joined:
    Sep 17, 2019
    Posts:
    3
    When I create a probuilder game object the inspector displays the Pb_Object script size XYZ values. How do I access these values from another script attached to the same game object?

    void Update () {

    BuildingX = gameObject.GetComponent<pb_Object>().?????

    }
    upload_2021-3-10_10-25-5.png
     
    sonaht_unity likes this.
  2. NStone_

    NStone_

    Joined:
    Apr 12, 2021
    Posts:
    1
    gameObject.GetComponent<Renderer>().bounds.size