private void Start() { _waterSurfaceObj = GameObject.FindGameObjectWithTag("WaterSurface"); if (_waterSurfaceObj == null) { print("it's null"); } _floatObjRB = GetComponent <Rigidbody>(); _waterHeight = _waterSurfaceObj.transform.position.y; _modifyBoatMesh = new ModifyBoatMesh(gameObject, _waterHeight);// float volume = FloatHelper.MeshVolume(GetComponent <MeshFilter>()); _floatObjRB.mass = _objectDensity * volume; }