Skip to content

Commit bb483a6

Browse files
author
setchi
committed
Refactoring
1 parent 925a7d6 commit bb483a6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Assets/Hypertext/Scripts/HypertextBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77

88
public abstract class HypertextBase : Text, IPointerClickHandler
99
{
10+
Canvas _rootCanvas;
11+
Canvas RootCanvas { get { return _rootCanvas ?? (_rootCanvas = GetComponentInParent<Canvas>()); } }
12+
1013
const int CharVertsNum = 6;
1114
readonly List<ClickableEntry> _entries = new List<ClickableEntry>();
1215
static readonly ObjectPool<List<UIVertex>> _verticesPool = new ObjectPool<List<UIVertex>>(null, l => l.Clear());
13-
Canvas _rootCanvas;
14-
Canvas RootCanvas { get { return _rootCanvas ?? (_rootCanvas = GetComponentInParent<Canvas>()); } }
1516

1617
struct ClickableEntry
1718
{

0 commit comments

Comments
 (0)