Search Unity

DataObjects VS GameObjects: Why DataObjects Aren't transferible or visible from the editor?

Discussion in '2D' started by Obsdark, Sep 19, 2017.

  1. Obsdark

    Obsdark

    Joined:
    Jan 10, 2016
    Posts:
    4
    You see, for some reason, when i want to make a non-gameObject object (i.e. DataObject) in a script to be used outside of that script, the object "cease to exist", a good example of this is what the editor shows related to them:

    Hierarchy.PNG

    Did you see that Tile slot in the Prefab Adapt script?, did you see than on that slot is shown like none Tile exist there? well, that happend to me every time i want to make a DataObject accesible through a public variable to be used from another script.

    I like to take that Tile DataObject programatically from another script, did you know some way to make sure the script doesn't eliminate that DataObject so to be used from another script in the future?

    Thanks in advance.