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); byte[] casted_storeResult = wrapped_owner.toArray(); if (!storeResult.IsNone) { if (storeResult.Length != casted_storeResult.Length) { storeResult.Resize(casted_storeResult.Length); } for (int i = 0; i < casted_storeResult.Length; i++) { storeResult.Set(i, (int)casted_storeResult[i]); } storeResult.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); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.ByteArray)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.ByteArray(); } ((OpenCVForUnityPlayMakerActions.ByteArray)storeResult.Value).wrappedObject = wrapped_owner.toArray(); }