/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { var other = obj as RendererKun; if (other == null) { return(false); } #if UNITY_2019_1_OR_NEWER if (!m_forceRenderingOff.Equals(other.m_forceRenderingOff)) { return(false); } if (!m_rayTracingMode.Equals(other.m_rayTracingMode)) { return(false); } #endif if (!m_allowOcclusionWhenDynamic.Equals(other.m_allowOcclusionWhenDynamic)) { return(false); } if (m_bounds != null && !m_bounds.Equals(other.m_bounds)) { return(false); } if (!m_enabled.Equals(other.m_enabled)) { return(false); } if (!m_isPartOfStaticBatch.Equals(other.m_isPartOfStaticBatch)) { return(false); } if (!m_isVisible.Equals(other.m_isVisible)) { return(false); } if (!m_lightmapIndex.Equals(other.m_lightmapIndex)) { return(false); } if (m_lightmapScaleOffset != null && !m_lightmapIndex.Equals(other.m_lightmapIndex)) { return(false); } if (m_lightProbeProxyVolumeOverride != null && !m_lightProbeProxyVolumeOverride.Equals(other.m_lightProbeProxyVolumeOverride)) { return(false); } if (!m_lightProbeUsage.Equals(other.m_lightProbeUsage)) { return(false); } if (m_localToWorldMatrix != null && !m_localToWorldMatrix.Equals(other.m_localToWorldMatrix)) { return(false); } if (m_material != null && !m_material.Equals(other.m_material)) { return(false); } if (m_materials != null) { if (m_materials.Length != other.m_materials.Length) { return(false); } for (var i = 0; i < m_materials.Length; i++) { if (!m_materials[i].Equals(other.m_materials[i])) { return(false); } } } if (!m_motionVectorGenerationMode.Equals(other.m_motionVectorGenerationMode)) { return(false); } if (m_probeAnchor != null && !m_probeAnchor.Equals(other.m_probeAnchor)) { return(false); } if (!m_realtimeLightmapIndex.Equals(other.m_realtimeLightmapIndex)) { return(false); } if (m_realtimeLightmapScaleOffset != null && !m_realtimeLightmapScaleOffset.Equals(other.m_realtimeLightmapScaleOffset)) { return(false); } if (!m_receiveShadows.Equals(other.m_receiveShadows)) { return(false); } if (!m_reflectionProbeUsage.Equals(other.m_reflectionProbeUsage)) { return(false); } if (!m_rendererPriority.Equals(other.m_rendererPriority)) { return(false); } if (!m_renderingLayerMask.Equals(other.m_renderingLayerMask)) { return(false); } if (!m_shadowCastingMode.Equals(other.m_shadowCastingMode)) { return(false); } if (!MaterialKun.Equals(m_sharedMaterial, other.m_sharedMaterial)) { return(false); } if (m_sharedMaterials != null) { if (!m_sharedMaterials.Length.Equals(other.m_sharedMaterials.Length)) { return(false); } for (var i = 0; i < m_sharedMaterials.Length; i++) { if (!m_sharedMaterials[i].Equals(other.m_sharedMaterials[i])) { return(false); } } } if (!m_sortingLayerID.Equals(other.m_sortingLayerID)) { return(false); } if (!string.Equals(m_sortingLayerName, other.m_sortingLayerName)) { return(false); } if (!m_sortingOrder.Equals(other.m_sortingOrder)) { return(false); } if (!Matrix4x4Kun.Equals(m_worldToLocalMatrix, other.m_worldToLocalMatrix)) { return(false); } return(base.Equals(obj)); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { var other = obj as SkinnedMeshRendererKun; if (other == null) { return(false); } if (m_bones == null && other.m_bones != null) { return(false); } if (m_bones != null && other.m_bones == null) { return(false); } if (m_bones != null) { if (m_bones.Length.Equals(other.m_bones.Length) == false) { return(false); } for (var i = 0; i < m_bones.Length; i++) { if (m_bones[i].Equals(other.m_bones[i]) == false) { return(false); } } } if (forceMatrixRecalculationPerRender.Equals(other.forceMatrixRecalculationPerRender) == false) { return(false); } if (m_localBounds == null && other.m_localBounds != null) { return(false); } if (m_localBounds != null && other.m_localBounds == null) { return(false); } if (m_localBounds != null) { if (m_localBounds.Equals(other.m_localBounds) == false) { return(false); } } if (quality.Equals(other.quality) == false) { return(false); } if (sharedMesh.Equals(other.sharedMesh) == false) { return(false); } if (skinnedMotionVectors.Equals(other.skinnedMotionVectors) == false) { return(false); } if (updateWhenOffscreen.Equals(other.updateWhenOffscreen) == false) { return(false); } return(base.Equals(obj)); }