void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfByte)) { LogError("owner is not initialized. Add Action \"newMatOfByte\"."); return; } OpenCVForUnity.CoreModule.MatOfByte wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfByte, OpenCVForUnity.CoreModule.MatOfByte>(owner); int[] int_lb = lb.intValues; byte[] casted_lb = new byte[int_lb.Length]; for (int i = 0; i < casted_lb.Length; i++) { casted_lb[i] = (byte)int_lb[i]; } List <byte> wrapped_lb = new List <byte>(casted_lb); wrapped_owner.fromList(wrapped_lb); for (int i = 0; i < wrapped_lb.Count; i++) { lb.Set(i, (int)wrapped_lb[i]); } lb.SaveChanges(); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfByte)) { LogError("owner is not initialized. Add Action \"newMatOfByte\"."); return; } OpenCVForUnity.CoreModule.MatOfByte wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfByte, OpenCVForUnity.CoreModule.MatOfByte>(owner); List <System.Byte> wrapped_lb = new List <System.Byte>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Byte, System.Byte>(lb, wrapped_lb); wrapped_owner.fromList(wrapped_lb); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <System.Byte, OpenCVForUnityPlayMakerActions.Byte>(wrapped_lb, lb); }