• 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
Question by cheesehound · Apr 10, 2011 at 09:41 PM · animationerrorruntimelayers

prevLayer < state->GetLayer() printed when playing an animation

I've got this same warning (error?) printing three times whenever I play my "lhand-" animations. This behavior started after I started setting my animation layers accordingly in a component's Start() function:

var theHandLayer : int = 1;

for( var theAnim : AnimationState in playerAnim ) { if( theAnim.name.Contains( "lhand-" ) ) { theAnim.layer = theHandLayer; theAnim.blendMode = AnimationBlendMode.Blend; theAnim.AddMixingTransform( theLHandTransform ); } }

This doesn't print if I set that layer to be 0, but that's understandably not too useful to me. What's the deal? My animation plays exactly as I'd expect it to, and I play it from within an update whenever I detect a fire-key-down. Is there somewhere else I'm supposed to be triggering animations (especially ones for higher layers) from?

Comment

People who like this

0 Show 0
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

1 Reply

  • Sort: 
avatar image
Best Answer

Answer by Paulius-Liekis · Apr 11, 2011 at 12:50 PM

I think it's a bug on Unity side (it sounds like internal assert). Can you make a mini repro project and submit a bug? It would be nice if you could post case number here too.

Edit:

I found and fixed the problem.

You actually shouldn't disregard the assert - if you get the assert it means it might result in incorrect blending. You can avoid the assert by switching the order of these lines (just set layer after applying mixing transform), i.e. you should do this

aaa.AddMixingTransform( attackMixingTransform );
aaa.layer = 1;

Comment
cheesehound

People who like this

1 Show 3 · 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 cheesehound · Apr 18, 2011 at 03:48 AM 0
Share

Thanks for the advice, I posted it to them and its case number is 398981.

avatar image cheesehound · Apr 19, 2011 at 06:57 PM 0
Share

Thanks, I'll order my code accordingly from here on out. Now that the problem is fixed, would that ordering be considered a temporary workaround until the next release of Unity? Just curiosity :).

avatar image Paulius-Liekis · Apr 20, 2011 at 07:38 PM 0
Share

Yes, the ordering is a temporary workaround. I expect the fix to be shipped in Unity 3.4.

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

why is my Gun Model Only rendering the front bit when the animations are on? 2 Answers

Locomotion System gives errors saying that animation curves are missing 2 Answers

Error: Check external application preferences 0 Answers

Animation of throw spear 1 Answer

How to export FBX at runtime with animation(s), rig and the mesh to Maya, blender etc.. ? 2 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