Reputation: 138
My Unity UWP app running on hololens is calling c++ functions imported from dll file. Said library prints a lot of useful debug information to standard output and I need to access them.
Upvotes: 2
Views: 1099
Reputation: 2900
Do you mean to print debug log in the console from CPP DLL?
You can write a callback function in C# that takes a string as it's argument and print it into the Unity's console window, and then pass a pointer of this function to C++ dll, so you can call the function from C++ by it's pointer, this will redirect your strings from C++ to log window. For a more detailed solution, please see here: Use Debug.Log from C++
Upvotes: 1