<?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=GetPolicy</id>
	<title>GetPolicy - 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=GetPolicy"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=GetPolicy&amp;action=history"/>
	<updated>2026-05-06T00:54:08Z</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=GetPolicy&amp;diff=1006&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;=== IM Class - &lt;code&gt;GetPolicy&lt;/code&gt; Method ===  ==== Overview ==== The &lt;code&gt;GetPolicy&lt;/code&gt; method in the IM class is used to retrieve a specific policy by its name or ID within the game's context.  ==== Syntax ==== &lt;syntaxhighlight lang=&quot;c#&quot;&gt; public static Policy GetPolicy(string policyNameOrId) &lt;/syntaxhighlight&gt;  ==== Description ==== This method searches for a policy within the game's active list of policies using its name or ID. If it finds a match, it returns t...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=GetPolicy&amp;diff=1006&amp;oldid=prev"/>
		<updated>2024-01-05T16:20:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== IM Class - &amp;lt;code&amp;gt;GetPolicy&amp;lt;/code&amp;gt; Method ===  ==== Overview ==== The &amp;lt;code&amp;gt;GetPolicy&amp;lt;/code&amp;gt; method in the IM class is used to retrieve a specific policy by its name or ID within the game&amp;#039;s context.  ==== Syntax ==== &amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt; public static Policy GetPolicy(string policyNameOrId) &amp;lt;/syntaxhighlight&amp;gt;  ==== Description ==== This method searches for a policy within the game&amp;#039;s active list of policies using its name or ID. If it finds a match, it returns t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== IM Class - &amp;lt;code&amp;gt;GetPolicy&amp;lt;/code&amp;gt; Method ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
The &amp;lt;code&amp;gt;GetPolicy&amp;lt;/code&amp;gt; method in the IM class is used to retrieve a specific policy by its name or ID within the game's context.&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public static Policy GetPolicy(string policyNameOrId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
This method searches for a policy within the game's active list of policies using its name or ID. If it finds a match, it returns the corresponding &amp;lt;code&amp;gt;Policy&amp;lt;/code&amp;gt; object.&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 PolicyManager : MonoBehaviour {&lt;br /&gt;
    void CheckPolicyStatus() {&lt;br /&gt;
        // Retrieve a policy by name or ID&lt;br /&gt;
        var policy = IM.GetPolicy(&amp;quot;Economy&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // Check if the policy exists and display information&lt;br /&gt;
        if (policy != null) {&lt;br /&gt;
            Debug.Log($&amp;quot;Policy Name: {policy.PolicyName}&amp;quot;);&lt;br /&gt;
            Debug.Log($&amp;quot;Policy Description: {policy.Description}&amp;quot;);&lt;br /&gt;
        } else {&lt;br /&gt;
            Debug.Log(&amp;quot;Policy not found.&amp;quot;);&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;
* This method is critical for accessing and managing policy-related features in the game, such as checking if certain policies are implemented or displaying policy details.&lt;br /&gt;
* Correct identification of the policy relies on the provided name or ID matching exactly with those listed in the game's policy database.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>