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

Unity Pro Asset Serialization: from Mixed to Force Text

Discussion in 'Editor & General Support' started by OnlineCop, Feb 28, 2012.

  1. OnlineCop

    OnlineCop

    Joined:
    Nov 14, 2009
    Posts:
    10
    Background:

    Our team of about 10 hold Unity Pro licenses, but we do not have the Asset Server: we are using a repository for collaborative efforts.

    We are in the middle of a project that contains a large amount of graphics, scenes, animations, etc.

    Our project's "Asset Serialization Mode" is currently set to "Mixed" (found here: Edit-->Project Settings-->Editor), but even minuscule changes to a scene means that we must push binary files to our SVN repo. It fills up fast, and it's not clear who has modified what.

    I changed my local settings from "Mixed" to "Force Text", and sat back while Unity re-imported and converted the assets. The re-import of assets was prohibitively long (3-4 solid hours, with no 'cancel' button in sight).

    Question:

    Are there definite pros to using the Force Text mode over Mixed?

    Problem:

    The fact that we're pushing binary files to the SVN repo means we make several GB worth of changes per week to our repository. Even a change to a camera's position could mean that we need to push the scene, the scene's prefab, and the possibly the camera's prefab for everyone to grab on the next update.

    Since Forced Text would allow us to only push the text file diffs to SVN, this would cut down on server load and bandwidth. But it would also mean that all 10 of us could be spending several hours (to a full day) of nothing but asset re-imports.

    Is it WORTH it to change horses mid-stream and convert to Forced Text? (As in, compelling enough to convince "the boss" of the time requirement?)

    Is there any comprehensive wiki, FAQ, tutorial, or online resource we can reference that discusses:
    • Which files should be synced
    • Proper line ending for Force Text files (LF? CRLF?)
    • SVN property types for .meta files (not all appear as ASCII text: some appear as "Bio-Rad .PIC Image File 26982 x 25964, 28486 images in file")
     
  2. swquinn

    swquinn

    Joined:
    Mar 23, 2011
    Posts:
    2
    I saw your post here--and on answers.unity3d.com--I was wondering if you have any insight into whether or not the text serialization is available for non-pro licenses? From what I can tell it appears its only available to pro licenses... :(

    Can anyone comment on this feature's availability to pro-vs.-non-pro licenses?
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Text Serialization is Pro only.
    Free just got the meta support but thats likely where it will end for Free on the Versioning until Pro ceases to exist in its current form.

    As for which files to sync:
    As previously the whole assets folder and since 3.5, nothing in the library folder anymore, everything thats versioning on the settings end etc is in an own folder.
    Line endings can be left alone, don't force anything
    Metas should be considered as binary, they are unmergable and I would suspect 'delta storage' can mess them up pretty easily too. But it should be detected correctly normally, never saw a problem, not even on git which at times has troubles with this and trashes the whole storage in consequence.
     
  4. snowkittykira

    snowkittykira

    Joined:
    Feb 1, 2011
    Posts:
    1
    In my experience only one user has to convert the assets to text format. If everyone else updates to that commit unity recognizes that the assets are already text, skipping the hours of reimporting. I've only tried with the asset server, though, so I can't be sure that it will be the same over svn.

    As for which files should be synced, the only resource I've found is at http://unity3d.com/support/documentation/Manual/ExternalVersionControlSystemSupport.html

     
  5. Molix

    Molix

    Joined:
    Apr 24, 2009
    Posts:
    92
    To the original poster, did you go ahead with this? Could you share your experience? We're using Asset Server, and I wonder if we wouldn't be better off with an SVN repo, though I have been reluctant to suggest switching because of the possible user error (i.e. UAS is nice and easy for artists, despite its many flaws).
     
  6. OnlineCop

    OnlineCop

    Joined:
    Nov 14, 2009
    Posts:
    10
    @Molix, my team has not yet converted our current project to Force Text, as we have not heard anything compelling enough to force our entire team to a multi-hour, frequent-crash-and-restart conversion process.

    We are going to try this with a new project, though we can't afford to update it for the current one... so maybe 5-6 months down the road before I can let everyone know if it's worth it... unless a Unity developer wants to come in here and answer this undocumented feature once-and-for-all :).

    Also, @Molix: Can you tell us what advantages you've found for using UAS? We might switch over to that, but we'd like to know how it helps "real developers"... not just relying on Unity's own "oh, you really need this!" marketing. From the horses mouth... is it worth it for your team? What's is good for?

    @henkboom, that is partially true. The ./ProjectSettings/EditorSettings.asset can be pushed up to SVN so the "Force Text" is shared across all project devs. Then, Unity converts all files except (I believe) strictly binary (like .MAT materials, .PNG images, .WAV sounds, etc.), which you can push up to SVN.

    The thing is, if I were to change it to Force Text on MY end but another developer has "Mixed" on his, all of my changes on my side will be pushed to SVN as text-based files. But once his Unity grabs it, it will auto-convert it back FROM text into binary on his side, behind the scenes. Then when he pushes up to SVN, we see a binary push, which gets converted on MY side from binary back to TEXT.

    So unless everyone in the project had the same preference/setting, there's a bunch of conversions going on back and forth, and it doesn't help the SVN for diffing purposes (or space savings).
     
    Last edited: Apr 3, 2012
  7. Molix

    Molix

    Joined:
    Apr 24, 2009
    Posts:
    92
    @OnlineCop: re: advantages of UAS: it is right in Unity, so it is very convenient for workflow. Add/Move/Delete/Change are clearly indicated (so you know if you've broken a reference by mistakenly deleting+adding instead of just modifying). It hides any odd files; you only see the real asset and nothing oddly named or that you didn't create. All that really adds up to reducing user mistakes and time wasted sorting out what should be trivial.

    The main disadvantages (for us at least) are sporadic performance, a lack of locking, and occasional oddness/bugs (client side; we've never lost data from a bug). Occasionally updates and commits are super fast, but sometimes they just seem to take forever to do (what appears to be) nothing. The problem of no locking is really an issue that grows geometrically with team size; it is not a huge issue with small teams that communicate about bottleneck assets but typically work on separate assets.

    When we started, UAS was the only way, and as you know, switching midstream is not something to take lightly, but maybe those advantages are less important now. We use SVN for other non-Unity stuff, but I wonder about adoption by artists and other less technical folks leading to errors or other issues (e.g. missing necessary files/partial commits, unnecessary files added, performance, how locking is represented/handled in Unity, having to lock or merge meta files, broken references).
     
  8. amuzulo

    amuzulo

    Joined:
    Jul 30, 2012
    Posts:
    1
    Note that as of today this is now available in free Unity (not just Pro) starting with version 4.2. I just ran it on my non-Pro project and the conversion took about 10 seconds. Then again, my project is still pretty small, since it's just a prototype...
     
  9. OnlineCop

    OnlineCop

    Joined:
    Nov 14, 2009
    Posts:
    10
    @amuzulo: That's good to know. We've been using Pro at work and I haven't upgraded my personal version to 4.2 yet.

    All the reason for me to advocate switching to Forced Text for everyone.

    Also, I have both asked this question, and responded a follow-up "answer" to it, at http://answers.unity3d.com/questions/222281/asset-serialization-mixed-vs-force-text.html in case any of you wanted to follow that thread and provide other feedback. Thanks for all your comments!
     
  10. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    My experience with text-serialization was to switch back from force-text to mixed.

    Reason being that my saving/loading scenes was 2-3x slower with text-serialization and no real advantages as you cannot merge 'safely' scenes. Unless you do a lot of merging of prefabs / materials, there is really no advantages.

    We're using PlasticSCM as our VCS.
     
  11. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    I always use the Force Text option and then I made scene merge so that at least the files are always sorted so the merge process is easier. Otherwise merging the text files are completely random.

    https://www.assetstore.unity3d.com/#/content/5412