@yuanjiashun 我不确定我是否正确理解你的问题,因为机器翻译有点含糊。
如果您询问如何在“Update()”之外的其他位置更新动画,那么请将“SkeletonAnimation”检查器属性“Advanced - Animation Update”设置为例如 “修复更新”,如此处所述。
如果您想在“LateUpdate”之外的其他位置生成“MeshRenderer”网格:您能否解释一下为什么要这样做,以及您想何时更新它?
您可以设置 SkeletonAnimation.GenerateMeshOverride
委托给您自己的方法,然后您负责自己更新网格,并且可以随时调用它。
您还可以创建“SkeletonAnimation”的子类并覆盖子类中的“LateUpdateMesh”以不更新网格。
I'm not sure I understand your question correctly, as machine translation was a bit ambiguous.
If you're asking how to update animations somewhere else than in Update()
, then please set the SkeletonAnimation
Inspector proeprty Advanced - Animation Update
to e.g. Fixed Update
as described here.
If you want to generate the MeshRenderer
mesh somewhere else than in LateUpdate
: could you please explain why do you want to do that, and when would you like to update it instead?
You could set the SkeletonAnimation.GenerateMeshOverride
delegate to your own method, then you're responsible for updating the mesh yourself and could call that whenever you want.
You could also create a subclass of SkeletonAnimation
and override LateUpdateMesh
in your subclass to not update the mesh.