解决Type 'UnityEngine.Component' does not support slicing

unity从4.x升级到5.x后部分脚本的编译错误

将animation改成GetComponent.<Animation>()

原文地址:https://www.cnblogs.com/beeasy/p/6098213.html