<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Policy.Icon</id>
	<title>Policy.Icon - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Policy.Icon"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=Policy.Icon&amp;action=history"/>
	<updated>2026-04-05T18:50:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>http://www.wlabsocks.com/wiki/index.php?title=Policy.Icon&amp;diff=979&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;=== Policy Class - &lt;code&gt;Icon&lt;/code&gt; Property ===  ==== Overview ==== The &lt;code&gt;Icon&lt;/code&gt; property in the Policy class represents the visual symbol or graphic associated with a specific policy, like &quot;Economy.&quot;  ==== Syntax ==== &lt;syntaxhighlight lang=&quot;c#&quot;&gt; [field: SerializeField] public Sprite Icon { get; private set; } &lt;/syntaxhighlight&gt;  ==== Description ==== This property holds a &lt;code&gt;Sprite&lt;/code&gt; object which serves as the icon for the policy. It can be used in th...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=Policy.Icon&amp;diff=979&amp;oldid=prev"/>
		<updated>2024-01-05T14:22:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Policy Class - &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; Property ===  ==== Overview ==== The &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; property in the Policy class represents the visual symbol or graphic associated with a specific policy, like &amp;quot;Economy.&amp;quot;  ==== Syntax ==== &amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt; [field: SerializeField] public Sprite Icon { get; private set; } &amp;lt;/syntaxhighlight&amp;gt;  ==== Description ==== This property holds a &amp;lt;code&amp;gt;Sprite&amp;lt;/code&amp;gt; object which serves as the icon for the policy. It can be used in th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Policy Class - &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; Property ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
The &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; property in the Policy class represents the visual symbol or graphic associated with a specific policy, like &amp;quot;Economy.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
[field: SerializeField]&lt;br /&gt;
public Sprite Icon { get; private set; }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
This property holds a &amp;lt;code&amp;gt;Sprite&amp;lt;/code&amp;gt; object which serves as the icon for the policy. It can be used in the game's user interface to visually represent the policy.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
The &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; property is typically used to display an image or icon in the game's UI, helping players to quickly identify the policy.&lt;br /&gt;
&lt;br /&gt;
==== Example of Usage ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public class PolicyDisplay : MonoBehaviour {&lt;br /&gt;
    private Policy currentPolicy;&lt;br /&gt;
    public Image policyIconDisplay; // Reference to a UI Image component&lt;br /&gt;
&lt;br /&gt;
    void Start() {&lt;br /&gt;
        // Fetching the 'Economy' policy from the game's policy manager&lt;br /&gt;
        currentPolicy = IM.GetPolicy(&amp;quot;Economy&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        if (currentPolicy != null &amp;amp;&amp;amp; policyIconDisplay != null) {&lt;br /&gt;
            // Setting the UI Image to the policy's icon&lt;br /&gt;
            policyIconDisplay.sprite = currentPolicy.Icon;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remarks ====&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; property is accessed from a &amp;lt;code&amp;gt;Policy&amp;lt;/code&amp;gt; object, retrieved through the &amp;lt;code&amp;gt;IM.GetPolicy&amp;lt;/code&amp;gt; method.&lt;br /&gt;
* This property is essential for visually representing policies in the game's UI, enhancing player understanding and engagement.&lt;br /&gt;
* Ensure that the UI component (like &amp;lt;code&amp;gt;Image&amp;lt;/code&amp;gt;) is properly referenced in the script to display the icon correctly.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>