Have you ever wondered why copying folders does not keep correct references inside the assests?
Smart Folder Copy will copy your folder with assests, rename them if needed and assign new references that link to copied assests, instead of the original.
This Tool will save you a lot of time when working on:
Scriptable Objects
Prefabs
Animations
Just let the Smart Folder Copy tool do all the hard work for you.
1. Using Mouse only.
1.1 Select folders you wish to copy.
1.2 Right-Click the selection to see Menu Options.
1.3 Left-Click on "Smart Copy Folder" in the Dropdown
2. Using Shortcut.
2.1 Select folders you wish to copy.
2.2 Based on Operating System.
2.2.1 Windows: Press Ctrl + Shift + D to execute command.
2.2.2 Linux: Press Ctrl + Shift + D to execute command.
2.2.3 MacOS: Press Cmd + Shift + D to execute command.
In case folder you copy has a structured naming system, or you wish to skip some of the (folder, subfolder, file types), you will be glad to find that there are two ways to change these settings.
Using .json file.
Hardcoding class file.
- Using Json File -
We recommend using (Case 1) as to avoid compilation time for every change made to these settings, we store them in "Smart Copy Settings.json" file which is originally located in:
Assets/Candlelit Studio/Smart Copy Folder/Editor/Smart Copy Settings.json
- Hardcoding Class File -
If you're not familiar with json or wish to see detailed explanation of what each variable does then we recommend jumping to (Case 2)
before we proceed any further we highly recommend that you create a back up for this file.
So you have chosen case 1, located file and opened it.
You should be able to see a text like in the picture on the left, and would be right if you thought that this text looks divided into left and right side. If your familiar with Json you know that variables come as (name-value) pairs. Lets delve deeper into this.
Variable Naming - Left Side
The left side is variable names, which directly translate into variable in .cs file, because of this, any change made to variable name needs to be reflected in script file. We kept variable names straightforward, but few of them need more detailed explanation. Sadly json does not offer a convenient way of writing comments, therefore variable purpose is explained in script file. To open the file and read descriptions follow (Case 2).
Variable Values- Right Side
The Right side contains variable values and they come in different types, while each type have its own format rules:
-Boolean: Either (true, false), nothing else and no quotes!
-Enum: Any number, but in our case 0,1,2 no quotes!
-String: Line of characters surrounded by quotes.
-String[]: Multiple strings (see above) separated by comma and surrounded by brackets([ ]).
There is only one script used in this tool.
located in:
Assets/CandleLit Studio/Smart Copy Folder/Editor/Smart Copy Folder.cs
if you wish to change how the script handles folder and asset naming you should take a look inside, more specifically Settings subclass. Continues (Case 2.2)
if you look to the picture example on the left, you can see where Settings class is located inside "Smart Copy Folder.cs" file.
- Case 1 -
Class contains descriptions for variables inside .json file (Look examples above).
- Case 2 -
If you do not wish to use .json settings file then you can delete it. This tool will proceed to use this class with its default variables as template, unless control variable inside the class is set to do otherwise.