Commit e126e309 authored by SherryChaos's avatar SherryChaos

Change Android api to OpenGL

parent c127f428
......@@ -2,8 +2,7 @@
MDPro v1.1.9.1更新:
1.升级Spine至v4.2,修复上一版更新的官方MonsterCutin部分动画异常的错误。
2.更新所有官方MonsterCutin动画文件,用于适配新版Spine。
史莱姆、银河眼极光波龙、 天照、彩虹、小夜、
2.安卓端首选图形API变更为OpenGL。
MDPro v1.1.9更新:
1.新增部分自定义功能,设置文件位于“Data/Settings.json“:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1877,6 +1877,13 @@ MonoBehaviour:
functional: 0
secondFace: 0
diy: 0
- id: 1030029
m_name:
m_description:
path:
functional: 0
secondFace: 0
diy: 0
- id: 1030014
m_name: "\u5149\u5C5E\u6027\u8FB9\u6846"
m_description:
......@@ -1933,13 +1940,6 @@ MonoBehaviour:
functional: 0
secondFace: 0
diy: 0
- id: 1030029
m_name:
m_description:
path:
functional: 0
secondFace: 0
diy: 0
- id: 1030030
m_name:
m_description:
......
fileFormatVersion: 2
guid: 2873812183509ea49864a248dfc48e24
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace YX
{
public class ScriptIDViewer : EditorWindow
{
[MenuItem("Debug/ScriptIDViewer")]
public static void Open()
{
var wnd = GetWindow<ScriptIDViewer>("ScriptIDViewer");
wnd.Show();
wnd.minSize = new Vector2(600, 400);
wnd.maxSize = new Vector2(600, 400);
}
private void Awake()
{
m_material = new Material(Shader.Find("Hidden/Internal-Colored"));
m_material.hideFlags = HideFlags.HideAndDontSave;
}
private void OnGUI()
{
EditorGUILayout.BeginVertical();
EditorGUILayout.Space();
GetId();
DrawLine();
GetScriptId();
DrawLine();
GetAssetFromId();
DrawLine();
GetDllScriptId();
EditorGUILayout.Space();
EditorGUILayout.EndVertical();
}
private MonoBehaviour _mono;
void GetId()
{
_mono = EditorGUILayout.ObjectField(_mono, typeof(MonoBehaviour), true) as MonoBehaviour;
if (_mono)
{
string guid;
long fid;
var script = MonoScript.FromMonoBehaviour(_mono);
var path = AssetDatabase.TryGetGUIDAndLocalFileIdentifier(script, out guid, out fid);
EditorGUILayout.TextField("fileID", fid.ToString());
EditorGUILayout.TextField("guid", guid);
}
}
private MonoScript _script;
void GetScriptId()
{
_script = EditorGUILayout.ObjectField(_script, typeof(MonoScript), true) as MonoScript;
if (_script)
{
string guid;
long fid;
var path = AssetDatabase.TryGetGUIDAndLocalFileIdentifier(_script, out guid, out fid);
EditorGUILayout.TextField("fileID", fid.ToString());
EditorGUILayout.TextField("guid", guid);
}
}
string _guid, _fid;
string _result;
void GetAssetFromId()
{
EditorGUILayout.BeginHorizontal();
_fid = EditorGUILayout.TextField("fileID", _fid);
_guid = EditorGUILayout.TextField("guid", _guid);
if (GUILayout.Button("find"))
{
_result = "δҵ";
var path = AssetDatabase.GUIDToAssetPath(_guid);
var assets = AssetDatabase.LoadAllAssetsAtPath(path);
string guid;
long fid;
for (int i = 0; i < assets.Length; i++)
{
var asset = assets[i];
var s = AssetDatabase.TryGetGUIDAndLocalFileIdentifier(asset, out guid, out fid);
if (s && _fid == fid.ToString())
{
var script = asset as MonoScript;
string name;
if (script != null)
name = script.GetClass().FullName;
else
name = asset.name;
_result = string.Format("{0}->{1}", path, name);
break;
}
}
}
EditorGUILayout.EndHorizontal();
GUILayout.TextField(_result);
}
private DefaultAsset _dll;
string _dll_guid;
long _dll_fid;
Object[] _dllAssets;
private float _scrollValueX = 0;
private float _scrollValueY = 0;
private Vector2 _scroll;
void GetDllScriptId()
{
_dll = EditorGUILayout.ObjectField(".dll", _dll, typeof(DefaultAsset), true) as DefaultAsset;
GUILayout.BeginHorizontal();
EditorGUILayout.TextField("fileID", _dll_fid.ToString());
EditorGUILayout.TextField("guid", _dll_guid);
GUILayout.EndHorizontal();
if (GUILayout.Button("Open") && _dll != null)
{
var path = AssetDatabase.GetAssetPath(_dll);
if (path.EndsWith(".dll"))
_dllAssets = AssetDatabase.LoadAllAssetsAtPath(path);
else
_dllAssets = null;
}
if (_dllAssets != null && _dllAssets.Length > 0)
{
_scroll = EditorGUILayout.BeginScrollView(_scroll, GUILayout.Width(600));
for (int i = 0; i < _dllAssets.Length; i++)
{
EditorGUILayout.BeginHorizontal();
GUILayout.TextField(_dllAssets[i].name);
if (GUILayout.Button("view", GUILayout.Width(100)))
{
var s = AssetDatabase.TryGetGUIDAndLocalFileIdentifier(_dllAssets[i], out _dll_guid, out _dll_fid);
}
EditorGUILayout.EndHorizontal();
}
EditorGUILayout.EndScrollView();
}
}
Material m_material;
void DrawLine()
{
EditorGUILayout.Space(20);
if (Event.current.type == EventType.Repaint)
{
var lastRect = GUILayoutUtility.GetLastRect();
var rect = new Rect(0, lastRect.y, 600, 20);
GL.PushMatrix();
m_material.SetPass(0);
GL.LoadPixelMatrix();
GL.Begin(GL.QUADS);
GL.Color(new Color32(78, 201, 176, 255));
GL.Vertex3(rect.x, rect.y, 0);
GL.Vertex3(rect.x + rect.width, rect.y, 0);
GL.Vertex3(rect.x + rect.width, rect.y + rect.height, 0);
GL.Vertex3(rect.x, rect.y + rect.height, 0);
GL.End();
GL.PopMatrix();
}
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 105efd4748506d24887ef231bf734382
\ No newline at end of file
......@@ -266,6 +266,7 @@ namespace MDPro3
var ab = abr.assetBundle;
var material = ab.LoadAsset<Material>("ProfileFrameMat" + code);
ab.Unload(false);
TextureManager.ChangeProfileFrameMaterialWrapMode(material);
yield return material;
}
public static IEnumerator<Mate> LoadMateAsync(int code)
......
......@@ -66,7 +66,6 @@ namespace MDPro3
};
ie = ABLoader.LoadFromFileAsync("MasterDuel/Timeline/summon/summonsynchro/summonsynchro01_royalstyle");
StartCoroutine(ie);
while (ie.MoveNext())
yield return null;
manager = ie.Current.GetComponent<ElementObjectManager>();
......@@ -78,7 +77,6 @@ namespace MDPro3
cardHolo4 = cardMatRoyal.GetTexture("_KiraColorTexture");
ie = ABLoader.LoadFromFileAsync("MasterDuel/Timeline/summon/summonsynchro/summonsynchro01_shinestyle");
StartCoroutine(ie);
while (ie.MoveNext())
yield return null;
manager = ie.Current.GetComponent<ElementObjectManager>();
......@@ -942,7 +940,32 @@ namespace MDPro3
return newTexture;
}
#endregion
public static void ChangeProfileFrameMaterialWrapMode(Material mat)
{
#if !UNITY_ANDROID
return;
#endif
if (mat == null)
return;
for(int i = 0; i < mat.shader.GetPropertyCount(); i++)
{
if(mat.shader.GetPropertyType(i) == UnityEngine.Rendering.ShaderPropertyType.Texture)
{
var propName = mat.shader.GetPropertyName(i);
if (propName != "_ProfileFrameTex" && propName != "_MainTex")
{
var tex = mat.GetTexture(propName);
if (tex != null)
tex.wrapMode = TextureWrapMode.Repeat;
}
}
}
}
#endregion
}
}
......@@ -57,8 +57,8 @@ public class AssetBundleRobber : MonoBehaviour
masterDuelAssetBundlePath = masterDuelWindowsAssetBundlePath;
workingPlace = windowsWorkingPlace;
//masterDuelAssetBundlePath = masterDuelAndroidAssetBundlePath;
//workingPlace = androindWorkingPlace;
masterDuelAssetBundlePath = masterDuelAndroidAssetBundlePath;
workingPlace = androindWorkingPlace;
fullCopy = true;
//fullCopy = false;
......
......@@ -140,7 +140,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 1.1.9
bundleVersion: 1.1.9.1
preloadedAssets:
- {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2}
- {fileID: -944628639613478452, guid: a916821eb5eea2842a69be6041bcdb82, type: 3}
......@@ -539,7 +539,7 @@ PlayerSettings:
m_GraphicsJobMode: 0
m_BuildTargetGraphicsAPIs:
- m_BuildTarget: AndroidPlayer
m_APIs: 150000000b000000
m_APIs: 0b00000015000000
m_Automatic: 0
- m_BuildTarget: iOSSupport
m_APIs: 10000000
......@@ -551,7 +551,7 @@ PlayerSettings:
m_APIs: 0b000000
m_Automatic: 1
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0200000015000000
m_APIs: 0b0000001500000002000000
m_Automatic: 0
m_BuildTargetVRSettings:
- m_BuildTarget: Standalone
......
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