I dreamed that Unreal Engine was used for Fallout 4.
I dreamed i was solving an issue with blueprint and when i woke up, i tried dreamed solution… and it worked.
Now i do all unreal things in my bed
[=;204413]
I dreamed i was solving an issue with blueprint and when i woke up, i tried dreamed solution… and it worked.
Now i do all unreal things in my bed
[/]
Haha i dream code to, on ocation i will solve a problem in my dreams.
I always have a notebook and pen next to my bed just in case.
This is a fun thread. hehe
[=;204413]
I dreamed i was solving an issue with blueprint and when i woke up, i tried dreamed solution… and it worked.
Now i do all unreal things in my bed
[/]
Weirdly enough I’ve been having this as well but with code, I actually see purple ‘UFUNCTION’ text flying around in my sleep, and I wake up to find the solution works. I’m starting to understand why programmers are typically socially awkward
[=;204488]
Weirdly enough I’ve been having this as well but with code, I actually see purple ‘UFUNCTION’ text flying around in my sleep, and I wake up to find the solution works. I’m starting to understand why programmers are typically socially awkward
[/]
Ive done this with puzzles in Portal 2
I do that a lot, . If I’m having trouble with a particular blueprint or design issue, if I get some sleep oftentimes I’ll dream of a potentially viable solution. Even when they don’t work I’ll find out something I didn’t know before which often leads to the answer I was looking for.
I woke up this morning with a sense of impending doom. A voice inside my head told me: “that file reader function you wrote yesterday will not find the file inside the .pak in a shipping build”.
Had breakfast, packaged the project… but hey, it didn’t fail!
Yeah , that’s not a dream, it’s a nightmare I remember going home from a week of crunch-time to finish a demo for the GDC 2008 where I woke up and noticed a bug
I then run to the office, stopped the build, fixed it and started a new build
[=;204563]
I woke up this morning with a sense of impending doom. A voice inside my head told me: “that file reader function you wrote yesterday will not find the file inside the .pak in a shipping build”.
Had breakfast, packaged the project… but hey, it didn’t fail!
[/]
Slightly OT: I don’t suppose you could PM me that function could you :P? I’m in a similar scenario right now where packaged builds don’t include all ma .txt filez.
[=;204575]
Slightly OT: I don’t suppose you could PM me that function could you :P? I’m in a similar scenario right now where packaged builds don’t include all ma .txt filez.
[/]
I could do this:
.h
/**
* Reads a file from /Config/[FileToRead] and puts the result in an array of strings.
* File should be ANSI encoded. Each line of text produces one element in the string array.
*
* @param FileToRead The full name of the file, with extension, but no path
* @param ReadStrings An array containing the strings read from the file
* @return bReadOK True if the operation was successful, False if the file could not be read
*
*/
UFUNCTION(BlueprintCallable, category = "Stuff", meta = (FriendlyName = "ReadLinesFromFile"))
static bool ReadLinesFromFile(
FString FileToRead,
TArray<FString>& ReadStrings
);
.cpp
bool XXXX::ReadLinesFromFile(
FString FileToRead,
TArray<FString>& ReadStrings)
{
FString path = FPaths::GameConfigDir() + FileToRead;
bool bReadOK = FFileHelper::LoadANSITextFileToStrings(*path, NULL, ReadStrings);
// LoadANSITextFileToStrings will raise a LogStream warning on fail, so we don't have to.
return(bReadOK);
}
…where XXXX would be the name of your class derived from UBlueprintFunctionLibrary. Of course there are other file reader functions besides LoadANSITextFileToStrings depending on your needs. I guess the key is the location of the files. When I’m using FPaths::GameConfigDir() it works fine as the packager seems to dump anything it finds there into the .pak.