774d18a99d
made most of the game Moddable. There is an in editor tool to make the mods and set them all up, and im making an external tool that will show your mods, lets you edit any information and it will pack it up and upload it. currently working on the uploading. Next I will make the game able to download and install. - Fuck Nexus.
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.Networking;
|
|
|
|
public class ModPrefab : MonoBehaviour
|
|
{
|
|
[SerializeField] public RawImage Screenshot;
|
|
[SerializeField] public TextMeshProUGUI Title;
|
|
[SerializeField] public TextMeshProUGUI Date;
|
|
[SerializeField] public TextMeshProUGUI Author;
|
|
[SerializeField] public TextMeshProUGUI Description;
|
|
[SerializeField] public string ModID;
|
|
[SerializeField] public GameObject GO;
|
|
[SerializeField] public RPGCreationKit.ButtonSounds BS;
|
|
|
|
public void LoadSS(string imagePath) {
|
|
StartCoroutine(LoadCurrentImageX(imagePath));
|
|
}
|
|
|
|
IEnumerator LoadCurrentImageX(string imagePath) {
|
|
UnityWebRequest WWW = UnityWebRequestTexture.GetTexture(imagePath);
|
|
yield return WWW.SendWebRequest();
|
|
if (WWW.result != UnityWebRequest.Result.ConnectionError) {
|
|
Screenshot.texture = DownloadHandlerTexture.GetContent(WWW);
|
|
Screenshot.SetNativeSize();
|
|
Screenshot.SizeToParent();
|
|
}
|
|
WWW.Dispose();
|
|
}
|
|
|
|
public void Selected() {
|
|
ModPanal MP = GO.GetComponent<ModPanal>();
|
|
MP.ActivateMod(ModID);
|
|
}
|
|
}
|