Script will not log mesh height

I’m using a script to find the max height of a mesh but it doesn’t print the value to the console.

Any help would be amazing!

using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 
 
 
 public class IslandGenerator : MonoBehaviour
 {
 
 
     public float GetHighestPoint(Mesh mesh)
     {
         mesh.RecalculateBounds();
         return mesh.bounds.max.y;
 
     }
 
     // Start is called before the first frame update
     void Start()
     {
 
     }
 
 
 
     // Update is called once per frame
     void Update()
     {
         Debug.Log(GetHighestPoint);
         
     }
 
    
 
 
 }

You are logging the function itself, not its return value.

You need to actually call the function like this:

Debug.Log(GetHighestPoint(mesh));

Of course you don’t actually know what Mesh you are talking about here, so you likely need this line before the last one:

Mesh mesh = GetComponent<MeshFilter>(). sharedMesh;