Commit 4de48b10 authored by 神楽坂玲奈's avatar 神楽坂玲奈

revert to 2021.1, fix

parent 88d14669
Pipeline #5290 passed with stages
in 10 minutes and 39 seconds
......@@ -9,7 +9,7 @@ stages:
variables:
BUILD_NAME: YGOPro2
UNITY_ACTIVATION_FILE: ./unity3d.alf
UNITY_VERSION: "2021.2.0b9"
UNITY_VERSION: "2021.1.18f1"
IMAGE: unityci/editor # https://hub.docker.com/r/unityci/editor
IMAGE_VERSION: "0.15" # https://github.com/game-ci/docker/releases
UNITY_DIR: $CI_PROJECT_DIR # this needs to be an absolute path. Defaults to the root of your tree.
......
......@@ -7,7 +7,7 @@ public class MonoCardInDeckManager : MonoBehaviour
public bool dying;
private bool bool_physicalON;
private Card _cardData = new();
private Card _cardData = new Card();
private bool died;
private bool isDraging;
......
......@@ -107,7 +107,7 @@ public class UITexturePacker
storage[i].paddingY = (yPadding != 0);
}
texture.Reinitialize(width, height);
texture.Resize(width, height);
texture.SetPixels(new Color[width * height]);
// The returned rects
......
......@@ -742,7 +742,13 @@ public static class UIHelper
public static async Task<Texture2D> GetTexture2DAsync(string path)
{
var pic = new Texture2D(0, 0);
pic.LoadImage(await File.ReadAllBytesAsync(path));
// Unity < 2021.2
var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true);
var data = new byte[stream.Length];
await stream.ReadAsync(data, 0, (int) stream.Length);
pic.LoadImage(data);
// Unity >= 2021.2
// pic.LoadImage(await File.ReadAllBytesAsync(path));
return pic;
}
......
......@@ -573,9 +573,7 @@ public class GameField : OCGobject
if (Ocgcore.inSkiping) return;
if (only) destroy(big_string);
big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false,
Program.I().ui_main_2d, true,
new Vector3(Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize,
Screen.height / 1000f * Program.fieldSize));
Program.I().ui_main_2d, true, Utils.UIHeight() / 1000f * Program.fieldSize * Vector3.one);
big_string.GetComponentInChildren<UITexture>().mainTexture = tex;
Program.I().ocgcore.Sleep(40);
big_string.AddComponent<animation_screen_lock2>();
......
......@@ -75,9 +75,9 @@ public class GameTextureManager
loadedCloseUp.Clear();
}
private static readonly Dictionary<int, Task<Texture2D>> loadedPicture = new();
private static readonly Dictionary<int, Task<Texture2D>> loadedCloseUp = new();
private static readonly Dictionary<string, Texture2D> loadedUI = new();
private static readonly Dictionary<int, Task<Texture2D>> loadedPicture = new Dictionary<int, Task<Texture2D>>();
private static readonly Dictionary<int, Task<Texture2D>> loadedCloseUp = new Dictionary<int, Task<Texture2D>>();
private static readonly Dictionary<string, Texture2D> loadedUI = new Dictionary<string, Texture2D>();
public static Task<Texture2D> GetCardPicture(int code)
{
......
......@@ -4,7 +4,7 @@
"com.unity.ide.visualstudio": "2.0.11",
"com.unity.ide.vscode": "1.2.3",
"com.unity.test-framework": "1.1.27",
"com.unity.timeline": "1.6.1",
"com.unity.timeline": "1.5.6",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
......
......@@ -44,7 +44,7 @@
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.6.1",
"version": "1.5.6",
"depth": 0,
"source": "registry",
"dependencies": {
......
This diff is collapsed.
m_EditorVersion: 2021.2.0b9
m_EditorVersionWithRevision: 2021.2.0b9 (162b5e238388)
m_EditorVersion: 2021.1.18f1
m_EditorVersionWithRevision: 2021.1.18f1 (25bdc3efbc2d)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment