How to Make a 2D Multiplayer Tabletop Card Game in Unity - Part 12 (Target RPCs)

How to Make a 2D Multiplayer Tabletop Card Game in Unity - Part 12 (Target RPCs)

M. S. Farzan

3 года назад

3,555 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@traviswright7558
@traviswright7558 - 26.05.2021 19:57

Wow, this is really good.

Ответить
@pablomoreno4495
@pablomoreno4495 - 01.09.2021 18:53

You are the best! Love your work. Very usefull for me at this moment. Regards from Uruguay! Thanks.

Ответить
@michaelgarcia3180
@michaelgarcia3180 - 30.10.2021 01:07

this made no sense

Ответить
@StevenKR
@StevenKR - 06.01.2022 05:49

The last 4 minutes is really confusing, so let me attempt to summarize: When you are the host, and you click on your own card, the code checks to see if you have authority and since you do, it sends the debug message "Targeted by self!" to your instance of Unity. When you click on someone else's card (the opponent), then the code checks to see if you have authority and since you don't, it will send the debug message by first checking whose client brought that gameObject into existence (the opponent) and send the message "Targeted by other!" to that client's instance of Unity.
This is why you don't see the message "Targeted by other!" when you click on your opponent's cards - it is because your client (instance of unity) didn't create the cards; however, you do see the message when the opponent clicks on your cards.

Ответить