Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Mulligan Renamer

Discussion in 'Assets and Asset Store' started by edwardrowe, May 19, 2018.

  1. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35


    Quickly rename any number of GameObjects or Assets simultaneously with Mulligan Renamer

    Get it on the Asset Store
    Follow the project on Github
    Rename objects by combining operators, including the ability to replace substrings, add prefixes and suffixes, and add counts. You can also use regular expressions to do just about any renaming task you can think of.

    FEATURES:
    ➜ Rename Assets and GameObjects
    ➜ Match and replace patterns using regular expressions
    ➜ Preview results with diff view
    ➜ Combine rename operations for simple or complex renaming tasks
    ➜ Rename all (or some) sprites within a spritesheet

    Please use this forum post for feedback and conversation about the tool. You can also submit issues directly through GitHub Issues.

    Mulligan was developed for and by Red Blue Games.




     
    Mark_01 likes this.
  2. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    69
    This has been a super useful plugin. One question, would you be able to add a setting to "Change Case" to include Camel Case? It would be useful for renaming project folders. Thanks!
     
  3. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    Thanks for the comment! Glad it's been useful!

    Casing is one of the few ops that I can't use the Regex replacement to do, so this sounds like something I should add. CamelCase sounds useful, but tricky. I basically don't know where words start, unless there's a delimiting character supplied, which might be too complicated.

    The easiest thing to do would be for me to just add a checkbox to Upper and Lower to "change first character only".

    But here's another, more complicated, idea...

    Like you suggested, it would be a new operation in "Modify/Change Case". In addition to Lower and Upper would be CamelCase, and maybe Pascal Case?

    Selecting Pascal or Camel would add another field for "delimiting characters" (maybe, might be too complicated). Space would be the default.

    Inputs:
    CharacterSheets
    My First rocket Ship
    anotherName
    cantDoAnythingaboutthisOne


    Output with Camel:
    characterSheets (lowered first Character)
    my First Rocket Ship (lowers first, uppers first in remaining words which is just Rocket. If you want to remove the spaces, there's an op for that)
    anotherName (unchanged as it's all just one word and lower is the same)
    cantDoAnythingaboutthisOne (also unchanged for reasons above)

    And if we wanted the delimiting characters field, you could add "-" in there, or anything you want, and
    this-would-get-camel would become this-Would-Get-Camel.

    Do you have any thoughts on those?
     
  4. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    69
    Thanks for the quick and informative reply!

    Casing is one of the few ops that I can't use the Regex replacement to do, so this sounds like something I should add. CamelCase sounds useful, but tricky. I basically don't know where words start, unless there's a delimiting character supplied, which might be too complicated.

    This is true, to actually do it you'd have to have some sort of word recognizing algorithm for each language so it's definitely not a simple feature, my bad I didn't think about the implementation enough!

    The easiest thing to do would be for me to just add a checkbox to Upper and Lower to "change first character only".

    This would be a very useful feature.

    Like you suggested, it would be a new operation in "Modify/Change Case". In addition to Lower and Upper would be CamelCase, and maybe Pascal Case?

    Selecting Pascal or Camel would add another field for "delimiting characters" (maybe, might be too complicated). Space would be the default.

    Pascal case is actually what I'm looking for, wasn't aware of that naming convention, but I've been using it this whole time for my naming and wrongfully though it was Camel Case!

    Yes delimiting characters would be great. Here's an example from the folder naming I'm trying to convert to Pascal.
    Having "_" as a delimiting character for Pascal Case would be ideal.

    upload_2019-2-5_12-15-11.png

    Preferred Naming:
    BULL_COW -> Bull_Cow
    BULL_A_POSE1 -> Bull_A_Pose1

    The reason for this request was that I'm working with different freelancers and didn't have specified naming conventions so I'm trying to get them to be consistent.
     
  5. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    Ok thanks for the images and use cases! Super helpful.

    This is a great suggestion. I've been slowly chipping away at a stability patch so I think I'll include this and get it out hopefully this week.

    Thanks again for the suggestion and for using Mulligan! I'll reply here when the patch goes live.

    And here's a link to the GitHub issue if you want to track it's progress. https://github.com/redbluegames/unity-mulligan-renamer/issues/195
     
    Last edited: Feb 5, 2019
  6. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    69
    Perfect thanks so much!
     
  7. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    I've made a beta release with this feature. I'm going to test it internally, and if all goes well I'll submit it. If you'd like you can get the beta release here: https://github.com/redbluegames/unity-mulligan-renamer/releases/tag/v1.6.0b1. Should install just like any other asset through Assets/Import Custom Package.

    Regarding BULL_COW, I only made the operation lowercase the *First* letter, unless flagged to Use Pascal casing. So BULL_COW will still be BULL_COW unless first converted to lowercase with the Change Case (now called To Upper or Lowercase) operator. The reason for this is I didn't want to destroy any capitalization users may have wanted to keep, for example char_bootLegger. If I lowercase bootLegger in the To Camel Case operation (resulting in Char_Bootlegger), they won't easily be able to capitalize the L again. Basically CamelCase would be unusable for that use case.

    The tradeoff is just that you'll have to lowercase BULL_COW before camelcasing it.
     
  8. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    Ok version 1.6.0 is live on the store with the CamelCase operator. Let me know if you have any issues!

    Thanks for the suggestion and for using Mulligan!
     
  9. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    69
    Hey sorry for the late reply, was off the grid and don't get email notifications.
    Thanks so much for adding this functionality, it works perfectly and the "-" & "_" delimiter characters are great as the defaults

    upload_2019-2-22_13-57-30.png
     
  10. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    Glad to hear! Thanks for reporting back!
     
  11. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    69
    Hey I found an issue with trying to rename things backwards.

    upload_2019-10-2_9-36-19.png
     
  12. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    First of all I love that you're using Mulligan for this.
    Second I'm sorry it didn't work! Thanks for reporting it, I'll add it to the issues on Github and try to address it in the next patch (which will likely be released in late November, just after we get Sparklite out the door =) )
     
  13. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    69
    It's a time-saver! It would take me 10x as long renaming every single file.
    I did realize that it's kind of intended behaviour with the filesystems, since it's trying to rename a file to an existing file's name. So I just prefixed them with an arbitrary character, reversed numbers and then removed the prefix.

    Didn't realize you guys were making games too, Sparklite looks awesome, good luck with the launch!!
     
  14. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    35
    Well, technically this should be possible. I rename the files to a temporary name so that they don't overlap during the rename. So it's gonna take a bit for me to dig in to see where that's going wrong. Glad you were able to workaround it, though.

    Yep, thanks! I appreciate your understanding on the delayed support.