mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-15 12:29:49 +07:00
fix 2019 deprecation warnings
This commit is contained in:
@@ -57,14 +57,12 @@ namespace FTEditor.Editors {
|
|||||||
if ( clip_go ) {
|
if ( clip_go ) {
|
||||||
var prefab_path = GetPrefabPath(clip);
|
var prefab_path = GetPrefabPath(clip);
|
||||||
if ( !string.IsNullOrEmpty(prefab_path) ) {
|
if ( !string.IsNullOrEmpty(prefab_path) ) {
|
||||||
var prefab = AssetDatabase.LoadMainAssetAtPath(prefab_path);
|
prefab_path = AssetDatabase.GenerateUniqueAssetPath(prefab_path);
|
||||||
if ( !prefab ) {
|
#if UNITY_2018_3_OR_NEWER
|
||||||
prefab = PrefabUtility.CreateEmptyPrefab(prefab_path);
|
result = PrefabUtility.SaveAsPrefabAsset(clip_go, prefab_path);
|
||||||
}
|
#else
|
||||||
result = PrefabUtility.ReplacePrefab(
|
result = PrefabUtility.CreatePrefab(prefab_path, clip_go);
|
||||||
clip_go,
|
#endif
|
||||||
prefab,
|
|
||||||
ReplacePrefabOptions.ConnectToPrefab);
|
|
||||||
}
|
}
|
||||||
GameObject.DestroyImmediate(clip_go, true);
|
GameObject.DestroyImmediate(clip_go, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user