<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://silvematt.com/URPGCreationKitDocumentation/index.php?action=history&amp;feed=atom&amp;title=Alert_Message</id>
	<title>Alert Message - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?action=history&amp;feed=atom&amp;title=Alert_Message"/>
	<link rel="alternate" type="text/html" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Alert_Message&amp;action=history"/>
	<updated>2026-07-26T04:10:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Alert_Message&amp;diff=806&amp;oldid=prev</id>
		<title>Silvematt at 11:35, 18 July 2026</title>
		<link rel="alternate" type="text/html" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Alert_Message&amp;diff=806&amp;oldid=prev"/>
		<updated>2026-07-18T11:35:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:35, 18 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The '''Alert Message''' is the pop-up text used to notify the Player that something happened in the game. It's what appears on screen when you gain XP (&amp;quot;+100 XP&amp;quot;), when you receive items (&amp;quot;Iron Bow added!&amp;quot;), when you learn a new spell (&amp;quot;You learn: Fireball&amp;quot;) and in many other situations.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The '''Alert Message''' is the pop-up text used to notify the Player that something happened in the game. It's what appears on screen when you gain XP (&amp;quot;+100 XP&amp;quot;), when you receive items (&amp;quot;Iron Bow added!&amp;quot;), when you learn a new spell (&amp;quot;You learn: Fireball&amp;quot;) and in many other situations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Alertmsg 1.png]]The Alert Message is part of the Player's UI, you can find it inside the ''RckPlayer'' prefab, and it is exposed as a singleton ('''AlertMessage.instance'''), so it is accessible at anytime from anywhere in your code.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Alertmsg 1.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Alert Message is part of the Player's UI, you can find it inside the ''RckPlayer'' prefab, and it is exposed as a singleton ('''AlertMessage.instance'''), so it is accessible at anytime from anywhere in your code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Showing an Alert Message from a script==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Showing an Alert Message from a script==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Silvematt</name></author>
	</entry>
	<entry>
		<id>https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Alert_Message&amp;diff=805&amp;oldid=prev</id>
		<title>Silvematt: Created page with &quot;The '''Alert Message''' is the pop-up text used to notify the Player that something happened in the game. It's what appears on screen when you gain XP (&quot;+100 XP&quot;), when you receive items (&quot;Iron Bow added!&quot;), when you learn a new spell (&quot;You learn: Fireball&quot;) and in many other situations.  File:Alertmsg 1.pngThe Alert Message is part of the Player's UI, you can find it inside the ''RckPlayer'' prefab, and it is exposed as a singleton ('''AlertMessage.instance'''), so...&quot;</title>
		<link rel="alternate" type="text/html" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Alert_Message&amp;diff=805&amp;oldid=prev"/>
		<updated>2026-07-18T11:35:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;Alert Message&amp;#039;&amp;#039;&amp;#039; is the pop-up text used to notify the Player that something happened in the game. It&amp;#039;s what appears on screen when you gain XP (&amp;quot;+100 XP&amp;quot;), when you receive items (&amp;quot;Iron Bow added!&amp;quot;), when you learn a new spell (&amp;quot;You learn: Fireball&amp;quot;) and in many other situations.  &lt;a href=&quot;/URPGCreationKitDocumentation/index.php/File:Alertmsg_1.png&quot; title=&quot;File:Alertmsg 1.png&quot;&gt;File:Alertmsg 1.png&lt;/a&gt;The Alert Message is part of the Player&amp;#039;s UI, you can find it inside the &amp;#039;&amp;#039;RckPlayer&amp;#039;&amp;#039; prefab, and it is exposed as a singleton (&amp;#039;&amp;#039;&amp;#039;AlertMessage.instance&amp;#039;&amp;#039;&amp;#039;), so...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The '''Alert Message''' is the pop-up text used to notify the Player that something happened in the game. It's what appears on screen when you gain XP (&amp;quot;+100 XP&amp;quot;), when you receive items (&amp;quot;Iron Bow added!&amp;quot;), when you learn a new spell (&amp;quot;You learn: Fireball&amp;quot;) and in many other situations.&lt;br /&gt;
&lt;br /&gt;
[[File:Alertmsg 1.png]]The Alert Message is part of the Player's UI, you can find it inside the ''RckPlayer'' prefab, and it is exposed as a singleton ('''AlertMessage.instance'''), so it is accessible at anytime from anywhere in your code.&lt;br /&gt;
&lt;br /&gt;
==Showing an Alert Message from a script==&lt;br /&gt;
&lt;br /&gt;
To show an Alert Message, all you have to do is call '''InitAlertMessage()''' on the instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AlertMessage.instance.InitAlertMessage(&amp;quot;Here goes your message.&amp;quot;, AlertMessage.DEFAULT_MESSAGE_DURATION_MEDIUM);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method takes the following parameters:&lt;br /&gt;
&lt;br /&gt;
*'''Text:''' the message to display.&lt;br /&gt;
*'''Duration:''' how long (in seconds) the message stays on screen. You can pass any value you want, but for consistency you may want to use one of the default durations defined in the AlertMessage class: '''DEFAULT_MESSAGE_DURATION_SHORT''' (1.5s), '''DEFAULT_MESSAGE_DURATION_MEDIUM''' (3s) and '''DEFAULT_MESSAGE_DURATION_LONG''' (5s).&lt;br /&gt;
*'''Allow Duplication (optional):''' see the section below.&lt;br /&gt;
&lt;br /&gt;
You can call it from any of your gameplay code: [[Item Script|Item Scripts]], [[Quest Script|Quest Scripts]], [[Result Scripts]] and so on. Since the duration runs on '''unscaled time''', the message will behave correctly even while the game is paused, for example when the Player has the inventory open.&lt;br /&gt;
&lt;br /&gt;
==The Alerts Queue==&lt;br /&gt;
&lt;br /&gt;
Only one Alert Message can be displayed at a time. If you init a message while another one is already on screen, the new one is not lost: it is added to a '''queue''', and it will be displayed as soon as the current one (and the ones queued before it) expires.&lt;br /&gt;
&lt;br /&gt;
There is one exception: if the message you are initing has the '''same text''' of the one currently displayed, it is discarded. This avoids stacking a wall of identical pop-ups when the Player repeats the same action quickly (buying five items in a row would queue five &amp;quot;Transaction Completed!&amp;quot; otherwise). If for some reason you do want the same message to be queued multiple times, pass '''true''' to the '''allowDuplication''' parameter.&lt;br /&gt;
&lt;br /&gt;
==Showing an Alert Message from a Consequence==&lt;br /&gt;
&lt;br /&gt;
You don't necessarily need a script to show an Alert Message: the [[Events And Consequences|Consequences System]] has a dedicated Consequence type for it, called '''AlertMessage'''.&lt;br /&gt;
&lt;br /&gt;
Just add a new Consequence, set its type to AlertMessage and fill the '''Alert Message''' text and the '''duration'''. When the Consequence fires, the pop-up will be displayed. See [[Creating A New Consequence]] if you don't know how Consequences work.&lt;br /&gt;
&lt;br /&gt;
Usually Alert Messages are mostly used with consequences inside the Dialogues:&lt;br /&gt;
&lt;br /&gt;
[[File:Alertmsg 2.png]]&lt;br /&gt;
&lt;br /&gt;
==Customizing the look==&lt;br /&gt;
&lt;br /&gt;
The pop-up itself is a UI element with an '''AlertMessageUIElement''' component, which simply holds a reference to the TextMeshPro text that gets filled with the message. To change how the Alert Message looks (font, size, position, background...), edit that UI element inside the ''RckPlayer'' prefab.&lt;br /&gt;
&lt;br /&gt;
==Alert Message vs Tutorial Alert Message==&lt;br /&gt;
&lt;br /&gt;
Don't confuse the Alert Message with the '''Tutorial Alert Message''': they are two different things.&lt;br /&gt;
&lt;br /&gt;
The Alert Message is a passive notification, it appears, stays on screen for its duration and disappears by itself, without ever interrupting the Player.&lt;br /&gt;
&lt;br /&gt;
The Tutorial Alert Message ('''TutorialAlertMessage.instance''') is the message box used for the tutorials of the Demo: calling '''OpenMessage()''' pauses the game, unlocks the cursor and displays a window that the Player has to close with a button before continuing. There is also an '''OpenMessageAfterDialogueEnds()''' version that waits for the current conversation to end before popping up. Use it when the Player really has to read what you are saying, and use the regular Alert Message for everything else.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the Tutorial Alert Message in use:&lt;br /&gt;
&lt;br /&gt;
[[File:Tutorialalertmessage.png]]&lt;/div&gt;</summary>
		<author><name>Silvematt</name></author>
	</entry>
</feed>