- Home /
Other
Animation editor Issue and a weird disappearing bug
Hello, I am desperately in need of some animating help. Everytime I create an animation in Unity, the animation is only editable in that instance. If I click off of the animation to set it to Legacy, the animator no longer allows me to edit it and does not appear in the list of available animations to edit when I click on the model that I animated. Because of this, I have had to manually set the object back to it's start position, compared to setting the animation to "Legacy" and changing the wrapping mode to "Loop." I would very much like to know if there is a fix for this.
Also, despite this, I made the darn animation. I created a script that would play the animation when it is clicked, and so far I have confirmed that the script works. However, the object that the animation is attached to disapears when the animation plays. Culling is set to "Always Animate" in case this is useful to know.
Here is my script, just in case:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ContainerOpen : MonoBehaviour
{
void OnMouseOver()
{
Debug.Log ("screw you");
if (Input.GetMouseButton (0))
{
Debug.Log ("you clicked this piece of S***, now good luck playing an animation");
GetComponent<Animation>().Play("ContainerOpen");
}
}
}
Please, any help would be greatly appreciated. I have been scouring google all night for this problem and various others. I just need to get this task done,
Answer by Adam-Mechtley · Nov 28, 2016 at 09:52 AM
Hi! Is the object actually disappearing or moving somewhere unexpected? For example, when this happens, try pausing the game, pick the object in the hierarchy view, and press F to focus on it in the scene view.
Follow this Question
Related Questions
Combine multiple animation transforms in one animation 0 Answers
How to make a single animation for a group of units. 0 Answers
Unity 5.5: Jump to Frame in Unity Animation Window 0 Answers
How do you control where your animation starts? 1 Answer
What is the interval between each step in animations? 1 Answer