Пример #1
0
 private bool GetNeedInstance(UnityEngine.Object obj, string name)
 {
     if (obj == null)
     {
         return(false);
     }
     if (!needInstanceGet)
     {
         needInstanceGet = true;
         if (name.EndsWithFast(".exr"))
         {
             needInstance = false;
         }
         else
         {
             if (obj is GameObject)
             {
                 if (EngineDelegateCore.PrefabUnInstantiateRule != null && EngineDelegateCore.PrefabUnInstantiateRule(obj as GameObject))
                 {
                     needInstance = false;
                 }
                 else
                 {
                     needInstance = true;
                 }
             }
             else
             {
                 needInstance = false;
             }
         }
     }
     return(needInstance);
 }
Пример #2
0
 internal static bool IsNeedInstance(UnityEngine.Object obj, string name)
 {
     if (name.IndexOf(".exr") >= 0)
     {
         return(false);
     }
     else
     {
         if (obj is GameObject)
         {
             if (EngineDelegateCore.PrefabUnInstantiateRule != null && EngineDelegateCore.PrefabUnInstantiateRule(obj as GameObject))
             {
                 return(false);
             }
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }