/// <summary> /// 导出Prefab时触发 /// </summary> public virtual void OnExportPrefab() { SceneUnit[] units = transform.GetComponentsInChildren <SceneUnit>(); for (int iUnit = 0; iUnit < units.Length; iUnit++) { SceneUnit iterSceneUnit = units[iUnit]; if (iterSceneUnit != this) { DestroyImmediate(units[iUnit]); } } }
private static bool IsPrefabOverrideModification(PropertyModification propertyModification, SceneUnit sceneUnit) { bool isOverrideModification; if (propertyModification.target == sceneUnit) { isOverrideModification = false; } else { isOverrideModification = true; } return(isOverrideModification); }