Home › Page › Build Pivots

Build Pivots

Build Pivots

Graveck UDev Build Pivot Utility

Build Pivots are used to swap files in and out of the Unity file structure. With
just a couple clicks you can pick some files and folders that live outside of your
Unity build and copy them in or out of your project.

A good time to use this utility is when you need to include different files (or different
versions of files) with different build targets. For instance, if you intend to publish to
iOS and Android and wish to include different Facebook plugins for both: you can place
each version of the plugin in a directory outside of Unity and then create a build pivot
for each platform. When building for iOS, simply pivot out Android and then pivot in
iOS. Switching back to Android is as easy as pivoting out iOS and then pivoting in Android.

Instructions:
* Place files that you wish to make pivotable outside of the Unity/Assets folder.
(For instance, if your Unity project lives at Trunk/Unity, then you might place
external pivot directories at Trunk/Pivots/Android and Trunk/Pivots/IOS.)

* Right-click in the Project window and select Create->Build Pivot.

* Re-name the pivot to something useful.

* With the pivot selected, use the inspector window to add pivot files and folders:

* Click the “Add File” or “Add Directory” button.

* In the “Select External File” or “Select External Directory” prompt, choose the
file or directory outside of the Unity/Assets folder. (For our example, if you
are making an Android pivot, choose Trunk/Pivots/Android as the external directory.)
Think of this as the “copy” part of a “copy and paste” routine.

* In the “Select Internal Directory” prompt, choose the directory inside of Unity/Assets
that you with the pivot to copy into. Think of this as the “paste” part of a
“copy and paste” routine.

* When done, your file or directory should show up in the “Pivot Points” list in
the inspector. You can visually confirm that the pivot was set up correctly.

* When you want to pivot something in, select the pivot and click the “Pivot In” button
in the inspector. This will copy the external files and folders into the Unity/Assets
folder.

* When you want to pivot something out, select the pivot and click the “Pivot Out”
button in the inspector. This will delete the files and folders from the Unity/Assets
folder.

* Note that it is always safe to click “Pivot Out” even if the pivot is not present. You
can do this at any time to ensure that the pivot is not present in the build.

Go here for Support and Feedback