<?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=OnRuntimeActorCreated</id>
	<title>OnRuntimeActorCreated - 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=OnRuntimeActorCreated"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnRuntimeActorCreated&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=OnRuntimeActorCreated&amp;diff=853&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;onRuntimeActorCreated&lt;/code&gt; Event in IM Class ==  === Overview === The &lt;code&gt;onRuntimeActorCreated&lt;/code&gt; event in the IM (Intrigue Manager) class is triggered when a runtime actor is created within the game world.  === Description ===  * Event Type: &lt;code&gt;Action&lt;Actor, GameObject&gt;&lt;/code&gt; * Functionality: ** This event is activated when a new actor is instantiated at runtime. ** It passes two parameters upon invocation: *** An &lt;code&gt;Actor&lt;/code&gt; object represen...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnRuntimeActorCreated&amp;diff=853&amp;oldid=prev"/>
		<updated>2024-01-04T18:32:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; Event in IM Class ==  === Overview === The &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; event in the IM (Intrigue Manager) class is triggered when a runtime actor is created within the game world.  === Description ===  * Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Actor, GameObject&amp;gt;&amp;lt;/code&amp;gt; * Functionality: ** This event is activated when a new actor is instantiated at runtime. ** It passes two parameters upon invocation: *** An &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; object represen...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; Event in IM Class ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; event in the IM (Intrigue Manager) class is triggered when a runtime actor is created within the game world.&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
* Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Actor, GameObject&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Functionality:&lt;br /&gt;
** This event is activated when a new actor is instantiated at runtime.&lt;br /&gt;
** It passes two parameters upon invocation:&lt;br /&gt;
*** An &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; object representing the newly created actor.&lt;br /&gt;
*** A &amp;lt;code&amp;gt;GameObject&amp;lt;/code&amp;gt; associated with the actor, typically representing its in-game entity or avatar.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; event is crucial for handling the creation of new actors in the game. It enables developers to execute specific actions or scripts when a new actor enters the game world, such as initializing actor-specific behaviors, updating game states, or integrating the actor into existing game systems.&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 ActorCreationHandler : MonoBehaviour {&lt;br /&gt;
    void OnEnable() {&lt;br /&gt;
        IM.onRuntimeActorCreated += HandleNewActor;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    void OnDisable() {&lt;br /&gt;
        IM.onRuntimeActorCreated -= HandleNewActor;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void HandleNewActor(Actor actor, GameObject actorGameObject) {&lt;br /&gt;
        Debug.Log($&amp;quot;New runtime actor created: {actor.Name}&amp;quot;);&lt;br /&gt;
        // Additional logic to process the new actor&lt;br /&gt;
        // This could include adding custom components, setting up interactions, or integrating the actor into game narratives&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Description: ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HandleNewActor&amp;lt;/code&amp;gt;: Subscribed to the &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; event, this method is called when a new runtime actor is created. It processes the actor and its associated GameObject, allowing for responses such as customization, integration into gameplay, or other actor-specific setup.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;onRuntimeActorCreated&amp;lt;/code&amp;gt; event is particularly important in games that dynamically generate characters or NPCs, allowing for seamless integration of these actors into the game world.&lt;br /&gt;
* Proper handling of this event contributes to a dynamic and evolving game environment, where new actors can enhance gameplay, narrative, or player interaction.&lt;br /&gt;
* It's especially relevant in role-playing games, simulation games, or any genre that involves dynamic character creation and management.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>