Author Topic: Substance Designer 2017 text node in Unity  (Read 2268 times)

First, thank you thank you THANK YOU for adding the text node in the new Substance Designer, and I'm glad SD6 support finally made it into the Unity 2017.2 beta! I was one of the people originally requesting that node, and I'm already putting it to good use in an archviz project.

I did notice a couple of limitations and would like to request they be considered as features for the next version:
  • In Substance Designer, it's possible to enter a multiline value for the displayed text. In the Unity plugin, however, the field in the Inspector is a plain text field that doesn't allow line breaks. I think all you would need to do is change the field type in the Inspector to make this work correctly. Check out the MultilineAttribute in the Unity C# scripting docs (https://docs.unity3d.com/ScriptReference/MultilineAttribute.html) as one alternative.
  • Ideally, there should be a way to have the typeface size change so the text auto-fits the map output of the node, with a parameter for the desired border in X and Y directions. Perhaps this is already possible now, and I just haven't found it yet?
  • This is a long shot, but is there any way the selection of font could be an exposable input parameter? I can't actually think how to implement that, so maybe it's not feasible. Maybe accept the font name as an input and resolve it to a TTF at runtime?
Thanks for listening, and again thanks for implementing my #1 priority feature request! I'm a happy camper!
Last Edit: September 27, 2017, 08:06:18 pm

I'm bumping this post, as I was about to make the same post. Specifically:
  • Please let us enter multi-line text Unity
  • Allow for font-selection to be exposed.

The first seems possibly very simple to add into the plugin.

Something I discovered is that it's possible to have multi-line text when setting the text via code. For example:
Code: [Select]
myGraph.SetInputString("Text", "Line 1\nLine 2");
So, this is sort of a workaround for those willing to use the API.

Oddly, the following results in an unknown character in the output: $"Line 1{Environment.NewLine}Line 2"

It seems Environment.NewLine isn't handled correctly by the plugin.


Something I discovered is that it's possible to have multi-line text when setting the text via code. For example:
Code: [Select]
myGraph.SetInputString("Text", "Line 1\nLine 2");
So, this is sort of a workaround for those willing to use the API.

Oddly, the following results in an unknown character in the output: $"Line 1{Environment.NewLine}Line 2"

It seems Environment.NewLine isn't handled correctly by the plugin.

Thanks for posting this issue. I will add this a bug for us to address.

Cheers,
Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja