Code cleanup.

This commit is contained in:
2022-11-15 12:12:29 +08:00
parent fcc9935325
commit 7b1f639412
4 changed files with 5 additions and 9 deletions

View File

@@ -32,8 +32,7 @@ namespace Cryville.Crtr.Browsing {
public void Load(string name, IEnumerable<PropertyInfo> props, object target) {
Name = name.ToUpper();
foreach (var prop in props) {
var obj = GameObject.Instantiate<GameObject>(m_propertyPrefab);
obj.transform.SetParent(transform, false);
var obj = GameObject.Instantiate<GameObject>(m_propertyPrefab, transform, false);
obj.GetComponent<PropertyPanel>().Load(prop, target);
}
}