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 /
  • Help Room /
This question was closed Jul 23, 2016 at 03:16 PM by Insui for the following reason:

Other

avatar image
0
Question by Insui · Jul 19, 2016 at 05:24 PM · c#unity 5networking

Networking With Colors Unity 5

I haven't found an answer yet for this that works. I am trying to make an object opaque with a left click and have it appear the same on a client window. Does anyone know how to send color data over a network with Unity 5?

Edit: Also the changing game object is a child.

Comment
Add comment
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

2 Replies

  • Sort: 
avatar image
0

Answer by Soos621 · Jul 19, 2016 at 05:28 PM

If the color variable itself can't be sent over the network then you can always set the rbg values of the colors to a vector3 then send that if that doesn't work then you can take each value from the Color and set it to a float

Comment
Add comment · Show 7 · 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 Insui · Jul 19, 2016 at 05:40 PM 0
Share

Both of these don't work. I should also mention that the game object that changes is a child, and I use Transform Child in the inspector of the root object.

avatar image Soos621 Insui · Jul 19, 2016 at 05:44 PM 0
Share

Are you setting the material directly? You will need to take a color from the object send the color over the network then reapply it to the client objects material

The object being a child shouldn't have any interference with this process

avatar image Insui · Jul 19, 2016 at 06:01 PM 0
Share

I'm not sure if I am doing the same thing that you are suggesting so please tell me. Specifically what I did was create a material for transparent and another one for opaque, then set each one on a click down/up key, but that didn't work either.

avatar image Soos621 Insui · Jul 19, 2016 at 06:06 PM 0
Share

How are you changing the material on the object? I assume that your doing something like

Public material coloredmaterial; Public material Transparent material;

if(input.getmousebutton(0)){ This.getcomponent().material = coloredmaterial; }

avatar image Soos621 Insui · Jul 19, 2016 at 06:07 PM 0
Share

You can also change the color of the material by using a material.albedeo I believe sry if there are some mistakes I'm not at my pc

avatar image Insui Soos621 · Jul 19, 2016 at 06:12 PM 0
Share

Yes pretty much the same thing but G e t C o m p o n e n t < S p r i t e R e n d e r e r > ( ) . I will try this when I get back as well though

Show more comments
avatar image
0

Answer by rmassanet · Jul 20, 2016 at 07:26 AM

Instead of sending the colour over the network, why not calling a method in all clients that sets the desired colour?

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 Insui · Jul 20, 2016 at 11:44 PM 0
Share

I'm not sure how to call methods of other objects through a network. Also i have been playing around with setActive to see if I can find a different solution. If you could tell me how I will try it

avatar image rmassanet Insui · Jul 21, 2016 at 06:25 AM 1
Share

You can use RPC for that. Check the Unity Networking tutorial. This section talks about RPCs, but I would recommend you go through all the networking section:

https://docs.unity3d.com/$$anonymous$$anual/UNetActions.html

avatar image Insui rmassanet · Jul 22, 2016 at 12:38 AM 0
Share

I had thought about reading the entire networking section of the manual from the beginning but there is way too much content for me to go through (as for trying a fun quick networking project for the summer). Also everything I have attempted with RPC has not worked. I have been trying to get this last part of my program to work for over 2 week now, so I will probably end up reading through the networking manual since I have tried everything else, and quit mid way through. Anyway, thanks for trying to help out.

Show more comments

Follow this Question

Answers Answers and Comments

226 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 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 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

ClientRpc not functioning 0 Answers

How to Disconnect a client from the server properly using unity Netcode for GameObjects ? 0 Answers

Can anyone tell me how to fix this problem???? 1 Answer

How do I create a disconnect button in a scene [UNET] 0 Answers

What's wrong with my script ? 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