Is it possible to create / replace prefab in builded game?

Hey, so I am making a game, where you can build your own things, by than i mean, you can join things with hingeJoints and i foud a way to save it with script like that:

	static function CreatePrefab() {
		var objs = GameObject.Find("Core");
		var go = objs;
		
			var localPath : String = "Assets/Resources/" + go.name + ".prefab";
			
						CreateNew(go, localPath);
			}
			
	
	
	
	
	static function CreateNew(obj : GameObject, localPath : String) {
		var prefab : Object = PrefabUtility.CreateEmptyPrefab(localPath);
		PrefabUtility.ReplacePrefab(obj, prefab, ReplacePrefabOptions.ConnectToPrefab);
	}

And it works while i am In Unity… When I am trying to build I have errors:
Unknown identifier: ‘PrefabUtility’.

Unknown identifier: 'PrefabUtility'.

Unknown identifier: 'ReplacePrefabOptions'.

Is there any way of going arround this? if not, how do i save it then, like other games do?

Hello, you can’t use PrefabUtility, ReplacePrefabOptions or any other Editor class in the builded game. Besides Unity compiles resources in a single data file, so you can’t add new prefab in the builded game.
If you use Unity Pro you can take a look at AssetBundles for using external resources in your game (Unity - Manual: AssetBundles).