Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add edits for tvOS and iOS #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

McManford
Copy link

@McManford McManford commented Feb 19, 2024

Below are changes that were added in order to allow compilation for iOS and tvOS. Haven't tested the occlusion features, had an error in the editor when toggled on.

@@ -128,7 +128,7 @@ void ADungeonGenerator::CreateDungeon()
if (!HasAuthority())
return;

int TriesLeft = MaxTry;
int TriesLeft = 500;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why MaxTry should be removed to compile on iOS?

"Win64",
"Mac",
"IOS",
"TVOS"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are iOS and tvOS needed for the Editor module?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking the same thing, I can remove it and test it out again.

@BenPyton
Copy link
Owner

Haven't tested the occlusion features, had an error in the editor when toggled on.

We should fix all the issues you encounter before merging the PR.
Could you share what error you have?
Also, on which platform are you developing? Windows? Mac?

@McManford
Copy link
Author

Haven't tested the occlusion features, had an error in the editor when toggled on.

We should fix all the issues you encounter before merging the PR. Could you share what error you have? Also, on which platform are you developing? Windows? Mac?

I'm testing this on both operating systems, Windows 10 for actual game development, and occlusion works perfectly. For MacOS Sonoma, (for iOS/tvOS deployment) the editors seem to crash during generation, I have to check the line where my IDE landed when it crashed.

I'm going to do a full rebuild on UE4 for MacOS, I had strange linker errors on static const uint32 MaxTry {500}; in Generator's header file as well. I am using a cobbled-up custom version of UE4, which could be related to those errors.

@BenPyton
Copy link
Owner

BenPyton commented Feb 19, 2024

I had strange linker errors on static const uint32 MaxTry {500}; in Generator's header file as well.

Mmmh I think maybe it could be the compiler used on Mac that treats a static member variable with a default value as 'not really defined' (just a declaration or something like that).
Perhaps, adding this line at the top of the DungeonGenerator.cpp file could resolve the link error?

const uint32 ADungeonGenerator::MaxTry = 500;

and remove the default value in the header file:

class ADungeonGenerator : public AActor
{
    ...
    static const uint32 MaxTry;
    ...
}

EDIT

As i'm thinking about it, it could be fine to just remove those static const members from the class header and put them as global variables in the cpp file... Something like that:

// DungeonGenerator.cpp

const uint32 MaxTry = 500;
const uint32 MaxRoomTry = 10;

...

These constants makes only sense in that file anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants