Closed
Description
Description
I'm trying to use the WebView a child of a root object. Therefore I created a Prefab that contains the class "WebView" and its requirements. I want this Prefab to be instantiated as child of another transform and to be at scale = Vector3.zero on initialization.
The Prefab contains a helper class that handles all visial components. Here I want to setup the WebView as child and scale it:
private void Awake()
{
_webView = GetComponentInChildren<WebView>();
_webView .transform.SetParent(root.transform); // <- causes crash
_webView .transform.localScale = Vector3.zero; // <- causes crash
}
If I maintain the scale and not change the parent of the WebView Unity or the application won't crash.
Version
WebView2: 0.17.1-pre.5
Unity: 2022.3.7f1
Repro Steps
Instantiate a WebView Prefab and try to change it's parent or scale it to zero.