Prefab, undo and other stuff

Hi all

First of all, killer product, this unity. Really great. It makes a lot of things a lot easier than most products out there. That said, I must admit that I have had my share of those experiences which make you question the software at its core.

First of all: Undo… How can you reach a version 2 of a piece of software, without having such a basic functionality just working. That is simply just bad. I mean, if I suddenly delete an object in the scene, I can’t undo it. Two times have I had to reload an old version of my scene, because I accidently deleted an object, and couldn’t undo it. Other things as well is not undoable. Is there some sort of logic behind what you can undo, and what you can’t? Or do you just have to wish for good luck, whenever you do something, and hope you can undo it?

Second: I might not understnad this whole prefab thing completely, but I know that I loose it all the time. Sometimes I get a warning, other times it is just lost, and I have to reload an old scene.

I.e. if I copy an object with a prefab connection, the prefab is lost. Maybe…sometimes it is not. If I want to add a collider to an object with a prefab connection, the prefab is lost. Why is that?
If I have this big scene (which I have) and want to add some components to objects inside it, it seems I have to do it on copies. Whenever I add stuff on the original objects, the prefab is lost. And I don’t get it. I mean, I have a mesh from 3dsmax, imported to the unity engine. Why does the prefab have to be lost, no matter what components I add on top? I mean, it’s not like I change the basic mesh.

As it is now, the prefab has been lost again, because I wanted to dublicate an object. Why? All unity needs to do is to make a new connection between the original mesh, and a new engine object. I don’t get it… How do I dublicate an object, maintaining a connection to the original mesh?

Other than that, I find the product great. This is just some things which get on my nerves…

Hi there,

and welcome :wink:

Concerning undo: I agree that it would be very cool to have it. But at the same time, I think it’s incredibly difficult to implement. Now that the Asset Server is available, I think the importance of Undo has dimished quite a bit, even though “instant undo” obviously still would be very nice. In a complex environment, however, which is what Unity projects are, I feel that a proper version control being set up correctly and used wisely is something that Undo could never do. Of course, using Unity with the Asset Server is a different league from Indie concerning licensing costs - but given the time you can save with such a setup, I think it’s worth every penny…

To me, that’s not an Undo replacement, but it’s something I consider a lot more important…

Personally, if I was to decide whether the UT people should implement Undo or some other feature, I would - by now - put Undo on a somewhat lower priority (it got on my nerves, too, but only for a few days :wink: ).

For the workflow, you can “play around” with many parameters while playing, which is automatically reset to the original values when you stop playing. That doesn’t replace what undo does (and can sometimes be annoying when you forgot to hit “stop” :wink: - and I don’t think you can delete objects and get them back that way…), but I think it’s a very nice feature that does something others might “misuse” Undo for (change something, see what happens, undo if you don’t like the changes).

Concerning the prefabs: At first, this really bugged me, too. But it’s just something one has to use for a while to work with smoothly.

First of all: When you break the prefab connection, you can very easily re-establish it by using “Game Object / Apply Changes to Prefab”. So, for instance, if you’re working on a prefab, and realize “oh, I want to add these components and these objects”, you just break the prefab by adding the components, and then re-establish it with “Apply Changes to Prefab” when you’re done. I think it’s written down in the manual, but I remember that I missed that at first, and I found it just as annoying as you seem to be :wink:

What usually is a very good idea is using a lot of “empty game objects” and putting stuff below those game objects in the hierarchy. So the game object just has the transform, and maybe some scripts attached (that control the object), and the other stuff is one level below (like models that you have imported). Then, the “root game objects” are what you put into the prefabs. I just found out that this helps keeping things “clean” and it gives you much more freedom when changing things.

I’m not exactly sure what happens with the object duplication… When I duplicate a prefab (the root object), there’s no problem. Of course, when you duplicate an object inside of a prefab, the connection breaks - but that is easily solved by “Apply Changes to Prefab” (just make sure to do that on the “prefab root object”… I don’t know what happens to an object somewhere in the hierachy below the prefab).

Maybe “Apply Changes to Prefab” is what you were missing?

Sunny regards,
Jashan