Пример #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);
 }
Пример #2
0
        public override void ProcessAsset(SearchJob job)
        {
            AnimatorController root = (AnimatorController)AssetDatabase.LoadAssetAtPath(assetPath, typeof(AnimatorController));

            if (root != null)
            {
                roots = new Object[] { root };
                job.OnAssetSearchBegin();
                job.searchAnimatorController(root); // todo: cache for subjobs?
                job.OnAssetSearchEnd();
                // yield return job.searchDependencies(root);
            }
        }