So I'm making a game where you can invite other players on the network to battle. My plan was to have a UI object appear when you get an invite. But I'm having trouble sending the invites to specific players on the network. Now I would like to ask how other people would do this so I can get an idea of how I should do it.
Answer by ADAMN721
4 days ago
I would say the easiest way to accomplish this would be by having a canvas attached to your player prefab and having the setting for the canvas set to "Screen Space- Camera". Then point it to your player camera( or even better make a designated UI Cam that only renders UI). Then, when a player notifies another player, simply enable the UI component that would handle the invite and allow the user to proceed with clicking an accept or decline button from there.
Oh ya I was think about doing this but I didn't know if it was a good idea. Thanks!
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
170 People are following this question.
My Brain is fogged: How do I move a networked object with user input
How would you load hundreds of clickable images?
Can anyone tell me how to fix this problem????
Unity 5.4 - NetworkLobbyManager can't accept new connection [hostId: -1 connectionId: 0 isReady: False channel count: 0], not in lobby and game already in progress.
Unet, ¿Spawn an object on server from an object client with localPlayerAuthority set false?