How to access a method from another class in C# in Unity

I want to access the method MoveAgent from public class ObstacleTowerAgent : Agent see below:

using System;
using System.Collections.Generic;
using UnityEngine;
using MLAgents;


/// 
/// Agent logic. Responsible for moving agent, assigning rewards, and going between floors.
/// 
[RequireComponent(typeof(AgentAnimator))]
public class ObstacleTowerAgent : Agent
{
    private void MoveAgent(float[] act)
    {
		...
	}
}

I have tried:

using UnityEngine;

/// 
/// Responsible for physically moving platforms around according to various parameters.
/// 
public class PlatformMover : MonoBehaviour
{
    private void FixedUpdate()
    {
        ObstacleTowerAgent agent2 = new ObstacleTowerAgent();
        float[] act = new float[4];
        act[0] = 1f;
        agent2.MoveAgent(act);
	}
}

What am I doing wrong?

In ObstacleTowerAgent, change MoveAgent(float act) from private to public.

You must make your “MoveAgent” method public to access it from another class

using MLAgents;

https://i.imgur.com/uJJijvnl.jpg