- Home /
Animation play 3D problem
I have a simple beam that is barely visible in an animation called "Idle" and then it elongates while moves up the Z axis while still Scaling in the same direction. Both clips were made in Unity's Animation window, saved in the format .Anim the game won't let me play. the word ".Play" in the script, C#, is underlined in red indicating that it's that area that's wrong, but what exactly do I do to fix/avoid this problem in the future?
using UnityEngine; using System.Collections;
public class fuckingplayBeam : MonoBehaviour { public Animation idle = null; public Animation takeOne = null;
// Use this for initialization
void Start () {
takeOne.wrapMode = WrapMode.ClampForever;
}
// Update is called once per frame
void Update () {
if (Input.GetButtonDown ("fire3")) {
takeOne.Play();
}
} }
Your answer
Follow this Question
Related Questions
Efficient way to instantiate a sprite that plays an animation then destroys itself? (3d space) 1 Answer
Door animation bugs and stays open unity 3D 0 Answers
Jumping into Animation : Is Unity Animator worth to learn ? 1 Answer
Using animation curves for fall and roll-over in and endless runner 3d 0 Answers
Animated Child Transform Moving Parent Transform - How to fix? 1 Answer