When setActive to false Canvas Scaler is wrong
this is my code, i load a UIPrefab and attach to uiroot
GameObject go = Instantiate(prefab) as GameObject;
go.name = assetName;
go.layer = LayerMask.NameToLayer("UI");
go.transform.SetParent(Parent, false);
go.transform.localScale = Vector3.one;
go.transform.localPosition = Vector3.zero;
when i use setactive(false) to hide the prefab and setactive(true) to show it again,the panel can't see in the screen any more, it seems the canvas scaler is wrong , anyone knows what happened maybe
Comment
Your answer