Open moepi2k opened 3 months ago
Hmm, I might did something which affect that class
Cannot reproduce it yet.
Want to see your setup and want to know which objects from your setup that not working properly.
this is my setup:
added a lever and a door which has the component on it. both are instantiated in a prodedural generated map https://gyazo.com/d2f204e7e6e21edf21009a62b565558b
added both of them to other network objects in database https://gyazo.com/6647eabbd7f6fc5bfeada442eabbc82a
so after enter the game the prefabs (not the one in scene) the one in project looks like this https://gyazo.com/ac8df64107efdcb35ad3709af28a29dd
both components disabled. so even after restar game. the component keeps disabled.
i just tested the door on a normal map which is not procuderal and then i get this error and cant login. is my setup wrong?
ArgumentException: An item with the same key has already been added. Key: 326 System.Collections.Generic.Dictionary
2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at 2[TKey,TValue].Add (TKey key, TValue value) (at <c0b7b90d34a54066a7234dad69255116>:0) LiteNetLibManager.LiteNetLibIdentity.Initial (LiteNetLibManager.LiteNetLibGameManager manager, System.Boolean isSceneObject, System.UInt32 objectId, System.Int64 connectionId) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Scripts/GameApi/LiteNetLibIdentity.cs:524) LiteNetLibManager.LiteNetLibAssets.NetworkSpawnScene (System.UInt32 objectId, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, System.Int64 connectionId) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Scripts/GameApi/LiteNetLibAssets.cs:377) LiteNetLibManager.LiteNetLibAssets.SpawnSceneObjects () (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Scripts/GameApi/LiteNetLibAssets.cs:357) LiteNetLibManager.LiteNetLibGameManager.ProceedOnlineSceneLoaded (LiteNetLibManager.ServerSceneInfo serverSceneInfo) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Scripts/GameApi/LiteNetLibGameManager.cs:338) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask
1[TStateMachine].GetResult (System.Int16 token) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs:218)
LiteNetLibManager.LiteNetLibGameManager.LoadSceneRoutine (LiteNetLibManager.ServerSceneInfo serverSceneInfo, System.Boolean online) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Scripts/GameApi/LiteNetLibGameManager.cs:310)
UnityEngine.Debug:LogException(Exception)
Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/UniTaskScheduler.cs:90)
LiteNetLibManager.1:Run() (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs:104) Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/UniTask.cs:25) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore
1:TrySetException(Exception) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs:167)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:SetException(Exception) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs:210)
LiteNetLibManager.1:Run() (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs:189) Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/UniTask.cs:25) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore
1:TrySetResult(Object) (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs:139)
Cysharp.Threading.Tasks.DelayPromise:MoveNext() (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/UniTask.Delay.cs:763)
Cysharp.Threading.Tasks.Internal.PlayerLoopRunner:RunCore() (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs:175)
Cysharp.Threading.Tasks.Internal.PlayerLoopRunner:Update() (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs:145)
Cysharp.Threading.Tasks.Internal.PlayerLoopRunner:Run() (at Assets/UnityMultiplayerARPG/Core/LiteNetLibManager/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs:104)
`
hey me again. regarding this component, last time we talked u told me because of the very last issue it has. i had time to check it again and noticed its still same issue. an issue i never seen before and its really weird.
the function of this component to register object is working the problem is. it works only for the very first time. the component disable itself after register the object, thats what it should but the thing is, it disable the main prefab in project. so after close editor and check the prefab with the compnent the LiteNetLibObjectPlaceholder is disabled.
so i tested it even on a build. it works for the very first time. even after restart server it no longer working becasue its disabled. how could that be?