Replacing prefabAssetPath with assetPath for PrefabStage to stop warning (#2210)

This commit is contained in:
James Frowen 2020-09-03 07:48:06 +01:00 committed by GitHub
parent 1ade82d435
commit ad8af783dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,7 +680,12 @@ void SetupIDs()
//logger.Log(name + " @ scene: " + gameObject.scene.name + " sceneid reset to 0 because CurrentPrefabStage=" + PrefabStageUtility.GetCurrentPrefabStage() + " PrefabStage=" + PrefabStageUtility.GetPrefabStage(gameObject)); //logger.Log(name + " @ scene: " + gameObject.scene.name + " sceneid reset to 0 because CurrentPrefabStage=" + PrefabStageUtility.GetCurrentPrefabStage() + " PrefabStage=" + PrefabStageUtility.GetPrefabStage(gameObject));
// NOTE: might make sense to use GetPrefabStage for asset // NOTE: might make sense to use GetPrefabStage for asset
// path, but let's not touch it while it works. // path, but let's not touch it while it works.
#if UNITY_2020_1_OR_NEWER
string path = PrefabStageUtility.GetCurrentPrefabStage().assetPath;
#else
string path = PrefabStageUtility.GetCurrentPrefabStage().prefabAssetPath; string path = PrefabStageUtility.GetCurrentPrefabStage().prefabAssetPath;
#endif
AssignAssetID(path); AssignAssetID(path);
} }
} }