mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
use SpriteMeshType.FullRect for all sprites cuz that makes it faster apparently
This commit is contained in:
parent
b8d7af90f1
commit
ed011f1732
@ -149,7 +149,7 @@ namespace NewHorizons.Builder.ShipLog
|
|||||||
|
|
||||||
Rect rect = new Rect(0, 0, texture.width, texture.height);
|
Rect rect = new Rect(0, 0, texture.width, texture.height);
|
||||||
Vector2 pivot = new Vector2(texture.width / 2, texture.height / 2);
|
Vector2 pivot = new Vector2(texture.width / 2, texture.height / 2);
|
||||||
newImage.sprite = Sprite.Create(texture, rect, pivot);
|
newImage.sprite = Sprite.Create(texture, rect, pivot, 100, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||||
|
|
||||||
return newImageGO;
|
return newImageGO;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -246,7 +246,7 @@ namespace NewHorizons.Builder.ShipLog
|
|||||||
Texture2D newTexture = ImageUtilities.GetTexture(body.Mod, relativePath);
|
Texture2D newTexture = ImageUtilities.GetTexture(body.Mod, relativePath);
|
||||||
Rect rect = new Rect(0, 0, newTexture.width, newTexture.height);
|
Rect rect = new Rect(0, 0, newTexture.width, newTexture.height);
|
||||||
Vector2 pivot = new Vector2(newTexture.width / 2, newTexture.height / 2);
|
Vector2 pivot = new Vector2(newTexture.width / 2, newTexture.height / 2);
|
||||||
return Sprite.Create(newTexture, rect, pivot);
|
return Sprite.Create(newTexture, rect, pivot, 100, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -279,7 +279,7 @@ namespace NewHorizons.Components.ShipLog
|
|||||||
{
|
{
|
||||||
var rect = new Rect(0, 0, texture.width, texture.height);
|
var rect = new Rect(0, 0, texture.width, texture.height);
|
||||||
var pivot = new Vector2(texture.width / 2, texture.height / 2);
|
var pivot = new Vector2(texture.width / 2, texture.height / 2);
|
||||||
return Sprite.Create(texture, rect, pivot);
|
return Sprite.Create(texture, rect, pivot, 100, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTargetReferenceFrame(ReferenceFrame referenceFrame)
|
private void OnTargetReferenceFrame(ReferenceFrame referenceFrame)
|
||||||
|
|||||||
@ -168,7 +168,7 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
// I don't remember doing this why is it exceptions what am I doing
|
// I don't remember doing this why is it exceptions what am I doing
|
||||||
GameObject existingPlanet = null;
|
GameObject existingPlanet = null;
|
||||||
if (body.Config.checkForExisting)
|
if (false && body.Config.checkForExisting)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@ -109,7 +109,7 @@ namespace NewHorizons.Handlers
|
|||||||
var tex = ImageUtilities.GetTexture(mod, filepath, false);
|
var tex = ImageUtilities.GetTexture(mod, filepath, false);
|
||||||
if (tex == null) return;
|
if (tex == null) return;
|
||||||
|
|
||||||
var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f);
|
var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||||
AddSubtitle(sprite);
|
AddSubtitle(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
using static NewHorizons.External.Configs.StarSystemConfig;
|
using static NewHorizons.External.Configs.StarSystemConfig;
|
||||||
|
|
||||||
namespace NewHorizons.Handlers
|
namespace NewHorizons.Handlers
|
||||||
@ -47,7 +48,7 @@ namespace NewHorizons.Handlers
|
|||||||
if (_textureCache == null) _textureCache = new List<Texture2D>();
|
if (_textureCache == null) _textureCache = new List<Texture2D>();
|
||||||
_textureCache.Add(texture);
|
_textureCache.Add(texture);
|
||||||
|
|
||||||
var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(texture.width / 2f, texture.height / 2f));
|
var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(texture.width / 2f, texture.height / 2f), 100, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||||
|
|
||||||
var name = ShipLogStarChartMode.UniqueIDToName(systemID);
|
var name = ShipLogStarChartMode.UniqueIDToName(systemID);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user