public static GameObject CreatePrefab(string path, GameObject go, [DefaultValue("ReplacePrefabOptions.Default")] ReplacePrefabOptions options) { GameObject result; if (!Paths.CheckValidAssetPathAndThatDirectoryExists(path, ".prefab")) { result = null; } else { result = PrefabUtility.Internal_CreatePrefab(path, go, options); } return(result); }
public static GameObject CreatePrefab(string path, GameObject go, [DefaultValue("ReplacePrefabOptions.Default")] ReplacePrefabOptions options) { GameObject result; if (!Paths.IsValidAssetPathWithErrorLogging(path, ".prefab")) { result = null; } else { result = PrefabUtility.Internal_CreatePrefab(path, go, options); } return(result); }
private static GameObject Internal_CreatePrefab(string path, GameObject go) { ReplacePrefabOptions options = ReplacePrefabOptions.Default; return(PrefabUtility.Internal_CreatePrefab(path, go, options)); }