public override System.Collections.Generic.IEnumerator <byte> Auth(string key, ServiceItem serviceItem) { #if FACEBOOK_ANALYTICS_API var connected = false; if (FB.IsInitialized == true) { FB.ActivateApp(); connected = true; } else { FB.Init(() => { FB.ActivateApp(); connected = true; }); } while (connected == false) { yield return(0); } var rootScreenId = FlowSystem.GetRootWindow(); var eventName = "Application Start"; FB.LogAppEvent(eventName, 1f, new Dictionary <string, object>() { { "Root Screen", rootScreenId }, { "Platform", Application.platform.ToString() } }); #endif yield return(0); }
public override IEnumerator Auth(string key) { var rootScreenId = FlowSystem.GetRootWindow(); var eventName = "Application Start"; UnityEngine.Analytics.Analytics.CustomEvent(eventName, new Dictionary <string, object>() { { "Root Screen", rootScreenId } }); yield return(false); }
public override System.Collections.Generic.IEnumerator <byte> Auth(string key, ServiceItem serviceItem) { #if UNITY_ANALYTICS_API var rootScreenId = FlowSystem.GetRootWindow(); var eventName = "Application Start"; UnityEngine.Analytics.Analytics.CustomEvent(eventName, new Dictionary <string, object>() { { "Root Screen", rootScreenId }, { "Platform", Application.platform.ToString() } }); #endif yield return(0); }
public override System.Collections.Generic.IEnumerator <byte> Auth(string key, ServiceItem serviceItem) { #if FACEBOOK_ANALYTICS_API System.Action onInited = () => { var rootScreenId = FlowSystem.GetRootWindow(); var eventName = "Application Start"; FB.LogAppEvent(eventName, 1f, new Dictionary <string, object>() { { "Root Screen", rootScreenId }, { "Platform", Application.platform.ToString() } }); Debug.LogWarning("Facebook Analytics Application Start"); }; if (FB.IsInitialized == true) { FB.ActivateApp(); onInited.Invoke(); } else { FB.Init(() => { if (FB.IsInitialized == true) { FB.ActivateApp(); onInited.Invoke(); } else { Debug.LogError("Failed to Initialize the Facebook SDK"); } }); } #endif yield return(0); }
public GUIStyle GetEditorStyle(bool selected) { if (this.IsSmall() == true) { // Yellow if (string.IsNullOrEmpty(this.smallStyleDefault) == true) { this.smallStyleDefault = "flow node 4"; } if (string.IsNullOrEmpty(this.smallStyleSelected) == true) { this.smallStyleSelected = "flow node 4 on"; } var style = ME.Utilities.CacheStyle("FlowWindow.GetEditorStyle.SmallStyle.NotSelected", this.smallStyleDefault, (styleName) => { var _style = WindowLayoutStyles.styles.GetInstanceByName(styleName); _style.padding = new RectOffset(0, 0, 14, 1); _style.contentOffset = new Vector2(0f, -15f); _style.fontStyle = FontStyle.Bold; _style.alignment = TextAnchor.UpperCenter; _style.normal.textColor = Color.black; //_style.normal.background = this.GetTexture_INTERNAL(styleName, 1f); return(_style); }); var styleSelected = ME.Utilities.CacheStyle("FlowWindow.GetEditorStyle.SmallStyle.Selected", this.smallStyleSelected, (styleName) => { var _style = WindowLayoutStyles.styles.GetInstanceByName(styleName); _style.padding = new RectOffset(0, 0, 14, 1); _style.contentOffset = new Vector2(0f, -15f); _style.fontStyle = FontStyle.Bold; _style.alignment = TextAnchor.UpperCenter; _style.normal.textColor = Color.black; //_style.normal.background = this.GetTexture_INTERNAL(styleName, 1f); return(_style); }); return(selected ? styleSelected : style); } else if (this.IsContainer() == true) { var styleNormal = string.Empty; //var styleSelected = string.Empty; // Compiled - Blue styleNormal = "flow node 0"; //styleSelected = "flow node 0 on"; if (this.IsValidToCompile() == false) { // Not Valid styleNormal = "flow node 6"; //styleSelected = "flow node 6 on"; } var containerStyle = ME.Utilities.CacheStyle(string.Format("FlowWindow.GetEditorStyle.Container.{0}.{1}", this.randomColor.ToString(), this.randomColor.r + this.randomColor.g + this.randomColor.b), styleNormal, (styleName) => { var _style = WindowLayoutStyles.styles.GetInstanceByName(styleName); _style.padding = new RectOffset(0, 0, 16, 1); _style.contentOffset = new Vector2(0f, -15f); _style.fontStyle = FontStyle.Bold; _style.alignment = TextAnchor.UpperCenter; _style.normal.textColor = Color.white; _style.normal.background = this.GetTexture_INTERNAL(this.randomColor, 0.2f); return(_style); }); return(containerStyle); } else { var styleNormal = string.Empty; var styleSelected = string.Empty; //if (this.compiled == true) { var functionWindow = this.GetFunctionContainer(); var isFunction = functionWindow != null; var isRoot = (isFunction == true && functionWindow.functionRootId == this.id); var isExit = (isFunction == true && functionWindow.functionExitId == id); if (FlowSystem.GetRootWindow() == this.id || (isFunction == true && (isRoot == true || isExit == true))) { if (isFunction == true && isExit == true) { // Function exit point - Green styleNormal = "flow node 3"; styleSelected = "flow node 3 on"; } else if (isFunction == true && isRoot == true) { // Function root - Yellow styleNormal = "flow node 4"; styleSelected = "flow node 4 on"; } else { // Root - Orange styleNormal = "flow node 5"; styleSelected = "flow node 5 on"; } } else if (FlowSystem.GetDefaultWindows().Contains(this.id) == true) { // Default - Cyan styleNormal = "flow node 2"; styleSelected = "flow node 2 on"; } else { // Compiled - Blue styleNormal = "flow node 1"; styleSelected = "flow node 1 on"; } /*} else { * * // Not Compiled - Gray * styleNormal = "flow node 0"; * styleSelected = "flow node 0 on"; * * }*/ if (this.IsValidToCompile() == false) { // Not Valid styleNormal = "flow node 6"; styleSelected = "flow node 6 on"; } var windowStyle = ME.Utilities.CacheStyle("FlowWindow.GetEditorStyle.Window.Selected", styleNormal, (styleName) => { var _style = WindowLayoutStyles.styles.GetInstanceByName(styleName); /*_style.fontStyle = FontStyle.Bold; * _style.margin = new RectOffset(0, 0, 0, 0); * _style.padding = new RectOffset(0, 0, 5, 4); * _style.alignment = TextAnchor.UpperLeft; * _style.contentOffset = new Vector2(5f, 0f);*/ _style.padding = new RectOffset(0, 0, 14, 1); _style.contentOffset = new Vector2(0f, -15f); _style.fontStyle = FontStyle.Bold; _style.alignment = TextAnchor.UpperCenter; _style.normal.textColor = Color.black; //_style.normal.background = this.GetTexture_INTERNAL(styleName, 1f); return(_style); }); var windowStyleSelected = ME.Utilities.CacheStyle("FlowWindow.GetEditorStyle.Window.NotSelected", styleSelected, (styleName) => { var _style = WindowLayoutStyles.styles.GetInstanceByName(styleName); /*_style.fontStyle = FontStyle.Bold; * _style.margin = new RectOffset(0, 0, 0, 0); * _style.padding = new RectOffset(0, -1, 5, 4); * _style.alignment = TextAnchor.UpperLeft; * _style.contentOffset = new Vector2(5f, 0f);*/ _style.padding = new RectOffset(0, 0, 14, 1); _style.contentOffset = new Vector2(0f, -15f); _style.fontStyle = FontStyle.Bold; _style.alignment = TextAnchor.UpperCenter; _style.normal.textColor = Color.black; //_style.normal.background = this.GetTexture_INTERNAL(styleName, 1f); return(_style); }); return(selected ? windowStyleSelected : windowStyle); } }