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 Abhiroop-Tandon · Apr 03, 2017 at 03:13 AM · animationnetworkinganimatortriggernetwork

Network Animator set trigger not working

Hello everyone,

i have been to almost every forum and question by now and still cannot find a fix for it. I am working on a multiplayer game and the netAnim.setTrigger("Attack1Trigger"); just won't play the animation. I have a Debug.log("Please work"); just above the set trigger so i know that it is 110% reaching that line of code. I have the Network Animator on my enemy and my network components looks like this alt text

The triggers do work if i use GetComponent<Animator>().SetTrigger("Attack1Trigger"); but then it is not synced over the network with other clients. I also tried the SetParameterAutoSend() to make it work but no success there as well.

 public override void OnStartServer()
 {
     for (int i = 0; i < 10; i++)
     {
         netAnim.SetParameterAutoSend(i, true);
     }
 }
 
 public override void PreStartClient()
 {
     for (int i = 0; i < 10; i++)
     {
         netAnim.SetParameterAutoSend(i, true);
     }
 }

Could anyone please suggest me a solution to the problem? The netAnim.SetTrigger("Attack1Trigger"); would just not set the trigger and play the animation.

Thanks in advance.

capture.png (25.6 kB)
Comment
Add comment · Show 1
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 Abhiroop-Tandon · Apr 03, 2017 at 09:20 AM 0
Share

anyone please ??

2 Replies

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

Answer by Abhiroop-Tandon · Apr 04, 2017 at 02:31 AM

Finally after a week of watching all the tutorials and reading all the forums i fixed this, so if anyone faces this problem simply uncheck both the boxes in Network Identity and the NetworkAnimator.SetTrigger(trigger) starts working.

Comment
Add comment · Show 5 · 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 3janeiscool · Feb 26, 2019 at 02:21 PM 0
Share

Please Please Please show me the whole script with NetworkAnimator.SetTrigger(trigger)

only thing i get when i try your solution is: alt text

$$anonymous$$y project "Polygon Nightmare" is totaly stuck at the moment :)

Best regards to you!

avatar image Abhiroop-Tandon 3janeiscool · Feb 26, 2019 at 02:27 PM 0
Share

@3janeiscool i think you need to use anim.SetTrigger("walk") since that is the NetworkAnimator object that you have created on line 9

avatar image 3janeiscool Abhiroop-Tandon · Feb 26, 2019 at 11:18 PM 0
Share

yes. but if i use it. it only play the animation on the client, and it doesn't sync on the other multiplayer clients. :(

thing is i cant find a easy guide discribing the whole process, going from Animator to NetworkAnimator. and get it synced.

Show more comments
avatar image
0

Answer by yuantaoHuang · Mar 28, 2018 at 05:49 AM

Do you find that even you use "NetworkAnimator.SetTrigger(trigger)", sometime it still not working. There is still a chance some animation of charactor is not synced. My feeling is I have to use the CMD / PRC method to synced manually.

Comment
Add comment · Show 1 · 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 Abhiroop-Tandon · Mar 28, 2018 at 09:40 AM 0
Share

Yes, for general animations like walking (where ti$$anonymous$$g is not of importance) it is fine but for more time specific animations such as Attack you will need to sync them using the C$$anonymous$$D/RPC method.

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

190 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

Related Questions

Network Animator not working 0 Answers

NetworkAnimator: SetBool vs. SetTrigget? 1 Answer

Play animation from animator? 1 Answer

Animation Starts on begin play 2 Answers

Animation Keypress Trigger Problem 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