Reply To: Setting window insets ??

Welcome! Forums Unity Plugins In-App Web Browser Setting window insets ?? Reply To: Setting window insets ??

#1591
MavenZip
Participant

I added coding per your instructions and get errors. I have included the errors, plus the file with they code.

Here are errors:
Assets\JuiceFresh\Scripts\PrivacyPolicy.cs(15,1): error CS0118: ‘InAppBrowser.DisplayOptions’ is a type but is used like a variable

Assets\JuiceFresh\Scripts\PrivacyPolicy.cs(21,117): error CS0103: The name ‘options’ does not exist in the current context

Here is the file with code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class

PrivacyPolicy : MonoBehaviour {

public void PolicyButton()
{

/* */
/* 14 June 2019 P Nisenbaum – using In-App Web Browser to open URL in game */
/* https://www.kokosoft.pl/in-app-web-browser */
/* */
/* InAppBrowser EdgeInsets adding extra space between browser and game screen */
InAppBrowser.DisplayOptions = new
InAppBrowser.DisplayOptions();
int paddingTop = 50;
int paddingBottom = 50;
int paddingLeft = 32;
int paddingRight = 32;
InAppBrowser.EdgeInsets insets = new InAppBrowser.EdgeInsets(paddingTop, paddingBottom,

paddingLeft, paddingRight); options.insets = insets;

/* */
/* replace default Application.OpenURL with InAppBrowser.OpenURL */
/* Application.OpenURL( */
InAppBrowser.OpenURL(
https://www.hopemaven.com/privacy-terms”,options);

}
}