Пример #1
0
        protected static void CreateAsset(string resourcePathWithoutExtension)
        {
            string assetPath = string.Format(RESOURCE_PATH_SOURCE, resourcePathWithoutExtension);
            ResourceSingleton <TResource> resource = CreateInstance <ResourceSingleton <TResource> >();

            AssetDatabase.CreateAsset(resource, assetPath);
            EditorUtility.DisplayDialog("Asset Created", string.Format("Asset has been added at '{0}'", assetPath),
                                        "OK");
        }