keijiro / KlakNDI

NDI® plugin for Unity
https://ndi.video
Other
754 stars 135 forks source link

Build doesn't output NDI? #88

Closed Soaryn closed 3 years ago

Soaryn commented 3 years ago

So far it would seem that builds don't actually send NDI out? Still unsure if this is just my use case or not, but in Editor it was fine. Expectant: 3 NDI outputs. Result: 0 NDI outputs :(

Sending methods: Camera - Nothing in Studio Monitor appears selectable. Texture - NDI Sources appear, but nothing is being rendered to them.

Report Data:

Soaryn commented 3 years ago

Activating the NDI sender gameobject after the game has fully started seems to be a temporary work around.

keijiro commented 3 years ago

I have used it in several builds, so that's a critical issue if it reproduces. Does it reproducible with HDRP 9.x.x? I haven't tried 10.x.x yet.

Soaryn commented 3 years ago

I apologize, I have been working with too many different projects lately. I checked again today, and noticed the project is in HDRP 8.1.0. (Most of my other projects are using more preview based packaging)

Some things to note, 4 cameras are in the scene: 1 Main camera for the user, 3 more for the NDI outputs. The 3 cameras for NDI also have the NDI Sender component attached. Their current configuration is to output a texture, and the camera outputs to the texture.

The work around for starting the Cameras after the game is running is an alright work around, but just wanted to inform you of the potential.

Also note that the unity version should be 2020.2.0b1 not 2020.1b (I may have been tired writing the original post)

keijiro commented 3 years ago

Thanks for the additional information.

Does it reproduce with a simple minimal project?

Soaryn commented 3 years ago

I'm unsure, but I can try to test sometime this week if that is ok :)

keijiro commented 3 years ago

I tried to reproduce it with Unity 2020.2.0b1 & HDRP 8.1.0 using the same setup, but it didn't reproduce.

I close this issue as non-reproducible, but please feel free to reopen it if you can share a project that reproduces the issue.

SpaceWarpStudio commented 3 years ago

I might have found the problem here... I was facing the same issue, but only on my work PC. The same project on my home PC (synced via collaborate) was outputting NDI just fine in builds but the work PC was only working in the editor. I eventually noticed my build architecture (shown under the target platform on the build window) on the work machine was set to X86 instead of X86_64. Changing to X86_64 resolved the issue.

EDIT: I just noticed the original info above stated X68_64, but my issue lead me here, so perhaps this will at least help for others :)

TheXRMonk commented 2 years ago

Adding to this topic;

If the editor is still open, NDI seems to be weirded out and can't figure out the sources as they are named the same. I built and launched from unity which lead to both the editor NDI source and the built one not working (even though the NDI source was there in Studio Monitor) - it was just outputting the latest frame from the render texture.

I fixed it by renaming the editor gameobject with the sender component. I guess next step is to write an editor script that renames sender objects on build to differentiate automatically.