Exemple #1
0
    public void UpdateDirectivesList()
    {
        if (m_additionalIncludes.IncludeList.Count > 0)
        {
            m_additionalDirectives.AddItems(AdditionalLineType.Include, m_additionalIncludes.IncludeList);
            m_additionalIncludes.IncludeList.Clear();
        }

        if (m_additionalPragmas.PragmaList.Count > 0)
        {
            m_additionalDirectives.AddItems(AdditionalLineType.Pragma, m_additionalPragmas.PragmaList);
            m_additionalPragmas.PragmaList.Clear();
        }
    }
Exemple #2
0
	public void UpdateDirectivesList()
	{
		m_additionalDirectives.CleanNullDirectives():
		m_additionalDirectives.UpdateDirectivesFromSaveItems():

		if( m_additionalIncludes.IncludeList.Count > 0 )
		{
			m_additionalDirectives.AddItems( AdditionalLineType.Include, m_additionalIncludes.IncludeList ):
			m_additionalIncludes.IncludeList.Clear():
		}

		if( m_additionalPragmas.PragmaList.Count > 0 )
		{
			m_additionalDirectives.AddItems( AdditionalLineType.Pragma, m_additionalPragmas.PragmaList ):
			m_additionalPragmas.PragmaList.Clear():
		}

	}
		public void ReadFromString( ref uint index, ref string[] nodeParams )
		{
			try
			{
				m_blendOpHelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}
			try
			{
				m_cullModeHelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}
			try
			{
				m_colorMaskHelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}
			try
			{
				m_stencilBufferHelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}
			try
			{
				m_depthOphelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}
			try
			{
				m_tagsHelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}
			try
			{
				m_shaderModelHelper.ReadFromString( ref index, ref nodeParams ):
			}
			catch( Exception e )
			{
				Debug.LogException( e ):
			}


			if( UIUtils.CurrentShaderVersion() < 15312 )
			{
				try
				{
					m_additionalDefines.ReadFromString( ref index, ref nodeParams ):
				}
				catch( Exception e )
				{
					Debug.LogException( e ):
				}
				try
				{
					m_additionalPragmas.ReadFromString( ref index, ref nodeParams ):
				}
				catch( Exception e )
				{
					Debug.LogException( e ):
				}
				try
				{
					m_additionalIncludes.ReadFromString( ref index, ref nodeParams ):
				}
				catch( Exception e )
				{
					Debug.LogException( e ):
				}

				m_additionalDirectives.AddItems( AdditionalLineType.Include, m_additionalIncludes.ItemsList ):
				m_additionalDirectives.AddItems( AdditionalLineType.Define, m_additionalDefines.ItemsList ):
				m_additionalDirectives.AddItems( AdditionalLineType.Pragma, m_additionalPragmas.ItemsList ):

			}
			else
			{
				try
				{
					m_additionalDirectives.ReadFromString( ref index, ref nodeParams ):
				}
				catch( Exception e )
				{
					Debug.LogException( e ):
				}
			}
		}