private static FindContent ( string contentName ) : |
||
contentName | string | |
리턴 |
private static GUIContent FindContent(string contentName)
{
Texture image = null;
if (EditorGUIUtility.isProSkin)
{
image = EditorGUIUtility.Load("Graph/Dark/" + contentName) as Texture;
}
if (image == null)
{
image = EditorGUIUtility.Load("Graph/Light/" + contentName) as Texture;
}
if (image == null)
{
Debug.LogError("Unable to load " + contentName);
return new GUIContent(contentName);
}
return new GUIContent(image);
}
static Styles() { Styles.graphBackground = "flow background"; Styles.connectionTexture = Styles.FindContent("flow connection texture.png"); Styles.selectedConnectionTexture = Styles.FindContent("flow selected connection texture.png"); Styles.varPinIn = "flow varPin in"; Styles.varPinOut = "flow varPin out"; Styles.varPinTooltip = "flow varPin tooltip"; Styles.targetPinIn = "flow target in"; Styles.triggerPinIn = "flow triggerPin in"; Styles.triggerPinOut = "flow triggerPin out"; Styles.selectionRect = "SelectionRect"; Styles.nodeTitlebar = "flow node titlebar"; Styles.nodeAddButton = "Label"; Styles.m_NodeStyleCache = new Dictionary <string, GUIStyle>(); Styles.nodeGroupButton = new GUIStyle(EditorStyles.toolbarButton) { alignment = TextAnchor.MiddleLeft }; }