Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[SOLVED]Prefab.cs warning CS0618 (Obsolete)

Discussion in 'Prefabs' started by Vanabee, Dec 24, 2019.

  1. Vanabee

    Vanabee

    Joined:
    Oct 28, 2018
    Posts:
    5
    Hi all,

    Android build, 2D
    After uploading/downloading while collaborating with co-worker we started to get this warning:

    Assets\Tiled2Unity\Scripts\Editor\ImportTiled2Unity.Prefab.cs(93,31): warning CS0618: 'PrefabUtility.CreateEmptyPrefab(string)' is obsolete: 'The concept of creating a completely empty Prefab has been discontinued. You can however use SaveAsPrefabAsset with an empty GameObject.'

    Assets\Tiled2Unity\Scripts\Editor\ImportTiled2Unity.Prefab.cs(97,66): warning CS0618: 'ReplacePrefabOptions' is obsolete: 'This has turned into the more explicit APIs, SavePrefabAsset, SaveAsPrefabAsset, SaveAsPrefabAssetAndConnect'

    Assets\Tiled2Unity\Scripts\Editor\ImportTiled2Unity.Prefab.cs(97,13): warning CS0618: 'PrefabUtility.ReplacePrefab(GameObject, Object, ReplacePrefabOptions)' is obsolete: 'Use SaveAsPrefabAsset or SaveAsPrefabAssetAndConnect with a path instead.'

    How can i narrow it down(Debug) what causing this warning and how to get rid of it?

    Is it possible that warning occurs because we both using different versions of Unity?
    My version - 2019.2.16f1
    Co-Workers - 2019.2.0

    Thanks in advance.

    EDIT: I did find out that my co-worker installed custom (obsolete) package that was causing a problem.
    If moderators could remove this thread i would really appreciate this.
    Sorry for the trouble and Merry Christmas everyone! :)
     
    Last edited: Dec 24, 2019
    iankf2008 likes this.
unityunity