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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if TUANJIE_1_8_OR_NEWER
|
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
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;
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
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
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
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
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if TUANJIE_1_8_OR_NEWER
|
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||||
namespace YooAsset.Editor
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if TUANJIE_1_8_OR_NEWER
|
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||||
namespace YooAsset.Editor
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if TUANJIE_1_8_OR_NEWER
|
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
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;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
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;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
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;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
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;
|
||||||
using System.Collections.Generic;
|
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.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
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;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
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;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if TUANJIE_1_8_OR_NEWER
|
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
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
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if TUANJIE_1_8_OR_NEWER
|
#if TUANJIE_1_8_OR_NEWER && YOOASSET_INSTANT_ASSET_SUPPORT
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace YooAsset
|
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;
|
||||||
using UnityEngine.SceneManagement;
|
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
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -13,17 +13,17 @@
|
|||||||
{
|
{
|
||||||
"name": "com.tuyoogame.yooasset",
|
"name": "com.tuyoogame.yooasset",
|
||||||
"expression": "",
|
"expression": "",
|
||||||
"define": "YOO_ASSET_3"
|
"define": "YOOASSET_3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "com.tuyoogame.yooasset",
|
"name": "com.tuyoogame.yooasset",
|
||||||
"expression": "3.0.0-beta",
|
"expression": "3.0.0-beta",
|
||||||
"define": "YOO_ASSET_3_0"
|
"define": "YOOASSET_3_0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "com.tuyoogame.yooasset",
|
"name": "com.tuyoogame.yooasset",
|
||||||
"expression": "3.0.0-beta",
|
"expression": "3.0.0-beta",
|
||||||
"define": "YOO_ASSET_3_0_OR_NEWER"
|
"define": "YOOASSET_3_0_OR_NEWER"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"noEngineReferences": false
|
"noEngineReferences": false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
#if YOO_MACRO_SUPPORT
|
#if YOOASSET_MACRO_SUPPORT
|
||||||
namespace YooAsset.Editor
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13,9 +13,9 @@ namespace YooAsset.Editor
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static IReadOnlyList<string> Macros { get; } = new List<string>()
|
public static IReadOnlyList<string> Macros { get; } = new List<string>()
|
||||||
{
|
{
|
||||||
"YOO_ASSET_3",
|
"YOOASSET_3",
|
||||||
"YOO_ASSET_3_0",
|
"YOOASSET_3_0",
|
||||||
"YOO_ASSET_3_0_OR_NEWER",
|
"YOOASSET_3_0_OR_NEWER",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
#if YOO_MACRO_SUPPORT
|
#if YOOASSET_MACRO_SUPPORT
|
||||||
namespace YooAsset.Editor
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Xml;
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
#if YOO_MACRO_SUPPORT
|
#if YOOASSET_MACRO_SUPPORT
|
||||||
namespace YooAsset.Editor.Experiment
|
namespace YooAsset.Editor.Experiment
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if UNITASK_YOOASSET_SUPPORT
|
#if YOOASSET_UNITASK_SUPPORT
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@@ -208,7 +208,7 @@ public class TestUniTask
|
|||||||
{
|
{
|
||||||
public IEnumerator RuntimeTester()
|
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;
|
yield break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class TestTask : MonoBehaviour
|
|||||||
Project Settings --> Player --> Scripting Define Symbols
|
Project Settings --> Player --> Scripting Define Symbols
|
||||||
|
|
||||||
```
|
```
|
||||||
UNITASK_YOOASSET_SUPPORT
|
YOOASSET_UNITASK_SUPPORT
|
||||||
```
|
```
|
||||||
|
|
||||||
5. 重启Unity引擎
|
5. 重启Unity引擎
|
||||||
@@ -68,7 +68,7 @@ public class TestTask : MonoBehaviour
|
|||||||
Project Settings --> Player --> Scripting Define Symbols
|
Project Settings --> Player --> Scripting Define Symbols
|
||||||
|
|
||||||
```
|
```
|
||||||
UNITASK_YOOASSET_SUPPORT
|
YOOASSET_UNITASK_SUPPORT
|
||||||
```
|
```
|
||||||
|
|
||||||
4. 重启Unity引擎
|
4. 重启Unity引擎
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if UNITASK_YOOASSET_SUPPORT
|
#if YOOASSET_UNITASK_SUPPORT
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using YooAsset;
|
using YooAsset;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if UNITASK_YOOASSET_SUPPORT
|
#if YOOASSET_UNITASK_SUPPORT
|
||||||
#if UNITY_2020_1_OR_NEWER && ! UNITY_2021
|
#if UNITY_2020_1_OR_NEWER && ! UNITY_2021
|
||||||
#define UNITY_2020_BUG
|
#define UNITY_2020_BUG
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.cysharp.unitask",
|
"name": "com.cysharp.unitask",
|
||||||
"expression": "",
|
"expression": "",
|
||||||
"define": "UNITASK_YOOASSET_SUPPORT"
|
"define": "YOOASSET_UNITASK_SUPPORT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"noEngineReferences": false
|
"noEngineReferences": false
|
||||||
|
|||||||
Reference in New Issue
Block a user