Example #1
0
 public void setMesh(Callback onFinishCallback, object orgs)
 {
     finishCallback = onFinishCallback;
     callbackPrgs   = orgs;
                     #if UNITY_EDITOR
     if (!CLCfgBase.self.isEditMode || Application.isPlaying)
     {
         if (string.IsNullOrEmpty(modelName))
         {
             Debug.LogWarning(" then model name is null===");
         }
         else
         {
             CLModePool.borrowObjAsyn(modelName, (Callback)onGetModel);
         }
     }
     else
     {
         string tmpPath = "Assets/" + CLPathCfg.self.basePath + "/upgradeRes4Dev/other/model/" + modelName.Replace(".", "/") + ".FBX";
         Debug.Log(tmpPath);
         GameObject model = AssetDatabase.LoadAssetAtPath(
             tmpPath, typeof(UnityEngine.Object)) as GameObject;
         onGetModel(modelName, model);
     }
                     #else
     CLModePool.borrowObjAsyn(modelName, (Callback)onGetModel);
                     #endif
 }
Example #2
0
 public void returnMesh()
 {
     CLModePool.returnObj(modelName);
 }