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

ExportTilesetDefinitionLinux.sh not being run correctly? #58

Open
sommerper opened this issue Sep 30, 2024 · 6 comments
Open

ExportTilesetDefinitionLinux.sh not being run correctly? #58

sommerper opened this issue Sep 30, 2024 · 6 comments

Comments

@sommerper
Copy link

Hi!

I'm trying to get the plugin to work on Linux (PopOS) and it seems the command was added correctly to the ldtk file. The command inside the .sh file also points towards a working mono command.

image

I've restarted both Unity and ldtk but I still get this error. Is there something else I could try to make it work?

@Cammin
Copy link
Owner

Cammin commented Oct 1, 2024

I can't personally test this OS so it's tricky for me. But, I'm willing to help hands-on in the discord server.

I've had other Mac/Linux users help me with their issues, but maybe there's something else to clear up here 🙂

@sommerper
Copy link
Author

I'll see if I have time for Discord at some point =)

But as far as I can see in LDtkEditorCommandUpdater.cs

You want $1 to be a part of the command on mac an linux

like so

../../../Library/LDtkTilesetExporter/ExportTilesetDefinitionLinux.sh "test_level" $1

but later you check if the split.length is not 2

if (split.Length != 2 || split[1] != $"\"{ProjectName}\"")

Which it is not because with the added $1 it would be 3

So if I change the check to 3 it works.

But after some testing it seems like it really doesn't matter if the custom command in ldtk
is ../../../Library/LDtkTilesetExporter/ExportTilesetDefinitionLinux.sh "test_level" $1 or ../../../Library/LDtkTilesetExporter/ExportTilesetDefinitionLinux.sh "test_level"

it works either way and I can drag the level to the scene.

Thanks for the quick reply!

@Cammin
Copy link
Owner

Cammin commented Oct 1, 2024

Yeah, it is possible that it might be improperly thinking there is a problem when there is not, and so it shows that error dialog

@sommerper
Copy link
Author

I could make some changes (i.e. pull request if you're accepting those) so that it works better on linux and mac.

I would also like to rename the .sh file to ../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.sh - omitting the Mac/Linux part so that you can work on both systems at the same time.

Right now I'm switching between Linux and Mac and I have to update the path in ldtk every time which is not super convenient.

@Haelle
Copy link
Contributor

Haelle commented Nov 4, 2024

I'm using LDtk2Unity and it's working fine, the "fix" button generate the right command but the warning stays, I didn't figured out why thanks for the investigation.

cf #59 it wasn't working before 6.4.6

@Cammin
Copy link
Owner

Cammin commented Nov 4, 2024

It's definitely a string comparison issue, it thinks there is a problem when it shouldn't be

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

No branches or pull requests

3 participants