Search Unity

[BUG] Netcode tutorial - Unity Crash

Discussion in 'Multiplayer' started by LucCoder, Feb 17, 2020.

  1. LucCoder

    LucCoder

    Joined:
    Feb 4, 2018
    Posts:
    1
    When following the tutorial "Getting started" of Netcode https://docs.unity3d.com/Packages/com.unity.netcode@0.0/manual/getting-started.html Unity 2019.3.1f1 Personal Windows DX11 crashes when Updating the component list of the Cube (Step 3).
    This "fix" https://forum.unity.com/threads/uni...ent-list-in-ghost-authoring-component.797511/ did not work for me.
    There is no error message or anything. Unity just shutsdown.

    Steps to Reproduce:
    • Create a new project
    • Go to Package Manager -> Advanced -> Enable preview packages
    • Search for Netcode and press Install
    • Go to the Scene and create a empty gameObject
    • Add a Convert To Client Server Entity to the gameObject
    • Create a Cube prefab
    • Click on the prefab and then click on "edit the prefab"
    • Add a Ghost Authoring Component
    • Add a the following script to the cube:
      Code (CSharp):
      1. using Unity.Entities;
      2. using Unity.NetCode;
      3.  
      4. [GenerateAuthoringComponent]
      5. public struct MovableCubeComponent : IComponentData
      6. {
      7.     [GhostDefaultField]
      8.     public int PlayerId;
      9. }
    • Go to the Ghost Authoring Component and click "Update Component List "
    • Unity is now crashed for me :(
     
    Last edited: Feb 17, 2020