HI I just updated to AC1.79.3 and I now get this error for my script
Assets/TMOWM/Scripts/OnLoadStopWalk.cs(13,44): error CS0123: No overload for 'StopWalking' matches delegate 'EventManager.Delegate_SaveID'
This is the script, can you help?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AC;
public class OnLoadStopWalk : MonoBehaviour
{
List<AC.PlayerPrefab> players;
// Start is called before the first frame update
void Start()
{
AC.EventManager.OnFinishLoading += StopWalking;
AC.EventManager.OnAfterChangeScene += StopWalking;
}
private void StopWalking()
{
players = AC.KickStarter.settingsManager.players;
foreach (AC.PlayerPrefab currentplayerPrefab in players)
{
AC.Player currentplayer = currentplayerPrefab.GetSceneInstance();
if (currentplayer)
{
currentplayer.Halt();
}
}
AC.KickStarter.player.Halt();
}
private void StopWalking(AC.LoadingGame loadingGame)
{
StopWalking();
}
// Update is called once per frame
void Update()
{
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The OnFinishLoading event now requires an integer parameter, assigned as the save file's ID number.
You should also unregister events in OnDisable: