コード例 #1
0
 private void AddObject(Object draggedObject)
 {
     System.Type type = draggedObject.GetType();
     if (UAI.IsIndexedType(type))
     {
         UAI.EvilAddAsset(type, draggedObject);
     }
 }
コード例 #2
0
        public static void AddSelectedToGlobalLibrary()
        {
            int             added = 0;
            UMAAssetIndexer UAI   = UMAAssetIndexer.Instance;

            foreach (Object o in Selection.objects)
            {
                System.Type type = o.GetType();
                if (UAI.IsIndexedType(type))
                {
                    UAI.EvilAddAsset(type, o);
                    added++;
                }
            }
            UAI.ForceSave();
            EditorUtility.DisplayDialog("Success", added + " item(s) added to Global Library", "OK");
        }