Hi all,
I am integrating an external SDK that requires a call to be made before Unity initializes the Direct3D device so that it can render an overlay in the game (triggered by a key-combo).
The SDK is a native 64-bit DLL with a C# wrapper for most of the functionality.
Our final build is compiled using IL2CPP and on Unity 2019.4.x
I need this for Standalone 64-bit Windows builds and ideally OSX builds (it’s not the end of the world if it doesn’t work on Mac). Our console builds do not require this.
What is the best approach/least hacky way to accomplish this? Ideally there’s some static callback made that I haven’t found in my documentation searches…
Thanks,
George
If you enable “Generate Visual Studio solution”/“Generate Xcode project” option, it will generate a project for the entry point which you can modify and do your stuff there before passing control over to Unity. You can then build the executable from it and reuse for all subsequent builds, even ones without explicit project generation.
Hi !
I have the same SDK integration purposes, I need to run some custom code before the Direct3D device but I’m in 2017.4.X.
So I checked my Build Settings window and I can’t found the “Create Visual Studio Solution” option inside.
But, currently in the 2017.4 Build Settings window documentation page, I can see an option called “Create Visual Studio Solution”. Why this option isn’t visible for me ?
Has it some conditions to display this specific option in Build Window ? Or maybe for 2017.4.X, I have to do some other tricks to execute my code before Direct3D device ?
Thanks,
Gaëtan
Unfortunately that option was added in Unity 2018 cycle. Does 2017.4 even have a separate UnityPlayer.dll? I don’t recall when it was split out from the executable.
1 Like
Thanks for your answer !
Is there a way to create with in 2017.4 a system doing the same thing than the “Create Visual Studio Solution” option ?
If we don’t have it, can we maybe replace it ?
I just found this low level possibility on the documentation: Unity - Manual: Low-level native plug-in rendering extensions
Can it be used for this kind of purpose ?