Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by xyHeat · Jun 19, 2016 at 10:08 AM · uinetworkingfps

UI with unity networking

Hi everybody ! I'm making an FPS but i have a problem with my UI : He doesn't follow the camera. I have a script that rotate with the camera that i use two time : one torotate X on the body and one to rotate y on the camera. When i rotate, the canvas stay at the same place. I tried Screen space - overlay, screen space - camera and world space. The canvas is a child of the camera :

Player

Graphics

Body

Camera

Weapon Canvas

Can someone halp me ? Thank you, bye, xyHeat

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image xyHeat · Jun 20, 2016 at 09:15 AM 0
Share

I can't find a solution for this problem...

avatar image jdean300 · Jun 20, 2016 at 09:37 AM 0
Share

I don't know if this is your issue, but I don't usually see people childing their UI to the camera. Ins$$anonymous$$d, try making it a separate object and setting the canvas render mode to screen space overlay

avatar image xyHeat jdean300 · Jun 20, 2016 at 09:55 AM 0
Share

I tried but this don't work, the UI don't follow the camera :/ i tried to change the culling mask with a new camera, only for the UI but it don't work too ... Now i'm trying screen space -camera changing the plane distance... It seem work

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Chinmay_Gawande · Jun 03, 2018 at 07:29 PM

Hey @xyHeat , Can you please share how you have overcame the overlay of ui buttons of the two clients joining the same game ?

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image xyHeat · Jun 03, 2018 at 07:55 PM 0
Share

Hey, I fixed this a few time ago and I don't remember exactly how I did but try this :

  1. Create an instance of your canvas with a script with access to each UI elements

  2. Create a script that will setup all players components when it spawn (using if(!islocalplayer) statement)

  3. Use this script to instantiate your canvas.

You'll have only one canvas because it is created only if you are the local player

I hope i helped you, have a good day :)

avatar image Chinmay_Gawande xyHeat · Jun 03, 2018 at 08:15 PM 0
Share

Thanks @xyHeat :) Really Appreciated That You Responded Can You Please Elaborate The 2. Point .

avatar image xyHeat · Jun 03, 2018 at 08:42 PM 0
Share

I usrd to create a script called SetupPlayer which contain a start method. This start method enable or disable components on player instance and instantiate things like canvas or other prefabs.

For this I use two public list of components : componentsToEnable and componentsToDisable. Then I loop through these lists with a for loop to enable or disable components.

To know what to do, I use unity networking features like islocalplayer which return true if the method is called on the active client You can find easily help about it on others posts

avatar image Chinmay_Gawande · Jun 04, 2018 at 06:41 AM 0
Share

Thanks @xyHeat !

avatar image
0

Answer by xyHeat · Jun 20, 2016 at 10:39 AM

I change my canvas to "screen space -camera" and i put the pkane distance to 0.4. It seem work.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

81 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why when I make a Networking first person game it controls the other person? 1 Answer

Frames Per Second Cost from Multiplayer? 1 Answer

Network.sendRate = 50; is that bad? 0 Answers

MLAPI error with two instances of networked object 0 Answers

Multiplayer UI : What's the best implementation for a waypoint-like system? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges