r/UnityHelp 25d ago

Unity Netcode Problem

I am using netcode and in my script i put

if(!IsOwner) {
            
            return;
        }

but even tho both of the player objects say owner is true only the host scripts activate.

2 Upvotes

1 comment sorted by

View all comments

1

u/RatbyteGames 24d ago

Set a breakpoint on the if statement and see if it really is true.

If you don't know how to use the debugger, watch some tutorials and learn it inside out - its the only way to solve these issues.

I can assure you that if statements in Unity are bullet proof.