self.spine.AnimationState:SetAnimation(0, "idlefirst", false)
self.spine.gameObject:SetActive(false)
self.spine.gameObject:SetActive(false)
代码类似这样
然后这个gameObject:SetActive(true)的时候 spine动画 才会切到"idlefirst"
有没有办法隐藏的时候就切过去呢 还是说要延迟一帧去隐藏
qq497547369
8 months ago
Harald
8 months ago
qq497547369
感谢 感谢Harald je napisao/la:我不确定我是否正确理解您的问题。 如果要在禁用 GameObject 之前应用动画,则可以调用:self.spine:Update(0)请注意,上面的代码可能无法按原样编译,我不习惯在 unityscript 中编码:)。
self.spine:LateUpdate() // 您可以根据要实现的目标跳过此行。
-----
I'm not sure I understand your question correctly. If you want to apply the animation before disabling the GameObject, then you can call:self.spine:Update(0)Please note that the above code might not compile as-is, I'm not used to coding in unityscript
self.spine:LateUpdate() // you can skip this line depending on what you want to achieve..
8 months ago