Distributing Content With uScript Graphs
This section covers ways you can safely (legally) distribute projects and content that use uScript for redistribution through either a Unity package file or to the Unity Asset Store.
If you have used uScript to create scripts and prefabs that you wish to redistribute, you must be careful to not distribute the uScript editor tool itself. This would be a violation of the End User License Agreement (EULA) you agreed to when purchasing and using uScript either directly from Detox Studios or through the Unity Asset Store. The PLE version of uScript must also follow these guidelines to ensure uScript itself is not distributed.
Note! - If you wish to redistribute uScript graphs that you want others to be able to view or edit in the uScript editor, they must have their own uScript license. The purpose of this documentation is to show you how to distribute content such as prefabs and Unity packages for direct use by others without uScript installed. One suggestion if you just want them to see how the graphs are made would be to use uScript's screenshot export feature and include the PNG files along with your content.
What Should Never Be Redistributed
We have tried to make it as easy as possible to separate the uScript Editor from the support files that may freely be distributed. For clarity, here is a list of files and directories that should never be included in any content you wish to distribute to others:
- The uScriptEditor folder - This folder contains the actual uScript Visual Scripting Tool editor files (most importantly the uScript.dll file) and should never be redistributed. No files in this folder are needed to run any content and graphs generated by uScript. There only purpose is to allow you to edit existing graphs and create new ones. If you wish to allow others to view, edit, or create uScript graphs they will need their own license of uScript-- either Retail or PLE depending on how the original content was authored and the usage conditions (free or commercial use).
- The License.rtf (or License_PLE.rtf) file - This file can be found in the root uScript folder and is for licensed users of uScript who purchased uScript directly through the Detox Studios website (this file does not exist in the Unity Asset Store version as they have their own license agreement). It should not be redistributed with your content.
- The ReadMe.txt file - This file can be found in the root uScript folder and is for licensed users of uScript only. It should not be redistributed with your content.
What You Can (And Should) Redistribute
The following parts of uScript were designed to be allowed to for redistribution as required by your content. As a legally licensed user of uScript, you may freely redistribute these files in whole or in part as you see fit:
- The uScriptRuntime folder (required) - This folder and its contents (including the uScriptRuntime.dll and all nodes) should be included. It is fine to distribute the root uScript folder that this folder resides in as long as you do not include the uScriptEditor folder or any of its contents (see above section for details) which also resides inside the root uScript folder.
- Distributing needed nodes only (optional) - if you know exactly which nodes you used in your uScript graphs you may be able to delete unused nodes files (they are C# .cs files) from inside the Nodes folder in order to reduce your overall file size and clutter to those you are distributing your work to.. You will know if you deleted a node you were using because Unity will generate compile errors. Again, this is optional though and should only be attempted if you feel comfortable doing so.
- The uScriptUnityVersion.cs file (optional) - There is no need to redistribute this file as it is only used by the uScript Visual Scripting Tool editor. It won't hurt anything if it is included however.
- The uScriptProjectFiles folder (required) - You may redistribute this folder and any files and sub-directories within it. The only thing you may need to be mindful of is if you have put any third party nodes in the uScriptProjectFiles/Nodes folder that you may have licensed from others. In that case you will need to check with the node author(s) to be sure you can redistribute those custom nodes. If you found these nodes on the uScript forum (http://uscript.net/forum) you can freely use and distribute the nodes found there as everyone must agree that anything posted there is free to use by anyone for any purpose (please see the forum user agreement for more details).
- Files you may not wish to include from uScriptProjectFiles (but are free to do so if you wish):
- The uScriptSettings.settings file (optional)- there is not much use in redistributing the uScriptSettings.settings file as only the uScript editor uses that file.
- Your .uscript graph files (optional) - There is no need to redistribute your .uscript graph files as they are only used by the uScript Visual Scripting Tool editor (which should not be redistributed). While redistributing these files should hurt anything you should be aware that they will take up extra space in your package and also give people access to your graphs if they also have uScript (which you may not want). The only files that are required are the C# script files that uScript generated (that your content actually uses) in the _GeneratedCode sub-folder.
- The uScript Gizmos in the root Gizmos folder (optional) - If you wish, you may also redistribute the uScript Gizmos found in your Unity project's root Assets/Gizmos folder-- though they are not required for your content to run and should only be considered if you wish to have the uScript Gizmos show up for others on content you have generated with uScript.
Example
Here is an example of what your uScript files should look like after deleting all the forbidden uScript editor files from a Unity project (see above), leaving only the files and directories that should be redistributed with your work:
Moving uScript Files For Redistribution
It is recommended that if you will be redistributing something using uScript that you may want to "hide" all the uScript files and folders. This is a fairly straightforward process through the Unity Editor, though there are a few things you will want to keep in mind:
- If you plan to redistribute multiple content that all use uScript, you may not want to move the uScript files from their default locations because they users could end up installing multiple packages that might put the same named script files into multiple locations in their project. This would cause Unity to generate compile errors since the C# (.cs) files would be duplicated in multiple places within their Unity project.
- Moving the uScript files may make it harder for you to update your content later (or at least more time consuming).
That said, here is an example of a prefab ready for submission to the Unity Asset Store using the default uScript folder structure...
... and here is the same example where the uScript files have been moved deeper into the package to hide them away (everything is under a Scripts folder)...