void vFmodEnginePlugin::OnInitEnginePlugin() { // this registers the module for serialization and the resource manager VFmodManager::GlobalManager().OneTimeInit(); FORCE_LINKDYNCLASS(VFmodCollisionMeshInstance); FORCE_LINKDYNCLASS(VFmodEvent); FORCE_LINKDYNCLASS(VFmodReverb); FORCE_LINKDYNCLASS(VFmodSoundObject); }
//============================================================================================================ // Initialize our plugin. //============================================================================================================ // Called when the plugin is loaded // We add our component initialize data here void myPlugin_cl::OnInitEnginePlugin() { Vision::Error.SystemMessage("MyPlugin:OnInitEnginePlugin()"); Vision::RegisterModule(&g_myComponentModule); //In some cases the compiler optimizes away the full class from the plugin since it seems to be dead code. //One workaround to prevent this is to add the following helper macro into the plugin initialization code: FORCE_LINKDYNCLASS( MyComponent ); // [...] //Start our component managers and game manager here.... MyGameManager::GlobalManager().OneTimeInit(); MyComponent_ComponentManager::GlobalManager().OneTimeInit(); // [...] //--------------------------------------------------------------------------------------------------------- // register the action module with the vision engine action manager // only after that will the action become available in the console. //--------------------------------------------------------------------------------------------------------- VActionManager * pManager = Vision::GetActionManager (); pManager->RegisterModule ( &g_myComponentModule ); // Set to true to open the console at startup and print some data to the display Vision::GetConsoleManager()->Show( false ); pManager->Print( "Welcome to the console!" ); pManager->Print( "This module is called '%s'", g_myComponentModule.GetName() ); pManager->Print( "Type in 'help' for a list of all actions" ); pManager->Print( "Type in 'myAction' to test this projects demo action" ); }
//============================================================================================================ // Initialize our plugin. //============================================================================================================ // Called when the plugin is loaded // We add our component initialize data here void ProjectEchoWinEnginePlugin::OnInitEnginePlugin() { hkvLog::Info("ProjectEchoWinEnginePlugin:OnInitEnginePlugin()"); Vision::RegisterModule(&g_myComponentModule); // load plugins if supported #if defined( HAVOK_PHYSICS_2012_KEYCODE ) VISION_PLUGIN_ENSURE_LOADED(vHavok); #endif #if defined( HAVOK_AI_KEYCODE ) VISION_PLUGIN_ENSURE_LOADED(vHavokAi); #endif #if defined( HAVOK_BEHAVIOR_KEYCODE ) VISION_PLUGIN_ENSURE_LOADED(vHavokBehavior); #endif VISION_PLUGIN_ENSURE_LOADED(vFmodEnginePlugin); // In some cases the compiler optimizes away the full class from the plugin since it seems to be dead code. // One workaround to prevent this is to add the following helper macro into the plugin initialization code: FORCE_LINKDYNCLASS( MyComponent ); // [...] // Start our component managers and game manager here.... MyGameManager::GlobalManager().OneTimeInit(); MyComponent_ComponentManager::GlobalManager().OneTimeInit(); // [...] //--------------------------------------------------------------------------------------------------------- // register the action module with the vision engine action manager // only after that will the action become available in the console. //--------------------------------------------------------------------------------------------------------- VActionManager * pManager = Vision::GetActionManager (); pManager->RegisterModule ( &g_myComponentModule ); // Set to true to open the console at startup and print some data to the display Vision::GetConsoleManager()->Show( false ); pManager->Print( "Welcome to the console!" ); pManager->Print( "This module is called '%s'", g_myComponentModule.GetName() ); pManager->Print( "Type in 'help' for a list of all actions" ); pManager->Print( "Type in 'myAction' to test this projects demo action" ); }
// initialize the plugin void vHavok_cl::OnInitEnginePlugin() { Vision::Callbacks.OnEngineInit.RegisterCallback(&cbInit); Vision::Callbacks.OnEngineDeInit.RegisterCallback(&cbInit); IVScriptManager::OnRegisterScriptFunctions.RegisterCallback(&cbInit); IVScriptManager::OnScriptProxyCreation.RegisterCallback(&cbInit); Vision::RegisterModule(&g_vHavokModule); // register the Havok module with the vision engine action manager VActionManager *pManager = Vision::GetActionManager(); pManager->RegisterModule(&g_vHavokModule); FORCE_LINKDYNCLASS(vHavokRigidBody); FORCE_LINKDYNCLASS(vHavokRagdoll); FORCE_LINKDYNCLASS(vHavokCharacterController); FORCE_LINKDYNCLASS(vHavokBallAndSocketConstraint); FORCE_LINKDYNCLASS(vHavokHingeConstraint); FORCE_LINKDYNCLASS(vHavokRagdollConstraint); FORCE_LINKDYNCLASS(vHavokPrismaticConstraint); FORCE_LINKDYNCLASS(vHavokStiffSpringConstraint); FORCE_LINKDYNCLASS(vHavokGenericConstraint); FORCE_LINKDYNCLASS(vHavokPointToPathConstraint); FORCE_LINKDYNCLASS(vHavokPointToPlaneConstraint); FORCE_LINKDYNCLASS(vHavokPulleyConstraint); FORCE_LINKDYNCLASS(VThrowItemComponent); FORCE_LINKDYNCLASS(VLineFollowerComponent); FORCE_LINKDYNCLASS(VFpsCameraEntity); EnsureHavokScriptRegistration(); return; }
void RPG_VisionModuleTypes::ForceStaticLink() { //FORCE_LINKDYNCLASS(RPG_AiControllerComponent); FORCE_LINKDYNCLASS(RPG_AiSpawnPoint); FORCE_LINKDYNCLASS(RPG_AttackableComponent); FORCE_LINKDYNCLASS(RPG_Boss); FORCE_LINKDYNCLASS(RPG_BossAiControllerComponent); FORCE_LINKDYNCLASS(RPG_CasterGuardian); FORCE_LINKDYNCLASS(RPG_CasterGuardianAiControllerComponent); FORCE_LINKDYNCLASS(RPG_Character); FORCE_LINKDYNCLASS(RPG_DestructibleEntity); //FORCE_LINKDYNCLASS(RPG_DummyEntity); FORCE_LINKDYNCLASS(RPG_FloatingEntity); FORCE_LINKDYNCLASS(RPG_HealthPickup); FORCE_LINKDYNCLASS(RPG_LevelInfo); FORCE_LINKDYNCLASS(RPG_ManaPickup); FORCE_LINKDYNCLASS(RPG_MeleeGuardian); FORCE_LINKDYNCLASS(RPG_MeleeGuardianAiControllerComponent); //FORCE_LINKDYNCLASS(RPG_HighlightableComponent); //FORCE_LINKDYNCLASS(RPG_InteractableComponent); //FORCE_LINKDYNCLASS(RPG_Pickup); FORCE_LINKDYNCLASS(RPG_PlayerControllerComponent); FORCE_LINKDYNCLASS(RPG_PlayerCharacter); FORCE_LINKDYNCLASS(RPG_PlayerSpawnPoint); FORCE_LINKDYNCLASS(RPG_Projectile_Healing); FORCE_LINKDYNCLASS(RPG_RangedGuardian); FORCE_LINKDYNCLASS(RPG_RangedGuardianAiControllerComponent); //FORCE_LINKDYNCLASS(RPG_SpawnPoint); FORCE_LINKDYNCLASS(RPG_Trigger); FORCE_LINKDYNCLASS(RPG_GUIHud); Vision::Error.SystemMessage("RPG_VisionModuleTypes::ForceStaticLink begin type dump"); for(VType *moduleType = g_RPGPluginModule.GetTypeList(); moduleType; moduleType = moduleType->m_pNextType) { Vision::Error.SystemMessage("%s", moduleType->m_lpszClassName); } Vision::Error.SystemMessage("RPG_VisionModuleTypes::ForceStaticLink end type dump"); }