Browse Source

图片bug修改

“hujiajun” 1 year ago
parent
commit
df1c1099d9

+ 4 - 4
Assets/HotUpdate/GameManager.cs

@@ -1302,7 +1302,7 @@ public class GameManager : MonoSingleton<GameManager>
         Debug.Log("加載完成2222");
         MatOfByte matbytes = filePathToMatByte(path);
         Debug.Log("加載完成3333");
-        Mat mat = Imgcodecs.imdecode(matbytes, -1);
+        Mat mat = Imgcodecs.imdecode(matbytes, CvType.CV_8UC4);
         Debug.Log("加載完成4444");
         float zoom = 1;
         float sint = 2048f;
@@ -1321,9 +1321,9 @@ public class GameManager : MonoSingleton<GameManager>
         Size size = new Size(mat.cols() * zoom, mat.rows() * zoom);
         Mat zoomMat = new Mat(size, CvType.CV_8UC4);
         Imgproc.resize(mat, zoomMat, size);
-        ////BGR 转RGB
+        ////BGR 转RGBAA
         Mat imgRGBMat = new Mat(zoomMat.cols(), zoomMat.rows(), CvType.CV_8UC4);
-        Imgproc.cvtColor(zoomMat, imgRGBMat, Imgproc.COLOR_BGR2RGB);
+        Imgproc.cvtColor(zoomMat, imgRGBMat, Imgproc.COLOR_BGRA2RGBA);
         //RefreshEvent?.Invoke();
         zoomMat.release();
         mat.release();
@@ -1336,7 +1336,7 @@ public class GameManager : MonoSingleton<GameManager>
     {
         //Debug.Log(imgRGBMat.cols());
         //Debug.Log(imgRGBMat.rows());
-        Texture2D _tex = new Texture2D(imgRGBMat.cols(), imgRGBMat.rows(), TextureFormat.RGB24, false);
+        Texture2D _tex = new Texture2D(imgRGBMat.cols(), imgRGBMat.rows(), TextureFormat.RGBA32, false);
         Utils.fastMatToTexture2D(imgRGBMat, _tex);
         return _tex;
     }

+ 0 - 1
Assets/MRNavigatorStart/Template/Prefab/yangshi1.prefab

@@ -60,7 +60,6 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
-  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
   m_SortingOrder: 0

+ 11 - 1
Assets/MRNavigatorStart/Template/Prefab/yangshi6.prefab

@@ -55,6 +55,7 @@ MonoBehaviour:
   video: {fileID: 6160898116859380121}
   img: {fileID: 248926341422538542}
   model: {fileID: 1029241025592612545}
+  useObj: {fileID: 0}
 --- !u!1 &26260299856024823
 GameObject:
   m_ObjectHideFlags: 0
@@ -110,6 +111,7 @@ MonoBehaviour:
   video: {fileID: 6160898117335415956}
   img: {fileID: 248926340911343221}
   model: {fileID: 8358063986662325665}
+  useObj: {fileID: 0}
 --- !u!1 &26260300147360624
 GameObject:
   m_ObjectHideFlags: 0
@@ -165,6 +167,7 @@ MonoBehaviour:
   video: {fileID: 6160898117039850211}
   img: {fileID: 248926340444068927}
   model: {fileID: 1439074679982727310}
+  useObj: {fileID: 0}
 --- !u!1 &26260300150422033
 GameObject:
   m_ObjectHideFlags: 0
@@ -220,6 +223,7 @@ MonoBehaviour:
   video: {fileID: 6160898116969586660}
   img: {fileID: 248926340925874041}
   model: {fileID: 6270464752405926977}
+  useObj: {fileID: 0}
 --- !u!1 &26260301886315834
 GameObject:
   m_ObjectHideFlags: 0
@@ -310,7 +314,7 @@ MonoBehaviour:
   m_FallbackScreenDPI: 96
   m_DefaultSpriteDPI: 96
   m_DynamicPixelsPerUnit: 1
