public static bool LoadImage(Texture2D tex, Il2CppStructArray <byte> data, bool markNonReadable)
 {
     if (tex == null)
     {
         throw new ArgumentException("The texture cannot be null.");
     }
     if (data == null)
     {
         throw new ArgumentException("The data cannot be null.");
     }
     if (LoadImageDelegateField == null)
     {
         throw new NullReferenceException("The LoadImageDelegateField cannot be null.");
     }
     return(LoadImageDelegateField(IL2CPP.Il2CppObjectBaseToPtr(tex), IL2CPP.Il2CppObjectBaseToPtr(data), markNonReadable));
 }
        public static Il2CppStructArray <byte> EncodeToEXR(Texture2D tex, Texture2D.EXRFlags flags)
        {
            if (tex == null)
            {
                throw new ArgumentException("The texture cannot be null.");
            }
            if (EncodeToEXRDelegateField == null)
            {
                throw new NullReferenceException("The EncodeToEXRDelegateField cannot be null.");
            }
            Il2CppStructArray <byte> il2CppStructArray;
            IntPtr encodeToEXRDelegateField = EncodeToEXRDelegateField(IL2CPP.Il2CppObjectBaseToPtr(tex), flags);

            if (encodeToEXRDelegateField != IntPtr.Zero)
            {
                il2CppStructArray = new Il2CppStructArray <byte>(encodeToEXRDelegateField);
            }
            else
            {
                il2CppStructArray = null;
            }
            return(il2CppStructArray);
        }
 public static IntPtr SafePointer(this Il2CppObjectBase instance)
 {
     return(IL2CPP.Il2CppObjectBaseToPtr(instance));
 }