About problems such as errors in the start procedure



  • Hi.
    I bought this asset and tried it for multiplayer testing.
    Some problems occurred and it did not work properly.
    The procedure is as follows. Can you check it?

    1、I made a blank project at Unity2019.2.4f1
    2、TankMultiplayer Asset Install.
    3、There are 3 Errors.

    An error occurred while resolving packages:
    Package com.unity.render-pipelines.lightweight@5.13.0 has invalid dependencies:
    com.unity.render-pipelines.core: Version [5.13.0] is incompatible with the selected version [6.9.0]
    com.unity.shadergraph: Version [5.13.0] is incompatible with the selected version [6.9.0]
    
    A re-import of the project may be required to fix the issue or a manual modification of D:/mock/TeamB/Packages/manifest.json file.
    
    Library\PackageCache\com.unity.render-pipelines.lightweight@5.13.0\Editor\ShaderGraph\LightWeightUnlitSubShader.cs(370,47): error CS7036: There is no argument given that corresponds to the required formal parameter 'inheritedPrecision' of 'PropertyCollector.GetPropertiesDeclaration(ShaderStringBuilder, GenerationMode, ConcretePrecision)'
    
    Library\PackageCache\com.unity.render-pipelines.lightweight@5.13.0\Editor\ShaderGraph\LightWeightPBRSubShader.cs(405,47): error CS7036: There is no argument given that corresponds to the required formal parameter 'inheritedPrecision' of 'PropertyCollector.GetPropertiesDeclaration(ShaderStringBuilder, GenerationMode, ConcretePrecision)'
    

    Resolved

    Window->Package Manager

    Lightweight RP v5.13 → v.6.9.1

    4、PUN2 - FREE Import
    5、I made application in photon. (Photon PUN)
    6、PUN Setup → Input AppId and Setup Project. Close window.
    7、Window->TanksMultiplayer->Network Setup
    Select Photon PUN
    Push Step1 Button.

    Tanks Multiplayer - Network Setup: Wait for the compiler to finish on Step 1, then press Step 2!
    UnityEngine.Debug:Log(Object)
    TanksMP.PluginSetup:OnGUI() (at Assets/TanksMultiplayer/Scripts/Editor/PluginSetup.cs:73)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    

    Push Step2 Button.
    There is Error.

    NullReferenceException: Object reference not set to an instance of an object
    TanksMP.PluginSetup.Setup () (at Assets/TanksMultiplayer/Scripts/Editor/PluginSetup.cs:137)
    TanksMP.PluginSetup.OnGUI () (at Assets/TanksMultiplayer/Scripts/Editor/PluginSetup.cs:84)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:374)
    UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:341)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
    UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    

    8、Save Scene "CTF_Game". (Because It was changed.)
    9、change scene "Intro"
    10、Play in Unity. Push Play Button. There are Errors.
    Infomation

    Photon did not find any matches on the Master Client we are connected to. Creating our own room...
    UnityEngine.Debug:Log(Object)
    TanksMP.NetworkManagerCustom:OnJoinRandomFailed(Int16, String) (at Assets/TanksMultiplayer/Scripts/NetworkManagerCustom.cs:156)
    Photon.Realtime.MatchMakingCallbacksContainer:OnJoinRandomFailed(Int16, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3515)
    Photon.Realtime.LoadBalancingClient:CallbackRoomEnterFailed(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2112)
    Photon.Realtime.LoadBalancingClient:OnOperationResponse(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2337)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:620)
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:552)
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1548)
    Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205)
    Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:139)
    

    Error

    Illegal view ID:0 method: Instantiate GO:ObjectSpawner
    UnityEngine.Debug:LogError(Object)
    Photon.Pun.PhotonNetwork:RPC(PhotonView, String, RpcTarget, Player, Boolean, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1012)
    Photon.Pun.PhotonNetwork:RPC(PhotonView, String, RpcTarget, Boolean, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2779)
    Photon.Pun.PhotonView:RPC(String, RpcTarget, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:411)
    TanksMP.<SpawnRoutine>d__9:MoveNext() (at Assets/TanksMultiplayer/Scripts/ObjectSpawner.cs:153)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    

    Warning

    Had to lookup view that wasn't in photonViewList: View 0 on ObjectSpawner (scene)
    UnityEngine.Debug:LogWarning(Object)
    Photon.Pun.PhotonNetwork:GetPhotonView(Int32) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:822)
    Photon.Pun.PhotonNetwork:ExecuteRpc(Hashtable, Player) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:335)
    Photon.Pun.PhotonNetwork:RPC(PhotonView, String, RpcTarget, Player, Boolean, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1075)
    Photon.Pun.PhotonNetwork:RPC(PhotonView, String, RpcTarget, Boolean, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2779)
    Photon.Pun.PhotonView:RPC(String, RpcTarget, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:411)
    TanksMP.<SpawnRoutine>d__9:MoveNext() (at Assets/TanksMultiplayer/Scripts/ObjectSpawner.cs:153)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    


  • "TanksMultiplayer-> Network Setup-> Step2" I think this is the problem here.

    PluginSetup.cs : 119

    System.Reflection.MethodInfo hierarchyMethod = photonWin.GetType().GetMethod("HierarchyChange", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.DeclaredOnly);
    

    I don't understand what this source does, but isn't it bad that the return value is null?



  • Hello,

    the error you are seeing about "Illegal view ID" is definitely coming from the Setup script not executing correctly. While I am not able to reproduce this on my end (in Unity 2019.1.0), you could try to perform the script steps manually.

    • Open the Network Setup window again and press on Step 1
    • Instead of pressing Step 2, open the game scenes CTF_Game and TDM_Game
    • in each scene, expand the "Spawner" game object, right click on each "ObjectSpawner" object and select "Unpack Prefab Completely"
    • save the scene(s)

    Please report back if this does or does not work.



  • The problem seems to have been solved.
    Thank you.


Log in to reply