public void OnAfterDeserialize() { // Upgrade from no serialized version if (m_ComponentVersion == ComponentVersions.Version_Unserialized) { ShadowUtility.ComputeBoundingSphere(m_ShapePath, out m_ProjectedBoundingSphere); m_ComponentVersion = ComponentVersions.Version_1; } }
ICollection <ComponentVersionInfo> GetUsefulComponentVersions() { if (ComponentVersions == null) { return(new ComponentVersionInfo[0]); } return(ComponentVersions .Where(x => x != null && !String.IsNullOrEmpty(x.ComponentName) && !String.IsNullOrEmpty(x.Version)) .ToArray()); }
public void AddVersionInfo(string name, string version) { foreach (var item in ComponentVersions) { if (item.Name == name) { item.Version = version; OnPropertyChanged("ComponentVersions"); return; } } ComponentVersionInfo info = new ComponentVersionInfo(); info.Name = name; info.Version = version; ComponentVersions.Add(info); }
public void OnAfterDeserialize() { #if UNITY_EDITOR // Upgrade from no serialized version if (m_ComponentVersion == ComponentVersions.Version_Unserialized) { if (m_UpscaleRT) { m_GridSnapping = GridSnapping.UpscaleRenderTexture; } else if (m_PixelSnapping) { m_GridSnapping = GridSnapping.PixelSnapping; } if (m_CropFrameX && m_CropFrameY) { if (m_StretchFill) { m_CropFrame = CropFrame.StretchFill; } else { m_CropFrame = CropFrame.Windowbox; } } else if (m_CropFrameX) { m_CropFrame = CropFrame.Pillarbox; } else if (m_CropFrameY) { m_CropFrame = CropFrame.Letterbox; } else { m_CropFrame = CropFrame.None; } m_ComponentVersion = ComponentVersions.Version_1; } #endif }
public void AddVersionInfo(string name, string version) { foreach (ComponentVersionInfo item in ComponentVersions) { if (item.Name == name) { item.Version = version; OnPropertyChanged(nameof(ComponentVersions)); return; } } ComponentVersionInfo info = new ComponentVersionInfo { Name = name, Version = version }; ComponentVersions.Add(info); }
public void OnBeforeSerialize() { m_ComponentVersion = k_CurrentComponentVersion; }
public void OnBeforeSerialize() { #if UNITY_EDITOR m_ComponentVersion = k_CurrentComponentVersion; #endif }