Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved using Unity.Netcode; not working properly?

Discussion in 'Netcode for GameObjects' started by dummmmmy, Jun 17, 2023.

  1. dummmmmy

    dummmmmy

    Joined:
    Jun 17, 2023
    Posts:
    12
    hi, i have a newbie question, ive been following the netcode documentation. ive downloaded the newest netcode: 1.5.1 and i have unity 2022.1.23f1.

    despite having "using Unity.Netcode" it looks like i cant use if (IsOwner) same with other netcode functions. what am i doing wrong?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Please post the code with the issue and whatever error message you get.
     
  3. dummmmmy

    dummmmmy

    Joined:
    Jun 17, 2023
    Posts:
    12

    Attached Files:

  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Your RPC class must subclass NetworkBehaviour for netcode stuff to work.
     
  5. dummmmmy

    dummmmmy

    Joined:
    Jun 17, 2023
    Posts:
    12
    thank you