当前位置: 首页>>代码示例>>C#>>正文


C# Data.GetFunctionContainer方法代码示例

本文整理汇总了C#中UnityEngine.UI.Windows.Plugins.Flow.Data.GetFunctionContainer方法的典型用法代码示例。如果您正苦于以下问题:C# Data.GetFunctionContainer方法的具体用法?C# Data.GetFunctionContainer怎么用?C# Data.GetFunctionContainer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.UI.Windows.Plugins.Flow.Data的用法示例。


在下文中一共展示了Data.GetFunctionContainer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenerateReturnMethod

		public static string GenerateReturnMethod(FlowSystemEditorWindow flowEditor, FD.FlowWindow exitWindow) {
			
			var file = Resources.Load("UI.Windows/Functions/Templates/TemplateReturnMethod") as TextAsset;
			if (file == null) {
				
				Debug.LogError("Functions Template Loading Error: Could not load template 'TemplateReturnMethod'");
				
				return string.Empty;
				
			}
			
			var data = FlowSystem.GetData();
			if (data == null) return string.Empty;
			
			var result = string.Empty;
			var part = file.text;

			var functionContainer = exitWindow.GetFunctionContainer();

			var functionName = functionContainer.title;
			var functionCallName = functionContainer.directory;
			var classNameWithNamespace = Tpl.GetNamespace(exitWindow) + "." + Tpl.GetDerivedClassName(exitWindow);
			
			result +=
				part.Replace("{FUNCTION_NAME}", functionName)
					.Replace("{FUNCTION_CALL_NAME}", functionCallName)
					.Replace("{CLASS_NAME_WITH_NAMESPACE}", classNameWithNamespace);
			
			return result;
			
		}
开发者ID:RuFengLau,项目名称:Unity3d.UI.Windows,代码行数:31,代码来源:FunctionsAddon.cs

示例2: DrawWindowToolbar


//.........这里部分代码省略.........
						}
						
					} else {
						
						if (GUILayout.Button("Cancel", buttonStyle) == true) {
							
							this.WaitForAttach(-1);
							
						}
						
					}
					
				} else {
					
					if (window.IsSmall() == false ||
					    window.IsFunction() == true ||
					    window.IsABTest() == true) {
						
						if (GUILayout.Button("Attach/Detach", buttonStyle) == true) {
							
							this.ShowNotification(new GUIContent("Use Attach/Detach buttons to Connect/Disconnect a window"));
							this.WaitForAttach(id);
							
						}
						
					}

				}
				
				if (window.IsSmall() == false) {
					
					//var isExit = false;
					
					var functionWindow = window.GetFunctionContainer();
					if (functionWindow != null) {
						
						if (functionWindow.functionRootId == 0) functionWindow.functionRootId = id;
						if (functionWindow.functionExitId == 0) functionWindow.functionExitId = id;
						
						//isExit = (functionWindow.functionExitId == id);
						
					}
					
					var isRoot = (FlowSystem.GetRootWindow() == id || (functionWindow != null && functionWindow.functionRootId == id));
					if (GUILayout.Toggle(isRoot, new GUIContent("R", "Set as root"), buttonStyle) != isRoot) {
						
						if (functionWindow != null) {
							
							if (isRoot == true) {
								
								// Was root
								// Setup root for the first window in function
								functionWindow.functionRootId = window.id;
								
							} else {
								
								// Was not root
								// Setup as root but inside this function only
								functionWindow.functionRootId = window.id;
								
							}
							
						} else {
							
							if (isRoot == true) {
								
开发者ID:MJunak,项目名称:Unity3d.UI.Windows,代码行数:66,代码来源:EditorWindow.cs

示例3: OnCompilerTransitionGeneration

		public override string OnCompilerTransitionGeneration(FD.FlowWindow window) {
			
			var functionContainer = window.GetFunctionContainer();
			if (functionContainer != null) {
				
				var exit = FlowSystem.GetWindow(functionContainer.functionExitId);
				if (exit != null && exit.id == window.id) {
					
					return FlowFunctionsTemplateGenerator.GenerateReturnMethod(this.flowEditor, exit);
					
				}
				
			}

			return base.OnCompilerTransitionGeneration(window);

		}
开发者ID:MJunak,项目名称:Unity3d.UI.Windows,代码行数:17,代码来源:FunctionsAddon.cs


注:本文中的UnityEngine.UI.Windows.Plugins.Flow.Data.GetFunctionContainer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。