Antoshidza / NSprites

Unity DOTS Sprite Rendering Package
Other
536 stars 42 forks source link

RenderArchetype.cs has wrong encoding on macOS and invalid characters #4

Closed lukasreuter closed 1 year ago

lukasreuter commented 1 year ago

Opening the sample project or trying to use the package on macOS (tested on M1 Pro, macOS Monterey) fails to compile and shows multiple errors in the console like: "Library/PackageCache/com.tonymax.nsprites@aedf3b99f0/Rendering/Common/RenderArchetype.cs(205,71): error CS1519: Invalid token '�' in class, record, struct, or interface member declaration"

converting the encoding in Rider for example to UTF8 does not fix the issue.

edit: seems to be the "C" character in "ChunkBaseEntityIndices" is invalid/corrupted

Antoshidza commented 1 year ago

Hi @lukasreuter! Thank you for opening this issue! I was facing this problem some time ago and yes - the problem exactly in letter C (I did multiple mistake because in my native language alphabet there is same looking letter С which sounds like S in eng). I saw that even github prints such token '�' but I've fixed that in some commit so now can't see this token. Have you working with latest version? If yes since I can't test it on macOS can you please help me and give an advice of how can I detect wrong symbols?

lukasreuter commented 1 year ago

Yes, using the latest version this issue is fixed. I was testing the Age-Of-Sprite example and for some reason it was not pulling the latest package version. Thanks for clearing that up and sorry for the confusion.

Regarding the invalid characters: Personally I set my IDE to use UTF8 for all files, always (Rider can do that, dunno about others). I think the issue in this case was that the characters were in an encoding that is only really usable on Windows and that's why it could not convert these characters to the correct one in UTF8.