| | |
| | | |
| | | void Awake() |
| | | { |
| | | LoadPrefab(); |
| | | LoadPrefab().Forget(); |
| | | } |
| | | |
| | | GameObject cellContainer; |
| | |
| | | |
| | | if (cellContainer == null) |
| | | { |
| | | cellContainer = await UIUtility.CreateWidget("MinggeBuffCell", "Container_BuffCell"); |
| | | var inst = await UIUtility.CreateWidget("MinggeBuffCell", "Container_BuffCell"); |
| | | if (this == null) |
| | | { |
| | | if (null != cellContainer) |
| | | { |
| | | DestroyImmediate(cellContainer); |
| | | } |
| | | if (null != inst) DestroyImmediate(inst); |
| | | return; |
| | | } |
| | | |
| | | if (cellContainer != null) |
| | | { |
| | | DestroyImmediate(inst); |
| | | return; |
| | | } |
| | | cellContainer = inst; |
| | | |
| | | if (cellContainer != null) |
| | | { |
| | | cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |