using UnityEngine; /// /// 防止裁剪引用。 /// 如果在主工程无引用,link.xml的防裁剪也无效。 /// public class DisStripCode : MonoBehaviour { private void Awake() { //UnityEngine.Physics RegisterType(); RegisterType(); RegisterType(); RegisterType(); //UnityEngine.Graphics RegisterType(); RegisterType(); //UnityEngine.Animation RegisterType(); RegisterType(); } private void RegisterType() { #if UNITY_EDITOR && false Debug.Log($"DisStripCode RegisterType :{typeof(T)}"); #endif } }