Forum rules - please read before posting.

Easy way to replace placeholder game objects?

Hi! I'm in the middle of constructing a 3D adventure game and am nearing the point where my placeholder cubes will need to be replaced by the actual game objects. Usually what we do at my workplace is simply create a new game object and copy the relevant components over from the placeholder, but in this case that would break a great deal of references in hotspots, interactions, action lists, etc. (and I don't know how it would affect the remember scripts/constant IDs). What's the best solution here?

Right now I'm thinking I'll have to make the game objects children of my placeholder cubes and remove the mesh-related components from the cubes, which does work... but my boss is hoping there's a better way, especially considering this will be a mobile game and we'd like to keep things as simple as possible. Is there?

Comments

  • I should think you could also just copy the "proper" meshes/components onto the root placeholders after removing the placeholder components - no need to attach them as children.

    This is partly a general Unity-related workflow issue.  There's various schools of thought on the matter, but I believe the "proper" way to work is to make all placeholders prefabs, and then update/replace the prefabs.

    Those without Constant ID components should be fairly simple - just make the placeholder object a prefab, then make the correct object in the scene and drag it over the prefab to replace it.

    Those with Constant ID numbers will be more tricky because you'll need to ensure each object has the same ID number as before.  Though a little long-winded, the safest way to do that would be to note the number before making the placehold prefab, then remove the component and add it on again to the scene-instance of the replaced prefab - setting the ID number manually to its original value.
  • That makes sense; I'll be sure to note all the IDs. Thank you for the quick response! Both times I've had a question here, you've answered it right away, and I appreciate that.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.