Hey! I decided to make my first plugin for the second lantern in the game. I got it, everything works, except for one BUT: I re-read SaveLoad Class in the MSCLoader Wiki several times, looked at the code of about a dozen other mods and could not do anything! Please help me!
P.S. about my skill - I'm still a noob in Unity and C#, but I already made file mods for MSC (replaced models and textures directly in the sharedassets itself). I learned to write plugins using the code from the Roman266 and zamp mods.
C#:
using MSCLoader;
using UnityEngine;
namespace SecondLantern
{
public class DoubleLantern : Mod
{
public override string ID => "SecondLantern";
public override string Name => "SecondLantern";
public override string Author => "Mr.Gitsen";
public override string Version => "0";
private static GameObject SecondLantern;
public override void OnLoad()
{
SecondLantern = Object.Instantiate(GameObject.Find("lantern(itemx)"));
SecondLantern.transform.localPosition = new Vector3(-10f, 0.2f, 6f);
}
}
}
Last edited: