Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 narwhal-ninja · Jul 19, 2015 at 07:45 PM · animation2dplatformer

2D elevator with animation doesn't start

I'm trying to make a 2D platformer "game". One of my game objects is an elevator. alt text

To make it work I added an animation clip that changes tranform Y position back and forth.

alt text

As you can see in the screenshot the animation component has play automatically enabled, but when I run the game it doesn't move.

What is happening here?

Thanks in advance.

captura-de-pantalla-2015-07-19-a-las-43620-pm.png (24.3 kB)
captura-de-pantalla-2015-07-19-a-las-44258-pm.png (173.3 kB)
Comment
Add comment · Show 2
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 Positive7 · Jul 19, 2015 at 08:05 PM 1
Share

does it plays from the Animation Tab or when moving the slider? Attach this to it : using UnityEngine; using System.Collections;

 public class test3 : $$anonymous$$onoBehaviour {
 
     void Start(){
         Animation anim = GetComponent<Animation> ();
         anim.Play ();
     }
 
 }
avatar image narwhal-ninja · Jul 20, 2015 at 10:43 PM 0
Share

It wasn't necessary, I was having another problem. The animation did start, but once it played it didn't repeat, and the platform was out of view, and by the time the player reaches the platform it already finished so I thought that was never started.

Now I'm struggling to make it work with repeat, I'm using this setup http://answers.unity3d.com/questions/204331/animation-loop.html but doesn't seem to work.

0 Replies

· Add your reply
  • Sort: 

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

23 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

Related Questions

How do I know when an object is going under a Platform Effector 2D object? 0 Answers

Animation Coordinates Issue 0 Answers

How to Change to the Same Point in Another Animation 0 Answers

Animation on public transform from script 2D 0 Answers

Play two 2D animation together? 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