URL in News Article...
 
Notifications
Clear all

URL in News Articles

2 Posts
2 Users
0 Reactions
382 Views
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

I tried putting in a URL in the URL field in News Article, but it does not appear in the game. How does that work? (And is there any way to have actual links in the News Article text?

 
Posted : 19/08/2020 4:48 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Are you printing the url property of the News object in your UI? I never received issue reports about this, anyway I'll try as soon as I'll come from holidays in the next week.

About URLs in the message property you can find tons of examples in the web to extract the addresses from a string through RegEx, for example:

var linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
var matches = linkParser.Matches(Text);
foreach (Match match in matches)
{
    Debug.Log(match.Value);
}

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 01/09/2020 7:07 pm
Share: