Resize walls at runtime

Hi everyone,
I’m using this script to create walls at runtime:

using UnityEngine;
using System.Collections;

public class CreateWalls : MonoBehaviour {

    bool creating;
    public GameObject start;
    public GameObject end;
    public GameObject wallPrefab;
    GameObject wall;
   
    void Start()
    {
    }
   
    void Update()
    {
        GetInput();
    }
   
    void GetInput()
    {
        if(Input.GetMouseButtonDown(0))
        {
            setStart();
        }
        else if(Input.GetMouseButtonUp(0))
        {
            setEnd();
        }
        else{
            if(creating)
            {
                adjust();
            }
        }
    }
   
    void setStart()
    {
        creating = true;
        start.transform.position = getWorldPoint();
        wall = (GameObject)Instantiate(wallPrefab, start.transform.position, Quaternion.Identity);
    }
   
    void setEnd()
    {
        creating = false;
        end.transform.position = getWorldPoint();
    }
   
    void adjustWall()
    {
        start.transform.LookAt(end.transform.position);
        end.transform.LookAt(start.transform.position);
        float distance = Vector3.Distance(start.transform.position, end.transform.position);
        wall.transform.position = start.transform.position + distance/2 * start.transform.forward;
        wall.transform.rotation = start.transform.rotation;
        wall.transform.localScale = new Vector3(wall.transform.localScale.x,wall.transform.localScale.y, distance);
       
    }
   
    void adjust()
    {
        end.transform.position = getWorldPoint();
        adjustWall();
    }
   
    Vector3 getWorldPoint()
    {
        Ray ray = camera.ScreenPointToRay(Input.mousePosition);
        RaycastHit it;
        if(Physics.Raycast(ray, out hit))
        {
            return hit.point;
        }
        return Vector3.zero;
       
    }

It creates a wall in the middle of two poles and after resize it on one axis according to the distance of the two poles.
But once the walls have been built, how can I resize them by giving the width of a wall as input?
I succeded in resizing the first wall, but since the room can have any size and any number of wall (walls always have a snap of 90°) look really complicated to do this.
Did anyone already made something like this?
Thank you.

To me it is not clear what you are trying to achieve. Do you place several walls and then want to scale them to match the size of a reference wall?

Hi, let’s say I have a rectangular room like this:
7496974--923300--room.png
When I set the A wall to 3 m, I want the C wall to be 3m too and the B wall to slide towards left of 3m.
If I set the B wall to 1m, the D wall must be 1m too and the C wall must go up 1m.
Hope I’ve been more clear.
Thank you.

I would go for a room class that holds the walls and handles wall positioning and scaling. Have width and height as public variables.
Have two lists holding the walls of equal size (AC, BD)
Scale walls based on your public variables.
Position walls by adding / substracting have of the other walls size to the rooms center.
It’s manual work, but it is straight forward.