Giter Site home page Giter Site logo

artees / unity-semver Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 9.0 43 KB

A convenient way to edit and compare version numbers according to the Semantic Versioning 2.0.0 specification. Also includes a property drawer for Unity.

License: MIT License

C# 100.00%
semver unity upm-package

unity-semver's People

Contributors

artees avatar gdgrhinox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unity-semver's Issues

SemVerDrawer - Recursive FoldoutGroup Label Rendering

We added the following field to a ScriptableObject class as per the documentation:

 [SemVer] string Version = "0.0.0";

However the drawer yielded the following result:
image

Upon checking the code in Artees/UnitySemVer/Editor/SemVerDrawer.cs at line 38:

*35*        protected SemVer DrawSemVer(Rect position, SerializedProperty property, GUIContent label)
*36*        {
*37*            InitPosition(position);
*38*            label.text = $"{label.text} {Target}";
*39*            property.isExpanded =

The culprit seems to be label.text recursively prefixes itself on each Draw call.
Is there some prefix which should be kept here or can we fix it by changing it to:

 label.text = $"{Target}";

ManualBuild fix

Seems local filed _build is missing. Or I don't get the point. Piece of code below fix the issue

  private class ManualBuild : SemVerAutoBuild
          {
              private string _build = string.Empty;
              internal override string Get(string build)
              {
                  return _build;
              }
  
              internal override string Set(string build)
              {
                  _build = build;
                  return build;
              }
          }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.