/// <summary> /// Awake this instance. /// </summary> void Start() { if (Loom.Current == null) { Loom.Initialize(); } vti_textOptions.layout.SizeChanged += OnSizeChanged; vti_textOptions.layout.MajorChanged += OnMajorLayoutChanged; vti_textOptions.parameter.BevelChanged += OnBevelChanged; vti_textOptions.parameter.DepthChanged += OnDepthChanged; vti_textOptions.parameter.UseLightProbesChanged += OnUseLightProbesChanged; vti_textOptions.parameter.FontNameChanged += OnFontNameChanged; foreach (VTextInterface vi in vti_time) { vi.parameter.UseLightProbes = true; } vti_textOptions.parameter.UseLightProbes = true; vti_textured.parameter.UseLightProbes = true; // init alignment old_headingValue = (int)VTextLayout.align.Center; SetAlignment(VTextLayout.align.Center); SetSize(0.4f); // init size SetDepth(0.1f); // init depth SetBevel(0.6f); // init bevel SetFont(vti_textOptions.parameter.Fontname); // init font type if (FontNameChanged != null) { FontNameChanged.Invoke(this, new GenericEventArgs <string>(vti_textOptions.parameter.Fontname)); } }
/// <summary> /// this is called if the current used fontname changes /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> void OnFontNameChanged(object sender, GenericEventArgs <string> e) { if (FontNameChanged != null) { FontNameChanged.Invoke(this, e); } }