suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

Fresh install of 1.81g and have interfaces not implemented errors on the DefaultLagCompensationManager #1966

Closed runningbird closed 1 year ago

runningbird commented 1 year ago

After importing into a clean project and setting up for unity 2021.3.16f

I have done nothing else but import and got the following:

Assets\UnityMultiplayerARPG\Core\Scripts\Networking\Implements\DefaultLagCompensationManager.cs(8,65): error CS0535: 'DefaultLagCompensationManager' does not implement interface member 'ILagCompensationManager.SimulateHitBoxes(long, long, Action)'

and

Assets\UnityMultiplayerARPG\Core\Scripts\Networking\Implements\DefaultLagCompensationManager.cs(8,65): error CS0535: 'DefaultLagCompensationManager' does not implement interface member 'ILagCompensationManager.SimulateHitBoxesByHalfRtt(long, Action)'

runningbird commented 1 year ago

Looks like in the file DefaultLagCompensationManager

public bool SimulateHitBoxes(long connectionId, long targetTime, Action action) public bool SimulateHitBoxesByHalfRtt(long connectionId, Action action)

but in the interface file ILagCompensationManager

bool SimulateHitBoxes(long connectionId, long rewindTime, System.Action action); bool SimulateHitBoxesByHalfRtt(long connectionId, System.Action action);

If I change the interface to not be a System.Action and just Action it uses your Action class that is based on a MonoBehavior.

I then get errors on the Action.Invoke(): on line 26 and 35 of the DefaultLagCompensationManager.

Then I get Error CS7036 There is no argument given that corresponds to the required parameter 'methodName' of 'MonoBehaviour.Invoke(string, float)' Assembly-CSharp G:\GameDesign\NPC-Jobs\Assets\UnityMultiplayerARPG\Core\Scripts\Networking\Implements\DefaultLagCompensationManager.cs 26 Active

runningbird commented 1 year ago

Whoops looks like I did have an action class in the default namespace :(