public UUebViewCore(IUUebView uuebView, IPluggable plugin = null, ResourceLoader.MyHttpRequestHeaderDelegate requestHeader = null, ResourceLoader.MyHttpResponseHandlingDelegate httpResponseHandlingDelegate = null, Action <List <ParseError> > onParseFailed = null) { if (plugin == null) { plugin = new DefaultBehaviour(); } this.view = uuebView; resLoader = new ResourceLoader(this.LoadParallel, requestHeader, httpResponseHandlingDelegate); this.view.AddChild(resLoader.cacheBox.transform); layoutMachine = new LayoutMachine(resLoader, plugin); materializeMachine = new MaterializeMachine(resLoader, plugin); if (onParseFailed != null) { this.onParseFailed = onParseFailed; } else { this.onParseFailed = errors => { Debug.LogError("parse errors:" + errors.Count); foreach (var error in errors) { Debug.LogError("code:" + error.code + " reason:" + error.reason); } }; } }
public TMProPlugin() { defaultBehaviour = new DefaultBehaviour(); }