- Home /
UNet: How to get isLocalPlayer from a parent
Looking everywhere, I didn't find anything that really answered this question. I was wondering how I would get isLocalPlayer from the child of the Network Identity. The parent is the only object that is able to get the isLocalPlayer variable. I did have a temporary solution, though. I would use GetComponent to get a script that held the isLocalPlayer value. However, calling GetComponent every update feels very inefficient. Getting the script every few updates would not work either, since isLocalPlayer needs to be accessed every update in order for correct user input to work.
Answer by EvanBindz · Aug 02, 2016 at 01:05 PM
this might help http://forum.unity3d.com/threads/scripts-with-islocalplayer-as-child-game-object-always-return-false.372368/
Your answer
![](https://koobas.hobune.stream/wayback/20220612075526im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
UNET Direct IP Connection not working 0 Answers
UNet NetworkServer max connections 4 Answers
Unet network message or Command/RPC 0 Answers
UNET "no free events for message" when client pauses game. 2 Answers