mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
2021.6.15
This commit is contained in:
3 files changed
+3
-26
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
|
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
|
||||||
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2021.5.25.2s</GameVersion>
|
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2021.6.15s</GameVersion>
|
||||||
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2021.5.10i</GameVersion>
|
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2021.6.15i</GameVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Reactor.Extensions
|
|
||||||
{
|
|
||||||
public static class TextRendererExtensions
|
|
||||||
{
|
|
||||||
private static readonly Lazy<TextAsset> _fontData = new Lazy<TextAsset>(() => FontCache.Instance.DefaultFonts.ToArray().Single(x => x.name == "Arial"));
|
|
||||||
|
|
||||||
public static TextRenderer AddTextRenderer(this GameObject gameObject)
|
|
||||||
{
|
|
||||||
var renderer = gameObject.AddComponent<MeshRenderer>();
|
|
||||||
renderer.material = new Material(Shader.Find("Unlit/VectFontShader"));
|
|
||||||
|
|
||||||
gameObject.AddComponent<MeshFilter>();
|
|
||||||
|
|
||||||
var textRenderer = gameObject.AddComponent<TextRenderer>();
|
|
||||||
textRenderer.FontData = _fontData.Value;
|
|
||||||
|
|
||||||
return textRenderer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,6 +6,7 @@ using UnityEngine.UI;
|
|||||||
|
|
||||||
namespace Reactor.Patches
|
namespace Reactor.Patches
|
||||||
{
|
{
|
||||||
|
// TODO this needs some changes as text box was entirely removed in 2021.6.15
|
||||||
internal static class FreeNamePatch
|
internal static class FreeNamePatch
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(SetNameText), nameof(SetNameText.Start))]
|
[HarmonyPatch(typeof(SetNameText), nameof(SetNameText.Start))]
|
||||||
|
|||||||
Reference in new issue
Block a user