public static string getAnimationPath(AnimationClip clip) { var path = GetAssetPath(clip); path = TFile.Join(TFile.PathParent(path), getAnimationName(clip)); return(path.ToLower()); }
public static void ExportUnitScene(UnityScene unitScene) { //write avatar //step1 write mesh foreach (var item in unitScene.avatarObj) { var avatar = item.Value; TFile file = new TFile(Export.config.outdir).ResolvePath(avatar.refName + ".km"); file.WriteAMF(avatar); } //write animation foreach (var item in unitScene.animationDataObj) { var path = item.Key.Replace("assets/", ""); var clip = item.Value; TFile file = new TFile(Export.config.outdir).ResolvePath(path); file.WriteAMF(clip); } foreach (var item in unitScene.materialObj) { string key = item.Key; string value = TFile.Join(Export.config.outdir, item.Value); var file = TFile.AppliationRoot.ResolvePath(key); file.CopyTo(value); } }