public void Select(GameObject inst) { if (inst == null) { return; } selectedObj = inst; obj = inst.GetComponent <IBuildable>(); obj.OnSelected(); }