File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,15 @@ public static class ConvertToModel
20
20
{
21
21
const string MenuItemName1 = "GameObject/Convert To Prefab" ;
22
22
23
- // Add a menu item called "Export Model..." to a GameObject's context menu.
24
- // OnContextItem gets called once per selected object
25
- // (if the parent and child are selected, then OnContextItem will only be called on the parent)
23
+ /// <summary>
24
+ /// OnContextItem is called either:
25
+ /// * when the user selects the menu item via the top menu (with a null MenuCommand), or
26
+ /// * when the user selects the menu item via the context menu (in which case there's a context)
27
+ ///
28
+ /// OnContextItem gets called once per selected object (if the
29
+ /// parent and child are selected, then OnContextItem will only be
30
+ /// called on the parent)
31
+ /// </summary>
26
32
[ MenuItem ( MenuItemName1 , false , 30 ) ]
27
33
static void OnContextItem ( MenuCommand command )
28
34
{
@@ -44,11 +50,7 @@ static void OnContextItem (MenuCommand command)
44
50
return ;
45
51
}
46
52
47
- try {
48
- Selection . objects = CreateInstantiatedModelPrefab ( selection ) ;
49
- } catch ( System . Exception xcp ) {
50
- Debug . LogException ( xcp ) ;
51
- }
53
+ Selection . objects = CreateInstantiatedModelPrefab ( selection ) ;
52
54
}
53
55
54
56
/// <summary>
You can’t perform that action at this time.
0 commit comments