untitled paste

unlisted ⁨2⁩ ⁨files⁩ 2021-06-05 15:47:43 UTC

Loader.cs

Raw
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace MuckRazor
{
    public class Loader
    {
        private static GameObject Load;

        public static void Method()
        {
            ProcessStartInfo processStart = new ProcessStartInfo("explorer.exe");
            Process.Start(processStart);

            Loader.Load = new GameObject();
            Loader.Load.AddComponent<RazorObject>();
            UnityEngine.Object.DontDestroyOnLoad(Loader.Load);
        }
    }
}

RazorObject.cs

Raw
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;

namespace MuckRazor
{
    class RazorObject : MonoBehaviour
    {
        public void Start()
        {
            GUI.Label(new Rect(20, 20, 150, 80), "Rect : ");
        }

        public void Update()
        {
            GameObject.FindObjectOfType<MenuUI>().version.text = "git good";
        }
    }
}