Jump to content
  • Advertisement

hojjatjafary

Member
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

242 Neutral

About hojjatjafary

  • Rank
    Newbie
  1. hojjatjafary

    C++ Plugin Debug Log with Unity

    Hi, I don't like C# so much but this is not the reason, it is not a missing feature in Unity, some times you have some existing C++ code that you like to use them in Unity or you need to use another external plugin like Steam, you can also write plugins to gain performance improvements, here you can find more detail, they gained 25x improvements by writing C++ plugins.
  2. hojjatjafary

    C++ Plugin Debug Log with Unity

    Hi ivan, Thank you for the points you mensioned, I added a paragraph at the start of article that I think make many things clear,   "You can write a 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."   log messages need not be always hard coded, but often are, strings like "plugin inited.", "initialization faild" or so on, but you can use sprintf or any method you know to prepare a log string and then print it, I wrote only a string to show how to use that function pointer.   GL, Hojjat.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!