Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Debugging OpenSoruce UISystem dlls that I build using Xamarin Studio

Discussion in 'Immediate Mode GUI (IMGUI)' started by tl, May 11, 2015.

  1. tl

    tl

    Joined:
    Dec 12, 2012
    Posts:
    1
    So unity released the source code for the UISystem, so people can customize it. This is what I want to do.
    Here's the original announcement
    And here is the bitbucket readme area which has some simple instructions
    And here is the unity help about it

    Those all talk about how to set up everything and get dlls built, which I can do. However, they leave the actual debugging as an exercise to the user. I don't have visual studio, so I'm interested in using xamarin studio or monodevelop to enhance the uisystem dlls.

    So what is the process to do this? Is it this?:
    - Build in debug mode
    - Copy new dlls into unity installation
    - Restart unity
    - attach debugger to unity
    - run the game preview

    Or are there other things involved?
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    That's pretty much it.
    You should also copy the debug symbols (.mdb files) to get it working.
    In case you're on Windows, i think you'll need to convert the .pdb files into mdb files before.
     
    tl likes this.
  3. BMayne

    BMayne

    Joined:
    Aug 4, 2014
    Posts:
    186
    As Liortal was saying you will need the correct files (.dll.mdb or .pdb) which are automatically exported on a successful build

    Code (CSharp):
    1.     <Copy Condition="'$(Configuration)' == 'Debug' And '$(OS)' == 'Unix'" SourceFiles="$(TargetDir)$(TargetName).dll.mdb" DestinationFiles="$(ProjectDir)..\Output\Standalone\$(TargetName).dll.mdb" />
    2.     <Copy Condition="'$(Configuration)' == 'Debug' And '$(OS)' != 'Unix'" SourceFiles="$(TargetDir)$(TargetName).pdb" DestinationFiles="$(ProjectDir)..\Output\Standalone\$(TargetName).pdb" />
    Code from MSBuild for UnityEngine.UI.assembly

    Just drag the whole folder output folder to the correct location or comment the build commands to make it automatic. Doing it automatically will save a ton of time.

    I am 70% sure you can't debug with Xamarin so switch over to monodevelop. It should just be a matter of connecting the debugger like you would for a normal Unity project.
     
    tl and liortal like this.