Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using DaggerfallWorkshop.Game;
- using DaggerfallWorkshop.Game.Utility;
- using DaggerfallWorkshop.Game.Utility.ModSupport;
- namespace DaggerfallModdingVIO4
- {
- //this class initializes the mod.
- public class VillagerImmersionLoader
- {
- public static Mod mod;
- //like in the last example, this is used to setup the Mod. This gets called at Start state.
- [Invoke]
- public static void InitAtStartState(InitParams initParams)
- {
- mod = initParams.Mod;
- Debug.Log("Started setup of : " + mod.Title);
- //start loading all assets asynchrousnly - the bool paramater tells it to unload the asset bundle since all assets are loaded
- ModManager.Instance.GetComponent<MonoBehaviour>().StartCoroutine(mod.LoadAllAssetsFromBundleAsync(true));
- //GameObject GO = GameObject.Find("Name of the Game Object PopulationManager is attached to");
- mod.IsReady = true;
- }
- [Invoke(StateManager.StateTypes.Game)]
- public static void InitAtGameState(InitParams initParams)
- {
- //GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject
- ///GO.RemoveComponent<PopulationManager>();
- //GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject.
- //GO.AddComponent<KamerPopulationManager>();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement