diff --git a/Assets/QFramework/Toolkits/ResKit/Scripts/LocalTextSupport/LocalTextSupport.cs b/Assets/QFramework/Toolkits/ResKit/Scripts/LocalTextSupport/LocalTextSupport.cs index 52f1e4ed..9ec59aec 100644 --- a/Assets/QFramework/Toolkits/ResKit/Scripts/LocalTextSupport/LocalTextSupport.cs +++ b/Assets/QFramework/Toolkits/ResKit/Scripts/LocalTextSupport/LocalTextSupport.cs @@ -22,7 +22,7 @@ namespace QFramework private string mFullPath; private string mHashCode; private object mRawAsset; - + public string text; UnityWebRequest request; public static LocalTextRes Allocate(string name) { @@ -181,7 +181,7 @@ namespace QFramework else { // Convert the downloaded data to an AudioClip - mAsset = new StringAsset(request.downloadHandler.text); + text = request.downloadHandler.text; } if (RefCount <= 0) @@ -267,12 +267,3 @@ namespace QFramework */ } } -public class StringAsset : ScriptableObject -{ - public string text; - public StringAsset(string text) - { - this.text = text; - } - -} \ No newline at end of file diff --git a/Assets/Scripts/Actions/LoadResAction.cs b/Assets/Scripts/Actions/LoadResAction.cs index cb6df41a..ceaa950e 100644 --- a/Assets/Scripts/Actions/LoadResAction.cs +++ b/Assets/Scripts/Actions/LoadResAction.cs @@ -48,7 +48,7 @@ namespace QFramework { if (success) { - string xmlStr = res.Asset.As().text; + string xmlStr = res.As().text; if (string.IsNullOrEmpty(xmlStr) == false) { // ¼ÓÔØXML diff --git a/Assets/Scripts/Launch.cs b/Assets/Scripts/Launch.cs index 26bdd4d2..2a13b1b4 100644 --- a/Assets/Scripts/Launch.cs +++ b/Assets/Scripts/Launch.cs @@ -23,7 +23,7 @@ public class Launch : MonoBehaviour { if (success) { - Global.Instance.appData = XmlParser.ParseXml(res.Asset.As().text); + Global.Instance.appData = XmlParser.ParseXml(res.As().text); } });