File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Assets/Scripts/Utils/Html Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
2+ using TMPro ;
23using UnityEngine ;
34
45namespace FairyGUI . Utils
@@ -14,15 +15,25 @@ public class HtmlPageContext : IHtmlPageContext
1415 Stack < IHtmlObject > _selectPool ;
1516 Stack < IHtmlObject > _linkPool ;
1617
17- public static HtmlPageContext inst = new HtmlPageContext ( ) ;
18+ static HtmlPageContext _inst ;
19+
20+ public static HtmlPageContext inst
21+ {
22+ get
23+ {
24+ if ( _inst == null )
25+ _inst = new HtmlPageContext ( ) ;
26+ return _inst ;
27+ }
28+ }
1829
1930 static Transform _poolManager ;
2031
2132#if UNITY_2019_3_OR_NEWER
2233 [ RuntimeInitializeOnLoadMethod ( RuntimeInitializeLoadType . SubsystemRegistration ) ]
2334 static void InitializeOnLoad ( )
2435 {
25- inst = new HtmlPageContext ( ) ;
36+ _inst = null ;
2637 _poolManager = null ;
2738 }
2839#endif
You can’t perform that action at this time.
0 commit comments