We’re currently doing some text based adventure and we have lots of longer text passages. The text is supposed to be displayed depending on available screen width so we only add newlines when we need a paragraph and when rendering the strings in-game we auto-wrap them according to available width.
The string table editor currently does not wrap text around automatically, so most of the strings we add are just one huge line of text, which is very inconvenient to edit. It would be super-helpful if the string table editor would auto-wrap the text (or at least have a setting for it).
Hi Karl, thank you very much. Would you provide some insight about the reasoning behind disabling the wrapping? I mean I’m glad that you add it to the list as a setting, but maybe I’m using this not the way it was intended to be used.
Wrapping can give the impression the text has new lines when it doesn’t making it look different when rendered. Of course if the render is doing line wrapping then it’s different again
Making it an option makes sense.
It has already been brought up by our QA
When will this feature be ready?
It’s pretty hard to use the TableEditor right now (but we use it for pretty much everything).
I’d be fine with changing the setting in a line of code or so.
I found the code, where it is set, it’s inside SmartFormatField.cs Line Nr. 360 - but I can’t change it, whenever I press “save” unity will just revert any changes made to the script.
Also you could do it like Visual Studio does, with a symbol (at the end of the line) when it is wrapped atomatically and no symbol when it is a real NewLine. But a simple toggle on top of the LocalizationTable Editor would be good enough for most use-cases.
And as I am already talking - Minimizing Entries (Foldout) would also be great, otherwise it’s a lot of scrolling up and down, when it could be just a few lines, which can be expanded to full text.
Otherwise: great asset! Thanks a lot for adding this to unity, ingame it works flawlessly and the customInspector field is also great for assigning localized strings - love it
If you want to make changes to a package, you need to move the package from the package cache folder into your projects packages folder. You will then be able to make changes.
We have plans to do a rework of the table editor for 0.11
I actually have the opposite question, is there a way to prevent line wrap in the underlying asset data? When we compare diffs in git on the translation tables, each table shows a different number of lines changed do to m_Localized string wrapping in some languages, and not in others. I don’t see any way of controlling this, and in the .asset file it certainly leaves the impression of multiple lines.
In 1.5, you can enable/disable line wrapping in the table window.
We don’t apply any line wrapping in the asset though, maybe you have some new lines added to the files?
I’ve attached a sample here. Notice both strings are a single line, but for some reason the Arabic text ends up wrapped to two lines in the .asset data. I can’t find what the limit is, but there seems to be something defining a character limit for lines in .asset files.