示例#1
0
            public override bool Equals(object obj)
            {
                var other = obj as Property;

                if (other == null)
                {
                    return(false);
                }
#if UNITY_2019_1_OR_NEWER
                if (flags.Equals(other.flags) == false)
                {
                    return(false);
                }
                if (type.Equals(other.type) == false)
                {
                    return(false);
                }
#endif
                if (dirty.Equals(other.dirty) == false)
                {
                    return(false);
                }

                if (!ColorKun.Equals(m_colorValue, other.m_colorValue))
                {
                    return(false);
                }

                if (!string.Equals(displayName, other.displayName))
                {
                    return(false);
                }

                if (floatValue.Equals(other.floatValue) == false)
                {
                    return(false);
                }

                if (!string.Equals(name, other.name))
                {
                    return(false);
                }
                if (nameId.Equals(other.nameId) == false)
                {
                    return(false);
                }

                if (!Vector2Kun.Equals(m_rangeLimits, other.m_rangeLimits))
                {
                    return(false);
                }

                if (textureDimension.Equals(other.textureDimension) == false)
                {
                    return(false);
                }

                if (!TextureKun.Equals(m_textureValue, other.m_textureValue))
                {
                    return(false);
                }

                if (!Vector4Kun.Equals(m_vectorValue, other.m_vectorValue))
                {
                    return(false);
                }

                if (!Vector2Kun.Equals(m_scale, other.m_scale))
                {
                    return(false);
                }

                if (!Vector2Kun.Equals(m_offset, other.m_offset))
                {
                    return(false);
                }
                return(true);
            }
示例#2
0
        /// <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_color != null && !m_color.Equals(other.m_color))
            {
                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);
        }
示例#3
0
        public override bool Equals(object obj)
        {
            var other = obj as CameraKun;

            if (other == null)
            {
                return(false);
            }
            if (clearFlags != other.clearFlags)
            {
                return(false);
            }
            if (m_backgroundColor.Equals(other.m_backgroundColor) == false)
            {
                return(false);
            }
            if (cullingMask.Equals(other.cullingMask) == false)
            {
                return(false);
            }
            if (orthographic.Equals(other.orthographic) == false)
            {
                return(false);
            }
            if (orthographicSize.Equals(other.orthographicSize) == false)
            {
                return(false);
            }
            if (fieldOfView.Equals(other.fieldOfView) == false)
            {
                return(false);
            }
            if (usePhysicalProperties.Equals(other.usePhysicalProperties) == false)
            {
                return(false);
            }
            if (focalLength.Equals(other.focalLength) == false)
            {
                return(false);
            }
            if (sensorType.Equals(other.sensorType) == false)
            {
                return(false);
            }
            if (m_lensShift.Equals(other.m_lensShift) == false)
            {
                return(false);
            }
            if (gateFit.Equals(other.gateFit) == false)
            {
                return(false);
            }
            if (nearClipPlane.Equals(other.nearClipPlane) == false)
            {
                return(false);
            }
            if (farClipPlane.Equals(other.farClipPlane) == false)
            {
                return(false);
            }
            if (m_rect.Equals(other.m_rect) == false)
            {
                return(false);
            }
            if (depth.Equals(other.depth) == false)
            {
                return(false);
            }
            if (renderingPath.Equals(other.renderingPath) == false)
            {
                return(false);
            }
            if (useOcclusionCulling.Equals(other.useOcclusionCulling) == false)
            {
                return(false);
            }
            if (allowHDR.Equals(other.allowHDR) == false)
            {
                return(false);
            }
            if (allowMSAA.Equals(other.allowMSAA) == false)
            {
                return(false);
            }
            if (allowDynamicResolution.Equals(other.allowDynamicResolution) == false)
            {
                return(false);
            }
            if (targetEye.Equals(other.targetEye) == false)
            {
                return(false);
            }
            return(base.Equals(obj));
        }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public override bool Equals(object other)
        {
            var otherKun = other as LightKun;

            if (otherKun == null)
            {
                return(false);
            }
#if UNITY_2019_1_OR_NEWER
            if (lightShape != otherKun.lightShape)
            {
                return(false);
            }
            if (colorTemperature.Equals(otherKun.colorTemperature) == false)
            {
                return(false);
            }
            if (useColorTemperature.Equals(otherKun.useColorTemperature) == false)
            {
                return(false);
            }
            if (renderingLayerMask.Equals(otherKun.renderingLayerMask) == false)
            {
                return(false);
            }
#endif
            if (lightType.Equals(otherKun.lightType) == false)
            {
                return(false);
            }
            if (range.Equals(otherKun.range) == false)
            {
                return(false);
            }
            if (spotAngle.Equals(otherKun.spotAngle) == false)
            {
                return(false);
            }
            if (innerSpotAngle.Equals(otherKun.innerSpotAngle) == false)
            {
                return(false);
            }
            if (cookieSize.Equals(otherKun.cookieSize) == false)
            {
                return(false);
            }


            if (!ColorKun.Equals(m_colorKun, otherKun.m_colorKun))
            {
                return(false);
            }

            if (intensity.Equals(otherKun.intensity) == false)
            {
                return(false);
            }
            if (bounceIntensity.Equals(otherKun.bounceIntensity) == false)
            {
                return(false);
            }
            if (cookie.Equals(otherKun.cookie) == false)
            {
                return(false);
            }
            if (shadowsType.Equals(otherKun.shadowsType) == false)
            {
                return(false);
            }
            if (shadowsStrength.Equals(otherKun.shadowsStrength) == false)
            {
                return(false);
            }
            if (shadowsResolution.Equals(otherKun.shadowsResolution) == false)
            {
                return(false);
            }
            if (shadowsBias.Equals(otherKun.shadowsBias) == false)
            {
                return(false);
            }
            if (shadowsNormalBias.Equals(otherKun.shadowsNormalBias) == false)
            {
                return(false);
            }
            if (shadowsNearPlane.Equals(otherKun.shadowsNearPlane) == false)
            {
                return(false);
            }
            if (halo.Equals(otherKun.halo) == false)
            {
                return(false);
            }
            if (flare.Equals(otherKun.flare) == false)
            {
                return(false);
            }
            if (renderMode.Equals(otherKun.renderMode) == false)
            {
                return(false);
            }
            if (cullingMask.Equals(otherKun.cullingMask) == false)
            {
                return(false);
            }
            return(true);
        }