#so how to achieve that

1 messages · Page 1 of 1 (latest)

bitter plaza
#

In your OnNetworkSpawn() check for IsLocalPlayer or IsOwner then disable the camera object

plucky cloak
#

give me sec

#

ok where is OnNetworkSpawn() i can only see OnNetworkInstantiate();

#

what class is that from?

bitter plaza
#

Are you using Netcode for Gameobjects?

plucky cloak
#

yes

#

1.0.2

bitter plaza
#

that is super old. update to 1.5.2

plucky cloak
#

sec

#

i did but i still cant see OnNetworkSpawn

#

what is OnNetworkSpawn()?

#

ok i had to use override thats why i couldn't see it didn't know

bitter plaza
plucky cloak
#

public class CheckForCameras : NetworkBehaviour
{
public GameObject Camera;

public override void OnNetworkSpawn()
{
    if (!IsOwner)
    {
        Camera.SetActive(false);
    }
}

}

#

is that right way?

#

i am following tutorial of codemonkey but im just stuck at this point , i need to solve this to continue following it, thats why i just wanna get this over with so if u can help me i'd really appreciate it

#

ok well something worked right now but now i got another issue

#

imma solve it real quick

#

yeah its working now

#

I guess 2 cameras were breaking it , might be a wild guess tho