Open MR-Alex42 opened 6 years ago
Yeah, I have been thinking about these for a while, but I haven't fully gotten to this yet. I have several ideas on how this should work within context of Neos, but needs some more more thought.
For example, should the prefabs be applied across all worlds? Meaning if the prefab is stored in the cloud, it will affect every single experience linking that prefab?
Another thing is how will it maintain the links to the prefabs. What if parts of the data tree are deleted/moved/inserted? How about performance memory implications?
Generally prefabs are going to be updated rarely, so the performance/memory cost should be in the update process, with as little in using and spawning them.
Also I'd like to implement this in a way that would allow implicit spawning, which would save on bandwidth, but it has further considerations.
For example, should the prefabs be applied across all worlds?
Please no. I think being able to copy things to their own worlds is a huge benefit of Neos, and if someone changes the original to a penis... well, you can imagine the consequences.
@sirkitree Yeah that's a good point :D Although I imagine both workflows would be necessary. Say you're making a game that's composed of dozens of worlds and you want to update an enemy that's in most of them. You'd want those changes to apply across your experiences.
There would be a way to break the reference to the original or create your own duplicate of it. But it should be designed in a way that makes it clear which one is happening with some sensible defaults.
Maybe just by author then?
If I import an asset, and use it in multiple worlds, only I can replace it across all of my worlds.
If someone copies that asset and uses it in their own worlds, they could update it across their worlds, but I cannot update that same asset that they copied into their worlds.
Yeah that sounds like a good default. If you take someone else's template/prefab, it'll make a copy of it for you (and similarly if someone else takes that, it'll make a copy for them) first and use that for instancing.
But if you want (and trust the author), you'll be able to say that you want the reference remain to the original.
Currently you need to apply a change of properties to each and every object separately. It would be much more efficient if a user could organize objects into groups and apply a change to all members of the group. Another way to achieve this would be to introduce a concept like Unity prefabs. If the prefab changes all instances of the prefab change as well.