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

[FREE] ֍ Link & Sync ֍ synchronize your Unity project with external files

Discussion in 'Assets and Asset Store' started by Kybernetik, Aug 6, 2022.

  1. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    Cover 1950x1300.png
    Link & Sync
    is a tool for importing and exporting assets and easily synchronizing changes when they occur.

    Features:
    ❶ Link to one or more external directories.
    ❷ Exclude files or folders you don't want to sync.
    ❸ Directions: Pull files in, Push files out, or Sync changes both ways.
    ❹ Triggers: Manually executed, Notify whenever a change occurs, or Automatically synchronize changes immediately.
    ❺ Synchronized files show an icon in the Project window. Middle Click it to quickly execute the link again.

    Disclaimer
    :
    While every effort has been made to ensure that this system is as intuitive and bug-free as possible, you should always backup your projects regularly (even without this plugin). Kybernetik cannot be held responsible for any loss of data.

    How to Use:
    Create a link via Assets -> Create -> Link and Sync and fill in the Inspector fields (which have tooltips to explain their details).

    upload_2022-8-6_13-34-4.png

    Once the link is configured, click the Prepare button to open a window explaining what will be copied and deleted.

    upload_2022-8-6_13-22-51.png

    Synchronized files show an icon in the Project window which you can Middle Click to re-synchronize the link without needing to go and select it.

    upload_2022-8-6_13-35-42.png

    History:

    Link & Sync v2.0 was on the Asset Store from 2016 to 2022, but was broken by recent Unity versions so I decided to completely rework the system to be more reliable and easier to use. The new structure means old link setups won't work and very few people ever downloaded it anyway so I didn't bother trying to make an upgrade system. Instead, I'll be deprecating the old ones to release it as a new asset and since it wasn't seeing a meaningful number of sales anyway, it's now completely free.

    If you find it useful and want to support me, please check out my other assets in my signature below.
     
    Last edited: Aug 10, 2022
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,511
    Somewhat off-topic question while I was looking at Animancer. I see you sell it on itch.io as well. Can you share whether it makes sense to also publish a Unity asset on itch.io? How do sales split between the two stores?

    My hunch is that UAS accounts for more than 80% of the sales simply because of ease of use and discovery.
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    For me it's closer to 98-99% in favour of the Asset Store, but it's not that much extra effort and even a couple of sales every now and then are worth something.
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,511
    Thanks for sharing! I thought it couldn't be much but 1-2 sales out of 100 on itch.io clearly speaks against doing so. This can easily introduce issues because the asset is imported differently than what users do when they get it on UAS. Besides, even though the cut may be less on itch.io, in the end if you make $20 extra on itch.io that otherwise would have gone to Unity, it simply doesn't pay off.

    Not saying you shouldn't, just thinking out loud that I definitely won't consider it. ;)

    PS: I'm of course assuming that itch.io purchases are from users who would have otherwise bought it on the UAS but chose not to for some reason (ie giving you more money as you mentioned should not be underestimated as an incentive).
     
  5. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    When you upload to the Asset Store, it exports a unitypackage file and opens the folder where it's saved. So you can just grab that file and upload it to itch as well, and users will get the exact same import process. It's just initiated by dragging the downloaded package into Unity instead of finding it in the Package Manager, but from there it's exactly the same.
     
  6. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
  7. Dom3D

    Dom3D

    Joined:
    Dec 19, 2012
    Posts:
    21
    Thanks for making this. Was looking for something for single-person dev where you can sync bi-directionally with a central lib folder. But for this I would need to be able to specify file types to be ignored (*.cs, .DS_Store etc). Would you be able to add it? Or do you have it on GitHub and accept Pull-Requests?
     
    Last edited: Sep 10, 2022
  8. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
  9. islaitala

    islaitala

    Joined:
    Sep 6, 2017
    Posts:
    3
    Thank you lots for this!

    I am creating MMORPG game and I have a lot of shared data between server and client such as items data, entity data as scriptable objects. This allows me to create/modify them in one project (the server) and they get synced automatically to a client.
     
  10. Bezoro

    Bezoro

    Joined:
    Mar 16, 2015
    Posts:
    133
    I'm having an annoying issue.
    I'm using MicroSplat for the terrains and whenever I change a setting in its material Link & Sync goes into a loop of calling
    Assetdatabase.SaveAssets()
    .
    It only stops once I select the MicroSplat shader file.

    Unity_Z6D4s7dNEo.png

    For context MicroSplat recompiles the shader for every change in the material.

    Unity: 2022.3.6f1
    URP: 14.0.8
    Link & Sync: 3.0
     
  11. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    The call in the SyncOperation constructor is most likely the source of the problem since it happens automatically in Automatic or Notify mode. Not sure if I can safely remove it because it's important for all assets to be written to disk at that point for the system to be able to determine what needs syncing. So the best solution might be for you to comment it out or just use Manual mode.
     
  12. Bezoro

    Bezoro

    Joined:
    Mar 16, 2015
    Posts:
    133
    Settings to Manual mode does work around the issue, but would there be a way to make Link & Sync only worry about the assets that are relevant to it?
    I will miss the auto sync functionality if so, it is quite handy.
     
  13. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    You can ignore files and folders by adding them to the Exclusions list in the link asset.
     
  14. Bezoro

    Bezoro

    Joined:
    Mar 16, 2015
    Posts:
    133
    That is to ignore files that are under the influence of Link & Sync no?
    The Microsplat shader file causing the issue is in a separate folder not touched by Link & Sync at all.

    Unity_z4BreBqhR0.png

    As you can see I am using multiple Links, but none of them have anything to do with the Microsplat shader in MicroSplatData.
    I've set them all to Manual to work around the issue, if I set any of them to Automatic or Notify whenever I make any changes to the Microsplat shader the issue occurs.
     
  15. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    If those files aren't in any link then they shouldn't be able to cause a link to do anything. Try putting a log in the SyncOperation constructor and backtrack from there to figure out why it's running.
     
  16. nonlin

    nonlin

    Joined:
    Dec 12, 2013
    Posts:
    46
    Can you help explain to me what this does or what problems it solves?

    For example I would use Symlinks to try and have a git repo of a plugin be used/shared across multiple projects but .Meta files get in the way.

    Does this tool somewhat help that issue? Any pros or cons?
     
  17. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    I'm not really sure what else there is to explain that isn't already covered in the first post and Asset Store description. It's a tool for synchronizing the contents of a folder inside your Unity project with one or more folders outside it and metadata files are included in that just like any other files.