Example #1
0
        public override IEnumerable <Object> FetchDependencies(bool isLog = false)
        {
            foreach (Object @object in base.FetchDependencies(isLog))
            {
                yield return(@object);
            }

            if (IsSerialized)
            {
                SShader shader = SerializedShader.FindObject();
                if (shader == null)
                {
                    if (isLog)
                    {
                        Logger.Log(LogType.Warning, LogCategory.Export, $"{ToLogString()} m_Shader {SerializedShader.ToLogString()} wasn't found ");
                    }
                }
                else
                {
                    yield return(shader);
                }
            }
            else
            {
                Shader shader = Shader.FindObject();
                if (shader == null)
                {
                    if (isLog)
                    {
                        Logger.Log(LogType.Warning, LogCategory.Export, $"{ToLogString()} m_Shader {Shader.ToLogString()} wasn't found ");
                    }
                }
                else
                {
                    yield return(shader);
                }
            }

            foreach (Object @object in SavedProperties.FetchDependencies(isLog))
            {
                yield return(@object);
            }
        }
Example #2
0
 public override IEnumerable <Object> FetchDependencies(bool isLog = false)
 {
     foreach (Object @object in base.FetchDependencies(isLog))
     {
         yield return(@object);
     }
     foreach (PPtr <SShader> ptr in Dependencies)
     {
         SShader shad = ptr.FindObject();
         if (shad == null)
         {
             if (isLog)
             {
                 Logger.Log(LogType.Warning, LogCategory.Export, $"{ToLogString()} shader m_dependencies {ptr.ToLogString()} wasn't found ");
             }
         }
         else
         {
             yield return(shad);
         }
     }
 }