Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

ProBuilder ProBuilder version (4.3.1) does not compile in older Unity versions

Discussion in 'World Building' started by Naigel, Jun 10, 2020.

  1. Naigel

    Naigel

    Joined:
    May 25, 2013
    Posts:
    2
    Hi, I'm an avid user of ProBuilder (4.2.3). I noticed there was a new version for ProBuilder and wanted to try it out. I'm currently using Unity 2018 and in this version of Unity there will be a compile error:

    This derives from: https://github.com/Unity-Technologi.../blob/master/Editor/EditorCore/ShapeEditor.cs where System.Reflection is used twice for older versions, because line 3 is:
    Code (CSharp):
    1. using System.Reflection;
    And line 11 is:
    Code (CSharp):
    1. #if !UNITY_2019_3_OR_NEWER
    2. using System.Reflection;
    3. #endif
    So sure enough the error makes sense. Of course I can update Unity to 2019, but that won't fix the core problem.

    Can this be fixed so that I can enjoy the great amount of bug fixes in the new ProBuilder version?

    I'm sorry if this isn't the best place to put it, I would love to hear if I should be handling this in a different manner. Thank you!
     
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    387
  3. Naigel

    Naigel

    Joined:
    May 25, 2013
    Posts:
    2
    Thank you! While not directly related to this thread: is this the best way to report these bugs (as in: create new threads in this forum)?
     
  4. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    387
    Happy to help :) The best way to report bugs is through the Unity Bug Reporter, it's much easier to track and it ensures that a developer actually looks at the issue. It's easy for things to get lost on the forums with no resolution.
     
    Naigel likes this.
  5. naigel_cf

    naigel_cf

    Joined:
    Nov 5, 2017
    Posts:
    3
    I noticed that the pull request(s) are closed, most likely due to not being able to reproduce this. The reason why it is not reproducible is because in my project warnings like these are regarded as errors, similar to: https://answers.unity.com/questions/216838/how-to-force-warnings-as-errors.html basically having -warnaserror+ assigned.

    The closed pull requests:

    So technically it's not ProBuilder's fault, but it's still unclean code and in my case causing a situation where I cannot use newer ProBuilder versions unless this warning is fixed. I'm stuck at older versions.

    -EDIT-
    This is the warning that gets turned to error in my case: Compiler Warning (level 3) CS0105: https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0105
    Unity docs about platform dependent compilation (with this you can define warning = error): https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

    Repro steps:
    Create a new empty Unity 2018.X project.
    Create a new file in Assets, call it msc.rsp and add the -warnaserror+ in it.
    Go to Package Manager, find and install ProBuilder 4.3.1
     
    Last edited: Jul 13, 2020
  6. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    46
    I'm running into the same issue with Unity 2019.2.21f1
     
  7. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    387
    @naigel_cf It turns out that the reason I was not able to reproduce is because I was using a more up to date version of Unity 2018.4. It looks like the fix for optional assembly references preventing compilation was backported at some point (sorry, I'm not sure exactly which patch). Updating to the latest 2018.4 patch release (2018.4.24f1 at time of writing) should resolve this issue.

    @Barliesque I'm not able to reproduce this even on the first public release of 2019.1. Are you seeing the exact same error log?
     
  8. naigel_cf

    naigel_cf

    Joined:
    Nov 5, 2017
    Posts:
    3
    The same issue happens in 2018.4.24f1, because of the warning = error thing mentioned in my previous post. I'm still dependent on ProBuilder having clean code in just this one class :( there is still no reason to have the same 'using' twice in any circumstance.

    -EDIT-
    Typo.
     
    Last edited: Jul 16, 2020
  9. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    387
    naigel_cf likes this.
  10. naigel_cf

    naigel_cf

    Joined:
    Nov 5, 2017
    Posts:
    3
    Thank you! I will await the next update and try it out. I'm sorry if I wasn't clear enough earlier.
     
unityunity