public struct SendFile : NetworkMessage
{
public byte[] imageBytes;
public string imageName;
}
public class FileLoader : MonoBehaviour
{
[SerializeField] private FileManager manager = null;
[SerializeField] private Texture2D loadedImage = null;
private void Start()
{
if (!NetworkClient.active) return;
NetworkClient.RegisterHandler<SendFile>(OnSendFile);
}
private void OnSendFile(NetworkConnection conn, SendFile file)
{
}
}```
Hello! I'm following Dapper Dino's multiplayer messaging tutorial, and I've been getting this error:
```error CS1503: Argument 1: cannot convert from 'method group' to 'Action<SendFile>'```
I've been following the tutorial closely and ran into this issue which I'm unsure of how to solve.
NetworkClient.RegisterHandler<SendFile>(OnSendFile);```
This line is causing the problem, but I have no idea how to fix it since I'm relatively new to networking. Any ideas?