Skip to content

Commit 595c73e

Browse files
committed
UNI-4964: Added new files
1 parent 2121504 commit 595c73e

File tree

5 files changed

+171
-9
lines changed

5 files changed

+171
-9
lines changed
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
* [FBX Exporter](index)
2-
* [Exporting FBX files](exporting)
3-
* [Using FBX Linked Prefabs](prefabs)
4-
* [FBX Linked Prefabs](nested-prefabs)
5-
* [Integration](integration)
6-
* [FBX Export options](options)
7-
* [Troubleshooting](troubleshooting)
8-
* [Known Issues](knownissues)
9-
* [Developer's guide](devguide)
2+
* [Exporting FBX files](exporting)
3+
* [FBX Linked Prefabs](prefabs)
4+
* [Integration](integration)
5+
* [FBX Export options](options)
6+
* [Limitations](knownissues)
7+
* [Troubleshooting](troubleshooting)
8+
* [Developer's guide](devguide)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Known Issues
2+
3+
* The FBX Exporter package does not support exporting `.asset` files.
4+
5+
* The bind poses of animated skinned meshes are lost on export. For example, if you export an animated skinned mesh from Unity and import it into Autodesk® Maya® and Autodesk® Maya LT™ you will not be able to set the character into the bind pose using the **Rigging** > **Skin** > **Go to Bind Pose** command.
6+
7+
* Name or path changes are ignored when converting a Model instance
8+
9+
* Exporting animation only for animated lights and cameras from Autodesk® Maya® and Maya LT™ is not currently supported
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Working with Prefabs
2+
3+
In Unity, [Nested Prefabs](https://docs.unity3d.com/Documentation/Manual/NestedPrefabs.html) allow you to create Prefabs inside other Prefabs, and [Prefab Variants](https://docs.unity3d.com/Documentation/Manual/PrefabVariants.html) allow you to save a variation on an existing Prefab.
4+
5+
When Unity imports a Model from a 3D modeling application such as Autodesk® Maya®, Unity creates a **Model Prefab**, which is a read-only representation of the FBX file's contents. You can't edit Model Prefabs in Unity, apart from [changing the import settings](https://docs.unity3d.com/2018.3/Documentation/Manual/class-FBXImporter.html). When the FBX file is modified inside the originating 3D modeling software, Unity updates the Model Prefab.
6+
7+
![A Model Prefab in the Scene and Hierarchy views](images/FBXExporter_ModelPrefab.png)
8+
9+
If you want to add components, Materials, or change most other property values without affecting the original FBX file in Unity, convert the Model Prefab to an **FBX Linked Prefab**. This is a Prefab Variant of the exported FBX's Model Prefab. Prefab Variants allow you to override their base Prefabs' properties.
10+
11+
> **NOTE:** While this method allows you to override properties, you cannot change the internal hierarchy of the Variant without breaking the link to the Model Prefab. This means you can add components to a Model Prefab in the Scene, such as a collider. However, you cannot apply any change back to the Asset without breaking the link. In this way, a Model Prefab is a *read-only* Prefab, because it is non-editable except for overrides in the Scene.
12+
13+
Using FBX Linked Prefabs is the best way to ensure that your Models continue to reflect any changes you make to your FBX files in external applications while still taking full advantage of the Prefab system. For example, while Linked Prefabs previously required the extra **FbxPrefab** component, FBX Linked Prefabs use only the Unity Prefab features. And you can create Variants of your FBX Linked Prefabs which all receive updates from the Model Prefab but provide a lot of flexibility.
14+
15+
In addition, Variants give you some additional control over receiving updates from external applications. For example, if you have a Model with a Spot Light of size 10 and you override the size to 1 in your Variant, when the size and color change in the FBX file, the color changes but the size remains 1.
16+
17+
> **IMPORTANT:** Because the Prefab Variant inherits data from the base Model Prefab, you cannot make structural changes to the Prefab Variant. This means that you cannot delete inherited child objects or re-arrange the order of inherited child objects on the Prefab Variant.
18+
19+
### Creating an FBX Linked Prefab
20+
21+
You can either create an FBX Linked Prefab [from a GameObject](#fromGameObject) or generate it directly [from the selected .fbx or .prefab file](#fromFBXorAssetFile). If you are upgrading from a previous version of Unity, you can also [convert any existing](#conversion) Linked Prefabs you may have to the new FBX Linked Prefabs.
22+
23+
When you convert a GameObject to an FBX Linked Prefab, the FBX Exporter exports each selected GameObject hierarchy and writes an FBX file and a Prefab Variant (`.prefab`) with the FBX as its base.
24+
25+
When you generate an FBX Linked Prefab from a selected file, the FBX Exporter generates the FBX Linked Prefab without modifying the Scene:
26+
27+
* If you select an FBX file, the FBX Exporter generates a Prefab Variant Asset file.
28+
* If you select a Prefab Asset file, the FBX Exporter generates a Prefab Variant Asset file and an FBX file.
29+
30+
31+
32+
<a name="fromGameObject"></a>
33+
#### Converting a GameObject
34+
35+
To replace the GameObject hierarchy with an instance of an FBX Linked Prefab:
36+
37+
1. Right-click on the GameObject in the Hierarchy view and select __Convert To FBX Linked Prefab__ from the context menu.
38+
39+
![Convert GameObject to FBX Linked Prefab](images/FBXExporter_FBXLinkedPrefab-GameObject.png)
40+
41+
Alternatively, you can use the main menu: __GameObject__ > __Convert To FBX Linked Prefab__ with the GameObject selected.
42+
43+
2. Specify how you want to export the GameObject using the properties on the [Convert Options](#ConvertOptions) window and click **Convert**.
44+
45+
FBX Linked Prefabs use the same rules as for exporting: all selected objects and their descendants are exported to a single FBX file. If you select both a parent and a descendant, the FBX Linked Prefab only exports the parent’s hierarchy.
46+
47+
> **NOTE:** If the selected object is a Model Prefab instance, then the hierarchy is not re-exported: instead the FBX Linked Prefab links to the FBX file that already exists.
48+
49+
<a name="fromFBXorAssetFile"></a>
50+
#### Converting an FBX file or a Prefab
51+
52+
To generate the FBX Linked Prefab from the selected file without modifying the Scene:
53+
54+
1. Right-click on an FBX or Prefab Asset file in the Project view and select __Convert To FBX Linked Prefab__ from the context menu.
55+
56+
![Convert Prefab file to FBX Linked Prefab](images/FBXExporter_FBXLinkedPrefab-Asset.png)
57+
58+
Alternatively, you can use the main menu: __Assets__ > __Convert To FBX Linked Prefab__.
59+
60+
2. Specify how you want to export the GameObject using the properties on the [Convert Options](#ConvertOptions) window and click **Convert**.
61+
62+
Depending on which type of file you selected, the FBX Exporter creates the FBX Linked Prefab in one of the following ways:
63+
64+
* If an FBX file is selected, the FBX Exporter generates a Prefab Variant file with the selected FBX file as its base.
65+
* If a Prefab Asset file is selected, the FBX Exporter exports the Prefab to an FBX file and creates a new FBX Linked Prefab.
66+
67+
<a name="ConvertOptions"></a>
68+
### Convert Options window
69+
70+
When converting to an FBX Linked Prefab, the following window opens, displaying options for exporting:
71+
72+
![Convert Options for an FBX Linked Prefab](images/FBXExporter_ConvertOptionsWindow.png)
73+
74+
75+
#### Convert Option Properties
76+
77+
| Property: | Function: |
78+
| :------------------------ | :----------------------------------------------------------- |
79+
| __Export Name__ | Specify the name of the FBX file to export. |
80+
| __Export Path__ | Specify the location where the FBX Exporter will save the FBX file. |
81+
| __Prefab Name__ | Specify the name of the FBX Linked Prefab's file. |
82+
| __Prefab Path__ | Specify the location where the FBX Exporter will save the FBX Linked Prefab file. |
83+
| __Source__ | Transfer the transform animation from this object to the __Destination__ transform.<br/><br/>**NOTES:**<br/> - __Source__ must be an ancestor of __Destination__.<br/> - __Source__ may be an ancestor of the selected object. |
84+
| __Destination__ | Which object to transfer the transform animation to.<br/><br/>This object receives the transform animation on objects between __Source__ and __Destination__ as well as the animation on the __Source__ itself. |
85+
| __Export Format__ | Select the format for the FBX Exporter to use when exporting the FBX file (ASCII or binary). |
86+
| __Include__ | __Convert to FBX Linked Prefab__ always exports both Models and Animation in the hierarchy. |
87+
| __LOD level__ | __Convert to FBX Linked Prefab__ always exports All levels of detail (LOD) available in the hierarchy for LOD groups. |
88+
| __Object(s) Position__ | __Convert to FBX Linked Prefab__ always resets the root object's transform during export. However, the Prefab maintains the global transform for the root object. |
89+
| __Animated Skinned Mesh__ | Check this option to export animation on objects with skinned meshes.<br/><br/>If unchecked, the FBX Exporter does not export animation on skinned meshes. |
90+
| __Compatible Naming__ | Check this option to control renaming the GameObject and Materials during export. <br/><br/>The FBX Exporter ensures compatible naming with Autodesk® Maya® and Autodesk® Maya LT™ to avoid unexpected name changes between Unity and Autodesk® Maya® and Autodesk® Maya LT™. During export the FBX Exporter replaces characters in Unity names as follows:<br/> - Replaces invalid characters with underscores ("\_"). Invalid characters are all non-alphanumeric characters, except for colon (":").<br/> - Adds an underscore ("\_") to names that begin with a number. - Replaces diacritics. For example, replaces "é" with “e”.<br/><br/>**NOTE:** If you have a Material with a space in its name, the space is replaced with an underscore ("_"). This results in a new Material being created when it is imported. For example, the Material named "Default Material" is exported as "Default_Material" and is created as a new Material when it is imported. If you want the exported Material to match an existing Material in the scene, you must manually rename the Material before exporting. |
91+
| __Don't ask me again__ | Check this option to use the same **Convert Option** properties and hide this window when converting to FBX Linked Prefabs in the future. You can reset this option by turning on the **Show Convert UI** option under **Edit** > **Project Settings** > **Fbx Export** in Unity's top menu. |
92+
93+
> **NOTE:** For FBX Model filenames, the FBX Exporter ensures that names do not contain invalid characters for the file system. The set of invalid characters may differ between file systems.
94+
95+
96+
97+
<a name="conversion"></a>
98+
### Converting from Linked Prefabs to FBX Linked Prefabs
99+
100+
To convert existing Linked Prefabs to FBX Linked Prefabs, follow these steps:
101+
102+
1. Fix any name discrepancies that were previously handled by the [name remapping functionality for Linked Prefabs](prefabs.md#Remapping) before converting. FBX Linked Prefabs do not handle name remapping. If you start to add game logic to components, and then the objects in the FBX get renamed, you are at risk of losing the components. This can happen because the old GameObjects are deleted and new objects with the new names are added in their place.
103+
104+
2. Right-click the Linked Prefab file and select **Convert to FBX Linked Prefab** from the context menu.
105+
106+
![Create a Prefab variant from the file's context menu](images/FBXExporter_FBXLinkedPrefab-Asset.png)
107+
108+
> **NOTE:** This re-exports the Linked Prefab to a new FBX file, and it is no longer connected to the original FBX.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Troubleshooting
2+
3+
This section covers the following issues:
4+
* [Upgrading the FBX Exporter from the Asset Store package](#AssetStoreToPackman)
5+
* [Incorrect skinning on Animated Skinned Mesh](#SkinnedMeshExport)
6+
* [Converting GameObjects with UI components](#ConvertUI)
7+
* [Overwriting FBX files](#OverwritingFiles)
8+
* [Tree primitive no longer editable after conversion](#EditableTree)
9+
* [Trail and line particles lose material after being converted](#ParticlesLoseMaterial)
10+
11+
<a name="AssetStoreToPackman"></a>
12+
## Upgrading the FBX Exporter from the Asset Store package
13+
14+
When installing a new version of the FBX Exporter package after using version 1.3.0f1 or earlier, the link between Assets and FbxPrefab components may be lost. See [Updating from 1.3.0f1 or earlier](index.md#Repairs_1_3_0f_1) for repairing instructions.
15+
16+
<a name="SkinnedMeshExport"></a>
17+
## Incorrect skinning on Animated Skinned Mesh
18+
19+
If animated skinned meshes do not export with the correct skinning, it may be because they are not in the bind pose on export.
20+
Before exporting the animated skinned mesh, check the following:
21+
* The skinned mesh animation is not being previewed in the Animation of Timeline windows, as this may cause issues on export
22+
* The original Rig's FBX does not contain animation
23+
* It is currently not possible to fix this issue in Unity. Animation will first need to be separated from the Rig in a separate modeling software such as Autodesk® Maya®
24+
25+
<a name="ConvertUI"></a>
26+
## Converting GameObjects with UI components
27+
28+
Converting hierarchies with UI components (i.e. RectTransform) will break the UI.
29+
A workaround for this is to first prepare the hierarchy so that it has no GameObjects with UI elements before converting, then add the UI elements to the FBX Linked Prefab afterwards.
30+
31+
<a name="OverwritingFiles"></a>
32+
## Overwriting FBX files
33+
34+
In some situations, overwriting an FBX file that is used by an FBX Linked Prefab instance, may lead to unexpected results such as additional objects being added to the Prefab hierarchy.
35+
Therefore, we recommend not to overwrite an FBX file that is used by an FBX Linked Prefab.
36+
37+
<a name="EditableTree"></a>
38+
## Tree primitive no longer editable after conversion
39+
40+
Converting a Tree primitive will make the Tree no longer editable.
41+
Make sure to only convert the Tree when finished editing. Otherwise click undo after converting to return to previous state where the Tree was editable.
42+
43+
<a name="ParticlesLoseMaterial"></a>
44+
## Trail and line particles lose material after being converted
45+
46+
If materials are lost when converting trail or line particles, the materials will currently need to be re-applied to the FBX Linked Prefab after conversion.

com.unity.formats.fbx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"unity": "2018.3",
1010
"unityRelease": "4f1",
11-
"description": "The Unity FBX Exporter package makes it easy to send geometry and animation from Unity 2018.3 or later to any application that supports FBX and back again with minimal effort.\n\nIn particular, this round-trip workflow enables you to export Unity scenes to FBX, import into Maya, Maya LT, or 3ds Max using an artist-friendly interface, export Unity-ready FBX geometry and animation, and safely merge your changes back into those Assets to continue your work.\n\nThe exporter provides support for GameObject hierarchies, Materials, Textures, Cameras, Lights, Skinned Meshes, and Animation. The Unity FBX importer provides support for hierarchies, Materials, Textures, Stingray Physically Based Shader (PBS), Cameras, Animation and Animated custom properties (when present in the FBX file).\n\nThis package includes a plug-in for Autodesk Maya 2017 or later, Autodesk Maya LT 2017 or later, and 3ds Max 2017 or later.",
11+
"description": "The Unity FBX Exporter package makes it easy to send geometry and animation from Unity 2018.3 or later to any application that supports FBX and back again with minimal effort.\n\nIn particular, this round-trip workflow enables you to export Unity scenes to FBX, import into Maya, Maya LT, or 3ds Max using an artist-friendly interface, export Unity-ready FBX geometry and animation, and safely merge your changes back into those Assets to continue your work.\n\nFor more information, see the FBX Exporter package documentation.",
1212
"keywords": [
1313
"fbx",
1414
"animation",

0 commit comments

Comments
 (0)