public override void ReadFromString(ref string[] nodeParams) { base.ReadFromString(ref nodeParams); m_selectedTriplanarType = ( TriplanarType )Enum.Parse(typeof(TriplanarType), GetCurrentParam(ref nodeParams)); m_selectedTriplanarSpace = ( TriplanarSpace )Enum.Parse(typeof(TriplanarSpace), GetCurrentParam(ref nodeParams)); m_normalCorrection = Convert.ToBoolean(GetCurrentParam(ref nodeParams)); m_tempTopInspectorName = GetCurrentParam(ref nodeParams); m_tempTopName = GetCurrentParam(ref nodeParams); m_tempTopDefaultValue = ( TexturePropertyValues )Enum.Parse(typeof(TexturePropertyValues), GetCurrentParam(ref nodeParams)); m_tempTopOrderIndex = Convert.ToInt32(GetCurrentParam(ref nodeParams)); m_tempTopDefaultTexture = AssetDatabase.LoadAssetAtPath <Texture2D>(GetCurrentParam(ref nodeParams)); m_tempMidInspectorName = GetCurrentParam(ref nodeParams); m_tempMidName = GetCurrentParam(ref nodeParams); m_tempMidDefaultValue = ( TexturePropertyValues )Enum.Parse(typeof(TexturePropertyValues), GetCurrentParam(ref nodeParams)); m_tempMidOrderIndex = Convert.ToInt32(GetCurrentParam(ref nodeParams)); m_tempMidDefaultTexture = AssetDatabase.LoadAssetAtPath <Texture2D>(GetCurrentParam(ref nodeParams)); m_tempBotInspectorName = GetCurrentParam(ref nodeParams); m_tempBotName = GetCurrentParam(ref nodeParams); m_tempBotDefaultValue = ( TexturePropertyValues )Enum.Parse(typeof(TexturePropertyValues), GetCurrentParam(ref nodeParams)); m_tempBotOrderIndex = Convert.ToInt32(GetCurrentParam(ref nodeParams)); m_tempBotDefaultTexture = AssetDatabase.LoadAssetAtPath <Texture2D>(GetCurrentParam(ref nodeParams)); if (UIUtils.CurrentShaderVersion() > 6102) { m_propertyInspectorName = GetCurrentParam(ref nodeParams); } SetTitleText(m_propertyInspectorName); ConfigurePorts(); }
void DrawMainOptions() { EditorGUI.BeginChangeCheck(); m_propertyInspectorName = EditorGUILayoutTextField("Name", m_propertyInspectorName); m_selectedTriplanarType = ( TriplanarType )EditorGUILayoutEnumPopup("Mapping", m_selectedTriplanarType); m_selectedTriplanarSpace = ( TriplanarSpace )EditorGUILayoutEnumPopup("Space", m_selectedTriplanarSpace); m_normalCorrection = EditorGUILayoutToggle("Normal Map", m_normalCorrection); if (EditorGUI.EndChangeCheck()) { SetTitleText(m_propertyInspectorName); ConfigurePorts(); ReRegisterPorts(); } }