using UnityEngine; using UnityEngine.Scripting; namespace HotPatch { [Preserve] internal static class HotPatchUnityGenericReferences { #if UNITY_IOS [Preserve] static System.Type PreserveIosSupport() => typeof(Unity.Advertisement.IosSupport.ATTrackingStatusBinding); #endif [Preserve] static void Preserve(GameObject go, Component component) { go.AddComponent(); go.GetComponent(); go.GetComponentInChildren(); go.GetComponentInChildren(true); go.GetComponentsInChildren(); go.GetComponentsInChildren(true); component.GetComponent(); component.GetComponentInChildren(); component.GetComponentsInChildren(); component.GetComponentsInChildren(true); Object.FindAnyObjectByType(); Object.FindFirstObjectByType(); Object.Instantiate(go); Resources.Load(""); Resources.LoadAll(""); JsonUtility.FromJson("{}"); } } }