mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-22 09:35:11 +00:00
rendertexture null check
This commit is contained in:
parent
38595da87a
commit
686129071b
2 changed files with 25 additions and 9 deletions
|
@ -399,14 +399,23 @@ namespace HeavenStudio
|
|||
height = (int)(width / 16f * 9f);
|
||||
}
|
||||
|
||||
if (GameRenderTexture != null)
|
||||
{
|
||||
GameRenderTexture.Release();
|
||||
|
||||
GameRenderTexture.width = width;
|
||||
GameRenderTexture.height = height;
|
||||
|
||||
GameRenderTexture.Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
GameRenderTexture = new RenderTexture(width, height, 24);
|
||||
GameRenderTexture.Create();
|
||||
}
|
||||
|
||||
|
||||
if (OverlayRenderTexture != null)
|
||||
{
|
||||
OverlayRenderTexture.Release();
|
||||
|
||||
OverlayRenderTexture.width = (int)(width * 1.5f);
|
||||
|
@ -414,6 +423,12 @@ namespace HeavenStudio
|
|||
|
||||
OverlayRenderTexture.Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayRenderTexture = new RenderTexture((int)(width * 1.5f), (int)(height * 1.5f), 24);
|
||||
OverlayRenderTexture.Create();
|
||||
}
|
||||
}
|
||||
|
||||
public static void ChangeMasterVolume(float value)
|
||||
{
|
||||
|
|
|
@ -31,5 +31,6 @@ MonoBehaviour:
|
|||
- Assets/Scripts/InputSystem/PlayerInput.cs
|
||||
- Assets/Scripts/JudgementManager.cs
|
||||
- Assets/Scripts/LevelEditor/RemixPropertiesDialog/PropertyPrefabs/RatingScreenPropertyDialog.cs
|
||||
- Assets/Scripts/GlobalGameManager.cs
|
||||
PathsToSkipImportEvent: []
|
||||
PathsToIgnoreOverwriteSettingOnAttribute: []
|
||||
|
|
Loading…
Reference in a new issue