static string[] OnWillSaveAssets(string[] paths) { foreach (string path in paths) { // Detect when we save project and write our HDRP version at this time. if (path == "ProjectSettings/ProjectSettings.asset") { // Update current project version with HDRP version HDRPVersion.WriteCurrentHDRPProjectVersion(); } } return(paths); }
static public void UpdateMaterialToNewerVersion() { // Add here all the material upgrade function supported in this version // Caution: All the functions here MUST be re-entrant (call multiple time) without failing. float currentVersion = HDRPVersion.GetCurrentHDRPProjectVersion(); if (currentVersion < 1.0) { // Appear in hdrp version 1.0 UpdateMaterialToNewerVersion("(EmissiveColor)", UpdateMaterial_EmissiveColor, UpdateMaterialFile_EmissiveColor); } }