/// <summary> /// Determines if the Probe Reference Volume Profile is equivalent to another one. /// </summary> /// <param name ="otherProfile">The profile to compare with.</param> /// <returns>Whether the Probe Reference Volume Profile is equivalent to another one.</returns> public bool IsEquivalent(ProbeReferenceVolumeProfile otherProfile) { return(minDistanceBetweenProbes == otherProfile.minDistanceBetweenProbes && cellSizeInMeters == otherProfile.cellSizeInMeters && simplificationLevels == otherProfile.simplificationLevels && renderersLayerMask == otherProfile.renderersLayerMask); }
/// <summary> /// Determines if the Probe Reference Volume Profile is equivalent to another one. /// </summary> /// <param name ="otherProfile">The profile to compare with.</param> /// <returns>Whether the Probe Reference Volume Profile is equivalent to another one.</returns> public bool IsEquivalent(ProbeReferenceVolumeProfile otherProfile) { return(minDistanceBetweenProbes == otherProfile.minDistanceBetweenProbes && cellSize == otherProfile.cellSize && maxSubdivision == otherProfile.maxSubdivision && normalBias == otherProfile.normalBias); }
void OnEnable() { #if UNITY_EDITOR if (m_Profile == null) { m_Profile = CreateReferenceVolumeProfile(gameObject.scene, gameObject.name); } #endif QueueAssetLoading(); }
void OnValidate() { if (!enabled || !gameObject.activeSelf) { return; } if (m_Profile != null) { m_PrevProfile = m_Profile; } if (volumeAsset != m_PrevAsset && m_PrevAsset != null) { ProbeReferenceVolume.instance.AddPendingAssetRemoval(m_PrevAsset); } if (volumeAsset != m_PrevAsset) { QueueAssetLoading(); } m_PrevAsset = volumeAsset; }
internal void StoreProfileData(ProbeReferenceVolumeProfile profile) { cellSizeInBricks = profile.cellSizeInBricks; simplificationLevels = profile.simplificationLevels; minDistanceBetweenProbes = profile.minDistanceBetweenProbes; }