public void CreateControls() { if (interfaceCanvasObject != null) { if (loadVirtualKeypad) { /*if( (buttonPrefabAction != null) && (buttonObjectAction == null) ) * { * if( UICreator.CreateButton( buttonPrefabAction, ref buttonObjectAction, ref buttonComponentAction, interfaceCanvasObject ) ) * { * actionPressAction = new UnityAction<BaseEventData>( OnPressAction ); * AddListenerToObject( buttonObjectAction, ref buttonTriggerAction, EventTriggerType.PointerDown, actionPressAction ); * actionReleaseAction = new UnityAction<BaseEventData>( OnReleaseAction ); * AddListenerToObject( buttonObjectAction, ref buttonTriggerAction, EventTriggerType.PointerUp, actionReleaseAction ); * AddListenerToObject( buttonObjectAction, ref buttonTriggerAction, EventTriggerType.PointerExit, actionReleaseAction ); * buttonImageAction = buttonObjectAction.GetComponent<Image>(); * } * }*/ if ((buttonPrefabPause != null) && (buttonObjectPause == null)) { if (UICreator.CreateButton(buttonPrefabPause, ref buttonObjectPause, ref buttonComponentPause, interfaceCanvasObject)) { actionPressPause = new UnityAction <BaseEventData>(OnPressPause); AddListenerToObject(buttonObjectPause, ref buttonTriggerPause, EventTriggerType.PointerDown, actionPressPause); AddListenerToObject(buttonObjectPause, ref buttonTriggerPause, EventTriggerType.PointerEnter, actionPressPause); buttonImagePause = buttonObjectPause.GetComponent <Image>(); } } } /*halmeida - if there are no blocking conditions, enable the keypad.*/ ToggleControls(true, true); } }