internal static void CheckExportedTypes(WriteEntitySceneSettings writeEntitySceneSettings, bool record, IEnumerable <TypeManager.TypeInfo> typeInfos, ref ConversionJournalData journalData) { if (!writeEntitySceneSettings.IsDotsRuntime) { return; } if (typeInfos.Any()) { if (record) { journalData.RecordLogEvent(null, LogType.Log, "::Exported Types (by stable hash)::"); } foreach (var typeInfo in typeInfos) { // TODO: We need to define what the assembly cache should look like for hybrid. Right now BuildAssemblyCache is defined from a root assembly and a build target and has only being used by DotsRuntime if (writeEntitySceneSettings.BuildAssemblyCache != null) { var type = typeInfo.Type; if (!writeEntitySceneSettings.BuildAssemblyCache.HasType(type)) { journalData.RecordExceptionEvent(null, new ArgumentException($"The {type.Name} component is defined in the {type.Assembly.GetName().Name} assembly, but that assembly is not referenced by the current build configuration. Either add it as a reference, or ensure that the conversion process that is adding that component does not run.")); } } // Record exported types in the conversion log file for debug purposes if (record) { journalData.RecordLogEvent(null, LogType.Log, $"0x{typeInfo.StableTypeHash:x16} - {typeInfo.StableTypeHash,22} - {typeInfo.Type.FullName}"); } } } }
public void LogFormat(UnityLogType logType, UnityObject context, string format, object[] args) { if (m_HookedLogger == null) { throw new InvalidOperationException($"{nameof(ExportConfigurationLogHandler)} is not hooked into the logger. Logs can't be recorded."); } m_HookedLogger.LogFormat(logType, context, format, args); m_JournalData.RecordLogEvent(context, logType, string.Format(format, args)); if (logType == UnityLogType.Error) { m_FailureLogs = true; } }