Пример #1
0
        static public CustomAsset CreateInternalCustomAsset(Type type, Process <CustomAsset> process)
        {
            CustomAsset asset = ScriptableObject.CreateInstance(type) as CustomAsset;

            process(asset);
            asset.SaveNewAsset(Filename.MakeUnusedFilename(Project.GetInternalAssetDirectory(), "asset"));
            return(asset);
        }
Пример #2
0
        static private void CreateEmptyPrefab()
        {
            GameObject game_object = new GameObject();

            PrefabUtility.SaveAsPrefabAsset(
                game_object,
                Filename.MakeUnusedFilename(Project.GetCurrentDirectory(), "New Prefab", "prefab")
                );

            game_object.DestroyAdvisory();
        }
Пример #3
0
 static public string MakeUnusedCurrentDirectoryFilename(string base_name, string extension)
 {
     return(Filename.MakeUnusedFilename(GetCurrentDirectory(), base_name, extension));
 }