Describe the bug:
I was using feature explained here: Gameface: Data binding overview (coherent-labs.com)
and at some point game started to crash. I have created copy with that version and rolling back code in original version.
Thanks for sharing the point of reference! I have opened up a ticket and assigned it out so that we can further investigate what is causing this crash. We hope to have this fixed to you as soon as possible.
I’m Chris from the Crayta dev team and I’ve been investigating this issue for you. I raised a ticket with Coherent and they got back to me this morning with some further information and a workaround you should be able to use to avoid the crash you’ve been seeing.
The crash is caused by some additional whitespace characters in the css for the linear-gradient you’ve added in the WhatMyAttributeHandler. I can see you’ve removed all the new-line characters, but it looks like you also need to remove tab characters as well, for example:
update(element, value) {
console.log("chaging style")
element.textContent = "test2"
element.style.color = "red"
element.style.background = `linear-gradient(0deg, transparent 49%, #03b627 50%, transparent 51%),
linear-gradient(90deg, transparent 49%, #03b627 50%, transparent 51%)`.replaceAll("\n", "").replaceAll("\t", "");
/// This will be executed everytime that the model which the attribute is attached to is synchronized.
}
I’ve raised this issue with the Coherent Labs support team who will be working on making their code more robust to be able to handle the extra white-space in a future release.