浏览代码

Remove wrong use of EditorUtility.SetDirty

/main
RSlysz 6 年前
当前提交
bfb1d222
共有 4 个文件被更改,包括 2 次插入12 次删除
  1. 3
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/EditorReflectionSystem.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Handles.cs
  3. 7
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs
  4. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ProxyVolumeUI.cs

3
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/EditorReflectionSystem.cs


AssetDatabase.ImportAsset(path);
probe.customTexture = AssetDatabase.LoadAssetAtPath<Texture2D>(path);
EditorUtility.SetDirty(probe);
}
public static void BakeAllPlanarReflectionProbes()

{
bakedTexture = new Texture2D(rt.width, rt.height, TextureFormat.RGBAHalf, true, false);
probe.bakedTexture = bakedTexture;
EditorUtility.SetDirty(probe);
}
ReflectionSystem.Render(probe, rt);

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Handles.cs


//call modification to legacy ReflectionProbe
probe.influenceVolume.offset = newOffset;
EditorUtility.SetDirty(probe);
}
}
break;

7
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs


}
s.data.Apply();
EditorUtility.SetDirty(sourceAsset);
}
}

positive = blendDistancePositive;
negative = blendDistanceNegative;
EditorUtility.SetDirty(sourceAsset);
}
}

s.data.sphereBlendDistance.floatValue = Mathf.Clamp(s.data.sphereBlendDistance.floatValue, 0, radius);
s.data.sphereBlendNormalDistance.floatValue = Mathf.Clamp(s.data.sphereBlendNormalDistance.floatValue, 0, radius);
s.data.Apply();
EditorUtility.SetDirty(sourceAsset);
}
}

Undo.RecordObject(sourceAsset, "Modified Influence volume");
radius = Mathf.Clamp(baseRadius - b.radius, 0, baseRadius);
EditorUtility.SetDirty(sourceAsset);
}
}
}

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ProxyVolumeUI.cs


proxyVolume.sphereRadius = s.sphereProjectionHandle.radius;
//the gizmo is not an object of the scene. Flag it as dirty
EditorUtility.SetDirty(sourceAsset);
}
}

proxyVolume.boxSize = s.boxProjectionHandle.size;
//the gizmo is not an object of the scene. Flag it as dirty
EditorUtility.SetDirty(sourceAsset);
}
}
正在加载...
取消
保存