WrapMode option not available in unity 4.3?


I am new to Unity. In Unity 4.3, there is no option for setting the wrap mode to ping pong.
The option was present in previous versions in the inspector. How can i set wrap mode to ping pong ?

It’s in the properties of the object with the animation component. Don’t forget to turn on Debug view:


Alright, posting as a new answer so we have a clean reference for the Stealth tutorial:

  1. First off, create the animation cctvSweep as per the video.
  2. Next, select the object you are animating (in the case of the Stealth tutorial, it’s prop_cctvCam_joint), and click on Add Component, then Miscellaneous, then Animation. Note that if you click and drag the animation onto the object in the Hierarchy like what is shown in the video it will create an Animator component which is not what we want.
  3. Click and drag the animation file from the Project view into the Animation field in the Animation component. Set wrap mode to PingPong, then double click the animation field with the Animation window already open. This should also open the animation in the inspector
  4. In the top right where the Inspector tab is located, click on the tiny box next to the lock and change “Normal” to “debug”. The image Kumo-Kairo posted in his answer shows how to do this
  5. Change the Animation Type from 2 to 1. You can also change the Wrap Mode to PingPong here as well.
  6. Set your animation as normal in the Animation window, and it should now ping pong when you test it

If you’ve created an animation using the Animator window, find where you saved the *.anim file using your Project hierarchy window and select it. Then check Loop Time in the inspector for ping-pong.

The instructions by Greg Brown on Youtube worked for me:

"For anyone struggling with the animations in Unity 4.5 here is an easy way to do it (avoiding the legacy problem):

Before you create the CCTVSweep animation file, open up the animation window under the window tab (not the animator window). With the camJoint child object selected, click add Curve in the animation window. Navigate to the animations folder and save your file there as CCTVSweep. (I don’t know why that would make a difference but it stopped the legacy warning coming up for me.)

You can click add Curve again and select Transform > Rotation. This will give you an animation clip. You can expand its properties using the drop down arrow to the left of the clip and its rotation.y you want to be working with. You can pretty much follow the tutorial from there. (I made a 16s clip, with keyframes (time,rot.y): (0,60), (8,0) and (16,60) to create the panning.)

Also for people complaining about not having the ping pong feature you can simulate the smooth motion by going into the curves tab, and right clicking on the start and end key frames and selecting “free smooth”. You can grab the key frame and fashion the curve into a cosine wave. (y) "

Ok, I’ve finally got the animation thing figured our for this tutorial with Unity 4.5. Here’s what I learned.

Summary: The new animation system as of version 4.3 is different. You can either try using the old legacy system(most advice you’ll find is for that) or you can make the same behavior with the new mecanim system.

Old Legacy System: Create an animation object(cctvSweep) like they say. There are three small lines at the top of the inspector. You can click that and go into debug mode. This is the only way to unlock making new oldstyle animation object. You can still import existing old style animations, but we are creating one from scratch. Once you are in debug mode, you can change the animation type from 2 to 1. Then you can switch Wrap Mode to “Ping Pong” since it won’t be available where it was in older versions of Unity. To attach the animation to the script, select the joint and add a component (Misc-> animation) and then drag your animation to the animation edit box rather than dragging to the tree, because with the 4.3/4.5 it will create an Animator object instead, which is part of the new system. When you go to the animation window, there won’t be all the curve types listed in the dope sheet like in the video. Click “Add Curve” and select Transform->Rotation. A second keyframe is already there, just set it like he does in the video. For some reason the curved lines aren’t actually showing in the gui, but you’ll see the light animate in the scene window if you hit play when you are done.

New MecaAnim System: The new system is very focused on rigging but you can do simple transform type animations as well. Create a new animation like the tutorial says, and if you had been playing with debug mode to get the old system, make sure it’s a type 2 animation otherwise just disregard. Check “loop time” to make it a looping animation (like Ping Pong sort of). Drag ccTVSweep to the joint hierarchy item and it will create an Animator object. Go to the animator window like the tutorial says and you will see the various curve types are not shown on the dope sheet like in the video. It’s ok, click add curve and select transform->Rotation. To get things working smoothly you’ll need to animate it going from 0-60 degrees and back instead of using Ping Pong like the video says…at least I haven’t figured out how to get that work anyway… So 0-60 in 2 seconds, then 60-0 from seconds 2 to 4. Right click the keyframes and choose “flat” so it doesn’t have strange speed changes. For some reason the curved lines aren’t actually showing in the gui, but you’ll see the light animate in the scene window if you hit play when you are done. I’m not sure how using the new system affects later tutorials, but it seems good at this point.