-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Textures are only refreshed when the soruce file time has changed A new command called "reloadtextures" was added
- Loading branch information
1 parent
6eafc46
commit 49576ee
Showing
5 changed files
with
92 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using HarmonyLib; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace VSideLoader | ||
{ | ||
[HarmonyPatch(typeof(Console), "InputText")] | ||
internal static class ConsoleUtils | ||
{ | ||
public static void Postfix(ref Console __instance) | ||
{ | ||
string text = __instance.m_input.text; | ||
string[] array = text.Split(' '); | ||
if (array.Length > 0) | ||
{ | ||
if (array[0] == "reloadtextures") | ||
{ | ||
TextureReplacement.HandleTextures(false); | ||
__instance.Print("Reloaded textures"); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace VSideLoader | ||
{ | ||
internal class TextureInfo | ||
{ | ||
internal Texture2D tex; | ||
internal DateTime time; | ||
|
||
internal TextureInfo(Texture2D tex, DateTime time) | ||
{ | ||
this.tex = tex; | ||
this.time = time; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters