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); if (!(a.Value is OpenCVForUnityPlayMakerActions.ByteArray)) { LogError("a is not initialized. Add Action \"newByteArray\"."); return; } System.Byte[] wrapped_a = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.ByteArray, System.Byte[]>(a); wrapped_owner.fromArray(offset.Value, length.Value, wrapped_a); }
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_a = a.intValues; byte[] casted_a = new byte[int_a.Length]; for (int i = 0; i < casted_a.Length; i++) { casted_a[i] = (byte)int_a[i]; } wrapped_owner.fromArray(casted_a); for (int i = 0; i < casted_a.Length; i++) { a.Set(i, (int)casted_a[i]); } a.SaveChanges(); }