Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug NetworkBehaviour Singleton error

Discussion in 'Netcode for GameObjects' started by BraniDev, Jul 27, 2023.

  1. BraniDev

    BraniDev

    Joined:
    Aug 3, 2019
    Posts:
    25
    Hi i installed package Netcode for GameObjects 1.2.0 and try out 1.4.0 as well but with same bug.
    when i create this :
    NetworkBehaviour.Singleton.StartHost();
    then under Singleton is error " NetworkBehaviour does not contain a definition for 'Singleton'.
    In the Course i watch is working just fine, but for me for i don't know what reason is not working and i don't know how to continue, what i am doing wrong?
    Thank you.
     
  2. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    698
  3. lavagoatGG

    lavagoatGG

    Joined:
    Apr 16, 2022
    Posts:
    229
    Instead
    NetworkBehaviour.Singleton.StartHost();

    try:
    NetworkManager.Singleton.StartHost();
     
  4. BraniDev

    BraniDev

    Joined:
    Aug 3, 2019
    Posts:
    25
    Omg i was totally blind yesterday thank you very much!
     
    lavagoatGG likes this.