kbengine / kbengine_unity3d_demo

This client-project is written for kbengine(a MMOG engine of server)
http://kbengine.org
293 stars 284 forks source link

warning: event(onConnectionState) NotFound #7

Open bl0up opened 7 years ago

bl0up commented 7 years ago

Hi,

I'm trying to make this demo work with unity and it seems to be ok but I get a warning about this "onConnectionState" event. How can I solve this issue?

Here is the complete log:

Event::fireIn: event(onConnectionState) not found! UnityEngine.Debug:LogWarning(Object)

KBEngine.Dbg:WARNING_MSG(Object) (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/Dbg.cs:47)

KBEngine.Event:fire_(Dictionary2, LinkedList1, String, Object[]) (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/Event.cs:276)

KBEngine.Event:fireAll(String, Object[]) (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/Event.cs:264)

KBEngine.NetworkInterface:_onConnectionState(ConnectState) (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/NetworkInterface.cs:110)

System.Reflection.MethodBase:Invoke(Object, Object[])

KBEngine.Event:processInEvents() (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/Event.cs:365)

KBEngine.KBEngineApp:process() (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:288)

KBEngine.KBEngineAppThread:process() (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:2702)

KBEngine.KBEThread:run() (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:2632)

Thanks :)

kbengine commented 7 years ago

Hi, This is not a problem. Whether the event needs processing is optional. Perhaps the warning should be closed.

bl0up commented 7 years ago

Ok, thank you for your answer.

What if I want to define this method? Where should I write it? I have a hard time figuring that out.

kbengine commented 7 years ago

You're in any place “registerOut (onConnectionState,...)”, reference demos.