mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
Fixed #190 - OnWillDeleteAsset() conflicts with lighting data regeneration
This commit is contained in:
parent
085906efd2
commit
810960e4a6
@ -1,5 +1,6 @@
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace XNodeEditor {
|
namespace XNodeEditor {
|
||||||
/// <summary> Deals with modified assets </summary>
|
/// <summary> Deals with modified assets </summary>
|
||||||
@ -9,6 +10,9 @@ namespace XNodeEditor {
|
|||||||
/// This is important to do, because you can't delete null sub assets.
|
/// This is important to do, because you can't delete null sub assets.
|
||||||
/// <para/> For another workaround, see: https://gitlab.com/RotaryHeart-UnityShare/subassetmissingscriptdelete </summary>
|
/// <para/> For another workaround, see: https://gitlab.com/RotaryHeart-UnityShare/subassetmissingscriptdelete </summary>
|
||||||
private static AssetDeleteResult OnWillDeleteAsset (string path, RemoveAssetOptions options) {
|
private static AssetDeleteResult OnWillDeleteAsset (string path, RemoveAssetOptions options) {
|
||||||
|
// Skip processing anything without the .cs extension
|
||||||
|
if (Path.GetExtension(path) != ".cs") return AssetDeleteResult.DidNotDelete;
|
||||||
|
|
||||||
// Get the object that is requested for deletion
|
// Get the object that is requested for deletion
|
||||||
UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath<UnityEngine.Object> (path);
|
UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath<UnityEngine.Object> (path);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user