mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 19:48:47 +00:00
Add explicit YooAsset macro gates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using UnityEditor;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using UnityEditor;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if TUANJIE_1_8_OR_NEWER
|
||||
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
{
|
||||
"name": "com.tuyoogame.yooasset",
|
||||
"expression": "",
|
||||
"define": "YOO_ASSET_3"
|
||||
"define": "YOOASSET_3"
|
||||
},
|
||||
{
|
||||
"name": "com.tuyoogame.yooasset",
|
||||
"expression": "3.0.0-beta",
|
||||
"define": "YOO_ASSET_3_0"
|
||||
"define": "YOOASSET_3_0"
|
||||
},
|
||||
{
|
||||
"name": "com.tuyoogame.yooasset",
|
||||
"expression": "3.0.0-beta",
|
||||
"define": "YOO_ASSET_3_0_OR_NEWER"
|
||||
"define": "YOOASSET_3_0_OR_NEWER"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
#if YOO_MACRO_SUPPORT
|
||||
#if YOOASSET_MACRO_SUPPORT
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
@@ -13,9 +13,9 @@ namespace YooAsset.Editor
|
||||
/// </summary>
|
||||
public static IReadOnlyList<string> Macros { get; } = new List<string>()
|
||||
{
|
||||
"YOO_ASSET_3",
|
||||
"YOO_ASSET_3_0",
|
||||
"YOO_ASSET_3_0_OR_NEWER",
|
||||
"YOOASSET_3",
|
||||
"YOOASSET_3_0",
|
||||
"YOOASSET_3_0_OR_NEWER",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Xml;
|
||||
using UnityEditor;
|
||||
|
||||
#if YOO_MACRO_SUPPORT
|
||||
#if YOOASSET_MACRO_SUPPORT
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Xml;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
#if YOO_MACRO_SUPPORT
|
||||
#if YOOASSET_MACRO_SUPPORT
|
||||
namespace YooAsset.Editor.Experiment
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if UNITASK_YOOASSET_SUPPORT
|
||||
#if YOOASSET_UNITASK_SUPPORT
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
@@ -208,7 +208,7 @@ public class TestUniTask
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
Debug.LogWarning("UniTask tests skipped: UNITASK_YOOASSET_SUPPORT is not defined.");
|
||||
Debug.LogWarning("UniTask tests skipped: YOOASSET_UNITASK_SUPPORT is not defined.");
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class TestTask : MonoBehaviour
|
||||
Project Settings --> Player --> Scripting Define Symbols
|
||||
|
||||
```
|
||||
UNITASK_YOOASSET_SUPPORT
|
||||
YOOASSET_UNITASK_SUPPORT
|
||||
```
|
||||
|
||||
5. 重启Unity引擎
|
||||
@@ -68,7 +68,7 @@ public class TestTask : MonoBehaviour
|
||||
Project Settings --> Player --> Scripting Define Symbols
|
||||
|
||||
```
|
||||
UNITASK_YOOASSET_SUPPORT
|
||||
YOOASSET_UNITASK_SUPPORT
|
||||
```
|
||||
|
||||
4. 重启Unity引擎
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if UNITASK_YOOASSET_SUPPORT
|
||||
#if YOOASSET_UNITASK_SUPPORT
|
||||
using System;
|
||||
using System.Threading;
|
||||
using YooAsset;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if UNITASK_YOOASSET_SUPPORT
|
||||
#if YOOASSET_UNITASK_SUPPORT
|
||||
#if UNITY_2020_1_OR_NEWER && ! UNITY_2021
|
||||
#define UNITY_2020_BUG
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{
|
||||
"name": "com.cysharp.unitask",
|
||||
"expression": "",
|
||||
"define": "UNITASK_YOOASSET_SUPPORT"
|
||||
"define": "YOOASSET_UNITASK_SUPPORT"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
|
||||
Reference in New Issue
Block a user