Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Best way to attach entire project?

Discussion in 'Editor & General Support' started by iamthwee, Dec 26, 2015.

  1. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Hi boys,

    Daft question, but just wondered, what is the best way to attach my project for someone to look at, so they can import it into unity independent of their operating system and decide to run the code.

    Should I just upload my entire asset folder, or does it require other dependancies? Is this the bare minimum?
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,299
    Pack entire project folder (the folder which contains Asset folder), excluding Library folder.

    -----

    Following files can be excluded.

    *.csproj
    *.unityproj
    *.sln
    *.suo
    *.tmp
    *.user
    *.userprefs
    *.pidb
    *.booproj
    *.pidb.meta
    .DS_Store
    .DS_Store?
    ._*
    .Spotlight-V100
    .Trashes
    ehthumbs.db
    Thumbs.db
    desktop.ini
    desktop.ini.meta
    Desktop.ini
    Desktop.ini.meta
    sysinfo.txt

    Following folders can be excluded.

    Library/
    Temp/
    Obj/
    Build/
     
    Ryiah likes this.
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Forget zipping and sending. It always becomes a nightmare keeping in sync. You should investigate version control. Its pretty trivial to learn. And it makes sharing with other developers simple.
     
    Ryiah likes this.
  4. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Thanks no, I'm not planning on sharing or using gitfor version control, it is purely to upload onto the forums for my own reference, and others, so it needs to be reasonably small enough to upload. Simple examples. @negnfinity I didn't realise you had to pack the entire project folder, I thought the assets folder would be enough, so the user could drag the assets folder into their project and be good to go.
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,299
    Nope. There's settings in ProjectSettings folder and some additional stuff elsewhere. If you use collision layers OR if you configured input bindings, that info is saved in ProjectSettings. So if you forget to include that, it'll break the project for whoever is going to try using it. Files that I listed as "safe to exclude" can be either easily regenerated or are regenerated automatically.
     
    Ryiah and iamthwee like this.
  6. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Hmm, seems a bit complex, is there anyway to just export all the required files that ARE needed into a folder, or do I have to manually pull them out?
     
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,299
    I gotta say setting up proper version control with proper branching support might be too much hassle for a beginner. Also there's matter of finding hosting with enough space. Now, unity is not unreal, so project has high chance of fitting into, say 2GB limit of bitbucket, but, for example, but if you, say setup git repo on bitbucket and try to stuff your binary assets onto that, you're gonna run out of space very quickly.

    Storing asset folder in dropbox and scripting folder onto git works, though, but that's a bit beyond basic usage, IMO.
     
  8. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,299
    Aside from "export package", no. And I don't remember if "export package" will pack up projectsettings.

    If that's complex, just zip/7zip/bzip/whateverzip up everything with exception of Temp and Library (Build, Exes) folders. Temp and library contains junk. Exes/Build contains binaries, those can be rebuilt. The rest of the files are arguably usable.. although you REALLY want to exclude *.pdb or *.ncb files (if they're generated in C# mode) on windows platform.
     
  9. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    I would like the examples to be portable unity files, for either linux, mac or windows builds... No textures, or smallish textures, no large polygon meshes, no external libraries e.g from asset store, just simple meshes and scripts, so you, me or anyone using using 5.0 could download the zip and run it on their os.
     
  10. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,299
    Just do as I said Zip it up, exclude Library, Temp, Build and Exe and optionally the file patterns I listed. Result should work anywhere unless it relies on platform-specific plugins.
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,004
    Yes, I know the feeling. There are version control assets on the store to assist with it but most of them aren't very well rated or they're restricted to specific OSes. One of them, SVN Tools, appears to have good ratings but it only supports Windows for the moment. Shame there aren't any other good alternatives.
     
  12. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,299
    I tend to use command line git. The problem is finding decently sized free hosting AND the fact that git can't diff binaries, so if you start pushing binaries into repo, repo size will grow quickly (it will store one version of everything, although it will try to compresss them). There's git-lfs, though, but I haven't tested that properly. SVN is good for binaries, but branching is hell, last time I checked. Some people use mix of both. SVN for binaries, git for code.

    It is sorta advanced topic, though.
     
  13. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    It can get very advanced on big project with multiple users and branches. But its can also be very simple. I use GitHub Desktop, as its the simplest interface I could find. Its set up with BitBucket as my repo. I used the first unity gitignore I found on google.

    Sure it might take 20 minutes to set up and learn git for the first time. But the payback on version control is almost instant.
     
  14. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,039
    +1

    Giving someone VCS access is not necessarily the best way to share a project for one off or occasional viewing (e.g. sending a project to a non-technical client).

    Fix an issue in an asset 30 minutes; teach the 100 people who want the patch how to use git... 30 hours.

    EDIT: That doesn't mean providing VCS access is the wrong solution in every case either (of course). Its just not necessarily right in every case either.
     
    Kiwasi likes this.
  15. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,397
    Use this script (put it in an Editor folder):

    Code (javascript):
    1. public class Exporter {
    2.     @MenuItem("Assets/ExportWithSettings")
    3.     static function Export () {
    4.         AssetDatabase.ExportPackage ("Assets", "MyProject.unitypackage", ExportPackageOptions.Interactive | ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets | ExportPackageOptions.IncludeDependencies);
    5.     }
    6. }
    Replace "MyProject.unitypackage" with the actual name you want. This way you export the entire project, including settings, as a Unitypackage.

    --Eric
     
    theANMATOR2b and Kiwasi like this.