//────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── /// <summary> /// Initialize the Selector for the first time /// </summary> public virtual void ResetController() { StopAllCoroutines(); AnimateSelectionC = IAnimateSelection(); //Store the courutine SelectionAnimation IndexSelected = FocusedItemIndex; //Set the Index and current Item to the Focused Item CheckFirstItemFocus(); InitialTransform.RestoreLocalTransform(transform); CurrentEventData = new PointerEventData(EventSystem.current); //Store the Current Event Data }
//────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── /// <summary> /// Initialize the Selector for the first time /// </summary> public virtual void ResetController() { StopAllCoroutines(); AnimateSelectionC = IAnimateSelection(); //Store the courutine SelectionAnimation IndexSelected = FocusedItemIndex; //Set the Index and current Item to the Focused Item CheckFirstItemFocus(); InitialTransform.RestoreLocalTransform(transform); CurrentEventData = new PointerEventData(EventSystem.current); //Store the Current Event Data foreach (var item in Items) { if (item) { item.IsRestoring = false; //Restore all the Items to its original Location } } }
void Awake() { if (S_Editor && S_Manager) { } //Store the Selector Editor S_Editor.enabled = false; //Disable Circle EditorScript UILayer = LayerMask.GetMask("UI"); InitialTransform.StoreTransform(transform); //Store the initial transform of the selector; if (S_Camera) { InitialPosCam = S_Camera.transform.localPosition; //Store the Camera Initial Local Position } CurrentEventData = new PointerEventData(EventSystem.current); //Store the Current Event Data if (S_Manager.Data) { FocusedItemIndex = S_Manager.Data.Save.FocusedItem; //UPDATE THE DATA WITH THE FOCUSED ITEM } LastDrag = DragSpeed; //StoretheDragValue ResetController(); }