示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        private static GameObject Internal_CreatePrefab(string path, GameObject go)
        {
            ReplacePrefabOptions options = ReplacePrefabOptions.Default;

            return(PrefabUtility.Internal_CreatePrefab(path, go, options));
        }