XChart重构:共享数据模型快照、时间序列与多分辨率系列,伪3D散点图/雷达图接入共享数据
This commit is contained in:
@@ -79,7 +79,7 @@ namespace XericUI.XChart
|
||||
|
||||
protected RectTransform CreateChild(string childName)
|
||||
{
|
||||
var child = new GameObject(childName);
|
||||
var child = new GameObject(childName, typeof(RectTransform));
|
||||
child.transform.SetParent(RootTransform, false);
|
||||
child.hideFlags = CurrentFlags;
|
||||
|
||||
@@ -88,6 +88,16 @@ namespace XericUI.XChart
|
||||
return rt;
|
||||
}
|
||||
|
||||
protected RectTransform CreateStretchChild(string childName)
|
||||
{
|
||||
var child = CreateChild(childName);
|
||||
child.anchorMin = Vector2.zero;
|
||||
child.anchorMax = Vector2.one;
|
||||
child.offsetMin = Vector2.zero;
|
||||
child.offsetMax = Vector2.zero;
|
||||
return child;
|
||||
}
|
||||
|
||||
protected T CreateChildComponent<T>(string childName) where T : Component
|
||||
{
|
||||
var child = CreateChild(childName);
|
||||
@@ -101,4 +111,4 @@ namespace XericUI.XChart
|
||||
if (RootObject != null) RootObject.SetActive(visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user