using UnityEngine;
using System.Collections;
using UnityEngine.Networking;
public class Enemy_Spawner : MonoBehaviour {
[SerializeField] GameObject Prefab;
[SerializeField] GameObject Spawn;
public override void OnStartServer()
{
EnemySpawn();
}
void EnemySpawn()
{
GameObject go = GameObject.Instantiate(Prefab, Spawn.transform.position, Quaternion.identity) as GameObject;
NetworkServer.Spawn(go);
}
// Update is called once per frame
void Update () {
}
}
このコードなのですが。10行目にこんなエラーが出ます。
Assets/Script/Enemy_Spawner.cs(10,30): error CS0115: `Enemy_Spawner.OnStartServer()' is marked as an override but no suitable method found to override
グーグル翻訳で翻訳して調べてみたり。ggったりして調べてみたんですが、さっぱりわかりません。override型の部分でエラーが出ていることは何となくわかりました。