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 /
avatar image
0
Question by Serju · May 06, 2016 at 06:12 PM · c#animationunity 5gameanimator controller

I can't make transition from actual animation to previous one

Evening! I have some trouble at calling transition. I can make the transition from up to down but i cant go from down to up. As you can see in Nest picture i make all transition, but only those who came from up are able to be called. alt text The script I'm using is here :

 using UnityEngine;
 using UnityEngine.UI;
 using System.Collections;
 
 public class AnimatorController : MonoBehaviour
 {
 
     int pagNr = 1;
     int BackPag=99;
     public Animator anim;
 
    
 
     void Start()
     {
         anim = GetComponent<Animator>();
         Debug.Log(BackPag);
         Debug.Log(pagNr);
     }
 
     // Update is called once per frame
     void Update()
     {
        
 
         if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.RightArrow))
         {
            
                 pagNr++;
                 BackPag++;
                 anim.SetInteger("PAg", pagNr);
                 Debug.Log(BackPag);
                 Debug.Log(pagNr);
                 //anim.SetTrigger("EnterPag1");}
 
             
 
            
 
         }
         if (Input.GetKeyDown(KeyCode.LeftArrow))
             {
                
                     BackPag--;
                    pagNr--;
             anim.SetInteger("PAg", pagNr);
             anim.SetInteger("BackPag", BackPag);
             Debug.Log(" ");
             Debug.Log(BackPag);
             Debug.Log(pagNr);
             Debug.Log(" ");
 
         }
     }
    
 }

Please try to respond as fast as you can!

Thanks in advance!

NOTE: PAg is trigger for up-down transitions and BackPag is for down-up transition!

P.S. Sorry for my english, I'm not so good at it :)

Serju

anim.png (83.0 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 incorrect · May 07, 2016 at 01:15 AM 0
Share

What are the conditions for transitions?

1 Reply

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

Answer by TBruce · May 06, 2016 at 10:05 PM

@Serju

It should not make a difference but try this (You may want to make a backup of your project first). Delete all your transitions. Than create your transitions like this

  1. EnterHS -> EnterP1

  2. EnterP1 -> EnterHS

  3. EnterP1 -> P2Enter

  4. P2Enter -> EnterP1

  5. P2Enter -> P3Enter

  6. P3Enter -> P2Enter

  7. P3Enter -> P4Enter

  8. P4Enter -> P3Enter

  9. P4Enter -> P5Enter

  10. P5Enter -> P4Enter

  11. P5Enter -> P6Enter

  12. P6Enter -> P5Enter

  13. P6Enter -> P7Enter

  14. P7Enter -> P6Enter

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 Serju · May 10, 2016 at 06:07 AM 0
Share

Hi! Thanks @$$anonymous$$avina ! I'm going to use this solution to check it soon. Today is the day when I must to present my project and I made something like a carrousel to jump from the last anim to first. When I'll find some time I'll put it in my code.

Serju

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

107 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

Related Questions

MobController 1 Answer

What is causing animation Position strange position changes 0 Answers

Adding a Highscore to game 1 Answer

Multiple enemies and no animations 0 Answers

Can't jump after adding jump animation 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