You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Assets/FbxExporters/Editor/ConvertToModel.cs
+40-11Lines changed: 40 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -97,16 +97,38 @@ public static GameObject[] CreateInstantiatedModelPrefab (
97
97
/// Returns the prefab asset that's linked to the fbx.
98
98
///
99
99
/// If 'toConvert' is:
100
-
/// (1) an object in the scene, then the hierarchy will be exported and a new auto-updating prefab created pointing to the new fbx
101
-
/// (2) the root of an fbx asset, or the root of an instance of an fbx asset, then a new auto-updating prefab will be created pointing to the existing fbx
102
-
/// (3) a prefab asset (but *not* if it's an instance of a prefab), then a new fbx asset will be exported and the prefab will be made to auto-update from the new fbx
100
+
/// <list>
101
+
/// <item>An object in the scene, then the hierarchy will be exported
102
+
/// and a new auto-updating prefab created pointing to the new fbx.</item>
103
+
/// <item>The root of an fbx asset, or the root of an instance of an
104
+
/// fbx asset, then a new auto-updating prefab will be created
105
+
/// pointing to the existing fbx.</item>
106
+
/// <item>A prefab asset (but *not* if it's an instance of a prefab),
107
+
/// then a new fbx asset will be exported and the prefab will be made
108
+
/// to auto-update from the new fbx.</item>
109
+
/// </list>
103
110
/// </summary>
104
111
/// <returns>The prefab asset linked to an fbx file.</returns>
105
112
/// <param name="toConvert">Object to convert.</param>
106
-
/// <param name="fbxFullPath">Absolute platform-specific path to the fbx file. If the file already exists, it will be overwritten. May be null, in which case we construct a unique filename. Ignored if 'toConvert' is an fbx asset or is an instance of one.</param>
107
-
/// <param name="fbxDirectoryFullPath">Absolute platform-specific path to a directory in which to put the fbx file under a unique filename. May be null, in which case we use the export settings. Ignored if 'fbxFullPath' is specified. Ignored if 'toConvert' is an fbx asset or an instance of one.</param>
108
-
/// <param name="prefabFullPath">Absolute platform-specific path to the prefab file. If the file already exists, it will be overwritten. May be null, in which case we construct a unique filename. Ignored if 'toConvert' is a prefab asset.</param>
109
-
/// <param name="prefabDirectoryFullPath">Absolute platform-specific path to a directory in which to put the prefab file under a unique filename. May be null, in which case we use the export settings. Ignored if 'prefabFullPath' is specified. Ignored if 'toConvert' is a prefab asset.
113
+
/// <param name="fbxFullPath">Absolute platform-specific path to
114
+
/// the fbx file. If the file already exists, it will be overwritten.
115
+
/// May be null, in which case we construct a unique filename.
116
+
/// Ignored if 'toConvert' is an fbx asset or is an instance of
/// platform-specific path to a directory in which to put the prefab
129
+
/// file under a unique filename. May be null, in which case we use
130
+
/// the export settings. Ignored if 'prefabFullPath' is specified.
131
+
/// Ignored if 'toConvert' is a prefab asset.</param>
110
132
publicstaticGameObjectConvert(
111
133
GameObjecttoConvert,
112
134
stringfbxDirectoryFullPath=null,
@@ -155,13 +177,20 @@ public static bool WillExportFbx(GameObject go) {
155
177
///
156
178
/// If 'toConvert' is the root of an FBX asset, return it.
157
179
///
158
-
/// If it's an instance in a scene the points to the root of an FBX asset, return that asset.
180
+
/// If it's an instance in a scene the points to the root of an FBX
181
+
/// asset, return that asset.
159
182
///
160
-
/// Otherwise, export according to the paths and options, and return the new asset.
183
+
/// Otherwise, export according to the paths and options, and
184
+
/// return the new asset.
161
185
/// </summary>
162
186
/// <param name="toConvert">GameObject for which we want an fbx asset</param>
163
-
/// <param name="fbxDirectoryFullPath">Export will choose an appropriate filename in this directory. Ignored if fbxFullPath is set. Ignored if toConvert is an fbx asset or an instance of an fbx.</param>
164
-
/// <param name="fbxDirectoryFullPath">Export will create this file. Overrides fbxDirectoryFullPath. Ignored if toConvert is an fbx asset or an instance of an fbx.</param>
187
+
/// <param name="fbxDirectoryFullPath">Export will choose an
188
+
/// appropriate filename in this directory. Ignored if fbxFullPath is
189
+
/// set. Ignored if toConvert is an fbx asset or an instance of an
190
+
/// fbx.</param>
191
+
/// <param name="fbxDirectoryFullPath">Export will create this
192
+
/// file. Overrides fbxDirectoryFullPath. Ignored if toConvert is an
193
+
/// fbx asset or an instance of an fbx.</param>
165
194
/// <returns>The root of a model prefab asset.</returns>
0 commit comments