|
|
@ -18,7 +18,7 @@ namespace Fungus |
|
|
|
GameObject prefab = Resources.LoadAssetAtPath("Assets/Fungus/Camera/Prefabs/" + prefabName + ".prefab", typeof(GameObject)) as GameObject; |
|
|
|
GameObject prefab = Resources.LoadAssetAtPath("Assets/Fungus/Camera/Prefabs/" + prefabName + ".prefab", typeof(GameObject)) as GameObject; |
|
|
|
if (prefab != null) |
|
|
|
if (prefab != null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
GameObject go = GameObject.Instantiate(prefab) as GameObject; |
|
|
|
GameObject go = PrefabUtility.InstantiatePrefab(prefab) as GameObject; |
|
|
|
go.name = prefabName; |
|
|
|
go.name = prefabName; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|