Implementing Active Stereo using NVAPI in Unity

Hi Everyone,
I have been working on Implementing Active Stereo in Unity using NVAPI.
The NVAPI was being implemented based on the following reference from unity : . I managed to start the stereo in the application but the output is not correct. As soon I found out the active stereo rendering was handled by nvidia driver and not unity app.
To let the app take care of individual camera rendering you have to set the mode in the app before device initialisation using :


I found out the NvAPI_Stereo_SetActiveEye gave back NVAPI_SET_NOT_ALLOWED result. Which meant according to this question on stack overflow ; bringing me to conclusion that d3d device is being created first & plugin load is happening afterwards, also according to this link

Assuming Unity does not allow any plugin to load before device creation is there something in NVAPI we can change to make it render using NvAPI_Stereo_SetActiveEye ?

It would be really great if anyone can help me with this issue.

Note: I have come across 3dmigoto as external injector to force start 3d which i don’t want to do unless that is very last option

I used the external dll injector to get the desired output but I think it is not possible to setup in unity as d3device creation is always done before loading plugin.