-  m_PresetInfoIsWorld: 1
+  m_PresetInfoIsWorld: 0
 --- !u!114 &26260301886315836
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -414,6 +418,7 @@ MonoBehaviour:
   video: {fileID: 6160898117653731389}
   img: {fileID: 248926341783739959}
   model: {fileID: 4976202992279363097}
+  useObj: {fileID: 0}
 --- !u!1001 &26260299818404167
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -886,6 +891,11 @@ PrefabInstance:
       propertyPath: m_LocalEulerAnglesHint.z
       value: 0
       objectReference: {fileID: 0}
+    - target: {fileID: 5709561373420343269, guid: f6f586a534503c54780e07a850d68d83,
+        type: 3}
+      propertyPath: m_PresetInfoIsWorld
+      value: 1
+      objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: f6f586a534503c54780e07a850d68d83, type: 3}
 --- !u!1 &248926340444068927 stripped

+ 1 - 1
Packages/manifest.json

@@ -24,7 +24,7 @@
     "jh.immersalsdk.engine": "file:/Users/hujiajun/ghz/ImmersalSDK",
     "jh.opencvforunity.engine": "ssh://git@gogs.ghz-tech.com:30979/GHzGlass/OpenCVForUnity.git",
     "jh.trilib.engine": "ssh://git@gogs.ghz-tech.com:30979/GHzGlass/TriLibXR.git",
-    "jh.xr.engine": "file:/Users/hujiajun/ghz/GHZSDKXR",
+    "jh.xr.engine": "ssh://git@gogs.ghz-tech.com:30979/GHzGlass/GHZSDKXR.git#XRSDK_Nreal",
     "com.unity.modules.ai": "1.0.0",
     "com.unity.modules.androidjni": "1.0.0",
     "com.unity.modules.animation": "1.0.0",

+ 4 - 3
Packages/packages-lock.json

@@ -322,14 +322,15 @@
       "hash": "0124fefeb16d355c5f4affd25cfad240e7ef0f2d"
     },
     "jh.xr.engine": {
-      "version": "file:/Users/hujiajun/ghz/GHZSDKXR",
+      "version": "ssh://git@gogs.ghz-tech.com:30979/GHzGlass/GHZSDKXR.git#XRSDK_Nreal",
       "depth": 0,
-      "source": "local",
+      "source": "git",
       "dependencies": {
         "com.unity.xr.management": "4.0.1",
         "com.unity.xr.legacyinputhelpers": "2.1.2",
         "com.unity.inputsystem": "1.4.2"
-      }
+      },
+      "hash": "8cc2b42b3e25e07a8e24e2fec40ebcfa154faf33"
     },
     "com.unity.modules.ai": {
       "version": "1.0.0",

+ 3 - 3
ProjectSettings/ProjectSettings.asset

@@ -938,7 +938,6 @@ PlayerSettings:
   metroSplashScreenUseBackgroundColor: 1
   platformCapabilities:
     WindowsStoreApps:
-      EnterpriseAuthentication: False
       OfflineMapsManagement: False
       HumanInterfaceDevice: False
       Location: False
@@ -950,6 +949,7 @@ PlayerSettings:
       PrivateNetworkClientServer: False
       InternetClientServer: False
       VideosLibrary: False
+      BackgroundMediaPlayback: False
       Objects3D: False
       RemoteSystem: False
       BlockedChatMessages: False
@@ -971,10 +971,10 @@ PlayerSettings:
       PointOfService: False
       RecordedCallsFolder: False
       Contacts: False
-      Proximity: False
       InternetClient: True
+      Proximity: False
       CodeGeneration: False
-      BackgroundMediaPlayback: False
+      EnterpriseAuthentication: False
   metroTargetDeviceFamilies: {}
   metroFTAName: 
   metroFTAFileTypes: []