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?