以下の内容はhttps://baba-s.hatenablog.com/entry/2019/06/21/090000より取得しました。


【Unity】unity-webview のマージンを RectTranform から設定できる機能「UniWebViewMarginsFromRectTransform」を GitHub に公開しました

はじめに

unity-webview のマージンを RectTranform から設定できる機能
「UniWebViewMarginsFromRectTransform」を GitHub に公開しました

バージョン

  • Unity 2018.3.11f1

使い方

var rectTransform = GetComponent<RectTransform>();
var margins = WebViewUtils.ToMargins( rectTransform );

m_webViewObject.SetMargins
( 
    left    : margins.left  , 
    top     : margins.top   , 
    right   : margins.right , 
    bottom  : margins.bottom 
);

WebViewUtils.ToMargins に RectTransform を渡して、
取得できた値を WebViewObject.SetMargins に渡すことで、
RectTransform の範囲に WebView を表示できます  

謝辞




以上の内容はhttps://baba-s.hatenablog.com/entry/2019/06/21/090000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14