public void Select(TouchInputLayout toSelect)
 {
     GUI.FocusControl("");
     _activeTracker = null;
     _activeBase = null;
     _layout = toSelect;
     if(toSelect != null)
     {
         renameNameTemp = _layout.name;
     }
 }
 public void Load(TouchBase tb)
 {
     _activeBase = tb;
     TouchAnimation ta = tb.GetComponent<TouchAnimation>();
     if(ta != null)
         SetPreset(ta.allPresets.First(a => a.presetID == ta.initialPreset));
     else
     {
         presetToShow = null;
         ResetPos();
     }
 }
            public void Select(TouchBase toSelect)
            {
                GUI.FocusControl("");

                selectedMiscPanel = null;
                _touchAnimationActivePreset = null;
                _touchBase = toSelect;
                baseImg = null;
                topImg = null;
			
                name = "";
                if(toSelect != null )
                {
                    name = _touchBase.gameObject.name;
                    if(toSelect is TouchGUIBase) 
                    {
					
                        baseImg = ((TouchGUIBase)toSelect).basePart.texture;
                        topImg = ((TouchGUIBase)toSelect).topPart.texture;
                    }
                } 
            }
        protected void DeleteInput(TouchBase b)
        {
            if(_selectedLayout._layout == null)
                return;
		
            TouchInputLayout.TrackerPrefabBasePrefabPair p = _selectedLayout._layout.trackerPrefabBasePrefab.First(a => a._base == b);
            if(p != null)
            {
                _selectedLayout._layout.trackerPrefabBasePrefab.Remove(p);
                DestroyImmediate(p._tracker, true);
                EditorUtility.SetDirty(_selectedLayout._layout.gameObject);
                EditorUtility.SetDirty(_selectedLayout._layout);
            }
        }
        protected void AddNewInput (TouchBase b)
        {
            if(_selectedLayout._layout == null)
                return;
		
            TouchTracker tc = _selectedLayout._layout.gameObject.AddComponent<TouchTracker>();
            tc.activeRegion = new Rect(0.25f,0.25f,0.5f,0.5f);
            tc._id = "";

            _selectedLayout._layout.trackerPrefabBasePrefab.Add(new TouchInputLayout.TrackerPrefabBasePrefabPair{ _tracker = tc, _base = b});
            EditorUtility.SetDirty(_selectedLayout._layout.gameObject);
            EditorUtility.SetDirty(_selectedLayout._layout);
            EditorUtility.SetDirty(tc);
        }