Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Jakesie · Apr 29, 2013 at 11:09 AM · networkinganimations

Animations via network

Good day, I am busy with a simple adventure game, and I am working on the online animations. The movement and positions is working fine, but the character does not walk (animate) on the partner's screen. Now I know accurate animations can eat bandwidth, and in my case it is not critical. My question is how to get the animations to work via network. I have asked in the forum, with no concrete answers here. In fact I cannot find ONE tutorial on how to transmit ANIMATIONS via network. not movement and positions,but ANIMATIONS.

If someone could help me I will really appreciate it.

Best regards,

Comment
Add comment · Show 4
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 FLASHDENMARK · Apr 29, 2013 at 12:35 PM 0
Share

What I plan to do in my game is to just stream an int.

1 = forward walk. 2 = backwards walk. 3 = idle.

Etc.

And then play the appropiate animations based on the received int.

avatar image Benproductions1 · May 22, 2013 at 01:47 AM 0
Share

@OrangeLightning Please convert your comment to an answer, as it answers the question perfectly :)

avatar image Jakesie · May 22, 2013 at 06:10 AM 0
Share

Actually, he didn't answer the question, He merely stated how he plan to do it. Remember, for us indie folks, "stream an int" means nothing if you don't know how to do it. If there is no form of guide, for example say "place this or that in your networking script", I/we are just as lost as in the beginning. Yes, I know there is documentation, and I have read through most of it, but some of us just do tjis as a hobby, with limited knowledge, and learns more by examples than by documentation ;)

I appreciate the answer, though. It gives me a new direction on my search for answers.

Thanks,

Jakes

avatar image FLASHDENMARK · May 22, 2013 at 11:51 AM 0
Share

The docs do provide plenty of examples at times.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by KiraSensei · May 22, 2013 at 07:21 AM

 enum animations { idle, forward, backwards };
 
 @RPC
 function NetworkAnimate (anim:int) {
     switch (anim) {
         case animations.idle:
             animation.Play("idle");
             break;
         case animations.forward:
             animation.Play("forward");
             break;
         case animations.backwards :
             animation.Play("backwards");
             break;
     }

When you want to call an animation, you need to call :

 networkView.RPC("NetworkAnimate", RPCMode.All, 0); 

to play idle for example.

Comment
Add comment · Show 2 · 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 apple92 · Nov 27, 2013 at 06:34 PM 0
Share

Thank you for this example. I had a different approach where I tried to sync the State names.. Didn't really work. But with Integers it works really nice.

avatar image KiraSensei · Nov 27, 2013 at 10:50 PM 0
Share

Glad I could help someone, the person who asked the question never answered to me :)

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

17 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

Related Questions

Locomotion animation syncing across network. 0 Answers

Unity networking tutorial? 6 Answers

Unity multiplayer Animations Over a network etc 1 Answer

Multiplayer Animations Sync Problem 0 Answers

Network Discovery is not working over multiple devices. 1 Answer


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