AirtestProject / Poco-SDK

https://github.com/AirtestProject/Poco
Apache License 2.0
279 stars 159 forks source link

[Unity3D-sdk] Fix conflicts between different UnityNodes #115

Open KorneiDontsov opened 1 year ago

KorneiDontsov commented 1 year ago

This commit allows folders 'fairygui', 'ngui', 'ugui' and 'uguiWithTMPro' to exists in project simultaneously without any compile errors as long as they have all the required dependencies. User can choose preferred UnityNode to use manually or it may be resolved automatically.

While it's difficult to imagine the situation where an end user want to keep multiple UnityNode scripts simultaneously, this improvement helps to develop sdk without deleting/restoring folders, and also, in perspective, separate code into different assemblies and packages for Unity 2019 and newer.

Note: TextMeshPro related code was set under define UNITY_2018_1_OR_NEWER, because TextMeshPro supports Unity 2018.1 and newer. Keeping this code for older versions is bad, because it makes hard to test sdk for older versions of Unity without removing the folder. So this change actually changes nothing, only makes life easier.