protected virtual void OnSuccess( ) { if (!string.IsNullOrEmpty(State.MissionName) && !string.IsNullOrEmpty(State.VariableNameOnSuccess)) { WorldItem itemToDestroy = null; for (int i = 0; i < State.WorldItemsToDestroy.Count; i++) { if (WIGroups.FindChildItem(State.WorldItemsToDestroy [i].FullPath, out itemToDestroy)) { itemToDestroy.RemoveFromGame(); } else { Debug.Log("Couldn't find child item " + State.WorldItemsToDestroy [i].FullPath); } } Missions.Get.ChangeVariableValue(State.MissionName, State.VariableNameOnSuccess, State.VariableValueOnSuccess, State.ChangeTypeOnSuccess); } }