Hello good people,
I'm running into a problem because it seems the "OnSetText" script is run immediately before the object's text property actually changes. As a reult, you can't grab the new string to use within the script.
I built a scene to test this.. I made Text-A driven by a time counter in Visual Logic. Then in the OnSetText tab of Text-A, the text property of Text-B is set to the value of Text-A's text. The result is that Text-B is always a second behind.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Here's a description of this problem within my specific scene.
It's a Poll Template with a list of political candidates in order of who has the most votes. If one candidate overtakes another, the text objects that are the names of each candidate are driven by Datalinq and will update automatically. On each of those text objects there's an OnSetText script that I'd like to use to update each corresponding quad object with the correct candidate's headshot.
The problem is that I can't use the text property to grab the correct cadidate's name to make a filepath to the correct headshot image file (using setVolatileTexture method), as it's not yet updated to the new candidate's name at that time.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please let me know if I can clarify.
Thank you!