void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.TrainData)) { LogError("owner is not initialized. Add Action \"newTrainData\"."); return; } OpenCVForUnity.MlModule.TrainData wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.TrainData, OpenCVForUnity.MlModule.TrainData>(owner); string[] string_names = names.stringValues; List <string> wrapped_names = new List <string>(string_names); wrapped_owner.getNames(wrapped_names); for (int i = 0; i < wrapped_names.Count; i++) { names.Set(i, (string)wrapped_names[i]); } names.SaveChanges(); }