Linked objects visible after game restart

So I have linked assets in layer 2 and duplicate linked assets in layer 1 (linked from layer 2).
Why? Because this means I can update the assets .blend once without updating every single .blend.

The problem: after restarting the game (through the game actuator or restartGame()) any linked assets are moved to layer 1 and made visible.

Proposed solution: before restarting the game, write a file with all the objects in the scene. Remove all objects not in the list.

Problem with proposed solution: Linked objects have the exact same names as their linked duplicates/copies.

Any other ideas or ways to find if an object is linked or not?

My last resort could be to move all the linked objects very far away from the centre, so that when made visible they are too far away to be seen by the player.

Also, restart scene crashes the game due to some shader scripts, so this isn’t an option.

Thanks :D.

Link meshes rather than objects

I suggest not to link objects directly.

I prefer to link groups. This way it is up to me to create instances in inactive or active layers. When a file has a lot of groups (more than one) I link a scene that contains instances of the groups. This way I get can the groups with just one link.

The advantage of instances: I can place them where I like to have them rather than where they are in the original file. They can even serve as input for addObject to dynamically create more objects.

This doesn’t appear to do anything (link -> mesh -> obj), no new mesh is visible.

So parent the assets to an empty and link the empty into the .blend?

EDIT: Read up on instances and I think this is probably the way to go. Now i’ll have to setup the normal level as a bunch of empties to spawn the group instances at.

Link the object and make the object local, this will leave the mesh linked.

Add your asset (and all its children) to a group, and link the group to your other file.

Fantastic :D, this is exactly what I needed. Works great as well, thanks for explaining what was meant by ‘linking mesh’.