В чем проблема Unity выводит следующюю оошибку
You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all
UnityEngine.MonoBehaviour:.ctor()
CoreClient:.ctor() (at Assets/Code/CoreClient.cs:36)
AnimatorController:.ctor() (at Assets/Code/AnimatorController.cs:9)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AnimatorController : MonoBehaviour
{
private Animator anim;
private CoreClient core = new CoreClient();
void Start()
{
//try
//{
// StartServer();
//}
//catch (Exception e)
//{
// Debug.Log("<color=red>ERROR: </color> " + e);
//}
anim = gameObject.GetComponent<Animator>();
core = gameObject.GetComponent<CoreClient>();
}