Node has its Widget Component lost while animating

Node has its Widget Component lost while animating
0.0 0


Hi, I found a weird behavior while using the Cocos Creator 1.6.2. I’ll explain the whole process I’m going through (just in case I’m doing something wrong someone can point it out).

I have many Nodes on the scene, all of them with Sprite and Widget (for screen relative positioning) components. Ideally every one of them will also have an Animation component.

The first thing that I did was add the animation component to just ONE of the nodes. This animation will interpolate the values of the Widget component’s attributes “Horizontal Center” and “Vertical Center”. So I click on “add property” from the Timeline tab and add cc.Widget.horizontalCenter. I click on the + sign, move to the 5 seconds mark and click the + sign again. At the 5 seconds mark I go and modify the Horizontal Center value from the Properties panel. When I try to play the animation I notice nothing happens. I go back to the 0 seconds mark and realize the Widget component is disabled in the properties panel. I re enable it by clicking the checkbox, try to play the animation but nothing happends. I go to the 5 seconds mark and the Widget component is disabled. There’s no way to keep those enabled all the time. I tried adding the cc.Widget.enabled to the animation clip so it stays enabled. I tried saving by clicking the buttons on the top of the scene (Save and Cancel) but still the Widget component kept being disabled. After trying many times, I exit animation edition mode and realize all of my nodes on the scene have their Widget component disabled, all of them although Animation component exists for just one of them.

Is there something I am missing here?