Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

ProBuilder Export asset not working with .NET 4.x API

Discussion in 'World Building' started by se, May 17, 2018.

  1. se

    se

    Joined:
    May 20, 2013
    Posts:
    22
    I'm using 2018.1.0f2 on Windows 10.

     
    phobos2077 likes this.
  2. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    24
    Having the same issue with 2018.1.3f1. Any solution yet? (except to use old .NET runtime)
     
  3. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    79
    Could you please open a case for this in Fogbugz?
     
  4. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    24
    Could you give a link?

    This issue is rather annoying as it prevents me from using new version of C# because I need "Export asset" as part of my prototyping workflow (very convenient to make simple models for prefabs in-editor without going to Maya).
     
  5. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    79
    You can report a bug using the menu item "Help / Report a bug..."

    I wasn't able to reproduce the problem on my machine, but with a bug report our testers will be able to test with a variety of setups.
     
  6. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    24
    Just tested again by creating a blank project with just a ProBuilder 3.0.9 installed, some stairs and .NET 4.x selected in the Player Settings. The issue is 100% reproducible.

    I have sent the bug report via menu item in Unity.
     
  7. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    24
    So I got tired of waiting for a fix and decided to look into it. It turns out the reason for error is function Path.GetDirectoryName() returning the path with "\" as directory separator on my windows, while the rest of Unity functions that deal with paths return path with "/" as separator. This issue is only with ".NET 4.x equivalent". This is rather serious issue IMO and should be dealt sooner rather than later, as it can potentially break a lot of stuff not just ProBuilder.

    It turns out the Probuilder functions involved are public and so I created my own implementation of asset export without this issue and with some QoL improvements:
    https://gist.github.com/phobos2077/5cc09cac2bc2cbe5c877d3cd11aac9db
     
  8. bigdaddio

    bigdaddio

    Joined:
    May 18, 2009
    Posts:
    209
    Not anymore.

    using ProBuilder.EditorCore;

    Not there.
     
  9. Elapse

    Elapse

    Joined:
    Feb 5, 2016
    Posts:
    5
    I have the same issue. Just updated from 2018.2.9 to 2018.2.14 with no change.
    I'd like to use your fix Phobos. Could you tell me please, how to implement and make use of it?
     
  10. bigdaddio

    bigdaddio

    Joined:
    May 18, 2009
    Posts:
    209
    What's weird is if you look at the bug page, it says fixed in Probuilder 4.0. However We cnnot get PB 4.0. so what is the point?