| 1234567891011121314151617181920212223242526272829303132333435363738 |
- 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<Component>();
- go.GetComponent<Component>();
- go.GetComponentInChildren<Component>();
- go.GetComponentInChildren<Component>(true);
- go.GetComponentsInChildren<Component>();
- go.GetComponentsInChildren<Component>(true);
- component.GetComponent<Component>();
- component.GetComponentInChildren<Component>();
- component.GetComponentsInChildren<Component>();
- component.GetComponentsInChildren<Component>(true);
- Object.FindAnyObjectByType<Object>();
- Object.FindFirstObjectByType<Object>();
- Object.Instantiate<Object>(go);
- Resources.Load<Object>("");
- Resources.LoadAll<Object>("");
- JsonUtility.FromJson<object>("{}");
- }
- }
- }
|