Fix AspectRatioLayoutElement to use its own transform.

This commit is contained in:
2022-10-01 15:48:53 +08:00
parent cd4ea557c3
commit adbe4370c9
2 changed files with 7 additions and 24 deletions

View File

@@ -1,9 +1,8 @@
using System.Collections.Generic;
using Cryville.Common.Unity.UI;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using Cryville.Common.Unity.UI;
using System;
namespace Cryville.Crtr.Browsing {
public class PropertyCategoryPanel : MonoBehaviour {
@@ -37,7 +36,6 @@ namespace Cryville.Crtr.Browsing {
var obj = GameObject.Instantiate<GameObject>(m_propertyPrefab);
obj.transform.SetParent(transform, false);
obj.GetComponent<PropertyPanel>().Load(prop, target);
obj.GetComponent<AspectRatioLayoutElement>().ContainerTransform = (RectTransform)transform;
}
}