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 Novodantis · Feb 12, 2013 at 09:54 AM · scene viewanimation events

Animation event not firing when out of view

We have a rather odd issue at the moment with Animation Events.

A character contains an animation which, at a particular point, calls a function on the object called Fire(). This instantiates a projectile, which is propelled for a certain distance before detonating.

A UI button controls the firing animation being triggered. When the desired frame is reached, the projectile appears, flies across the screen and detonates perfectly well. However, on running the game on device we noticed that the projectile wasn't being created while the character was off screen (it is a strategy game, hence this need). In every case, the projectile appeared and assumed its trajectory the moment that character was back on screen (even after waiting 20-30 seconds).

So I tried the following experiment back in the editor: if the game camera is moved so that the character is no longer in its frustum, will the same thing happen? Reassuringly, the projectile was still instantiated fine. HOWEVER, if the other window (scene view) was ALSO not looking at the character, we got the ignoring of the animation events. I had not realised the editor's view could actually affect the way the game behaves; is this truly the case?

To summarise: are animation events affected by being rendered (eg. is the animation component disabled at some low level), and is there a relatively painless way to get animation events to trigger regardless of camera visibility?

Thanks!

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

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

Answer by Novodantis · Feb 12, 2013 at 10:38 AM

Don't you just love the way a solution to a problem only presents itself when you've just asked for help with it?

I didn't notice the animation component's "Culling Type" field, which by default is "Based on Renderers". Changing to "Always Animate" fixes the issue.

Thanks for reading!

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.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Near plane adjustment in Scene View 3 Answers

Align scene view camera to HUD camera? 0 Answers

I can see the objects in game view but in scene view I can see only the outlines. what is the problem? 1 Answer

using assets in scene window and hierarchy 1 Answer

All objects missing from scene view except the canvas 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