Exemple #1
0
 protected virtual void processAsset(string assetPath)
 {
     // Don't assume that this asset's *the* asset!
     if (processingOneAsset() && job.scope.scopeObj.assetPath == assetPath)
     {
         //We only have one object, and its already loaded.
         job.asset = job.scope.scopeObj.obj;
     }
     else
     {
         //Load the object.
         job.asset = (UnityEngine.Object)AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Object));
     }
     if (job.asset == null)
     {
         return;
     }
     // GameObject foo = (GameObject) job.asset;
     // Debug.Log("[SearchSubJob] foo:"+foo);
     if (job.asset is GameObject)
     {
         job.searchGameObject((GameObject)job.asset);
     }
     else if (job.asset is AnimatorController)
     {
         job.searchAnimatorController((AnimatorController)job.asset);
     }
     else
     {
         job.searchObject(job.asset);
     }
     job.searchDependencies(job.asset);
 }
        public override void ProcessAsset(SearchJob job)
        {
            ScriptableObject root = (ScriptableObject)AssetDatabase.LoadAssetAtPath(assetPath, typeof(ScriptableObject));

            if (root != null)
            {
                job.OnAssetSearchBegin();
                job.searchObject(root); // todo: cache for subjobs?
                job.OnAssetSearchEnd();
            }
        }
 public override void ProcessAsset(SearchJob job)
 {
     UnityEngine.Object root = (UnityEngine.Object)AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Object));
     if (root != null)
     {
         roots = new Object[] { root };
         job.OnAssetSearchBegin();
         job.searchObject(root);
         job.OnAssetSearchEnd();
     }
 }
 public override void ProcessAsset(SearchJob job)
 {
     UnityEngine.Object root = (UnityEngine.Object)AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Object));
     if (root != null)
     {
         roots = new Object[] { root };
         job.OnAssetSearchBegin();
         job.searchObject(root); // todo: cache for subjobs?
         if (importer != null)
         {
             importer.SaveAndReimport();
         }
         job.OnAssetSearchEnd();
         // yield return job.searchDependencies(root);
     }
 }