public static void ReadLocalisationFile() { localisationDic.Clear(); lines = ModIO.ReadAllLines(locatisationFilePath); languages = lines[0].Split(','); for (int i = 1; i < lines.Length; i++) { string[] strs = lines[i].Split(','); localisationDic.Add(strs[0], strs); } }
public static bool IsExist(String path) { try { //ModConsole.Log("Find: " + path); if (ModIO.ExistsFile(path)) { return(true); } } catch { //ModConsole.Log("" + e); } return(false); }
public static void Load() { AssetBundle = bundle.AssetBundle; var allAssets = AssetBundle.LoadAllAssets(); if (allAssets.Length <= 0) { Debug.LogWarning("asset bundle is empty attempting manual reloading"); byte[] bytes = ModIO.ReadAllBytes("Resources/portal.unity3d"); AssetBundle.Unload(false); AssetBundle = new AssetBundle(); StatMaster.Instance.StartCoroutine(IELoad(AssetBundle.LoadFromMemoryAsync(bytes))); return; } RebuildForNewLevel(); }
void ReadMeshs(string path, bool data = false) { List <ModMesh> modMeshes = new List <ModMesh>(); string[] vs = ModIO.GetFiles(path, data); Debug.Log(vs.Length); Debug.Log(vs[0]); Console.WriteLine(vs[0]); //ModResource.CreateMeshResource("",) //foreach (var str in vs) //{ // Debug.Log(str.ToString()); //} }
public RocketsController() { rocketTargetDict = new Dictionary <BlockBehaviour, int>(); playerGroupedRockets = new Dictionary <int, Dictionary <KeyCode, HashSet <TimedRocket> > >(); InitRedSquareAndLayer(); void InitRedSquareAndLayer() { redSquareAim.LoadImage(ModIO.ReadAllBytes(@"Resources/Square-Red.png")); redCircleAim.LoadImage(ModIO.ReadAllBytes(@"Resources/Circle-Red.png")); SetRadarIgnoreCollosionLayer(); void SetRadarIgnoreCollosionLayer() { Physics.IgnoreLayerCollision(RadarScript.CollisionLayer, RadarScript.CollisionLayer, true); Physics.IgnoreLayerCollision(RadarScript.CollisionLayer, 29, true); } } }