-
-
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.
fix(ui): position save icon to be visible (#59)
- Loading branch information
Showing
4 changed files
with
50 additions
and
24 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
24 changes: 24 additions & 0 deletions
24
plugin/src/patch/loading_screen/LoadingScreenCanvasPatch.cs
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,24 @@ | ||
using TechtonicaVR.VRCamera; | ||
using UnityEngine; | ||
|
||
namespace TechtonicaVR.Patches.LoadingScreen; | ||
|
||
public class LoadingScreenCanvasPatch : GameObjectPatch | ||
{ | ||
public LoadingScreenCanvasPatch() : base("Canvas") | ||
{ | ||
} | ||
|
||
protected override bool Apply(GameObject gameObject) | ||
{ | ||
gameObject.transform.position = new Vector3(0, 0, 0); | ||
gameObject.transform.localScale = new Vector3(0.01f, 0.01f, 0.01f); | ||
|
||
var canvas = gameObject.GetComponent<Canvas>(); | ||
canvas.renderMode = RenderMode.WorldSpace; | ||
|
||
VRCameraManager.mainCamera.farClipPlane = 20f; | ||
|
||
return true; | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
plugin/src/patch/loading_screen/loading_screen_canvas_patch.cs
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
using UnityEngine; | ||
|
||
namespace TechtonicaVR.Patches.MainGame.UI; | ||
|
||
public class SaveNotificationPatch : GameComponentPatch<SaveNotification> | ||
{ | ||
protected override bool Apply(SaveNotification component) | ||
{ | ||
var tlc = component.transform.GetChild(0).gameObject; | ||
if (tlc == null) | ||
{ | ||
return false; | ||
} | ||
|
||
var image = tlc.transform.GetChild(0).gameObject; | ||
if (image == null) | ||
{ | ||
return false; | ||
} | ||
|
||
image.transform.localPosition = new Vector3(200, -200, -500); | ||
|
||
return true; | ||
} | ||
} |