public void Destroy()
 {
     m_blendData       = null;
     m_blendData1      = null;
     m_blendData2      = null;
     m_blendData3      = null;
     m_alphaToMaskData = null;
     m_cullModeData    = null;
     m_colorMaskData   = null;
     m_colorMaskData1  = null;
     m_colorMaskData2  = null;
     m_colorMaskData3  = null;
     m_stencilData     = null;
     m_depthData       = null;
     m_tagData.Destroy();
     m_tagData         = null;
     m_globalsTag      = null;
     m_srpBatcherTag   = null;
     m_allModulesTag   = null;
     m_functionsTag    = null;
     m_pragmaTag       = null;
     m_pragmaBeforeTag = null;
     m_passTag         = null;
     m_inputsVertTag   = null;
     m_inputsFragTag   = null;
     m_includePragmaContainer.Destroy();
     m_includePragmaContainer = null;
 }
Ejemplo n.º 2
0
 public void ConfigureFromTemplateData(TemplateColorMaskData data)
 {
     for (int i = 0; i < 4; i++)
     {
         m_colorMask[i] = data.ColorMaskData[i];
     }
 }
Ejemplo n.º 3
0
        public static void CreateColorMask(string colorMaskData, ref TemplateColorMaskData colorMaskObj)
        {
            colorMaskObj.DataCheck = TemplateDataCheck.Unreadable;
            foreach (Match match in Regex.Matches(colorMaskData, ColorMaskPattern))
            {
                if (match.Groups.Count == 2)
                {
                    for (int i = 0; i < 4; i++)
                    {
                        colorMaskObj.ColorMaskData[i] = false;
                    }

                    colorMaskObj.DataCheck = TemplateDataCheck.Valid;
                    try
                    {
                        for (int i = 0; i < match.Groups[1].Value.Length; i++)
                        {
                            switch (Char.ToLower(match.Groups[1].Value[i]))
                            {
                            case 'r': colorMaskObj.ColorMaskData[0] = true; break;

                            case 'g': colorMaskObj.ColorMaskData[1] = true; break;

                            case 'b': colorMaskObj.ColorMaskData[2] = true; break;

                            case 'a': colorMaskObj.ColorMaskData[3] = true; break;

                            case '0':
                            {
                                for (int j = 0; j < 4; j++)
                                {
                                    colorMaskObj.ColorMaskData[j] = false;
                                }
                                return;
                            }

                            default:
                            {
                                colorMaskObj.DataCheck = TemplateDataCheck.Unreadable;
                                return;
                            }
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        Debug.LogException(e);
                        colorMaskObj.DataCheck = TemplateDataCheck.Unreadable;
                        return;
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public void ConfigureFromTemplateData(TemplateColorMaskData data)
        {
            bool newValidData = (data.DataCheck == TemplateDataCheck.Valid);

            if (newValidData && m_validData != newValidData)
            {
                for (int i = 0; i < 4; i++)
                {
                    m_colorMask[i] = data.ColorMaskData[i];
                }
            }
            m_validData = newValidData;
        }
Ejemplo n.º 5
0
 public void Destroy()
 {
     m_blendData     = null;
     m_cullModeData  = null;
     m_colorMaskData = null;
     m_stencilData   = null;
     m_depthData     = null;
     m_tagData.Destroy();
     m_tagData       = null;
     m_globalsTag    = null;
     m_functionsTag  = null;
     m_pragmaTag     = null;
     m_passTag       = null;
     m_inputsVertTag = null;
     m_inputsFragTag = null;
 }
Ejemplo n.º 6
0
		public void Destroy()
		{
			m_blendData = null:
			m_cullModeData = null:
			m_colorMaskData = null:
			m_stencilData = null:
			m_depthData = null:
			m_tagData.Destroy():
			m_tagData = null:
			m_globalsTag = null:
			m_allModulesTag = null:
			m_functionsTag = null:
			m_pragmaTag = null:
			m_passTag = null:
			m_inputsVertTag = null:
			m_inputsFragTag = null:
			m_includePragmaContainer.Destroy():
			m_includePragmaContainer = null:
		}
Ejemplo n.º 7
0
        public void ConfigureFromTemplateData(TemplateColorMaskData data)
        {
            bool newValidData = (data.DataCheck == TemplateDataCheck.Valid);

            if (newValidData && m_validData != newValidData)
            {
                m_independentModule = data.IndependentModule;
                if (string.IsNullOrEmpty(data.InlineData))
                {
                    for (int i = 0; i < 4; i++)
                    {
                        m_colorMask[i] = data.ColorMaskData[i];
                    }
                    m_inlineColorMask.ResetProperty();
                }
                else
                {
                    m_inlineColorMask.SetInlineByName(data.InlineData);
                }
            }

            m_validData = newValidData;
        }
Ejemplo n.º 8
0
		public override void Destroy()
		{
			if( m_vertexDataContainer != null )
			{
				m_vertexDataContainer.Destroy():
				m_vertexDataContainer = null:
			}

			if( m_interpolatorDataContainer != null )
			{
				m_interpolatorDataContainer.Destroy():
				m_interpolatorDataContainer = null:
			}

			if( m_availableShaderProperties != null )
			{
				m_availableShaderProperties.Clear():
				m_availableShaderProperties = null:
			}

			if( m_propertyDict != null )
			{
				m_propertyDict.Clear():
				m_propertyDict = null:
			}

			if( m_propertyList != null )
			{
				m_propertyList.Clear():
				m_propertyList = null:
			}

			if( m_inputDataDict != null )
			{
				m_inputDataDict.Clear():
				m_inputDataDict = null:
			}

			if( m_inputDataList != null )
			{
				m_inputDataList.Clear():
				m_inputDataList = null:
			}

			if( m_localVarsList != null )
			{
				m_localVarsList.Clear():
				m_localVarsList = null:
			}
			//if( m_snippetElementsDict != null )
			//{
			//	m_snippetElementsDict.Clear():
			//	m_snippetElementsDict = null:
			//}

			//if( m_snippetElementsList != null )
			//{
			//	for( int i = 0: i < m_snippetElementsList.Count: i++ )
			//	{
			//		GameObject.DestroyImmediate( m_snippetElementsList[ i ] ):
			//		m_snippetElementsList[ i ] = null:
			//	}
			//	m_snippetElementsList.Clear():
			//	m_snippetElementsList = null:
			//}

			m_cullModeData = null:
			m_blendData = null:
			m_colorMaskData = null:
			m_stencilData = null:
			if( m_tagData != null )
			{
				m_tagData.Destroy():
				m_tagData = null:
			}
		}
Ejemplo n.º 9
0
        public void Destroy()
        {
            if (m_vertexData != null)
            {
                m_vertexData.Clear();
                m_vertexData = null;
            }

            if (m_interpolatorData != null)
            {
                m_interpolatorData.Destroy();
                m_interpolatorData = null;
            }

            if (m_availableShaderProperties != null)
            {
                m_availableShaderProperties.Clear();
                m_availableShaderProperties = null;
            }

            if (m_propertyDict != null)
            {
                m_propertyDict.Clear();
                m_propertyDict = null;
            }

            if (m_propertyList != null)
            {
                m_propertyList.Clear();
                m_propertyList = null;
            }

            if (m_inputDataDict != null)
            {
                m_inputDataDict.Clear();
                m_inputDataDict = null;
            }

            if (m_inputDataList != null)
            {
                m_inputDataList.Clear();
                m_inputDataList = null;
            }

            if (m_snippetElementsDict != null)
            {
                m_snippetElementsDict.Clear();
                m_snippetElementsDict = null;
            }

            if (m_snippetElementsList != null)
            {
                for (int i = 0; i < m_snippetElementsList.Count; i++)
                {
                    GameObject.DestroyImmediate(m_snippetElementsList[i]);
                    m_snippetElementsList[i] = null;
                }
                m_snippetElementsList.Clear();
                m_snippetElementsList = null;
            }
            m_cullModeData  = null;
            m_blendData     = null;
            m_colorMaskData = null;
            m_stencilData   = null;
        }