mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-06-21 03:54:17 +00:00
Add explicit YooAsset macro gates
This commit is contained in:
@@ -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