/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { var other = obj as ShaderKunPacket; if (other == null) { return(false); } if (shaderKuns != null) { if (other.shaderKuns == null) { return(false); } if (shaderKuns.Length != other.shaderKuns.Length) { return(false); } for (var i = 0; i < shaderKuns.Length; i++) { if (!ShaderKun.Equals(shaderKuns[i], other.shaderKuns[i])) { return(false); } } } return(true); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { var other = obj as MaterialKun; if (other == null) { return(false); } if (!m_doubleSidedGI.Equals(other.m_doubleSidedGI)) { return(false); } if (!m_enableInstancing.Equals(other.m_enableInstancing)) { return(false); } if (!m_globalIlluminationFlags.Equals(other.m_globalIlluminationFlags)) { return(false); } if (!m_mainTexPropIdx.Equals(other.m_mainTexPropIdx)) { return(false); } if (!m_passCount.Equals(other.m_passCount)) { return(false); } if (!m_renderQueue.Equals(other.m_renderQueue)) { return(false); } if (m_shader != null && !m_shader.Equals(other.m_shader)) { return(false); } if (m_shaderKeywords != null) { if (m_shaderKeywords.Length != other.m_shaderKeywords.Length) { return(false); } for (var i = 0; i < m_shaderKeywords.Length; i++) { if (!m_shaderKeywords[i].Equals(other.m_shaderKeywords[i])) { return(false); } } } if (m_propertys != null) { if (m_propertys.Length != other.m_propertys.Length) { return(false); } for (var i = 0; i < m_propertys.Length; i++) { if (!m_propertys[i].Equals(other.m_propertys[i])) { return(false); } } } return(true); }