Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using DaggerfallWorkshop.Game;
  4. using DaggerfallWorkshop.Game.Utility;
  5. using DaggerfallWorkshop.Game.Utility.ModSupport;
  6.  
  7.  
  8. namespace DaggerfallModdingVIO4
  9. {
  10.  
  11.  
  12. //this class initializes the mod.
  13. public class VillagerImmersionLoader
  14. {
  15. public static Mod mod;
  16.  
  17. //like in the last example, this is used to setup the Mod. This gets called at Start state.
  18. [Invoke]
  19. public static void InitAtStartState(InitParams initParams)
  20. {
  21. mod = initParams.Mod;
  22.  
  23. Debug.Log("Started setup of : " + mod.Title);
  24.  
  25. //start loading all assets asynchrousnly - the bool paramater tells it to unload the asset bundle since all assets are loaded
  26. ModManager.Instance.GetComponent<MonoBehaviour>().StartCoroutine(mod.LoadAllAssetsFromBundleAsync(true));
  27.  
  28. //GameObject GO = GameObject.Find("Name of the Game Object PopulationManager is attached to");
  29.  
  30. mod.IsReady = true;
  31. }
  32.  
  33. [Invoke(StateManager.StateTypes.Game)]
  34. public static void InitAtGameState(InitParams initParams)
  35. {
  36. //GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject
  37. ///GO.RemoveComponent<PopulationManager>();
  38. //GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject.
  39. //GO.AddComponent<KamerPopulationManager>();
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement