Пример #1
0
		public static void ShowWindow (Graph graph, IExposedGuid gen, IOutlet<object> layer, FieldInfo field, Vector2 pos)
		{
			ExposeWindow window = ScriptableObject.CreateInstance(typeof(ExposeWindow)) as ExposeWindow;

			if (layer != null  &&  layer is IExposedGuid expLayer) window.obj = expLayer;
			else window.obj = gen;

			window.graph = graph;
			window.field = field;
			window.customName = field.Name.Nicify();
			window.ShowUtility();

			Vector2 windowSize = new Vector2(300, 100);
			window.position = new Rect(
				pos - windowSize/2,
				windowSize);
		}