Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Building save system but getting error CS0029

Discussion in 'Scripting' started by fepsdominguez, May 12, 2021.

  1. fepsdominguez

    fepsdominguez

    Joined:
    Feb 4, 2021
    Posts:
    1
    Hello. I am attempting to make a save system in order to save inventory. I think I am close to getting it done but I keep getting the following error:

    Error CS0029 Cannot implicitly convert type 'InventoryItemWeapon' to 'UnityEngine.GameObject'

    I just want to see if there is any way around it. Thanks.
     
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,657
    Could you please attach your code?

    Be sure to use Code tags when pasting code into your post.
     
  3. MartinMa_

    MartinMa_

    Joined:
    Jan 3, 2021
    Posts:
    455
    try write behind your line with InventoryItemWeapon
    Code (CSharp):
    1. as GameObject