This a clip based animation system for the Point Cache component which allows you to add any number of anim clips which can be selected and played back using the C# methods for the class as shown below. You just need to click the Add Clip button and add as many slots as you need and then fill in the start and end times and loop mode. This component is aimed at scripters who want to have direct control over the animations of the morphing system.
Mega Animator Param Description
You can choose to define your animation clips in either frames or by time. If you choose frames then the Source FPS value will be used to calculate the timing. So if your 3d package has exported your animation at 24fps then you should enter 24 in the Source FPS box, the default is 30.
The frames per second count that the animation was built at in your 3d package.
If your main character has a load of animations already loaded into the main Unity animation system you can select this option to have the system try and match the point cache animation to whatever main animation is running on your character, to make this happen you must name the clips below to match the names of the Unity animation clips, then the system will watch the main object for changes to the main Unity animation clip and will look to see if there is a point cache anim clip with the same name, if it finds one it will start that playing.
Play On Start
If this is checked then the Playing Clip will be started when the game is run.
Click this to select the clip you want to be playing. A box will open showing all the clips on this morph to select from.
Click this to append a new clip slot to the bottom of the list. You can then fill in the start and end times and loop mode.
Each clip has a slot here which shows the name of the clip the start and end time or frame and the anim loop mode, all these values can be edited. The last button is a delete channel button.
You can also control the the play back of clips via the Unity Animation Event system, you just add an event to a Unity Animation clip at the time you need then select ‘PlayClip(int clip)’ from the function selection box and provide the index of the clip you want to start playing at that time. You can find more information on Unity Animation Events Here
The other option is to control the animation from script by calling one of the methods listed below.
This system exposes a set of methods so the point cache system can be controlled by clips and code.
Returns true is an animation is currently being played.
void SetTime(float time)
Allows you to set the time manually if you want to override the animation system.
time – Time to set.
Returns the current time of the animation system.
void PlayClip(int clip)
Starts a new animation by index.
clip – The new clip to start playing.
void PlayClip(string name)
Starts a new animation by name, will look through the clip array for a match, if none is found nothing happens.
name – Animation clip to start playing.
Stops any animation playing/
int AddClip(string name, float start, float end, MegaRepeatMode loop)
Allows you to easily add a new script via code. Returns the index of the newly created clip.
name – Name for the new clip.
start – Start time for the clip.
end – End time for the clip.
loop – Looping mode for the animation, either Loop, Clamp or PingPong.
Returns a string array of all the animation clip names.
public string name;
public float start;
public float end;
public MegaRepeatMode loop;
public class MegaPointCacheAnimator : MonoBehaviour
public MegaPointCache morph;
public List<MegaPointCacheAnimClip> clips;
public int current;
public float t;
public float at;