コード例 #1
0
        private static void FailedToFind(string objectToFind)
        {
            FObjectInitializer currentInitializer = FUObjectThreadContext.TopInitializer();
            UClass             unrealClass        = currentInitializer.IsNull ? null : currentInitializer.GetClass();

            string message = string.Format("CDO Constructor ({0}): Failed to find {1}\n",
                                           (unrealClass != null ? unrealClass.GetName() : "Unknown"), objectToFind);

            Log(ELogVerbosity.Error, message);
        }
コード例 #2
0
        private static void CheckFoundViaRedirect(UObject obj, string pathName, string objectToFind)
        {
            UObjectRedirector redir = UObject.FindObject <UObjectRedirector>(ObjectOuter.AnyPackage, pathName);

            if (redir != null && redir.DestinationObject == obj)
            {
                string             str = obj.GetFullName().Replace(" ", "'") + "'";
                FObjectInitializer currentInitializer = FUObjectThreadContext.TopInitializer();
                UClass             unrealClass        = currentInitializer.IsNull ? null : currentInitializer.GetClass();

                string message = string.Format("CDO Constructor ({0}): Followed redirector ({1}), change code to new path ({2])\n",
                                               (unrealClass != null ? unrealClass.GetName() : "Unknown"), objectToFind, str);
                Log(ELogVerbosity.Warning, message);
            }
        }