Adding MobileControlRig disable/corrupt child elements
I am copying Unity Standard Asset's MobileSingleStickControl
prefab behavior to create joystick of my own. It requires a script component MobileControlRig
to be attached with canvas. If I try to attach it, all child elements are disabled/gray out, and they can't be enabled again.
Inspector for disabled element:
'MobileControlRig` has been marked with [ExecuteInEditMode]
. Can this be a cause of issue? Any help will be appreciated. Thanks.
Answer by Anni2D · Aug 31, 2016 at 08:40 PM
I watched starting minutes of this video. And understood why elements were disabled default by Unity on adding MobileControlRig script. It was because default platform in Build Settings selected was Web Player instead of some mobile platform. So I switched to Android Platform and all the child elements were enabled again. Please also make sure that Mobile Input is enable in Menu.