Valerian Posted May 9, 2015 Share Posted May 9, 2015 That's amazing, thank you! Quote Link to comment Share on other sites More sharing options...
rhjoerg Posted June 26, 2015 Share Posted June 26, 2015 Thanks alot for the KspDevModPatcher.The following changes are required for 1.0.4 :- Patching MapView is no longer needed (has no .cctor anymore)- Patching PhysicsGlobals changed to "\u0013\u0002" (was "\u000A\u0002") Quote Link to comment Share on other sites More sharing options...
Teknoman117 Posted July 10, 2015 Share Posted July 10, 2015 What version of Unity does KSP 1.0.4 use? Also, at this point, do we still need to use the angrilov mono lib? Quote Link to comment Share on other sites More sharing options...
DMagic Posted July 10, 2015 Share Posted July 10, 2015 What version of Unity does KSP 1.0.4 use? Also, at this point, do we still need to use the angrilov mono lib?Initialize engine version: 4.6.4f1It's always the first line in the output_log file. Quote Link to comment Share on other sites More sharing options...
Teknoman117 Posted July 10, 2015 Share Posted July 10, 2015 Could someone upload the 1.0.4 compatible patcher tool? I'm having trouble building it myself. It keeps throwing exceptions when running the patches on HighLogic... Quote Link to comment Share on other sites More sharing options...
seanmcdougall Posted July 10, 2015 Share Posted July 10, 2015 Could someone upload the 1.0.4 compatible patcher tool? I'm having trouble building it myself. It keeps throwing exceptions when running the patches on HighLogic...You can grab a copy from my GitHub repo at https://github.com/seanmcdougall/KspDevModePatcher/releases/download/v1.0.4/KspDevModePatcher.zip It contains rhjoerg's changes, and I've used it successfully with 1.0.4. Quote Link to comment Share on other sites More sharing options...
Teknoman117 Posted July 11, 2015 Share Posted July 11, 2015 (edited) Thanks, but still having issues. Doesn't seem to work under Mono on Linux, even if I recompile it in .NET 3.5 mode and link against the version of Mono.Cecil that comes with KSP.Edit: Log - http://pastebin.com/HGEy9K6Y Edited July 11, 2015 by Teknoman117 Quote Link to comment Share on other sites More sharing options...
seanmcdougall Posted July 12, 2015 Share Posted July 12, 2015 Weird... I haven't tried compiling it under Linux yet, just through VS 2013 on Windows 7. Hopefully someone else has some suggestions. Quote Link to comment Share on other sites More sharing options...
Alshain Posted August 12, 2015 Share Posted August 12, 2015 (edited) I'm a bit new to this and I followed the instruction step by step (including the 1.0 patcher tool) but when I go to create my mdb it fails. Can anyone help me out with this?C:\Kerbal Space Program Dev\GameData>"C:\Program Files (x86)\Unity\Editor\Data\MonoBleedingEdge\bin\cli.bat" "C:\Program Files (x86)\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.0\pdb2mdb.exe" Categories.dllFatal error:Microsoft.Cci.Pdb.PdbDebugException: Unknown custom metadata item kind: 6 at Microsoft.Cci.Pdb.PdbFunction.ReadCustomMetadata (Microsoft.Cci.Pdb.BitAccess bits) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFunction..ctor (System.String module, ManProcSym proc, Microsoft.Cci.Pdb.BitAccess bits) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFunction.LoadManagedFunctions (System.String module, Microsoft.Cci.Pdb.BitAccess bits, UInt32 limit, Boolean readStrings) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModule (Microsoft.Cci.Pdb.BitAccess bits, Microsoft.Cci.Pdb.DbiModuleInfo info, Microsoft.Cci.Pdb.IntHashTable names, System.Collections.ArrayList funcList, Boolean readStrings, Microsoft.Cci.Pdb.MsfDirectory dir, System.Collections.Generic.Dictionary`2 nameIndex, Microsoft.Cci.Pdb.PdbReader reader) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, Microsoft.Cci.Pdb.BitAccess bits, Boolean readAllStrings) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, Boolean readAllStrings) [0x00000] in <filename unknown>:0 at Pdb2Mdb.Driver.Convert (Mono.Cecil.AssemblyDefinition assembly, System.IO.Stream pdb, Mono.CompilerServices.SymbolWriter.MonoSymbolWriter mdb) [0x00000] in <filename unknown>:0 Edited August 12, 2015 by Alshain Quote Link to comment Share on other sites More sharing options...
seanmcdougall Posted August 12, 2015 Share Posted August 12, 2015 I'm a bit new to this and I followed the instruction step by step (including the 1.0 patcher tool) but when I go to create my mdb it fails. Can anyone help me out with this?C:\Kerbal Space Program Dev\GameData>"C:\Program Files (x86)\Unity\Editor\Data\MonoBleedingEdge\bin\cli.bat" "C:\Program Files (x86)\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.0\pdb2mdb.exe" Categories.dllFatal error:Microsoft.Cci.Pdb.PdbDebugException: Unknown custom metadata item kind: 6 at Microsoft.Cci.Pdb.PdbFunction.ReadCustomMetadata (Microsoft.Cci.Pdb.BitAccess bits) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFunction..ctor (System.String module, ManProcSym proc, Microsoft.Cci.Pdb.BitAccess bits) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFunction.LoadManagedFunctions (System.String module, Microsoft.Cci.Pdb.BitAccess bits, UInt32 limit, Boolean readStrings) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModule (Microsoft.Cci.Pdb.BitAccess bits, Microsoft.Cci.Pdb.DbiModuleInfo info, Microsoft.Cci.Pdb.IntHashTable names, System.Collections.ArrayList funcList, Boolean readStrings, Microsoft.Cci.Pdb.MsfDirectory dir, System.Collections.Generic.Dictionary`2 nameIndex, Microsoft.Cci.Pdb.PdbReader reader) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, Microsoft.Cci.Pdb.BitAccess bits, Boolean readAllStrings) [0x00000] in <filename unknown>:0 at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, Boolean readAllStrings) [0x00000] in <filename unknown>:0 at Pdb2Mdb.Driver.Convert (Mono.Cecil.AssemblyDefinition assembly, System.IO.Stream pdb, Mono.CompilerServices.SymbolWriter.MonoSymbolWriter mdb) [0x00000] in <filename unknown>:0Are you using Visual Studio 2015 by any chance? There seems to be an incompatibility between VS 2015 and pdb2mdb.exe. I'm using VS 2013 Community Edition and it works great, so it looks like you might have to downgrade. Quote Link to comment Share on other sites More sharing options...
Alshain Posted August 12, 2015 Share Posted August 12, 2015 (edited) Are you using Visual Studio 2015 by any chance? There seems to be an incompatibility between VS 2015 and pdb2mdb.exe. I'm using VS 2013 Community Edition and it works great, so it looks like you might have to downgrade.Yes, I am using 2015. That is unfortunate, I really don't want to downgrade for other reasons outside of KSP. I may just have to wait, presumably an updated converter is in the Unity 5 package. Edited August 12, 2015 by Alshain Quote Link to comment Share on other sites More sharing options...
sarbian Posted August 13, 2015 Author Share Posted August 13, 2015 Try with the one here : https://gist.github.com/jbevain/ba23149da8369e4a966fI did not try it much myself but I'll have a look soonish. Quote Link to comment Share on other sites More sharing options...
Alshain Posted August 13, 2015 Share Posted August 13, 2015 Try with the one here : https://gist.github.com/jbevain/ba23149da8369e4a966fI did not try it much myself but I'll have a look soonish.I tried it but got an Unhandled Exception error. Though the description says the Visual Studio tools for Unity can do this automatically? I have those installed. Quote Link to comment Share on other sites More sharing options...
belpyro Posted September 3, 2015 Share Posted September 3, 2015 I use last Mono installer from Mono site and use pdb2mdb.bat from Mono folder. It wrks for me with Visual Studio 2015 Ent. Quote Link to comment Share on other sites More sharing options...
Fwiffo Posted September 11, 2015 Share Posted September 11, 2015 (edited) Just want to say thanks to everyone here. I was able to grab the Advanced Fly-By-Wire mod's source code and get it to run with VS2015 debug capabilities using the tips in this thread and belpyro's other reply here.One small deviation - instead of using pdb2mdb.bat my build events look something like this:..."C:\Program Files (x86)\mono\bin\mono.exe" "C:\Program Files (x86)\mono\lib\mono\4.5\pdb2mdb.exe" ksp-advanced-flybywire.dllxcopy /Y ksp-advanced-flybywire.pdb "C:\Program Files (x86)\Games\Kerbal Space Program\GameData\ksp-advanced-flybywire\"xcopy /Y ksp-advanced-flybywire.dll.mdb "C:\Program Files (x86)\Games\Kerbal Space Program\GameData\ksp-advanced-flybywire\"When I referenced the bat file, I think it wasn't waiting for the command to complete before moving onto the next one (or something like that - no time to investigate - did try using start /wait).Now a question: I don't suppose anyone's figured out a way to achieve Edit-And-Continue capabilities?I know that feature is precluded when you attach to processes. I don't know much about Unity, but came across this link talking about some kind of ability to serialize game-state, recompile, then deserialize, to effectively achieve on-the-fly code updates:http://answers.unity3d.com/questions/532242/editing-code-in-debug-mode.htmlWondering if there's any hope here, e.g. some wild ideas...- load a DLL that's hosted in Visual Studio devenv- dynamically load a new version of a DLL into the game without restarting it- write a clever DLL that can then dynamically load/unload a child one (or delegate the bulk of the code to some kind of embedded scripting language) Edited September 11, 2015 by Fwiffo Quote Link to comment Share on other sites More sharing options...
EladDv Posted September 11, 2015 Share Posted September 11, 2015 i guess if you reload the database it would load the dll again but i am not 100% sure Quote Link to comment Share on other sites More sharing options...
sarbian Posted September 11, 2015 Author Share Posted September 11, 2015 it does reload the dlls but since you can't write over them while they are open...Harvester said KSP 1.1 will use shadow copy so we may be able to hot load/reload mods dll. We will have to wait before we see how/if we can use it for that. Quote Link to comment Share on other sites More sharing options...
Fwiffo Posted September 24, 2015 Share Posted September 24, 2015 it does reload the dlls but since you can't write over them while they are open...Harvester said KSP 1.1 will use shadow copy so we may be able to hot load/reload mods dll. We will have to wait before we see how/if we can use it for that.Cool! I realize this isn't a high priority for the developers but it sure would be convenient. In the meantime I was pondering writing a "shim" DLL that delegates the heavy lifting out to some other module (e.g. DLL loaded in a separate AppDomain so we can tear it down and load in a new version, scripting language with the shim using Reflection to ferry SDK calls between the module and the API, etc). But it's all kind of pie in the sky at the moment.(ps. On another note - I'm a bit wary of Shadow Copy ever since having all kinds of VSS issues on servers with various backup software we use. In the early days it just seemed to get corrupted a lot and required a bunch of manual intervention to sort out and get working again. Hope they've fixed the problems. I do believe .NET can load / unload assemblies dynamically though and release the file locks without requiring VSS) Quote Link to comment Share on other sites More sharing options...
sarbian Posted September 24, 2015 Author Share Posted September 24, 2015 Unity still uses Mono (and an old one) so some .Net tricks may not work Quote Link to comment Share on other sites More sharing options...
xEvilReeperx Posted September 24, 2015 Share Posted September 24, 2015 In the meantime I was pondering writing a "shim" DLL that delegates the heavy lifting out to some other module (e.g. DLL loaded in a separate AppDomain so we can tear it down and load in a new version, scripting language with the shim using Reflection to ferry SDK calls between the module and the API, etc).I was working on something along these lines when I had my eureka moment that lead to the birth of AssemblyReloader. Have a look at the WIP thread if you're interested, I'd love any feedback Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted October 1, 2015 Share Posted October 1, 2015 Does anyone know how to get Xamarin on OSX to connect to unity runtime to debug?I have got all this working under a Windows 7 VM and I have successfully got the DEV mode KSP to work, but I can't get Xamarin to connect to it (there doesn't seem to be a way?). I found tools for Xamarin to do this that work with Unity 5, but has anyone got this working under OSX to connect Xamarin to the runtime unity for current version (4.6.4)? Quote Link to comment Share on other sites More sharing options...
MrHappyFace Posted October 1, 2015 Share Posted October 1, 2015 Does anyone know how to get Xamarin on OSX to connect to unity runtime to debug?I second this. It would be really helpful if this could work for Xamarin. Quote Link to comment Share on other sites More sharing options...
pulp_user Posted November 8, 2015 Share Posted November 8, 2015 Everything works for me, except the Debugging itself. I don't get any errors creating the mdb file or something like this, and attaching the unity debugger also works fine. But it simply does not debug. It doesn't care about breaking points, or doesnt even show function calls, or values of variables. Do I miss something obvius here? what I have done so far: I followed you instructions on installing (I guess nothing has gone wrong here, since I would have problems earlier)1. Set breaking points in my mod.cs file2. Build the Project, and get a dll and pdb file3. Build the dll.mdb file using this line in a bat file: "D:\Programme\Unity4_6_4f1\Editor\Data\MonoBleedingEdge\bin\cli.bat" "D:\Programme\Unity4_6_4f1\Editor\Data\MonoBleedingEdge\lib\mono\4.0\pdb2mdb.exe" mod.dll4. Copy dll ptb and mdb files into GameData/Mod/Plugins5. start the game6 attach debuggerKSP runs normal, the mod functionality works normal, I just can't debug stuff. Do I set the Breakpoints right? I can bring the whole game to a halt btw, but that isnt very usefull Quote Link to comment Share on other sites More sharing options...
sarbian Posted November 8, 2015 Author Share Posted November 8, 2015 (edited) You will have to provide more info. VS version, unity VS version and a log. I m not sure I have time to look into it much today but I ll do soon.You do attach with the "Attach Unity debugger" option right ?Edit : if you use VS 2015 make sure to install Mono 4 somewhere and read this post to change how the mdb is generated Edited November 8, 2015 by sarbian Quote Link to comment Share on other sites More sharing options...
pulp_user Posted November 8, 2015 Share Posted November 8, 2015 The post you linked solved the issue. Thanks! Works great! 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.