export-table-pulgin-csharp 1.1.135 → 1.1.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ExportUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAqC,MAAM,kBAAkB,CAAA;AAOxJ,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA+FnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAiHzE;AAED,qBAAa,iBAAkB,SAAQ,UAAU;IAChD,IAAI,SAAU;IACd,IAAI,EAAE,MAAM,EAAE,CAAY;IAE1B,WAAW,CAAC,KAAK,EAAE,iBAAiB;IAmBpC,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAmC3C"}
1
+ {"version":3,"file":"ExportUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAqC,MAAM,kBAAkB,CAAA;AAOxJ,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA+FnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA0GzE;AAED,qBAAa,iBAAkB,SAAQ,UAAU;IAChD,IAAI,SAAU;IACd,IAAI,EAAE,MAAM,EAAE,CAAY;IAE1B,WAAW,CAAC,KAAK,EAAE,iBAAiB;IAmBpC,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAmC3C"}
@@ -151,21 +151,14 @@ namespace ${exportNamespace}
151
151
  public static async Task Load()
152
152
  {
153
153
  var loadUrl="Assets/Bundles/GameConfigs/Auto/${fullName}.json";
154
- var configJson =
155
- #if UNITY_EDITOR
156
- Application.isPlaying ? await ConfigAssetLoader.LoadAssetAsync<TextAsset>(loadUrl).Task
157
- : UnityEditor.AssetDatabase.LoadAssetAtPath<TextAsset>(loadUrl);
158
- #else
159
- await ConfigAssetLoader.LoadAssetAsync<TextAsset>(loadUrl).Task;
160
- #endif
154
+ var configJson = await ConfigAssetLoader.LoadAssetAsync(loadUrl);
161
155
  if (configJson != null)
162
156
  {
163
157
  Debug.Log($"解析配表: {loadUrl}");
164
158
  ${RowClass}[] jsonObjs;
165
159
  try
166
160
  {
167
- jsonObjs = JsonUtility.FromJson<TempA>("{\\"a\\":"+configJson.text+"}").a;
168
- //jsonObjs = JSON.parse<${RowClass}[]>(configJson.text);
161
+ jsonObjs = JsonUtility.FromJson<TempA>("{\\"a\\":"+configJson+"}").a;
169
162
  }
170
163
  catch(System.Exception ex)
171
164
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "export-table-pulgin-csharp",
3
- "version": "1.1.135",
3
+ "version": "1.1.136",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {},
@@ -146,21 +146,14 @@ namespace ${exportNamespace}
146
146
  public static async Task Load()
147
147
  {
148
148
  var loadUrl="Assets/Bundles/GameConfigs/Auto/${fullName}.json";
149
- var configJson =
150
- #if UNITY_EDITOR
151
- Application.isPlaying ? await ConfigAssetLoader.LoadAssetAsync<TextAsset>(loadUrl).Task
152
- : UnityEditor.AssetDatabase.LoadAssetAtPath<TextAsset>(loadUrl);
153
- #else
154
- await ConfigAssetLoader.LoadAssetAsync<TextAsset>(loadUrl).Task;
155
- #endif
149
+ var configJson = await ConfigAssetLoader.LoadAssetAsync(loadUrl);
156
150
  if (configJson != null)
157
151
  {
158
152
  Debug.Log($"解析配表: {loadUrl}");
159
153
  ${RowClass}[] jsonObjs;
160
154
  try
161
155
  {
162
- jsonObjs = JsonUtility.FromJson<TempA>("{\\"a\\":"+configJson.text+"}").a;
163
- //jsonObjs = JSON.parse<${RowClass}[]>(configJson.text);
156
+ jsonObjs = JsonUtility.FromJson<TempA>("{\\"a\\":"+configJson+"}").a;
164
157
  }
165
158
  catch(System.Exception ex)
166
159
  {