• 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 benjamin_schulz · Sep 14, 2011 at 05:20 PM · animationcullingskinnedmeshrenderer

updateWhenOffscreen/cullingType = AnimationCullingType.AlwaysAnimate not working

Hey there,

I have a skinned character mesh. In one of the animations, the character walks out of the screen. The animation is done in a way, that the character walk out of its origin. The animation of the caracter pauses, if he walked out of the screen. But I want the animation to continue, because that gamelogic waits for it. I have the following code:

 //1
 foreach ( SkinnedMeshRenderer r in skaterModel.GetComponentsInChildren<SkinnedMeshRenderer>() )
     r.updateWhenOffscreen = true;
         
 //2
 foreach ( Animation a in skaterModel.GetComponentsInChildren<Animation>() )
     a.cullingType = AnimationCullingType.AlwaysAnimate;

The problem now is: When I only have block //1 active the character does NOT get animated if it disappears from the screen. When I have block //1 and //2 active, the character is not animated at all, no matter which animation I play.

Can anyone explain to me, which part of updateWhenOffscreen and AlwaysAnimate I did not understand? Does anyone another solution to this kind of problem?

Thanks and best regards -- Benjamin Schulz

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 heksboks · Dec 10, 2011 at 01:52 AM 0
Share

I've experienced something very similar. $$anonymous$$y solution was to disable and enable the Animation component just after setting the cullingType. It seems like a bug to me, but this fixed my issue for now.

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by montdidier · Oct 17, 2011 at 03:48 AM

Yes I'm seeing something similar to you. I think it's a bug in unity to be honest.

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

Answer by montdidier · Oct 17, 2011 at 03:48 AM

yes I'm definitely seeing something similar to you. I have a suspicion chaining cullingType at runtime resets some other states. I've noticed on the animating character if I change it back to BasedOnRenders briefly at runtime and then back to AlwaysAnimation it seems to work as expected. Not sure how to solve this problem definitely yet however.

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

Answer by jitwtttl · Mar 19, 2015 at 11:40 AM

For someone who suffers similar problem. If you have not so many characters and do not need to cull animation, just check "Always Animate" box in Inspector.

alt text


스크린샷-2015-03-19-오전-114618.png (46.2 kB)
Comment
Add comment · 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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

SkinnedMeshRenderer : RootBone access from Script? 0 Answers

animation won't complete unless mesh is visible in scene view, where ever main camera is looking 1 Answer

Animation not rendered when object is close to one another 1 Answer

Animation "Always Animate" not working, Animated object which half goes off screen culls whole object. 1 Answer

Animation not importing correctly? 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