Hi. I’m getting the following error when trying to instantiate a NamedPipeClientStream on Unity 2019.4.22f1 on an Android device using IL2CPP. This error does not occur when using the Mono backend.
03-20 16:03:36.924 5207 5279 E Unity : NotImplementedException: The method or operation is not implemented.
03-20 16:03:36.924 5207 5279 E Unity : at System.IO.Pipes.NamedPipeClientStream..ctor (System.String serverName, System.String pipeName, System.IO.Pipes.PipeAccessRights desiredAccessRights, System.IO.Pipes.PipeOptions options, System.Security.Principal.TokenImpersonationLevel impersonationLevel, System.IO.HandleInheritability inheritability) [0x00000] in <00000000000000000000000000000000>:0
03-20 16:03:36.924 5207 5279 E Unity : at System.IO.Pipes.NamedPipeClientStream..ctor (System.String serverName, System.String pipeName, System.IO.Pipes.PipeDirection direction, System.IO.Pipes.PipeOptions options) [0x00000] in <00000000000000000000000000000000>:0
Thanks for reporting this issue. The bug fix you mentioned occurred only on Windows platforms. At the moment, named pipes are not supported for IL2CPP on non-Windows platforms (which includes Android of course).
I’m curious, what is the use case you have for named pipes on Android?
We use FFMPEG for audio conversion and read the result from a named pipe to avoid having to go through an actual file.
As a workaround for the class not being available, I’m now simply using Java to read from the pipe and pass the (buffered) results a megabyte at a time to C#, which works and is as performant as the NamedPipeClientStream on Mono.
PlatformNotSupportedException: Operation is not supported on this platform.
at System.IO.Pipes.PipeStream.GetPipePath (System.String serverName, System.String pipeName)
Thank you in advance.
Edit:
As far as I see there is no problem with IL2CPP (building a native Windows application based on IL2CPP works) but with WebGL as it seems to not support working with named pipes.
Nonetheless I would be happy to get approval on my theorie or deviating information.
Thanks.
We don’t expect to support named pipe on WebGL at any point in the future. The underlying platform does not have the support we need for them, as far as I know.