Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using MSCLoader;
- using UnityEngine;
- namespace MyMod
- {
- public class MyMod: Mod
- {
- public override string ID { get { return "MyMod"; } }
- public override string Name { get { return "MyMod"; } }
- public override string Author { get { return "Author"; } }
- public override string Version { get { return "0.11"; } }
- public override bool UseAssetsFolder => true;
- private AssetBundle bundle;
- private GameObject ccpanel;
- private GameObject steer;
- //Called when mod is loading
- public override void OnLoad()
- {
- Print(Name + " v" + Version + " activated.");
- bundle = LoadAssets.LoadBundle(this, "ccassets.unity3d");
- ccpanel = bundle.LoadAsset("ccobject.prefab") as GameObject;
- steer = GameObject.Find("stock steering wheel(Clone)");
- ccpanel = GameObject.Instantiate(ccpanel);
- ccpanel.transform.SetParent(steer.transform, false);
- ccpanel.transform.localPosition = new Vector3(0f, 0.2f, 0f);
- ccpanel.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
- ccpanel.transform.localScale = new Vector3(1f, 1f, 1f);
- Print("Replaced and resized Object!");
- bundle.Unload(false);
- }
- // Update is called once per frame
- public override void Update()
- {
- }
- private void Print(string msg)
- {
- ModConsole.Print("[" + ID + "] " + msg);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement