"Text" properties can't be set by a string property

Describe the bug:

I’m not sure if this is a bug or not, but I expected it to implicitly convert.

If you have a property { name = "example", type = "text" }, and another property somewhere else { name = "example2", type = "string" }, you can’t run any form of firstExample.properties.example = secondExample.properties.example2 and have the value of example be set.

The specific scenario that tripped me up was trying to blank out the value of the text field. I had a method SetLocation accepting a single location parameter. Calling SetLocation("") was not clearing the player location because "" is a string, not text.

Wrapping the string in Text.Format resolves the issue, converting the string into text.

How do you cause this bug?

  • Install the Text Property Bug package
  • Drag the Bug Example Template into the world
  • Drag the User Bug template on to the user
  • Preview the game. There’s 4 buttons, one sets the value of a text property to “Foo”, one to “”, and the other two do the same things, but wrap the value in Text.Format.

Screenshots / video of bug:

Which platform: PC / Stadia

Which input: Controller / keyboard + mouse

Your Crayta username: Cereal

Game seen in (including “Hub” or “Editor for XYZ”): Editor

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Every time

Time + date seen: November 13 2021

Version number (found in Help tab in Settings): 0.d5.9.111485

Hi Cereal,

Would being able to set the text property to empty help e.g.

self.properties.example = Text.Empty

It may be really helpful to us if you could include a code snippet, there has been some discussion around this now and I think the reason that it’s not easy to do this is because we want people to user the Text fields to add translations rather that using Strings which don’t allow this.