Padishar Posted March 31, 2016 Share Posted March 31, 2016 I've not seen any mention of it so far but I would expect it to work in exactly the same way. It will almost certainly require (lots of) changes to the MoveInitializerIntoAwake calls and you will obviously need to use the correct version of Unity (5.2.4f1). You may be able to use the mdb2pdb supplied with that Unity for VS2015 (or you may still need to get a newer one from a newer version of Mono). Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted March 31, 2016 Share Posted March 31, 2016 18 minutes ago, Padishar said: I've not seen any mention of it so far but I would expect it to work in exactly the same way. It will almost certainly require (lots of) changes to the MoveInitializerIntoAwake calls and you will obviously need to use the correct version of Unity (5.2.4f1). You may be able to use the mdb2pdb supplied with that Unity for VS2015 (or you may still need to get a newer one from a newer version of Mono). Yep. Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted March 31, 2016 Share Posted March 31, 2016 (edited) So I gave it a go... Unity 5.2.4f1. Took the 64 bit dev player. Replaced KSP.exe with it. Added the "PlayerConnectionConfigFile" file (From OP). Started KSP expecting bunches of "main thread" errors... but I got NONE. Tried out KSP, seemed to be working fine, no errors in log. So I skipped the old patcher, went straight for a mdb2pdb using the one from Unity 5.2.4f1. using mono downloaded.As per this post. Attached the Unity Debugger to VS. Working just fine. No errors, breakpoints, watches, etc all working. The one thing I did a little differently, I copied the player_win_development_x64.pdb from the same location as the dev player.exe from Unity. Not sure if this has anything to do with it... But I am debugging error free. Edited March 31, 2016 by JPLRepo Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 31, 2016 Author Share Posted March 31, 2016 This was the plan Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted March 31, 2016 Share Posted March 31, 2016 Just now, sarbian said: This was the plan A thought occurred to me... is there now support for .NET 4 or 4.5? Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 31, 2016 Author Share Posted March 31, 2016 No Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted March 31, 2016 Share Posted March 31, 2016 1 minute ago, sarbian said: No Thanks. Quote Link to comment Share on other sites More sharing options...
xEvilReeperx Posted April 1, 2016 Share Posted April 1, 2016 What's really cool is that we now have access to Unity's profiler. It's somewhat fiddly (I've managed to crash KSP a number of times so far) but a lot better than the nothing we were using before Quote Link to comment Share on other sites More sharing options...
sarbian Posted April 1, 2016 Author Share Posted April 1, 2016 Yep, that is one really useful tool. And a bit frightening when I look at the memory use of MJ GUI... Learn to use Profiler.BeginSample("MyMethodName") and Profiler.EndSample(). You will need a "#define ENABLE_PROFILER" for those to work Quote Link to comment Share on other sites More sharing options...
d4rksh4de Posted April 4, 2016 Share Posted April 4, 2016 On 31.3.2016 at 10:52 PM, JPLRepo said: So I gave it a go... Unity 5.2.4f1. Took the 64 bit dev player. Replaced KSP.exe with it. Added the "PlayerConnectionConfigFile" file (From OP). Started KSP expecting bunches of "main thread" errors... but I got NONE. Tried out KSP, seemed to be working fine, no errors in log. So I skipped the old patcher, went straight for a mdb2pdb using the one from Unity 5.2.4f1. using mono downloaded.As per this post. Attached the Unity Debugger to VS. Working just fine. No errors, breakpoints, watches, etc all working. The one thing I did a little differently, I copied the player_win_development_x64.pdb from the same location as the dev player.exe from Unity. Not sure if this has anything to do with it... But I am debugging error free. Confirmed working for 1.1, instead of KSP.exe you should replace KSP_x64.exe for 64bit. Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted April 4, 2016 Share Posted April 4, 2016 7 minutes ago, d4rksh4de said: Confirmed working for 1.1, instead of KSP.exe you should replace KSP_x64.exe for 64bit. yeah forgot to mention that. Quote Link to comment Share on other sites More sharing options...
rbray89 Posted April 8, 2016 Share Posted April 8, 2016 (edited) Any trick to getting this working for 1.1? I have debug output (file/lines in exceptions now) but I can't attach the debugger. EDIT: Didn't copy the connection file to KSP_Data Edited April 8, 2016 by rbray89 Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted April 8, 2016 Share Posted April 8, 2016 8 minutes ago, rbray89 said: Any trick to getting this working for 1.1? I have debug output (file/lines in exceptions now) but I can't attach the debugger. No tricks.. Do everyting from the OP.. EXCEPT running the Patch ... that's no longer required. Makes sure you have the right Unity version. 5.2.4f1 and get the winplayer 64 bit exe or whatever platform you need from that Unity version to replace the exe. Put the PlayerConnectionConfigFile in the right folder for 32 or 64 bit (there are now two). I couldn't get mono to work from Unity to create the dll.mdb so I just downloaded Mono and used that (As I'm using VS 2015). Quote Link to comment Share on other sites More sharing options...
sarbian Posted April 18, 2016 Author Share Posted April 18, 2016 OP updated for 1.1 with the new method I use (dir junction) and info on Profiling Quote Link to comment Share on other sites More sharing options...
m4v Posted April 18, 2016 Share Posted April 18, 2016 the profiler can only be run from Unity's Editor? Quote Link to comment Share on other sites More sharing options...
sarbian Posted April 18, 2016 Author Share Posted April 18, 2016 (edited) It is part of the editor so AFAIK yes Edited April 18, 2016 by sarbian Quote Link to comment Share on other sites More sharing options...
Youen Posted May 1, 2016 Share Posted May 1, 2016 (edited) I don't think anyone already stated that you don't need to install Unity. You can open the installer with an archive extractor (such as 7-zip) and take the file directly, it's located in $_OUTDIR\windowsstandalonesupport\Variations\win64_development_mono\player_win.exe I don't know if it's possible to make a tool that would download and unzip player_win.exe directly from the online Unity website (using resume-on-error web server capability if it is enabled on their site, to seek directly the interesting parts). This would avoid to download the whole installer (2GB), without breaking Unity agreement. On the other hand, it probably can be handy at some point to have the unity editor (for the profiler and other tools). Edited May 1, 2016 by Youen Quote Link to comment Share on other sites More sharing options...
Aerospike Posted June 23, 2016 Share Posted June 23, 2016 Thank you sarbian for this, I'm sure this will make finding and fixing bugs a lot easier! (Also thank you to Youen for pointing out that I do not have to install unity ) Quote Link to comment Share on other sites More sharing options...
Heed Posted June 27, 2016 Share Posted June 27, 2016 Has anyone had any joy with MonoDevelop and OSX? I copied the Unity player out and renamed it, but it won't run at all. Got it working in VS fine, but OSX is my main environment. Quote Link to comment Share on other sites More sharing options...
sarbian Posted June 27, 2016 Author Share Posted June 27, 2016 Did you try with the MonoDevelop that Unity install (if it does that on OSX...) ? it should have all the required plugins. Quote Link to comment Share on other sites More sharing options...
nightingale Posted June 29, 2016 Share Posted June 29, 2016 Couldn't figure out why my Profiler.BeginSample() stuff wasn't working. Apparently it's conditionally compiled away if you don't have both the DEVELOPMENT and ENABLE_PROFILER set (I was only using ENABLE_PROFILER). So this is what I ended up using: #if DEBUG #define ENABLE_PROFILER #define DEVELOPMENT #endif Quote Link to comment Share on other sites More sharing options...
Heed Posted July 2, 2016 Share Posted July 2, 2016 @sarbian The issue isn't the debugger. The debug UnityPlayer itself doesn't do anything. I've tried copying it over, renaming it, chmod, copying KSP and overwriting the MacOS portions from UnityPlayer. Nothing seems to work. So simply, I cannot get a debug version of KSP running in OSX. Quote Link to comment Share on other sites More sharing options...
Thomas P. Posted July 2, 2016 Share Posted July 2, 2016 (edited) 1 hour ago, Heed said: @sarbian The issue isn't the debugger. The debug UnityPlayer itself doesn't do anything. I've tried copying it over, renaming it, chmod, copying KSP and overwriting the MacOS portions from UnityPlayer. Nothing seems to work. So simply, I cannot get a debug version of KSP running in OSX. Did you add the PlayerConnectionFile to the KSP_Data (or whatever it is called on OSX) folder? Without that mono wont start the debugger IIRC Edited July 2, 2016 by Thomas P. Quote Link to comment Share on other sites More sharing options...
Heed Posted July 2, 2016 Share Posted July 2, 2016 Yeah I did. Just to be clear, the UnityPlayer renamed to KSP_x64_Dbg.app will not run AT ALL. So it doesn't actually matter about the the PlayerConnectionFile, since I don't even get a UI. Nothing happens. You execute, and the app flashes and closes. No logs, no messages, nothing. This happens no matter what I try and do with the UnityPlayer.app Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 3, 2016 Author Share Posted July 3, 2016 From what I see in the OSX zip the app is "KSP.app" so it should how you rename the dev package. Other managed to make it work on OSX since I had some feedback on the app path in Unity install. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.